Skip to contentSkip to conversation

tests: upgrade to debian 13

PATCH Superseded John Snow 1 participant 3 messages Feb 18

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

John Snow

author
#0 lore raw

cover tests: upgrade to debian 13

This mini-series upgrades everything except mipsel tests to Debian 13, removing our usage of the EOL Debian 11. Our mipsel tests continue to run Debian 12, which will be EOL in June.

This is mostly helpful to me for being able to increase the minimum version of Python modules like setuptools, pip and wheel as I ran into while writing
https://patchew.org/QEMU/[email protected]/

Tested as part of a larger chain of patches at
https://gitlab.com/jsnow/qemu/-/pipelines/2335060565 - though this series is based directly on origin/master and I have not tested it separately at this time.

John Snow (2):
tests: upgrade most non-lcitool debian tests to debian 13
tests: upgrade debian-legacy-test-cross to debian 13

 .../dockerfiles/debian-hexagon-cross.docker      | 11 ++++++-----
 .../dockerfiles/debian-legacy-test-cross.docker  | 16 +++++-----------
 .../dockerfiles/debian-loongarch-cross.docker    | 10 +++++-----
 tests/docker/dockerfiles/debian-toolchain.docker |  8 +++++---
 .../dockerfiles/debian-tricore-cross.docker      |  5 ++---
 .../dockerfiles/debian-xtensa-cross.docker       |  2 +-
 6 files changed, 24 insertions(+), 28 deletions(-)
Signature · 1 line
2.53.0
author
#1 lore raw

PATCH 1/2 tests: upgrade most non-lcitool debian tests to debian 13

Debian 11 was EOL in 2024, and Debian 12 will be EOL this June. This patch moves all but one of our tests, debian-legacy-test-cross, onto Debian 13.

I did not make any attempt to optimize or update these tests beyond the minimum necessary to keep them running, as I am not deeply familiar with these tests.

---
 tests/docker/dockerfiles/debian-hexagon-cross.docker  | 11 ++++++-----
 .../docker/dockerfiles/debian-loongarch-cross.docker  | 10 +++++-----
 tests/docker/dockerfiles/debian-toolchain.docker      |  8 +++++---
 tests/docker/dockerfiles/debian-tricore-cross.docker  |  5 ++---
 tests/docker/dockerfiles/debian-xtensa-cross.docker   |  2 +-
 5 files changed, 19 insertions(+), 17 deletions(-)
tests/docker/dockerfiles/debian-hexagon-cross.docker +6 -5
index 23152b4918b..91d4b71ac95 100644
@@ -5,10 +5,12 @@
 # needs to be able to build QEMU itself in CI we include its
 # build-deps.
 #
-FROM docker.io/library/debian:11-slim
+FROM docker.io/library/debian:13-slim
+
+# Add deb-src repository sources
+RUN sed -i "s/^Types: deb$/Types: deb deb-src/" \
+    /etc/apt/sources.list.d/debian.sources
 
-# Duplicate deb line as deb-src
-RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
 RUN apt-get update && \
     DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
@@ -24,6 +26,7 @@ RUN apt-get update && \
         ninja-build \
         python3-pip \
         python3-setuptools \
+        python3-tomli \
         python3-venv \
         python3-wheel && \
 # Install QEMU build deps for use in CI
@@ -36,8 +39,6 @@ RUN apt-get update && \
     ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc && \
     dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
 
-RUN /usr/bin/pip3 install tomli
-
 ENV TOOLCHAIN_INSTALL /opt
 ENV TOOLCHAIN_RELEASE 12.Dec.2023
 ENV TOOLCHAIN_BASENAME "clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unknown-linux-musl"
tests/docker/dockerfiles/debian-loongarch-cross.docker +5 -5
index 538ab534902..55b3dbe4510 100644
@@ -4,10 +4,11 @@
 # This docker target uses prebuilt toolchains for LoongArch64 from:
 # https://github.com/loongson/build-tools/releases
 #
-FROM docker.io/library/debian:11-slim
+FROM docker.io/library/debian:13-slim
 
-# Duplicate deb line as deb-src
-RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
+# Add deb-src repository sources
+RUN sed -i "s/^Types: deb$/Types: deb deb-src/" \
+    /etc/apt/sources.list.d/debian.sources
 
 RUN export DEBIAN_FRONTEND=noninteractive && \
     apt-get update && \
@@ -31,12 +32,11 @@ RUN apt-get update && \
         ninja-build \
         python3-pip \
         python3-setuptools \
+        python3-tomli \
         python3-venv \
         python3-wheel && \
         dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
 
-RUN /usr/bin/pip3 install tomli
-
 RUN curl -#SL https://github.com/loongson/build-tools/releases/download/2023.08.08/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz \
     | tar -xJC /opt
 
tests/docker/dockerfiles/debian-toolchain.docker +5 -3
index ab4ce29533d..9a256209a78 100644
@@ -4,13 +4,15 @@
 # This dockerfile is used for building a cross-compiler toolchain.
 # The script for building the toolchain is supplied via extra-files.
 #
-FROM docker.io/library/debian:11-slim
+FROM docker.io/library/debian:13-slim
 
 # Install build utilities for building gcc and glibc.
 # ??? The build-dep isn't working, missing a number of
 # minimal build dependiencies, e.g. libmpc.
 
-RUN sed 's/^deb /deb-src /' </etc/apt/sources.list >/etc/apt/sources.list.d/deb-src.list
+# Add deb-src repository sources
+RUN sed -i "s/^Types: deb$/Types: deb deb-src/" \
+    /etc/apt/sources.list.d/debian.sources
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
@@ -34,7 +36,7 @@ RUN cd /root && ./build-toolchain.sh
 # Throw away the extra toolchain build deps, the downloaded source,
 # and the build trees by restoring the original image,
 # then copying the built toolchain from stage 0.
-FROM docker.io/library/debian:11-slim
+FROM docker.io/library/debian:13-slim
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
tests/docker/dockerfiles/debian-tricore-cross.docker +2 -3
index 7e00e870ceb..fd797dc7ee4 100644
@@ -9,7 +9,7 @@
 #
 # SPDX-License-Identifier: GPL-2.0-or-later
 #
-FROM docker.io/library/debian:11-slim
+FROM docker.io/library/debian:13-slim
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
@@ -31,12 +31,11 @@ RUN apt update && \
        pkgconf \
        python3-pip \
        python3-setuptools \
+       python3-tomli \
        python3-wheel \
        python3-venv && \
        dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
 
-RUN /usr/bin/pip3 install tomli
-
 RUN curl -#SL https://github.com/bkoppelmann/package_940/releases/download/tricore-toolchain-9.40/tricore-toolchain-9.4.0.tar.gz \
     | tar -xzC /usr/local/
 
tests/docker/dockerfiles/debian-xtensa-cross.docker +1 -1
index d011eee2ad3..ef63e44e2ef 100644
@@ -5,7 +5,7 @@
 # using a prebuilt toolchains for Xtensa cores from:
 # https://github.com/foss-xtensa/toolchain/releases
 #
-FROM docker.io/library/debian:11-slim
+FROM docker.io/library/debian:13-slim
 
 RUN apt-get update && \
     DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
Signature · 1 line
2.53.0
author
#2 lore raw

PATCH 2/2 tests: upgrade debian-legacy-test-cross to debian 13

In reply to John Snow

This test appears to work properly on Debian 13/Trixie. It is possible we no longer need a specific "legacy" cross test and this can be fixed on a deeper level, so consider this patch more of an RFC and a request for help performing this upgrade.

---
 .../dockerfiles/debian-legacy-test-cross.docker  | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
tests/docker/dockerfiles/debian-legacy-test-cross.docker +5 -11
index 5a6616b7d39..293f31a07d6 100644
@@ -1,18 +1,13 @@
 # Docker legacy cross-compiler target (tests and minimal qemu)
 #
-# Compilers for some of our older targets which we cant currently
-# upgrade. Currently:
-#
-#   libc6.1-dev-alpha-cross: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1054412
-#   sh4-linux-user: binaries don't run with bookworm compiler
-#
 # As we are targeting check-tcg here we only need minimal qemu
 # dependencies and the relevant cross compilers.
 
-FROM docker.io/library/debian:11-slim
+FROM docker.io/library/debian:13-slim
 
-# Duplicate deb line as deb-src
-RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
+# Add deb-src repository sources
+RUN sed -i "s/^Types: deb$/Types: deb deb-src/" \
+    /etc/apt/sources.list.d/debian.sources
 
 RUN export DEBIAN_FRONTEND=noninteractive && \
     apt-get update && \
@@ -35,12 +30,11 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         libc6-dev-sh4-cross \
         python3-pip \
         python3-setuptools \
+        python3-tomli \
         python3-venv \
         python3-wheel && \
         dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
 
-RUN /usr/bin/pip3 install tomli
-
 ENV QEMU_CONFIGURE_OPTS --disable-system --disable-docs --disable-tools
 ENV DEF_TARGET_LIST alpha-linux-user,sh4-linux-user
 ENV MAKE /usr/bin/make
Signature · 1 line
2.53.0