From 4e50d7d53f6fd60a95c94f8f387fbc136e5a5f63 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Mon, 27 May 2024 10:41:00 +0200 Subject: [PATCH] gitlab: fix helper scripts to support DNF5 As Fedora 41 (currently Rawhide) is migrating to DNF5 [1], the debuginfo-install command is not available anymore according to the documentation. Instead, the user need to add the package suffix "-debuginfo" when using the install command. The implementation of the debuginfo-install plugin is under development and tracked upstream. [2] [1] https://fedoraproject.org/wiki/Changes/SwitchToDnf5 [2] https://github.com/rpm-software-management/dnf5/issues/389 --- .gitlab-ci.yml | 4 ++-- .gitlab-ci/fedora-install.sh | 16 +++++++++++++++- .gitlab-ci/run-test.sh | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f26ba9b91..b0e8977445 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,9 +60,9 @@ variables: # This is done by running `ci-fairy generate-template` and possibly bumping # ".default_tag". ALPINE_TAG: 'tag-75ecbb5bcef4' - CENTOS_TAG: 'tag-ea45f0a3f632' + CENTOS_TAG: 'tag-0de3c2e2d9ed' DEBIAN_TAG: 'tag-1ccef04c657b' - FEDORA_TAG: 'tag-ea45f0a3f632' + FEDORA_TAG: 'tag-0de3c2e2d9ed' UBUNTU_TAG: 'tag-1ccef04c657b' ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh' diff --git a/.gitlab-ci/fedora-install.sh b/.gitlab-ci/fedora-install.sh index 5ffb461c5e..3bd4698366 100755 --- a/.gitlab-ci/fedora-install.sh +++ b/.gitlab-ci/fedora-install.sh @@ -5,6 +5,7 @@ set -ex IS_FEDORA=0 IS_CENTOS=0 CENTOS_VERSION=0 +FEDORA_VERSION=0 grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1 grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1 if [ $IS_CENTOS = 1 ]; then @@ -45,9 +46,22 @@ yum install -y glibc-langpack-pl ccache clang # to generate proper documentation. yum reinstall -y --setopt='tsflags=' glib2-doc +if [ $IS_FEDORA = 1 ]; then + FEDORA_VERSION=$(cat /etc/os-release | grep '^VERSION_ID=' | sed s\/"VERSION_ID="\/\/) +fi + if command -v dnf &>/dev/null; then dnf install -y python3-dnf-plugins-core - dnf debuginfo-install -y glib2 + # Fedora 41 migrated to DNF5 and the debuginfo-install plugin is not implemented yet + # therefore we need to enable the repo and install the debuginfo subpackage manually + if [ $FEDORA_VERSION -lt "41" ]; then + dnf debuginfo-install -y glib2 + else + dnf install -y dnf5-plugins + dnf config-manager setopt fedora-debuginfo.enabled=1 + dnf config-manager setopt rawhide-debuginfo.enabled=1 || true + dnf install -y glib2-debuginfo + fi else debuginfo-install -y glib2 fi diff --git a/.gitlab-ci/run-test.sh b/.gitlab-ci/run-test.sh index cd12220315..d97163b63d 100755 --- a/.gitlab-ci/run-test.sh +++ b/.gitlab-ci/run-test.sh @@ -40,7 +40,7 @@ uname -a meson --version ! command -v dpkg &>/dev/null || dpkg -l -! command -v yum &>/dev/null || yum list installed +! command -v dnf &>/dev/null || dnf list --installed ! command -v apk &>/dev/null || apk -v info # We have a unit test that check that `ci-fairy generate-template`