aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pkg/build/build.go5
-rw-r--r--tools/docker/syzbot/Dockerfile9
2 files changed, 10 insertions, 4 deletions
diff --git a/pkg/build/build.go b/pkg/build/build.go
index 26ba8f4d3..a9d23cbe0 100644
--- a/pkg/build/build.go
+++ b/pkg/build/build.go
@@ -192,7 +192,7 @@ func compilerIdentity(compiler string) (string, error) {
arg, timeout := "--version", time.Minute
if bazel {
// Bazel episodically fails with 1 min timeout.
- arg, timeout = "", 10*time.Minute
+ timeout = 10 * time.Minute
}
output, err := osutil.RunCmd(timeout, "", compiler, arg)
if err != nil {
@@ -210,6 +210,9 @@ func compilerIdentity(compiler string) (string, error) {
if strings.HasPrefix(line, "WARNING: ") {
continue
}
+ if strings.Contains(line, "Downloading https://releases.bazel") {
+ continue
+ }
}
return strings.TrimSpace(line), nil
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.