Skip to content

Commit

Permalink
ci: move external build environment setups to CentOS Stream 9
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20240412103708.27650-1-pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20240418101056.302103-7-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
bonzini authored and huth committed Apr 24, 2024
1 parent 8f8cdf5 commit c036bbc
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -42,7 +42,6 @@
- gettext
- git
- glib2-devel
- glusterfs-api-devel
- gnutls-devel
- libaio-devel
- libcap-ng-devel
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down Expand Up @@ -157,7 +157,6 @@
--enable-docs \
--enable-fdt \
--enable-gcrypt \
--enable-glusterfs \
--enable-gnutls \
--enable-guest-agent \
--enable-iconv \
Expand All @@ -180,7 +179,6 @@
--enable-seccomp \
--enable-snappy \
--enable-smartcard \
--enable-spice \
--enable-system \
--enable-tcg \
--enable-tools \
Expand Down
44 changes: 17 additions & 27 deletions scripts/ci/setup/build-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -211,7 +211,6 @@
- gettext
- git
- glib2-devel
- glusterfs-api-devel
- gnutls-devel
- libaio-devel
- libcap-ng-devel
Expand All @@ -229,46 +228,37 @@
- 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
- zlib-devel
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'

0 comments on commit c036bbc

Please sign in to comment.