diff mbox series

[v2,14/12] CI: Refresh OpenSUSE Leap container

Message ID 20240712125538.3246947-1-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series None | expand

Commit Message

Andrew Cooper July 12, 2024, 12:55 p.m. UTC
See prior patch for most discussion.

Despite appearing to be a fixed release (and therefore not marked as permitted
failure), the dockerfile references the `leap` tag which is rolling in
practice.  Switch to 15.6 explicitly, for better test stability.

Vs tumbleweed, use `zypper update` rather than dist-upgrade, and retain the
RomBIOS dependencies; bin86 and dev86.

In terms of size, this saves ~700M:

  registry.gitlab.com/xen-project/xen/opensuse  leap-15.6-x86_64       1.33GB
  registry.gitlab.com/xen-project/xen/suse      opensuse-leap          2.05GB

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Anthony PERARD <anthony.perard@vates.tech>
CC: Juergen Gross <jgross@suse.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien@xen.org>
CC: Oleksii Kurochko <oleksii.kurochko@gmail.com>
CC: Shawn Anastasio <sanastasio@raptorengineering.com>
CC: Olaf Hering <olaf@aepfle.de>

Runs with this new container:

 4.19:  https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/7322493460
 4.16:  https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/7322499881

v2:
 * git -> git-core
 * Use 'pkgconfig()' references
---
 .../opensuse/leap-15.6-x86_64.dockerfile      | 79 +++++++++++++++++++
 .../build/suse/opensuse-leap.dockerfile       | 75 ------------------
 automation/gitlab-ci/build.yaml               | 16 ++--
 automation/scripts/containerize               |  2 +-
 4 files changed, 88 insertions(+), 84 deletions(-)
 create mode 100644 automation/build/opensuse/leap-15.6-x86_64.dockerfile
 delete mode 100644 automation/build/suse/opensuse-leap.dockerfile

Comments

Anthony PERARD July 12, 2024, 1:02 p.m. UTC | #1
On Fri, Jul 12, 2024 at 01:55:38PM +0100, Andrew Cooper wrote:
> See prior patch for most discussion.
> 
> Despite appearing to be a fixed release (and therefore not marked as permitted
> failure), the dockerfile references the `leap` tag which is rolling in
> practice.  Switch to 15.6 explicitly, for better test stability.
> 
> Vs tumbleweed, use `zypper update` rather than dist-upgrade, and retain the
> RomBIOS dependencies; bin86 and dev86.
> 
> In terms of size, this saves ~700M:
> 
>   registry.gitlab.com/xen-project/xen/opensuse  leap-15.6-x86_64       1.33GB
>   registry.gitlab.com/xen-project/xen/suse      opensuse-leap          2.05GB
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

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

Thanks,
diff mbox series

Patch

diff --git a/automation/build/opensuse/leap-15.6-x86_64.dockerfile b/automation/build/opensuse/leap-15.6-x86_64.dockerfile
new file mode 100644
index 000000000000..ea70dffe2afc
--- /dev/null
+++ b/automation/build/opensuse/leap-15.6-x86_64.dockerfile
@@ -0,0 +1,79 @@ 
+# syntax=docker/dockerfile:1
+FROM --platform=linux/amd64 opensuse/leap:15.6
+LABEL maintainer.name="The Xen Project"
+LABEL maintainer.email="xen-devel@lists.xenproject.org"
+
+ENV XEN_TARGET_ARCH=x86_64
+
+RUN <<EOF
+#!/bin/bash
+    set -e
+
+    useradd --create-home user
+
+    zypper refresh
+    zypper update -y --no-recommends
+
+    DEPS=(
+        # Xen
+        bison
+        checkpolicy
+        clang
+        diffutils
+        findutils
+        flex
+        gawk
+        gcc
+        make
+        python3
+
+        # Tools (general)
+        git-core
+        gzip
+        patch
+        perl
+        pkg-config
+        wget
+        # libxenguest dombuilder
+        'pkgconfig(bzip2)'
+        'pkgconfig(libzstd)'
+        'pkgconfig(lzo2)'
+        'pkgconfig(liblzma)'
+        'pkgconfig(zlib)'
+        # libacpi
+        acpica
+        # libxl
+        'pkgconfig(uuid)'
+        'pkgconfig(yajl)'
+        # RomBIOS
+        bin86
+        dev86
+        # Header Check
+        gcc-c++
+        # xentop
+        'pkgconfig(ncurses)'
+        # Python bindings
+        python3-devel
+        python3-setuptools
+        # Ocaml bindings/oxenstored
+        ocaml
+        ocaml-findlib
+
+        # Stubdom (download/extract)
+        bzip2
+        tar
+
+        # Qemu build
+        meson
+        ninja
+        'pkgconfig(glib-2.0)'
+        'pkgconfig(pixman-1)'
+        python3-packaging
+    )
+
+    zypper install -y --no-recommends "${DEPS[@]}"
+    zypper clean -a
+EOF
+
+USER user
+WORKDIR /build
diff --git a/automation/build/suse/opensuse-leap.dockerfile b/automation/build/suse/opensuse-leap.dockerfile
deleted file mode 100644
index 28d333881233..000000000000
--- a/automation/build/suse/opensuse-leap.dockerfile
+++ /dev/null
@@ -1,75 +0,0 @@ 
-# syntax=docker/dockerfile:1
-FROM --platform=linux/amd64 opensuse/leap
-LABEL maintainer.name="The Xen Project" \
-      maintainer.email="xen-devel@lists.xenproject.org"
-
-ENV USER root
-
-RUN mkdir /build
-WORKDIR /build
-
-RUN zypper ref && zypper up -y --no-recommends
-RUN zypper install -y --no-recommends \
-        acpica \
-        bc \
-        bin86 \
-        bison \
-        bzip2 \
-        checkpolicy \
-        clang \
-        cmake \
-        dev86 \
-        diffutils \
-        discount \
-        flex \
-        gawk \
-        gcc \
-        gcc-c++ \
-        git \
-        ghostscript \
-        glib2-devel \
-        glibc-devel \
-        gzip \
-        hostname \
-        libaio-devel \
-        libbz2-devel \
-        libext2fs-devel \
-        libgnutls-devel \
-        libjpeg62-devel \
-        libnl3-devel \
-        libnuma-devel \
-        libpixman-1-0-devel \
-        libpng16-devel \
-        libssh2-devel \
-        libtasn1-devel \
-        libuuid-devel \
-        libyajl-devel \
-        lzo-devel \
-        make \
-        nasm \
-        ncurses-devel \
-        ocaml \
-        ocaml-findlib-devel \
-        ocaml-ocamlbuild \
-        ocaml-ocamldoc \
-        pandoc \
-        patch \
-        pkg-config \
-        'pkgconfig(libpci)' \
-        'pkgconfig(sdl)' \
-        'pkgconfig(sdl2)' \
-        python3-devel \
-        python3-setuptools \
-        # systemd-devel for Xen < 4.19
-        systemd-devel \
-        tar \
-        transfig \
-        valgrind-devel \
-        wget \
-        which \
-        xz-devel \
-        zlib-devel \
-        # QEMU
-        ninja \
-        && \
-        zypper clean -a
diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index fd6ca1270e4e..f9a9275ff293 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -645,25 +645,25 @@  ubuntu-focal-clang-debug:
   variables:
     CONTAINER: ubuntu:focal
 
-opensuse-leap-clang:
+opensuse-leap-15.6-clang:
   extends: .clang-x86-64-build
   variables:
-    CONTAINER: suse:opensuse-leap
+    CONTAINER: opensuse:leap-15.6-x86_64
 
-opensuse-leap-clang-debug:
+opensuse-leap-15.6-clang-debug:
   extends: .clang-x86-64-build-debug
   variables:
-    CONTAINER: suse:opensuse-leap
+    CONTAINER: opensuse:leap-15.6-x86_64
 
-opensuse-leap-gcc:
+opensuse-leap-15.6-gcc:
   extends: .gcc-x86-64-build
   variables:
-    CONTAINER: suse:opensuse-leap
+    CONTAINER: opensuse:leap-15.6-x86_64
 
-opensuse-leap-gcc-debug:
+opensuse-leap-15.6-gcc-debug:
   extends: .gcc-x86-64-build-debug
   variables:
-    CONTAINER: suse:opensuse-leap
+    CONTAINER: opensuse:leap-15.6-x86_64
 
 opensuse-tumbleweed-clang:
   extends: .clang-x86-64-build
diff --git a/automation/scripts/containerize b/automation/scripts/containerize
index c4f013702122..d8110b125333 100755
--- a/automation/scripts/containerize
+++ b/automation/scripts/containerize
@@ -42,7 +42,7 @@  case "_${CONTAINER}" in
     _bookworm-cppcheck) CONTAINER="${BASE}/debian:bookworm-cppcheck" ;;
     _bionic) CONTAINER="${BASE}/ubuntu:bionic" ;;
     _xenial) CONTAINER="${BASE}/ubuntu:xenial" ;;
-    _opensuse-leap|_leap) CONTAINER="${BASE}/suse:opensuse-leap" ;;
+    _opensuse-leap|_leap) CONTAINER="${BASE}/opensuse:leap-15.6-x86_64" ;;
     _opensuse-tumbleweed|_tumbleweed) CONTAINER="${BASE}/opensuse:tumbleweed-x86_64" ;;
 esac