Files
xen/automation/build/ubuntu/22.04-x86_64.dockerfile
T
Andrew Cooper 1223375d8b CI: Fix builds following qemu-xen update
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 <andrew.cooper3@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
2024-10-04 19:27:40 +01:00

75 lines
1.3 KiB
Docker

# syntax=docker/dockerfile:1
FROM --platform=linux/amd64 ubuntu:22.04
LABEL maintainer.name="The Xen Project"
LABEL maintainer.email="xen-devel@lists.xenproject.org"
ENV DEBIAN_FRONTEND=noninteractive
RUN <<EOF
#!/bin/bash
set -e
useradd --create-home user
apt-get -y update
DEPS=(
# Xen
bison
build-essential
checkpolicy
clang
flex
python3-minimal
# Tools (general)
ca-certificates
git-core
gzip
patch
perl
pkg-config
wget
# libxenguest dombuilder
libbz2-dev
libzstd-dev
liblzo2-dev
liblzma-dev
zlib1g-dev
# libacpi
acpica-tools
# libxl
uuid-dev
libyajl-dev
# RomBIOS
bcc
bin86
# xentop
libncurses5-dev
# Python bindings
python3-dev
python3-setuptools
# Ocaml bindings/oxenstored
ocaml-nox
ocaml-findlib
# Stubdom download/extract
bzip2
# Qemu build
libglib2.0-dev
libpixman-1-dev
meson
ninja-build
python3-packaging
python3-tomli
python3-venv
)
apt-get -y --no-install-recommends install "${DEPS[@]}"
rm -rf /var/lib/apt/lists/*
EOF
USER user
WORKDIR /build