aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2016-01-28 15:16:02 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-01-28 15:30:52 +0000
commit84450b8c1a6d9a5cb47032d00aac851741fc94ad (patch)
tree7809356217eb02543e865c65d71bf4429d916eb1 /scripts
parent8fbc490ec71c927f54e6db752308adef93a64898 (diff)
*** Reason for rollback *** Issue that caused the rollback (#819) is resolved *** Original change description *** Automated [] rollback of []. *** Reason for rollback *** Prerequisite for rolling back j2objc base workspace change *** Original change description *** Remove base_workspace from bazel setup I also removed a couple places the documentation referred to it incorrectly. There are still a couple of blog posts that mention it, but that seemed okay. RELNOTES: A bazelrc with --package_path set is no longer required for Bazel to find its tools. This also means that building //...... -- MOS_MIGRATED_REVID=113259357
Diffstat (limited to 'scripts')
-rw-r--r--scripts/packages/BUILD52
-rw-r--r--scripts/packages/debian/bazel.bazelrc3
-rwxr-xr-xscripts/packages/template_bin.sh25
3 files changed, 9 insertions, 71 deletions
diff --git a/scripts/packages/BUILD b/scripts/packages/BUILD
index 86a3a1f5ae..554c626e72 100644
--- a/scripts/packages/BUILD
+++ b/scripts/packages/BUILD
@@ -93,64 +93,12 @@ pkg_tar(
)
pkg_tar(
- name = "bazel-tools",
- files = [
- "//third_party:srcs",
- "//third_party/java/jdk/langtools:srcs",
- "//tools:package-srcs",
- ],
- mode = "0644",
- modes = {f: "0755" for f in [
- # List made out of `find -type f -executable`
- "third_party/iossim/iossim",
- "third_party/ijar/test/zip_test.sh",
- "third_party/ijar/test/ijar_test.sh",
- "third_party/ijar/test/testenv.sh",
- "third_party/protobuf/protoc-osx-x86_32.exe",
- "third_party/protobuf/protoc-linux-x86_64.exe",
- "third_party/protobuf/protoc-osx-x86_64.exe",
- "third_party/protobuf/protoc-linux-x86_32.exe",
- "third_party/protobuf/protoc-windows-x86_32.exe",
- "third_party/protobuf/protoc-windows-x86_64.exe",
- "third_party/py/gflags/tests/flags_modules_for_testing/module_bar.py",
- "third_party/py/gflags/tests/flags_modules_for_testing/module_baz.py",
- "third_party/py/gflags/tests/flags_modules_for_testing/module_foo.py",
- "third_party/py/gflags/tests/gflags_helpxml_test.py",
- "third_party/py/gflags/tests/gflags_unittest.py",
- "third_party/py/gflags/tests/gflags_validators_test.py",
- "third_party/py/gflags/gflags2man.py",
- "third_party/py/gflags/setup.py",
- "third_party/py/gflags/debian/rules",
- "third_party/py/gflags/gflags_validators.py",
- "third_party/py/mock/setup.py",
- "tools/android/jack/fail.sh",
- "tools/android/shuffle_jars.sh",
- "tools/android/merge_dexzips.sh",
- "tools/android/idlclass.sh",
- "tools/android/aar_generator.sh",
- "tools/android/resources_processor.sh",
- "tools/j2objc/j2objc_wrapper.py",
- "tools/genrule/genrule-setup.sh",
- "tools/objc/j2objc_dead_code_pruner.py",
- "tools/python/2to3.sh",
- "tools/cpp/osx_gcc_wrapper.sh",
- "tools/test/test-setup.sh",
- "tools/jdk/ijar",
- "tools/build_defs/docker/testenv.sh",
- "tools/build_defs/docker/build_test.sh",
- ]},
- package_dir = "/usr/share/lib/bazel/tools",
- strip_prefix = "/",
-)
-
-pkg_tar(
name = "debian-data",
extension = "tar.gz",
deps = [
":bazel-bin",
":bazel-completion",
":bazel-rc",
- ":bazel-tools",
],
)
diff --git a/scripts/packages/debian/bazel.bazelrc b/scripts/packages/debian/bazel.bazelrc
index 594b54bca8..e69de29bb2 100644
--- a/scripts/packages/debian/bazel.bazelrc
+++ b/scripts/packages/debian/bazel.bazelrc
@@ -1,3 +0,0 @@
-build --package_path=%workspace%:/usr/share/lib/bazel/tools
-query --package_path=%workspace%:/usr/share/lib/bazel/tools
-fetch --package_path=%workspace%:/usr/share/lib/bazel/tools
diff --git a/scripts/packages/template_bin.sh b/scripts/packages/template_bin.sh
index d3f7d3b2ba..594a19c746 100755
--- a/scripts/packages/template_bin.sh
+++ b/scripts/packages/template_bin.sh
@@ -18,6 +18,7 @@
# 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"
@@ -33,11 +34,10 @@ function usage() {
echo "Usage: $progname [options]" >&2
echo "Options are:" >&2
echo " --prefix=/some/path set the prefix path (default=/usr/local)." >&2
- echo " --bazelrc= set the bazelrc path (default=/etc/bazel.bazelrc)." >&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 " --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
}
@@ -139,19 +139,12 @@ if [ -d "${base}" -a -x "${base}/bin/bazel" ]; then
rm -fr "${base}"
fi
-mkdir -p ${bin} ${base} ${base}/bin ${base}/etc ${base}/base_workspace
+mkdir -p ${bin} ${base} ${base}/bin ${base}/etc
echo -n .
unzip -q "${BASH_SOURCE[0]}" bazel bazel-real bazel-complete.bash -d "${base}/bin"
echo -n .
chmod 0755 "${base}/bin/bazel" "${base}/bin/bazel-real"
-unzip -q "${BASH_SOURCE[0]}" -x bazel bazel-real bazel-complete.bash -d "${base}/base_workspace"
-echo -n .
-cat >"${base}/etc/bazel.bazelrc" <<EO
-build --package_path %workspace%:${base}/base_workspace
-fetch --package_path %workspace%:${base}/base_workspace
-query --package_path %workspace%:${base}/base_workspace
-EO
echo -n .
chmod -R og-w "${base}"
chmod -R og+rX "${base}"
@@ -166,14 +159,14 @@ echo -n .
if [ -f "${bazelrc}" ]; then
echo
- echo "${bazelrc} already exists, ignoring. It is either a link to"
- echo "${base}/etc/bazel.bazelrc or that it's importing that file with:"
- echo " import ${base}/etc/bazel.bazelrc"
-else
- ln -s "${base}/etc/bazel.bazelrc" "${bazelrc}"
- 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}"
+echo .
+
cat <<EOF
Bazel is now installed!