Skip to content

Instantly share code, notes, and snippets.

@celskeggs
Last active December 1, 2019 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save celskeggs/26d49f3452d25a8dd99927b516b30c5b to your computer and use it in GitHub Desktop.
Save celskeggs/26d49f3452d25a8dd99927b516b30c5b to your computer and use it in GitHub Desktop.
A set of publicly usable reproduction steps for #6480

DON'T USE THIS; IT DOESN'T WORK

Reproducing bazelbuild/bazel#6480 in sipb/homeworld

We run pinned versions of bazel in a build chroot (which is run with systemd-nspawn).

(Recommended: using a debian stretch machine with passwordless sudo. A n1-standard-2 GCP instance should work.)

Take the following steps to set up and enter the build chroot:

$ sudo apt install build-essential debootstrap realpath sudo systemd-container gnupg curl git        # dependencies for creating the chroot
$ git clone https://github.com/sipb/homeworld
$ cd homeworld
$ git checkout fce92f7af41c3de400116c90aadbc45bfee36a1f     # commit known to exhibit this flaw
$ export HOMEWORLD_CHROOT="$HOME/homeworld-chroot"          # location to store the chroot
$ ./build-chroot/create.sh                                  # install a debian stretch chroot with the appropriate packages and bazel 0.26.1
$ gpg --import .circleci/ci-key-private.asc                 # import a fake version of the private key used for code signing
$ cp .circleci/branches.yaml platform/upload/branches.yaml  # use stub configuration for pushing compiled binaries
$ echo ci >platform/upload/BRANCH_NAME                      # activate stub configuration for pushing compiled binaries
$ sed -i '1d' platform/.bazelrc                             # disable the workaround that prevents issue #6480 from occurring
$ ./build-chroot/enter.sh                                   # enter the build chroot

In the build chroot:

$ cd platform
$ bazel build //upload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment