From 1223375d8b7faf0eab642834292bf4924e40f425 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Fri, 4 Oct 2024 14:27:02 +0100 Subject: [PATCH] CI: Fix builds following qemu-xen update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A recent update to qemu-xen has bumped the build requirements, with Python 3.8 being the new baseline but also needing the 'ensurepip' and 'tomllib/tomli' packages. * Ubuntu/Debian package 'ensurepip' separately, but it can be obtained by installing the python3-venv package. * 'tomllib' was added to the python standard library in Python 3.11, but previously it was a separate package named 'tomli'. In terms of changes required to build QEMU: * Ubuntu 24.04 (Noble) has Python 3.12 so only needs python3-venv * Ubuntu 22.04 (Jammy) has Python 3.10 but does have a python3-tomli package that QEMU is happy with. * FreeBSD has Python 3.9, but Python 3.11 is available. In terms of exclusions: * Ubuntu 20.04 (Focal) has Python 3.8, but lacks any kind of tomli package. * Fedora 29 (Python 3.7), OpenSUSE Leap 15.6 (Python 3.6), and Ubuntu 18.04/Bionic (Python 3.6) are now too old. Detecting tomllib/tomli is more than can fit in build's one-liner, so break it out into a proper script. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Acked-by: Roger Pau Monné --- .cirrus.yml | 3 ++- .../build/ubuntu/22.04-x86_64.dockerfile | 2 ++ .../build/ubuntu/24.04-x86_64.dockerfile | 1 + automation/scripts/build | 4 ++-- automation/scripts/qemu-deps-check.py | 19 +++++++++++++++++++ 5 files changed, 26 insertions(+), 3 deletions(-) create mode 100755 automation/scripts/qemu-deps-check.py diff --git a/.cirrus.yml b/.cirrus.yml index 1c2a6cb812..00e4c57678 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -7,10 +7,11 @@ freebsd_template: &FREEBSD_TEMPLATE install_script: pkg install -y seabios gmake ninja bash pkgconf python bison perl5 yajl lzo2 pixman argp-standalone - libxml2 glib git + libxml2 glib git python311 build_script: - cc --version + - export PYTHON=/usr/local/bin/python3.11 - ./configure --with-system-seabios=/usr/local/share/seabios/bios.bin - gmake -j`sysctl -n hw.ncpu` clang=y diff --git a/automation/build/ubuntu/22.04-x86_64.dockerfile b/automation/build/ubuntu/22.04-x86_64.dockerfile index 230903f624..6aa3c4d188 100644 --- a/automation/build/ubuntu/22.04-x86_64.dockerfile +++ b/automation/build/ubuntu/22.04-x86_64.dockerfile @@ -62,6 +62,8 @@ RUN <