From 86504f5136f4e0ed4c8d6ed811e8e7030d91be02 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Wed, 11 Nov 2026 09:25:57 +0100 Subject: [PATCH] rpm-init: let dnf downgrade packages of a ubi image ahead of its repositories The rhel10 build of every package fails in rpm-init since the ubi10 image ships rpm 4.19.1.1-25 while the ubi 10 repositories still serve -23: cannot install both rpm-4.19.1.1-23.el10 from ubi-10-for-aarch64-baseos-rpms and rpm-4.19.1.1-25.el10 from @System rpm-build requires the exact version of rpm of its repository, so dnf has to downgrade rpm and its dependent packages. Pass --allowerasing to let it do so. Signed-off-by: Nicolas De Loof --- hack/scripts/rpm-init.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hack/scripts/rpm-init.sh b/hack/scripts/rpm-init.sh index cb1c8bc8..4f41c940 100755 --- a/hack/scripts/rpm-init.sh +++ b/hack/scripts/rpm-init.sh @@ -88,7 +88,10 @@ case "$pkgrelease" in ;; rhel*) # skipping rpmlint as it requires dependencies not available in ubi images - dnf install -y git rpm-build dnf-plugins-core + # --allowerasing: a ubi image can be ahead of the ubi repositories (e.g. rpm + # installed in a newer version than the one rpm-build requires), dnf then + # has to downgrade it + dnf install -y --allowerasing git rpm-build dnf-plugins-core ;; esac