From 53f9996de7a1c5cc1a8e183951db28292e78bc5b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 4 Sep 2024 10:43:17 +0200 Subject: [PATCH] install_rpm_containerd: add support for dnf5 Fedora 41 and up use the new dnf5 as default, which is a rewrite of the dnf commands with different options; + dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments. make: *** [Makefile:95: verify] Error 2 script returned exit code 2 Signed-off-by: Sebastiaan van Stijn --- install-containerd-helpers | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install-containerd-helpers b/install-containerd-helpers index 5d80c5ed05..131b7e298b 100644 --- a/install-containerd-helpers +++ b/install-containerd-helpers @@ -24,7 +24,14 @@ function install_rpm_containerd() { # so this logic works for both cases. # (See also same logic in install_debian_containerd) - if command -v dnf; then + if command -v dnf5; then + dnf --version + + dnf config-manager addrepo --save-filename=docker-ce.repo --from-repofile="${REPO_URL}" + dnf config-manager setopt 'docker-ce-*.enabled=0' + dnf config-manager setopt 'docker-ce-test.enabled=1' + dnf makecache + elif command -v dnf; then dnf --version dnf config-manager --add-repo "${REPO_URL}"