Skip to content

Commit

Permalink
gitlab: fix helper scripts to support DNF5
Browse files Browse the repository at this point in the history
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] rpm-software-management/dnf5#389

(cherry picked from commit 4e50d7d)
  • Loading branch information
ffmancera authored and ihuguet committed Aug 22, 2024
1 parent c0a36ba commit c72978a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ variables:
# This is done by running `ci-fairy generate-template` and possibly bumping
# ".default_tag".
ALPINE_TAG: 'tag-d8c61f882b9d'
CENTOS_TAG: 'tag-14c0de35a349'
CENTOS_TAG: 'tag-8044890d9044'
DEBIAN_TAG: 'tag-538b968b666b'
FEDORA_TAG: 'tag-14c0de35a349'
FEDORA_TAG: 'tag-8044890d9044'
UBUNTU_TAG: 'tag-538b968b666b'

ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
Expand Down
16 changes: 15 additions & 1 deletion .gitlab-ci/fedora-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit c72978a

Please sign in to comment.