From c6093e1dab2a84ae32ce938e0fc64306e143360e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= Date: Fri, 28 Feb 2025 13:36:15 +0100 Subject: [PATCH] fedora/REQUIRED_PACKAGES: use dnf, not yum Dnf is available since many years ago, let's always use it. Moreover, we are using now --skip-unavailable option, which yum doesn't have, so it fails. In the CI we were still using yum because we were passing NM_INSTALL=yum from fedora-install.sh, causing the CI to fail. Change it. Fixes: 5409d4f5cd40 ('fedora/REQUIRED_PACKAGES: speed up optional packages installation') --- .gitlab-ci/fedora-install.sh | 6 +++--- contrib/fedora/REQUIRED_PACKAGES | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci/fedora-install.sh b/.gitlab-ci/fedora-install.sh index 3bd4698366..65e0219921 100755 --- a/.gitlab-ci/fedora-install.sh +++ b/.gitlab-ci/fedora-install.sh @@ -39,12 +39,12 @@ fi fi -NM_NO_EXTRA=1 NM_INSTALL="yum install -y" ./contrib/fedora/REQUIRED_PACKAGES -yum install -y glibc-langpack-pl ccache clang +NM_NO_EXTRA=1 ./contrib/fedora/REQUIRED_PACKAGES +dnf install -y glibc-langpack-pl ccache clang # containers have "tsflags=nodocs" in /etc/dnf/dnf.conf. We need /usr/shared/gtk-doc/html # to generate proper documentation. -yum reinstall -y --setopt='tsflags=' glib2-doc +dnf reinstall -y --setopt='tsflags=' glib2-doc if [ $IS_FEDORA = 1 ]; then FEDORA_VERSION=$(cat /etc/os-release | grep '^VERSION_ID=' | sed s\/"VERSION_ID="\/\/) diff --git a/contrib/fedora/REQUIRED_PACKAGES b/contrib/fedora/REQUIRED_PACKAGES index d47e60980a..c2832875c7 100755 --- a/contrib/fedora/REQUIRED_PACKAGES +++ b/contrib/fedora/REQUIRED_PACKAGES @@ -4,16 +4,13 @@ # NetworkManager on Fedora and RHEL. # # Not all of these packages are available, depending -# on your distribution/release. But yum will happily -# skip them. +# on your distribution/release. But the script will skip them. # # Not all of these packages are strictly speaking necessary. # This is a generous list of related packages. set -xe -DNF="$(command -v dnf &>/dev/null && echo dnf || echo yum)" - SUDO= [ "$EUID" -eq 0 ] || SUDO=sudo @@ -21,7 +18,7 @@ install() { if [ "$NM_INSTALL" != "" ]; then $NM_INSTALL "$@" else - $SUDO "$DNF" install -y "$@" + $SUDO dnf install -y "$@" fi }