aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2023-07-10 19:57:57 +0200
committerAleksandr Nogikh <nogikh@google.com>2023-07-11 13:39:36 +0000
commitd7389d938d9983ed7a2a91e6b5f54eb35690d74e (patch)
tree4c5a72fad354cea88da4e16b370e3f331ece8801 /tools
parent50356e13638d57243e5192d053937420ef697bd5 (diff)
tools/docker: update to bookworm images
Closes #3973. As Python 2.7 is no longer present in the packages, build it directly in Dockerfile. It's rather small and doesn't take much time.
Diffstat (limited to 'tools')
-rw-r--r--tools/docker/big-env/Dockerfile20
-rw-r--r--tools/docker/env/Dockerfile11
-rw-r--r--tools/docker/syzbot/Dockerfile16
3 files changed, 22 insertions, 25 deletions
diff --git a/tools/docker/big-env/Dockerfile b/tools/docker/big-env/Dockerfile
index 88b798981..1d8aa74b9 100644
--- a/tools/docker/big-env/Dockerfile
+++ b/tools/docker/big-env/Dockerfile
@@ -34,10 +34,7 @@ RUN dpkg --add-architecture i386 && \
apt-get update --allow-releaseinfo-change && \
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
# required to build root images.
- debootstrap ssh-tools qemu-user-static \
- # required for gcloud sdk.
- python2 \
- && \
+ debootstrap ssh-tools qemu-user-static && \
apt-get -y autoremove && \
apt-get clean autoclean && \
rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
@@ -47,13 +44,22 @@ RUN curl https://dl.google.com/go/go1.19.6.linux-amd64.tar.gz | tar -C /usr/loca
RUN curl https://storage.googleapis.com/syzkaller/fuchsia-toolchain.tar.gz | tar -C /syzkaller -xz
RUN curl https://storage.googleapis.com/syzkaller/netbsd-toolchain.tar.gz | tar -C /syzkaller -xz
-RUN curl https://storage.googleapis.com/syzkaller/akaros-toolchain.tar.gz | tar -C /syzkaller -xz
ENV SOURCEDIR_FUCHSIA /syzkaller/fuchsia
ENV SOURCEDIR_NETBSD /syzkaller/netbsd
-ENV SOURCEDIR_AKAROS /syzkaller/akaros
+
+# Build Python 2.7 from source.
+RUN apt-get install -y -q libsqlite3-dev
+RUN wget -O /tmp/Python-2.7.18.tgz 'https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz'
+RUN cd /tmp/ && tar -zxf Python-2.7.18.tgz
+RUN cd /tmp/Python-2.7.18 && ./configure
+RUN cd /tmp/Python-2.7.18 && make -j2 && make altinstall
+RUN ln -s /usr/local/bin/python2.7 /usr/bin/python2
# Install gcloud sdk for dashboard/app tests.
-RUN curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-360.0.0-linux-x86_64.tar.gz | tar -C /usr/local -xz
+# The newest version (as of 07/10/23) is 437, however, it seems to expect to be run with python3
+# (but still requires python2). But Go's aetest package still runs dev_appserver.py with python2.7.
+# So let's use an older, but working sdk.
+RUN curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-400.0.0-linux-x86_64.tar.gz | tar -C /usr/local -xz
ENV PATH /usr/local/google-cloud-sdk/bin:$PATH
RUN gcloud components install --quiet app-engine-python app-engine-go app-engine-python-extras cloud-datastore-emulator
RUN chmod 0777 /usr/local/google-cloud-sdk
diff --git a/tools/docker/env/Dockerfile b/tools/docker/env/Dockerfile
index 8620eb0be..de6d8b3d7 100644
--- a/tools/docker/env/Dockerfile
+++ b/tools/docker/env/Dockerfile
@@ -3,16 +3,17 @@
# See /tools/docker/README.md for details.
-FROM debian:bullseye
+FROM debian:bookworm
LABEL homepage="https://github.com/google/syzkaller"
RUN apt-get update --allow-releaseinfo-change
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends \
- sudo make python nano unzip curl ca-certificates binutils g++ \
+ sudo make nano unzip curl ca-certificates binutils g++ \
g++-arm-linux-gnueabi g++-aarch64-linux-gnu g++-powerpc64le-linux-gnu \
g++-mips64el-linux-gnuabi64 g++-s390x-linux-gnu g++-riscv64-linux-gnu \
- libc6-dev-i386 libc6-dev-i386-amd64-cross lib32gcc-10-dev lib32stdc++-10-dev \
+ libc6-dev-i386 libc6-dev-i386-amd64-cross lib32gcc-12-dev lib32stdc++-12-dev \
+ python3 python-is-python3 \
# These are needed to build Linux kernel:
flex bison bc libelf-dev libssl-dev \
# qemu-user is required to run alien arch binaries in pkg/cover tests.
@@ -34,12 +35,10 @@ RUN mkdir -p /syzkaller/gopath/src/github.com/google/syzkaller && \
mkdir -p /syzkaller/.cache && \
chmod -R 0777 /syzkaller
-# The default clang-11 is too old, install the latest one.
RUN apt-get install -y -q gnupg software-properties-common apt-transport-https
RUN curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
-RUN add-apt-repository "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main"
+RUN add-apt-repository "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-15 main"
RUN apt-get update --allow-releaseinfo-change
-RUN apt-get remove -y -q clang-11
RUN apt-get install -y -q --no-install-recommends clang-15 clang-format-15 clang-tidy-15
RUN apt autoremove -y -q
RUN sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100
diff --git a/tools/docker/syzbot/Dockerfile b/tools/docker/syzbot/Dockerfile
index 892f7be15..e15b6ec80 100644
--- a/tools/docker/syzbot/Dockerfile
+++ b/tools/docker/syzbot/Dockerfile
@@ -3,7 +3,7 @@
# See /tools/docker/README.md for details.
-FROM debian:bullseye
+FROM debian:bookworm
RUN apt-get update --allow-releaseinfo-change
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
@@ -23,7 +23,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
crossbuild-essential-amd64 crossbuild-essential-arm64
RUN test "$(uname -m)" != x86_64 && exit 0 || \
DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
- libc6-dev-i386 libc6-dev-i386-amd64-cross lib32gcc-10-dev lib32stdc++-10-dev \
+ libc6-dev-i386 libc6-dev-i386-amd64-cross lib32gcc-12-dev lib32stdc++-12-dev \
# These are required to run foreign arch kernels:
qemu-utils qemu-system-misc qemu-system-x86 qemu-system-arm qemu-system-aarch64 \
qemu-system-s390x qemu-system-mips qemu-system-ppc \
@@ -34,12 +34,11 @@ RUN test "$(uname -m)" != x86_64 && exit 0 || \
RUN curl https://dl.google.com/go/go1.20.1.linux-$(uname -m | sed 's/aarch64/arm64/;s/x86_64/amd64/').tar.gz | tar -C /usr/local -xz
ENV PATH /usr/local/go/bin:$PATH
-# The default clang-11 is too old, install the latest one.
+# The default clang-14 is too old, install the latest one.
RUN apt-get install -y -q gnupg software-properties-common apt-transport-https
RUN curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
-RUN add-apt-repository "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main"
+RUN add-apt-repository "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-15 main"
RUN apt-get update --allow-releaseinfo-change
-RUN apt-get remove -y -q clang-11
RUN apt-get install -y -q --no-install-recommends clang-15 clang-format-15 clang-tidy-15 lld-15
RUN apt autoremove -y -q
RUN sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100
@@ -55,13 +54,6 @@ RUN mkdir -p /usr/grte/v5/bin && ln -s /usr/bin/python3 /usr/grte/v5/bin/python2
# 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/6.2.0/release/bazel-6.2.0-linux-$(uname -m | sed s/aarch64/arm64/) && chmod ugo+x /usr/local/bin/bazel'
-# Update pahole from 1.20 to 1.22 to avoid this build error seen on 5.10 based kernels:
-# [43990] INT DW_ATE_unsigned_24 Error emitting BTF type
-# The default git is too old, install a newer one.
-RUN echo 'deb http://deb.debian.org/debian bullseye-backports main' >> /etc/apt/sources.list
-RUN apt update
-RUN apt install -y -q dwarves/bullseye-backports git/bullseye-backports
-
# pkg/osutil uses syzkaller user for sandboxing.
RUN useradd --create-home syzkaller
RUN echo "export PS1='\n\W🤖 '" >> /root/.bashrc