Fetch compatibile dnf download command in container image

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. There doesn't seem to be a good reason for this as there is no
file overlap between the packages according to `apt-file list`.

Change-Id: I6fbf7db87a8272dae2552f9075addec2d5c82e56
This commit is contained in:
Clark Boylan 2024-02-09 10:26:17 -08:00
parent 7abd12906f
commit c7f52ed97f
1 changed files with 8 additions and 5 deletions

View File

@ -93,12 +93,15 @@ RUN \
RUN apt-get install -y --install-recommends podman containernetworking-plugins uidmap libsemanage-common \
&& printf '[engine]\ncgroup_manager="cgroupfs"\nevents_logger="file"\n' > /etc/containers/containers.conf
# There is a Debian package in the NEW queue currently for dnf-plugins-core
# https://ftp-master.debian.org/new/dnf-plugins-core_4.0.21-1~exp1.html
# Until this is generally available; manually install "dnf download"
# for the yum-minimal element
# 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.
RUN \
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 \