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
This commit is contained in:
@@ -60,9 +60,9 @@ variables:
|
|||||||
# This is done by running `ci-fairy generate-template` and possibly bumping
|
# This is done by running `ci-fairy generate-template` and possibly bumping
|
||||||
# ".default_tag".
|
# ".default_tag".
|
||||||
ALPINE_TAG: 'tag-75ecbb5bcef4'
|
ALPINE_TAG: 'tag-75ecbb5bcef4'
|
||||||
CENTOS_TAG: 'tag-ea45f0a3f632'
|
CENTOS_TAG: 'tag-0de3c2e2d9ed'
|
||||||
DEBIAN_TAG: 'tag-1ccef04c657b'
|
DEBIAN_TAG: 'tag-1ccef04c657b'
|
||||||
FEDORA_TAG: 'tag-ea45f0a3f632'
|
FEDORA_TAG: 'tag-0de3c2e2d9ed'
|
||||||
UBUNTU_TAG: 'tag-1ccef04c657b'
|
UBUNTU_TAG: 'tag-1ccef04c657b'
|
||||||
|
|
||||||
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
||||||
|
@@ -5,6 +5,7 @@ set -ex
|
|||||||
IS_FEDORA=0
|
IS_FEDORA=0
|
||||||
IS_CENTOS=0
|
IS_CENTOS=0
|
||||||
CENTOS_VERSION=0
|
CENTOS_VERSION=0
|
||||||
|
FEDORA_VERSION=0
|
||||||
grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1
|
grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1
|
||||||
grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1
|
grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1
|
||||||
if [ $IS_CENTOS = 1 ]; then
|
if [ $IS_CENTOS = 1 ]; then
|
||||||
@@ -45,9 +46,22 @@ yum install -y glibc-langpack-pl ccache clang
|
|||||||
# to generate proper documentation.
|
# to generate proper documentation.
|
||||||
yum reinstall -y --setopt='tsflags=' glib2-doc
|
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
|
if command -v dnf &>/dev/null; then
|
||||||
dnf install -y python3-dnf-plugins-core
|
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
|
else
|
||||||
debuginfo-install -y glib2
|
debuginfo-install -y glib2
|
||||||
fi
|
fi
|
||||||
|
@@ -40,7 +40,7 @@ uname -a
|
|||||||
meson --version
|
meson --version
|
||||||
|
|
||||||
! command -v dpkg &>/dev/null || dpkg -l
|
! 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
|
! command -v apk &>/dev/null || apk -v info
|
||||||
|
|
||||||
# We have a unit test that check that `ci-fairy generate-template`
|
# We have a unit test that check that `ci-fairy generate-template`
|
||||||
|
Reference in New Issue
Block a user