Skip to contentSkip to conversation

tests: upgrade containers to debian 13

PATCH In review John Snow 4 participants 11 messages Feb 25 – Feb 26

lore
Share & tools
lore

John Snow

author
#0 lore raw

v2 cover tests: upgrade containers 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]/

v2:
- Rebased on origin/master following the merge of the qemu.qmp series

Note: there is a minor conflict with
https://patchew.org/QEMU/[email protected]/
concerning the pinned wheel version in python/tests/minreqs.txt - the change in this series should take precedence.

John Snow (3):
tests: upgrade most non-lcitool debian tests to debian 13
tests: upgrade debian-legacy-test-cross to debian 13
python: upgrade minimum setuptools/wheel/pip versions

 python/tests/minreqs.txt                       |  1 +
 pythondeps.toml                                | 18 ++++++++++--------
 .../dockerfiles/debian-hexagon-cross.docker    | 11 ++++++-----
 .../debian-legacy-test-cross.docker            | 16 +++++-----------
 .../dockerfiles/debian-loongarch-cross.docker  | 10 +++++-----
 .../docker/dockerfiles/debian-toolchain.docker |  8 +++++---
 .../dockerfiles/debian-tricore-cross.docker    |  5 ++---
 .../dockerfiles/debian-xtensa-cross.docker     |  2 +-
 8 files changed, 35 insertions(+), 36 deletions(-)
Signature · 1 line
2.53.0
author
#1 lore raw

PATCH v2 1/3 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.

This patch does the bare minimum to upgrade these tests and doesn't make any attempt at optimization or cleanup that may or may not be possible with this upgrade.

---
 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
Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] tests: upgrade most non-lcitool debian tests to debian 13

Quoted 8 lines · John Snow

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.

This patch does the bare minimum to upgrade these tests and doesn't make any attempt at optimization or cleanup that may or may not be possible with this upgrade.

Quoted 8 lines
---
 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(-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|
#3 lore raw

Re: [PATCH v2 1/3] tests: upgrade most non-lcitool debian tests to debian 13

In reply to John Snow
Quoted 9 lines · John Snow

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.

This patch does the bare minimum to upgrade these tests and doesn't make any attempt at optimization or cleanup that may or may not be possible with this upgrade.

Queued to testing/next, thanks.

Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro
author
#4 lore raw

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

In reply to John Snow

We no longer require Debian 11 to run these tests; they work properly under Debian 13/Trixie.

---
 .../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
#5 lore raw

Re: [PATCH v2 2/3] tests: upgrade debian-legacy-test-cross to debian 13

Quoted 4 lines · John Snow

We no longer require Debian 11 to run these tests; they work properly under Debian 13/Trixie.

If these all work with Debian 13 we should just punt the compilers into debian-all-test-cross and delete this container and redirect its users.

Quoted 45 lines
---
 .../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 · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro
author
#6 lore raw

Re: [PATCH v2 2/3] tests: upgrade debian-legacy-test-cross to debian 13

Quoted 10 lines · Alex Bennée
Quoted 4 lines · John Snow

We no longer require Debian 11 to run these tests; they work properly under Debian 13/Trixie.

If these all work with Debian 13 we should just punt the compilers into debian-all-test-cross and delete this container and redirect its users.

Alright, wasn't sure where you wanted em. I'll give it a shot.

Quoted 55 lines

Review

Quoted 5 lines
---
 .../dockerfiles/debian-legacy-test-cross.docker  | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
(quoted diff) +0 -0

b/tests/docker/dockerfiles/debian-legacy-test-cross.docker

tests/docker/dockerfiles/debian-legacy-test-cross.docker line 6

Quoted 10 lines

index 5a6616b7d39..293f31a07d6 100644

tests/docker/dockerfiles/debian-legacy-test-cross.docker +0 -4
@@ -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

tests/docker/dockerfiles/debian-legacy-test-cross.docker

Quoted 10 lines
tests/docker/dockerfiles/debian-legacy-test-cross.docker +1 -5
-#   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

Quoted 7 lines
tests/docker/dockerfiles/debian-legacy-test-cross.docker +3 -0
+# 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 && \

tests/docker/dockerfiles/debian-legacy-test-cross.docker RUN DEBIAN_FRONTEND=noninteractive eatmydata \ · line 36

Quoted 7 lines
tests/docker/dockerfiles/debian-legacy-test-cross.docker +1 -0
@@ -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

tests/docker/dockerfiles/debian-legacy-test-cross.docker RUN DEBIAN_FRONTEND=noninteractive eatmydata \ · line 40

Quoted 6 lines
tests/docker/dockerfiles/debian-legacy-test-cross.docker +0 -2
-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

--
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reviewed-by on v2 2/3
#7 lore raw

Re: [PATCH v2 2/3] tests: upgrade debian-legacy-test-cross to debian 13

In reply to John Snow
Quoted 7 lines · John Snow

We no longer require Debian 11 to run these tests; they work properly under Debian 13/Trixie.

---
 .../dockerfiles/debian-legacy-test-cross.docker  | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|
author
#8 lore raw

PATCH v2 3/3 python: upgrade minimum setuptools/wheel/pip versions

In reply to John Snow

With Debian 11 tests removed from our CI suite, we are allowed to rely on the versions present in CentOS Stream 9 as a new minimum.

Note that CentOS Stream 9 does offer Python 3.12 packages, but mandating this incurs the loss of ability to build offline documentation on CentOS because there is no official Sphinx package for Python 3.12. We will very likely mandate these upgraded packages for QEMU 11.1, but there is no real benefit to doing it now for 11.0 - It will be simpler to perform that upgrade after QEMU drops support for Ubuntu 22.04 LTS in late April.

See
https://gitlab.com/jsnow/repology-dashboard#results-overview-as-of-2026-02-16
for more details on current Python ecosystem versions across all of our supported build platforms.

---
 python/tests/minreqs.txt |  1 +
 pythondeps.toml          | 18 ++++++++++--------
 2 files changed, 11 insertions(+), 8 deletions(-)
python/tests/minreqs.txt +1 -0
index 855b5129c94..6fc671b1780 100644
@@ -16,6 +16,7 @@
 # installation of the QEMU package itself fails, failing to find
 # setuptools.
 setuptools<=70
+wheel==0.36.2
 
 # Dependencies for qapidoc/qapi_domain et al
 sphinx==3.4.3
pythondeps.toml +10 -8
index a0717742423..c843f163a8f 100644
@@ -38,14 +38,16 @@ sphinx_rtd_theme = { accepted = ">=0.5", installed = "1.2.2" }
 [tooling]
 "qemu.qmp" = { accepted = ">=0.0.5", installed = "0.0.5" }
 "qemu" = { path = "python/" }
-# NB: The following dependencies should be a little bit more modern than
-# the versions listed here, but we are still using Debian 11 for several
-# GitLab CI tests, so we are further restricted.
-"setuptools" = { accepted = ">=44.1.1" }
-"wheel" = { accepted = ">=0.34.2" }
-# pip should be guaranteed by mkvenv, this is merely a sanity check for
-# which version we are counting on being present.
-"pip" = { accepted = ">=20.3.4" }
+# These dependencies largely serve as sanity checks and a place to
+# record our current accepted minimum versions of various python
+# packaging modules; in offline mode, the absence of these modules will
+# cause configure to fail.
+#
+# We are currently constrained by CentOS Stream 9.
+"setuptools" = { accepted = ">=53.0.0" }
+"wheel" = { accepted = ">=0.36.2" }
+# Guaranteed by mkvenv, sanity-check only
+"pip" = { accepted = ">=21.3.1" }
 
 # This test group is for functional tests, and can include dependencies
 # fetched from PyPI.
Signature · 1 line
2.53.0
Reviewed-by on v2 3/3
#9 lore raw

Re: [PATCH v2 3/3] python: upgrade minimum setuptools/wheel/pip versions

Quoted 16 lines · John Snow

With Debian 11 tests removed from our CI suite, we are allowed to rely on the versions present in CentOS Stream 9 as a new minimum.

Note that CentOS Stream 9 does offer Python 3.12 packages, but mandating this incurs the loss of ability to build offline documentation on CentOS because there is no official Sphinx package for Python 3.12. We will very likely mandate these upgraded packages for QEMU 11.1, but there is no real benefit to doing it now for 11.0 - It will be simpler to perform that upgrade after QEMU drops support for Ubuntu 22.04 LTS in late April.

See
https://gitlab.com/jsnow/repology-dashboard#results-overview-as-of-2026-02-16
for more details on current Python ecosystem versions across all of our supported build platforms.

Quoted 5 lines
---
  python/tests/minreqs.txt |  1 +
  pythondeps.toml          | 18 ++++++++++--------
  2 files changed, 11 insertions(+), 8 deletions(-)
Reviewed-by on v2 3/3
#10 lore raw

Re: [PATCH v2 3/3] python: upgrade minimum setuptools/wheel/pip versions

In reply to John Snow
Quoted 16 lines · John Snow

With Debian 11 tests removed from our CI suite, we are allowed to rely on the versions present in CentOS Stream 9 as a new minimum.

Note that CentOS Stream 9 does offer Python 3.12 packages, but mandating this incurs the loss of ability to build offline documentation on CentOS because there is no official Sphinx package for Python 3.12. We will very likely mandate these upgraded packages for QEMU 11.1, but there is no real benefit to doing it now for 11.0 - It will be simpler to perform that upgrade after QEMU drops support for Ubuntu 22.04 LTS in late April.

See
https://gitlab.com/jsnow/repology-dashboard#results-overview-as-of-2026-02-16
for more details on current Python ecosystem versions across all of our supported build platforms.

Quoted 5 lines
---
 python/tests/minreqs.txt |  1 +
 pythondeps.toml          | 18 ++++++++++--------
 2 files changed, 11 insertions(+), 8 deletions(-)

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|