From bee60a83ac500de0590dfe108da76395d821092a Mon Sep 17 00:00:00 2001 From: Konstantin Bogomolov Date: Wed, 27 Aug 2025 02:48:12 +0000 Subject: tools/docker: install bazelisk instead of bazel The needed Bazel version to build gVisor got bumped. However, instead of doing the same bump in two places whenever this happens, we can simply use bazelisk in syzkaller to determine which bazel version to use automatically. --- tools/docker/syzbot/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/docker/syzbot/Dockerfile b/tools/docker/syzbot/Dockerfile index 731759b3b..04d42de87 100644 --- a/tools/docker/syzbot/Dockerfile +++ b/tools/docker/syzbot/Dockerfile @@ -61,9 +61,12 @@ RUN apt-get install -y -q --no-install-recommends clang-15 # Not really GRTE, but it's enough to run some scripts that hardcode the path. RUN mkdir -p /usr/grte/v5/bin && ln -s /usr/bin/python3 /usr/grte/v5/bin/python2.7 -# Install bazel -# Download the official bazel binary. The APT repository isn't used because there is not packages for arm64. -RUN sh -c 'curl -o /usr/local/bin/bazel https://releases.bazel.build/7.1.2/release/bazel-7.1.2-linux-$(uname -m | sed s/aarch64/arm64/) && chmod ugo+x /usr/local/bin/bazel' +# Install bazelisk +RUN curl -s https://api.github.com/repos/bazelbuild/bazelisk/releases/latest \ + | sed -n '/browser_download_url/s/[^:]*:[^"]*\("[^"]*"\).*/url = \1/p' \ + | grep bazelisk-linux-$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \ + | curl -L -o /usr/local/bin/bazel -K - \ + && chmod +x /usr/local/bin/bazel # Install qemu from the backports. # The currently stable version (7.2) cannot properly run arm64-MTE kernels. -- cgit mrf-deployment