From 84450b8c1a6d9a5cb47032d00aac851741fc94ad Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Thu, 28 Jan 2016 15:16:02 +0000 Subject: Rollback of commit 14cf67863d56bab1eef11687a881adf323ba55ad. *** 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 --- compile.sh | 25 ++++------------- scripts/packages/BUILD | 52 ----------------------------------- scripts/packages/debian/bazel.bazelrc | 3 -- scripts/packages/template_bin.sh | 25 ++++++----------- site/docs/bazel-user-manual.html | 8 +++--- 5 files changed, 19 insertions(+), 94 deletions(-) diff --git a/compile.sh b/compile.sh index 1cc6ecf545..9f435e0b2b 100755 --- a/compile.sh +++ b/compile.sh @@ -27,30 +27,26 @@ cd "$(dirname "$0")" source scripts/bootstrap/buildenv.sh function usage() { - [ -n "${1:-build}" ] && echo "Invalid command(s): $1" >&2 + [ -n "${1:-compile}" ] && echo "Invalid command(s): $1" >&2 echo "syntax: $0 [command[,command]* [BAZEL_BIN [BAZEL_SUM]]]" >&2 echo " General purpose commands:" >&2 - echo " build = compile,init (default)" >&2 - echo " compile = compile a Bazel binary for usage" >&2 - echo " init = initialize the base workspace" >&2 + echo " compile = compile the bazel binary (default)" >&2 echo " Commands for developers:" >&2 - echo " all = build,determinism,test" >&2 + echo " all = compile,determinism,test" >&2 echo " determinism = test for stability of Bazel builds" >&2 echo " test = run the full test suite of Bazel" >&2 exit 1 } function parse_options() { - local keywords="(build|compile|init|all|determinism|bootstrap|test)" - COMMANDS="${1:-build}" + local keywords="(compile|all|determinism|bootstrap|test)" + COMMANDS="${1:-compile}" [[ "${COMMANDS}" =~ ^$keywords(,$keywords)*$ ]] || usage "$@" DO_COMPILE= DO_CHECKSUM= DO_FULL_CHECKSUM=1 DO_TESTS= - DO_BASE_WORKSPACE_INIT= - [[ "${COMMANDS}" =~ (compile|build|all) ]] && DO_COMPILE=1 - [[ "${COMMANDS}" =~ (init|build|all) ]] && DO_BASE_WORKSPACE_INIT=1 + [[ "${COMMANDS}" =~ (compile|all) ]] && DO_COMPILE=1 [[ "${COMMANDS}" =~ (bootstrap|determinism|all) ]] && DO_CHECKSUM=1 [[ "${COMMANDS}" =~ (bootstrap) ]] && DO_FULL_CHECKSUM= [[ "${COMMANDS}" =~ (test|all) ]] && DO_TESTS=1 @@ -159,14 +155,5 @@ if [ $DO_TESTS ]; then || fail "Tests failed" fi -# -# Setup the base workspace -# -if [ $DO_BASE_WORKSPACE_INIT ]; then - new_step 'Setting up base workspace' - display "." - source scripts/bootstrap/init_workspace.sh -fi - clear_log display "Build successful! Binary is here: ${BAZEL}" diff --git a/scripts/packages/BUILD b/scripts/packages/BUILD index 86a3a1f5ae..554c626e72 100644 --- a/scripts/packages/BUILD +++ b/scripts/packages/BUILD @@ -92,57 +92,6 @@ pkg_tar( strip_prefix = ".", ) -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", @@ -150,7 +99,6 @@ pkg_tar( ":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" <$TEST_SRCDIR/base_workspace/packagename/filename. + $TEST_SRCDIR/workspace/packagename/filename. The "runfiles" tree ensures that tests have access to all the files upon which they have a declared dependence, and nothing more. By default, the runfiles tree is implemented by constructing a set of @@ -2368,7 +2368,7 @@ either to the terminal, or to additional log files. --symlink_prefix=/ will cause Bazel to not create or update any symlinks, including the bazel-out and - bazel-base_workspace + bazel-<workspace> symlinks. Use this option to suppress symlink creation entirely.

@@ -2959,7 +2959,7 @@ in an environment closer to the current shell environment. Note that none of the directory for those commands. If the workspace directory is writable, a symlink named - bazel-base_workspace + bazel-<workspace> is placed there pointing to this directory. @@ -3763,6 +3763,6 @@ Start time: [time elapsed from the profiling session start] Duration: [tas

Since you may not be able to run bazel info if bazel is hung, the - output_base directory is usually the parent of the bazel-base_workspace + output_base directory is usually the parent of the bazel-<workspace> symlink in your workspace directory.

-- cgit v1.2.3