[PATCH] ci: move external build environment setups to CentOS Stream 9

Paolo Bonzini posted 1 patch 2 weeks, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240412103708.27650-1-pbonzini@redhat.com
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>
.../stream/{8 => 9}/build-environment.yml     | 31 ++++++-------
.../stream/{8 => 9}/x86_64/configure          |  4 +-
.../stream/{8 => 9}/x86_64/test-avocado       |  0
scripts/ci/setup/build-environment.yml        | 44 +++++++------------
4 files changed, 34 insertions(+), 45 deletions(-)
rename scripts/ci/org.centos/stream/{8 => 9}/build-environment.yml (75%)
rename scripts/ci/org.centos/stream/{8 => 9}/x86_64/configure (98%)
rename scripts/ci/org.centos/stream/{8 => 9}/x86_64/test-avocado (100%)
[PATCH] ci: move external build environment setups to CentOS Stream 9
Posted by Paolo Bonzini 2 weeks, 3 days ago
RHEL 9 (and thus also the derivatives) are available since two years
now, so according to QEMU's support policy, we can drop the active
support for the previous major version 8 now.

Thus upgrade our CentOS Stream build environment playbooks to major
version 9 now.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 .../stream/{8 => 9}/build-environment.yml     | 31 ++++++-------
 .../stream/{8 => 9}/x86_64/configure          |  4 +-
 .../stream/{8 => 9}/x86_64/test-avocado       |  0
 scripts/ci/setup/build-environment.yml        | 44 +++++++------------
 4 files changed, 34 insertions(+), 45 deletions(-)
 rename scripts/ci/org.centos/stream/{8 => 9}/build-environment.yml (75%)
 rename scripts/ci/org.centos/stream/{8 => 9}/x86_64/configure (98%)
 rename scripts/ci/org.centos/stream/{8 => 9}/x86_64/test-avocado (100%)

diff --git a/scripts/ci/org.centos/stream/8/build-environment.yml b/scripts/ci/org.centos/stream/9/build-environment.yml
similarity index 75%
rename from scripts/ci/org.centos/stream/8/build-environment.yml
rename to scripts/ci/org.centos/stream/9/build-environment.yml
index 1ead77e2cbf..cd29fe6f275 100644
--- a/scripts/ci/org.centos/stream/8/build-environment.yml
+++ b/scripts/ci/org.centos/stream/9/build-environment.yml
@@ -2,32 +2,32 @@
 - name: Installation of extra packages to build QEMU
   hosts: all
   tasks:
-    - name: Extra check for CentOS Stream 8
+    - name: Extra check for CentOS Stream 9
       lineinfile:
         path: /etc/redhat-release
-        line: CentOS Stream release 8
+        line: CentOS Stream release 9
         state: present
       check_mode: yes
-      register: centos_stream_8
+      register: centos_stream_9
 
-    - name: Enable EPEL repo on CentOS Stream 8
+    - name: Enable EPEL repo on CentOS Stream 9
       dnf:
         name:
           - epel-release
         state: present
       when:
-        - centos_stream_8
+        - centos_stream_9
 
-    - name: Enable PowerTools repo on CentOS Stream 8
+    - name: Enable CRB repo on CentOS Stream 9
       ini_file:
-        path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo
-        section: powertools
+        path: /etc/yum.repos.d/centos.repo
+        section: crb
         option: enabled
         value: "1"
       when:
-        - centos_stream_8
+        - centos_stream_9
 
-    - name: Install basic packages to build QEMU on CentOS Stream 8
+    - name: Install basic packages to build QEMU on CentOS Stream 9
       dnf:
         name:
           - bzip2
@@ -42,7 +42,6 @@
           - gettext
           - git
           - glib2-devel
-          - glusterfs-api-devel
           - gnutls-devel
           - libaio-devel
           - libcap-ng-devel
@@ -61,22 +60,24 @@
           - lzo-devel
           - make
           - mesa-libEGL-devel
+          - meson
           - nettle-devel
           - ninja-build
           - nmap-ncat
           - numactl-devel
           - pixman-devel
-          - python38
+          - python3
+          - python3-pip
           - python3-sphinx
+          - python3-sphinx_rtd_theme
+          - python3-tomli
           - rdma-core-devel
           - redhat-rpm-config
           - snappy-devel
-          - spice-glib-devel
-          - spice-server-devel
           - systemd-devel
           - systemtap-sdt-devel
           - tar
           - zlib-devel
         state: present
       when:
-        - centos_stream_8
+        - centos_stream_9
diff --git a/scripts/ci/org.centos/stream/8/x86_64/configure b/scripts/ci/org.centos/stream/9/x86_64/configure
similarity index 98%
rename from scripts/ci/org.centos/stream/8/x86_64/configure
rename to scripts/ci/org.centos/stream/9/x86_64/configure
index 76781f17f41..1b6f40fd785 100755
--- a/scripts/ci/org.centos/stream/8/x86_64/configure
+++ b/scripts/ci/org.centos/stream/9/x86_64/configure
@@ -16,7 +16,7 @@
 # that patches adding downstream specific devices are not available.
 #
 ../configure \
---python=/usr/bin/python3.8 \
+--python=/usr/bin/python3.9 \
 --prefix="/usr" \
 --libdir="/usr/lib64" \
 --datadir="/usr/share" \
@@ -157,7 +157,6 @@
 --enable-docs \
 --enable-fdt \
 --enable-gcrypt \
---enable-glusterfs \
 --enable-gnutls \
 --enable-guest-agent \
 --enable-iconv \
@@ -180,7 +179,6 @@
 --enable-seccomp \
 --enable-snappy \
 --enable-smartcard \
---enable-spice \
 --enable-system \
 --enable-tcg \
 --enable-tools \
diff --git a/scripts/ci/org.centos/stream/8/x86_64/test-avocado b/scripts/ci/org.centos/stream/9/x86_64/test-avocado
similarity index 100%
rename from scripts/ci/org.centos/stream/8/x86_64/test-avocado
rename to scripts/ci/org.centos/stream/9/x86_64/test-avocado
diff --git a/scripts/ci/setup/build-environment.yml b/scripts/ci/setup/build-environment.yml
index f344d1a8509..9b7d96c01b2 100644
--- a/scripts/ci/setup/build-environment.yml
+++ b/scripts/ci/setup/build-environment.yml
@@ -174,26 +174,26 @@
         - ansible_facts['distribution_version'] == '22.04'
         - ansible_facts['architecture'] == 'aarch64'
 
-    - name: Enable EPEL repo on EL8
+    - name: Enable EPEL repo on EL9
       dnf:
         name:
           - epel-release
         state: present
       when:
         - ansible_facts['distribution_file_variety'] in ['RedHat', 'CentOS']
-        - ansible_facts['distribution_major_version'] == '8'
+        - ansible_facts['distribution_major_version'] == '9'
 
-    - name: Enable PowerTools repo on CentOS 8
+    - name: Enable CRB repo on CentOS 9
       ini_file:
-        path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo
-        section: powertools
+        path: /etc/yum.repos.d/centos.repo
+        section: crb
         option: enabled
         value: "1"
       when:
         - ansible_facts['distribution_file_variety'] == 'CentOS'
-        - ansible_facts['distribution_major_version'] == '8'
+        - ansible_facts['distribution_major_version'] == '9'
 
-    - name: Install basic packages to build QEMU on EL8
+    - name: Install basic packages to build QEMU on EL9
       dnf:
         # This list of packages start with tests/docker/dockerfiles/centos8.docker
         # but only include files that are common to all distro variants and present
@@ -211,7 +211,6 @@
           - gettext
           - git
           - glib2-devel
-          - glusterfs-api-devel
           - gnutls-devel
           - libaio-devel
           - libcap-ng-devel
@@ -229,17 +228,20 @@
           - lzo-devel
           - make
           - mesa-libEGL-devel
+          - meson
           - nettle-devel
           - ninja-build
           - nmap-ncat
           - numactl-devel
           - pixman-devel
-          - python38
+          - python3
+          - python3-pip
           - python3-sphinx
+          - python3-sphinx_rtd_theme
+          - python3-tomli
           - rdma-core-devel
           - redhat-rpm-config
           - snappy-devel
-          - spice-glib-devel
           - systemd-devel
           - systemtap-sdt-devel
           - tar
@@ -247,28 +249,16 @@
         state: present
       when:
         - ansible_facts['distribution_file_variety'] in ['RedHat', 'CentOS']
-        - ansible_facts['distribution_version'] == '8'
-
-    - name: Install packages only available on x86 and aarch64
-      dnf:
-        # Spice server not available in ppc64le
-        name:
-          - spice-server
-          - spice-server-devel
-        state: present
-      when:
-        - ansible_facts['distribution_file_variety'] in ['RedHat', 'CentOS']
-        - ansible_facts['distribution_version'] == '8'
-        - ansible_facts['architecture'] == 'aarch64' or ansible_facts['architecture'] == 'x86_64'
+        - ansible_facts['distribution_version'] == '9'
 
     - name: Check whether the Python runtime version is managed by alternatives
       stat:
         path: /etc/alternatives/python3
       register: python3
 
-    - name: Set default Python runtime to 3.8 on EL8
-      command: alternatives --set python3 /usr/bin/python3.8
+    - name: Set default Python runtime to 3.9 on EL9
+      command: alternatives --set python3 /usr/bin/python3.9
       when:
         - ansible_facts['distribution_file_variety'] in ['RedHat', 'CentOS']
-        - ansible_facts['distribution_version'] == '8'
-        - python3.stat.islnk and python3.stat.lnk_target != '/usr/bin/python3.8'
+        - ansible_facts['distribution_version'] == '9'
+        - python3.stat.exists and python3.stat.islnk and python3.stat.lnk_target != '/usr/bin/python3.9'
-- 
2.44.0
Re: [PATCH] ci: move external build environment setups to CentOS Stream 9
Posted by Thomas Huth 4 days, 7 hours ago
On 12/04/2024 12.37, Paolo Bonzini wrote:
> RHEL 9 (and thus also the derivatives) are available since two years
> now, so according to QEMU's support policy, we can drop the active
> support for the previous major version 8 now.
> 
> Thus upgrade our CentOS Stream build environment playbooks to major
> version 9 now.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   .../stream/{8 => 9}/build-environment.yml     | 31 ++++++-------
>   .../stream/{8 => 9}/x86_64/configure          |  4 +-
>   .../stream/{8 => 9}/x86_64/test-avocado       |  0
>   scripts/ci/setup/build-environment.yml        | 44 +++++++------------
>   4 files changed, 34 insertions(+), 45 deletions(-)
>   rename scripts/ci/org.centos/stream/{8 => 9}/build-environment.yml (75%)
>   rename scripts/ci/org.centos/stream/{8 => 9}/x86_64/configure (98%)
>   rename scripts/ci/org.centos/stream/{8 => 9}/x86_64/test-avocado (100%)

  Hi Paolo!

Not sure whether you've seen my busted pull request, but anyway: It seems 
like this was not enough to update the custom runner. You also need to 
update .gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml for this.

By the way, who has access to the s390x custom runner and could update it to 
Ubuntu 22.04 now? It still seems to work with 20.04 which will be out of 
support from the QEMU POV next week...

  Thomas
Re: [PATCH] ci: move external build environment setups to CentOS Stream 9
Posted by Daniel P. Berrangé 4 days, 6 hours ago
On Thu, Apr 25, 2024 at 05:03:43PM +0200, Thomas Huth wrote:
> On 12/04/2024 12.37, Paolo Bonzini wrote:
> > RHEL 9 (and thus also the derivatives) are available since two years
> > now, so according to QEMU's support policy, we can drop the active
> > support for the previous major version 8 now.
> > 
> > Thus upgrade our CentOS Stream build environment playbooks to major
> > version 9 now.
> > 
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >   .../stream/{8 => 9}/build-environment.yml     | 31 ++++++-------
> >   .../stream/{8 => 9}/x86_64/configure          |  4 +-
> >   .../stream/{8 => 9}/x86_64/test-avocado       |  0
> >   scripts/ci/setup/build-environment.yml        | 44 +++++++------------
> >   4 files changed, 34 insertions(+), 45 deletions(-)
> >   rename scripts/ci/org.centos/stream/{8 => 9}/build-environment.yml (75%)
> >   rename scripts/ci/org.centos/stream/{8 => 9}/x86_64/configure (98%)
> >   rename scripts/ci/org.centos/stream/{8 => 9}/x86_64/test-avocado (100%)
> 
>  Hi Paolo!
> 
> Not sure whether you've seen my busted pull request, but anyway: It seems
> like this was not enough to update the custom runner. You also need to
> update .gitlab-ci.d/custom-runners/centos-stream-8-x86_64.yml for this.
> 
> By the way, who has access to the s390x custom runner and could update it to
> Ubuntu 22.04 now? It still seems to work with 20.04 which will be out of
> support from the QEMU POV next week...

I rather wish that the custom runners were all using podman/docker,
so we could have the jobs just build containers for the envs, like
we do on shared runners, and/or on the Azure runners. That way we're
not beholden to an admin to manually update OS intsalls.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Re: [PATCH] ci: move external build environment setups to CentOS Stream 9
Posted by Thomas Huth 2 weeks, 3 days ago
On 12/04/2024 12.37, Paolo Bonzini wrote:
> RHEL 9 (and thus also the derivatives) are available since two years
> now, so according to QEMU's support policy, we can drop the active
> support for the previous major version 8 now.
> 
> Thus upgrade our CentOS Stream build environment playbooks to major
> version 9 now.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   .../stream/{8 => 9}/build-environment.yml     | 31 ++++++-------
>   .../stream/{8 => 9}/x86_64/configure          |  4 +-
>   .../stream/{8 => 9}/x86_64/test-avocado       |  0
>   scripts/ci/setup/build-environment.yml        | 44 +++++++------------
>   4 files changed, 34 insertions(+), 45 deletions(-)
>   rename scripts/ci/org.centos/stream/{8 => 9}/build-environment.yml (75%)
>   rename scripts/ci/org.centos/stream/{8 => 9}/x86_64/configure (98%)
>   rename scripts/ci/org.centos/stream/{8 => 9}/x86_64/test-avocado (100%)

Looks sane to me!

Reviewed-by: Thomas Huth <thuth@redhat.com>