diff mbox series

[XEN,v1,3/3] CI: Refresh and upgrade the Fedora container

Message ID 178560672106e37648304f5e597cc0b16c8db6db.1729170005.git.javi.merino@cloud.com (mailing list archive)
State New
Headers show
Series CI: Upgrade the Fedora container and fix build failure | expand

Commit Message

Javi Merino Oct. 17, 2024, 4:20 p.m. UTC
From: Andrew Cooper <andrew.cooper3@citrix.com>

Fedora 29 is long out of date.  Move forward 5 years to Fedora 40.

Include all the usual improvements.  Rework the container to be non-root, use
heredocs for legibility, and switch to the new naming scheme.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Javi Merino <javi.merino@cloud.com>
---
 automation/build/fedora/29.dockerfile        | 46 ------------
 automation/build/fedora/40-x86_64.dockerfile | 77 ++++++++++++++++++++
 automation/gitlab-ci/build.yaml              |  8 +-
 automation/scripts/containerize              |  2 +-
 4 files changed, 82 insertions(+), 51 deletions(-)
 delete mode 100644 automation/build/fedora/29.dockerfile
 create mode 100644 automation/build/fedora/40-x86_64.dockerfile

Comments

Anthony PERARD Oct. 17, 2024, 5:03 p.m. UTC | #1
On Thu, Oct 17, 2024 at 05:20:21PM +0100, Javi Merino wrote:
> From: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> Fedora 29 is long out of date.  Move forward 5 years to Fedora 40.
> 
> Include all the usual improvements.  Rework the container to be non-root, use
> heredocs for legibility, and switch to the new naming scheme.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Javi Merino <javi.merino@cloud.com>

Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>

Thanks,
Stefano Stabellini Oct. 18, 2024, 2 a.m. UTC | #2
On Thu, 17 Oct 2024, Anthony PERARD wrote:
> On Thu, Oct 17, 2024 at 05:20:21PM +0100, Javi Merino wrote:
> > From: Andrew Cooper <andrew.cooper3@citrix.com>
> > 
> > Fedora 29 is long out of date.  Move forward 5 years to Fedora 40.
> > 
> > Include all the usual improvements.  Rework the container to be non-root, use
> > heredocs for legibility, and switch to the new naming scheme.
> > 
> > Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> > Signed-off-by: Javi Merino <javi.merino@cloud.com>
> 
> Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>

Assuming it was tested successfully:

Acked-by: Stefano Stabellini <sstabellini@kernel.org>
diff mbox series

Patch

diff --git a/automation/build/fedora/29.dockerfile b/automation/build/fedora/29.dockerfile
deleted file mode 100644
index d5f017ac723d..000000000000
--- a/automation/build/fedora/29.dockerfile
+++ /dev/null
@@ -1,46 +0,0 @@ 
-# syntax=docker/dockerfile:1
-FROM --platform=linux/amd64 fedora:29
-LABEL maintainer.name="The Xen Project" \
-      maintainer.email="xen-devel@lists.xenproject.org"
-
-# install Xen depends
-RUN dnf -y install \
-        clang \
-        gcc \
-        gcc-c++ \
-        ncurses-devel \
-        zlib-devel \
-        python-devel \
-        python3-devel \
-        libuuid-devel \
-        pkgconfig \
-        flex \
-        bison \
-        libaio-devel \
-        glib2-devel \
-        yajl-devel \
-        pixman-devel \
-        glibc-devel \
-        make \
-        binutils \
-        git \
-        wget \
-        acpica-tools \
-        python-markdown \
-        patch \
-        checkpolicy \
-        dev86 \
-        xz-devel \
-        bzip2 \
-        nasm \
-        ocaml \
-        ocaml-findlib \
-        golang \
-        # QEMU
-        ninja-build \
-    && dnf clean all && \
-    rm -rf /var/cache/dnf
-
-RUN useradd --create-home user
-USER user
-WORKDIR /build
diff --git a/automation/build/fedora/40-x86_64.dockerfile b/automation/build/fedora/40-x86_64.dockerfile
new file mode 100644
index 000000000000..7d4d4cc2ac0a
--- /dev/null
+++ b/automation/build/fedora/40-x86_64.dockerfile
@@ -0,0 +1,77 @@ 
+# syntax=docker/dockerfile:1
+FROM --platform=linux/amd64 fedora:40
+LABEL maintainer.name="The Xen Project"
+LABEL maintainer.email="xen-devel@lists.xenproject.org"
+
+RUN <<EOF
+    set -e
+
+    useradd --create-home user
+
+    dnf -y update
+
+    DEPS=(
+        # Xen
+        binutils
+        gcc
+        make
+        python3
+        # Kconfig
+        bison
+        flex
+        # Flask
+        checkpolicy
+
+        # Tools (general)
+        git-core
+        gzip
+        patch
+        perl-interpreter
+        perl-File-Find
+        pkgconfig
+        wget
+        # libxenguest dombuilder
+        bzip2-devel
+        libzstd-devel
+        lzo-devel
+        xz-devel
+        zlib-devel
+        # libacpi
+        acpica-tools
+        # libxl
+        libuuid-devel
+        yajl-devel
+        # xen-foreign
+        diffutils
+        # RomBIOS
+        dev86
+        # Header Check
+        gcc-c++
+        # xentop
+        ncurses-devel
+        # Python bindings
+        python3-devel
+        python3-setuptools
+        # Ocaml bindings/oxenstored
+        ocaml
+        ocaml-findlib
+        # Golang bindings
+        golang
+
+        # Stubdom download/extract
+        bzip2
+
+        # Qemu build
+        glib2-devel
+        pixman-devel
+        ninja-build
+    )
+
+    dnf -y --setopt=install_weak_deps=False install "${DEPS[@]}"
+
+    dnf clean all
+    rm -rf /var/cache/dnf
+EOF
+
+USER user
+WORKDIR /build
diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index c2db69ecf86c..09dd9e6ccbd0 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -579,15 +579,15 @@  debian-bookworm-32-gcc-debug:
   variables:
     CONTAINER: debian:bookworm-i386
 
-fedora-gcc:
+fedora-40-x86_64-gcc:
   extends: .gcc-x86-64-build
   variables:
-    CONTAINER: fedora:29
+    CONTAINER: fedora:40-x86_64
 
-fedora-gcc-debug:
+fedora-40-x86_64-gcc-debug:
   extends: .gcc-x86-64-build-debug
   variables:
-    CONTAINER: fedora:29
+    CONTAINER: fedora:40-x86_64
 
 ubuntu-16.04-x86_64-clang:
   extends: .clang-x86-64-build
diff --git a/automation/scripts/containerize b/automation/scripts/containerize
index 7607b78f7666..6ac02c42d124 100755
--- a/automation/scripts/containerize
+++ b/automation/scripts/containerize
@@ -28,7 +28,7 @@  case "_${CONTAINER}" in
     _alpine-arm64v8) CONTAINER="${BASE}/alpine:3.18-arm64v8" ;;
     _archlinux|_arch) CONTAINER="${BASE}/archlinux:current" ;;
     _centos7) CONTAINER="${BASE}/centos:7" ;;
-    _fedora) CONTAINER="${BASE}/fedora:29";;
+    _fedora) CONTAINER="${BASE}/fedora:40-x86_64";;
     _bullseye-ppc64le) CONTAINER="${BASE}/debian:11-ppc64le" ;;
     _bookworm-ppc64le) CONTAINER="${BASE}/debian:12-ppc64le" ;;
     _bullseye-riscv64) CONTAINER="${BASE}/debian:11-riscv64" ;;