aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/packages
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2016-05-23 15:20:50 +0000
committerGravatar Yue Gan <yueg@google.com>2016-05-23 15:28:11 +0000
commit02287b692acfb23ae5014e875f61d01835fbc8d8 (patch)
tree4ac85846bbb2e1486de90ad4771500c446badf98 /scripts/packages
parenta99d0df3a1abeddf8b9d889cd461062f969af453 (diff)
*** Reason for rollback *** This is a roll-forward of commit 009b48bcfaf4ebb17f9ab03bea9036cfa3c12ff0, making --bazelrc a no-op. *** Original change description *** Automated [] rollback of commit 009b48bcfaf4ebb17f9ab03bea9036cfa3c12ff0. *** Reason for rollback *** Broke bazel installation on ci.bazel.io, see http://ci.bazel.io/view/Bazel%20bootstrap%20and%20maintenance/job/Bazel-Install/578/console This change should make --bazelrc a non-op first to remove it. *** Original change description *** Remove .bazelrc This hasn't been used in several releases. -- MOS_MIGRATED_REVID=122998537
Diffstat (limited to 'scripts/packages')
-rw-r--r--scripts/packages/BUILD9
-rwxr-xr-xscripts/packages/template_bin.sh24
2 files changed, 4 insertions, 29 deletions
diff --git a/scripts/packages/BUILD b/scripts/packages/BUILD
index e2f5efef92..38fc2f3b15 100644
--- a/scripts/packages/BUILD
+++ b/scripts/packages/BUILD
@@ -65,14 +65,6 @@ pkg_tar(
strip_prefix = ".",
)
-pkg_tar(
- name = "bazel-rc",
- files = ["debian/bazel.bazelrc"],
- mode = "0644",
- package_dir = "/etc",
- strip_prefix = "debian",
-)
-
genrule(
name = "rename-bazel-completion",
srcs = ["//scripts:bash_completion"],
@@ -93,7 +85,6 @@ pkg_tar(
deps = [
":bazel-bin",
":bazel-completion",
- ":bazel-rc",
],
)
diff --git a/scripts/packages/template_bin.sh b/scripts/packages/template_bin.sh
index 5b1cfa943c..e4c9472fb7 100755
--- a/scripts/packages/template_bin.sh
+++ b/scripts/packages/template_bin.sh
@@ -18,8 +18,6 @@
# Installation and etc prefix can be overriden from command line
install_prefix=${1:-"/usr/local"}
-# TODO(kchodorow): delete by April 2016.
-bazelrc=${2:-"/etc/bazel.bazelrc"}
progname="$0"
@@ -36,16 +34,14 @@ function usage() {
echo " --prefix=/some/path set the prefix path (default=/usr/local)." >&2
echo " --bin= set the binary folder path (default=%prefix%/bin)." >&2
echo " --base= set the base install path (default=%prefix%/lib/bazel)." >&2
- echo " --bazelrc= set the path to bazelrc (default=/etc/bazelrc)." >&2
echo " --user configure for user install, expands to:" >&2
- echo ' --bin=$HOME/bin --base=$HOME/.bazel --bazelrc=$HOME/.bazelrc' >&2
+ echo ' --bin=$HOME/bin --base=$HOME/.bazel' >&2
exit 1
}
prefix="/usr/local"
bin="%prefix%/bin"
base="%prefix%/lib/bazel"
-bazelrc="/etc/bazel.bazelrc"
for opt in "${@}"; do
case $opt in
@@ -53,7 +49,8 @@ for opt in "${@}"; do
prefix="$(echo "$opt" | cut -d '=' -f 2-)"
;;
--bazelrc=*)
- bazelrc="$(echo "$opt" | cut -d '=' -f 2-)"
+ # TODO(kchodorow): remove once everything we're testing on CI contains
+ # this comment.
;;
--bin=*)
bin="$(echo "$opt" | cut -d '=' -f 2-)"
@@ -64,7 +61,6 @@ for opt in "${@}"; do
--user)
bin="$HOME/bin"
base="$HOME/.bazel"
- bazelrc="$HOME/.bazelrc"
;;
*)
usage
@@ -74,7 +70,6 @@ done
bin="${bin//%prefix%/${prefix}}"
base="${base//%prefix%/${prefix}}"
-bazelrc="${bazelrc//%prefix%/${prefix}}"
function test_write() {
local file="$1"
@@ -127,7 +122,6 @@ fi
# Test for write access
test_write "${bin}"
test_write "${base}"
-test_write "${bazelrc}"
# Do the actual installation
echo -n "Uncompressing."
@@ -153,17 +147,7 @@ echo -n .
ln -s "${base}/bin/bazel" "${bin}/bazel"
echo -n .
-if [ -f "${bazelrc}" ]; then
- echo
- echo "${bazelrc} already exists, moving it to ${bazelrc}.bak."
- mv "${bazelrc}" "${bazelrc}.bak"
-fi
-
-# Not necessary, but this way it matches the Debian package.
-touch "${bazelrc}"
-if [ "${UID}" -eq 0 ]; then
- chmod 0644 "${bazelrc}"
-else
+if [ "${UID}" -ne 0 ]; then
# Uncompress the bazel base install for faster startup time
"${bin}/bazel" help >/dev/null
fi