From f305d7fe70f66f9e329a3a254592713be7f30bbd Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 19 Feb 2024 08:21:45 -0800 Subject: [PATCH] Fetch compatibile dnf download command in functest setup The dnf-plugins-core repo updates its download command to use a dnf.utils method that is not present in the dnf version installed by Debian packages. Update the fetch of dnf-plugins-core to use the last version of the download plugin that is compatible with the dnf package in Debian. Note that we don't use the bookworm dnf-plugins-core package to address this because dnf-plugins-core specifies that it breaks and replaces zypper. This occurs due to the collision of a single manpage filename. OpenSUSE addresses this by moving one of the manpages to a different location allowing zypper and dnf to be installed together on SUSE distros. Hopefully Debian will manage to do similar eventually. Change-Id: I3a029340f9635f54570e48a68a9e2c1b1e30a76f --- roles/dib-functests/tasks/main.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/dib-functests/tasks/main.yaml b/roles/dib-functests/tasks/main.yaml index 4573f3c94..e727a7c30 100644 --- a/roles/dib-functests/tasks/main.yaml +++ b/roles/dib-functests/tasks/main.yaml @@ -34,13 +34,17 @@ state: directory mode: ugo+rw -# NOTE(ianw) 2021-10-15 : at this point dnf-plugins-core is stuck in -# the NEW queue. Use that when it is available over this hack, -# obviously. +# There is a Debian package for dnf-plugins-core but it breaks and replaces +# zypper which we also want to install. Prior to dnf-plugins-core existing +# in Debian we fetched the content we needed from github. Continue doing +# that but pin the version for compatibility with Debian's dnf. +# Until Debian fixes its dnf-plugins-core package in bookworm; manually +# install "dnf download" for the yum-minimal element. Note version 4.4.4 +# is the last version compatible with bookworm's dnf package. - name: Install dnf download shell: | set -x - git clone https://github.com/rpm-software-management/dnf-plugins-core + git clone --depth 1 --branch 4.4.4 https://github.com/rpm-software-management/dnf-plugins-core mkdir /usr/lib/python3/dist-packages/dnf-plugins cp -r dnf-plugins-core/plugins/dnfpluginscore /usr/lib/python3/dist-packages cp dnf-plugins-core/plugins/download.py /usr/lib/python3/dist-packages/dnf-plugins