From: Daan De Meyer Date: Fri, 31 May 2024 21:21:05 +0000 (+0200) Subject: mkosi: Filter out sdubby and grubby from fedora rpm dependencies X-Git-Tag: v256-rc4~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9dd837104c387a25dd135d7aeef0df0d12ac71a;p=thirdparty%2Fsystemd.git mkosi: Filter out sdubby and grubby from fedora rpm dependencies When we query dependencies with rpmspec, we get the following: """ bash-5.2# mkosi-chroot rpmspec --with upstream --query --requires --define "_topdir /var/tmp" --define "_sourcedir pkg/fedora" "pkg/fedora/systemd.spec" | sort --unique (grubby > 8.40-72 if grubby) (sdubby > 1.0-3 if sdubby) (systemd-rpm-macros = 256~rc3-1.fc41 if rpm-build) (util-linux-core or util-linux) /bin/sh coreutils dbus >= 1.9.18 firewalld-filesystem grep kbd kmod >= 18-4 libidn2.so.0()(64bit) libidn2.so.0(IDN2_0.0.0)(64bit) libkmod.so.2()(64bit) libkmod.so.2(LIBKMOD_5)(64bit) openssl-libs python3dist(cryptography) python3dist(pefile) python3dist(psutil) python3dist(zstd) systemd = 256~rc3-1.fc41 systemd(x86-64) = 256~rc3-1.fc41 systemd-boot systemd-libs(x86-64) = 256~rc3-1.fc41 systemd-networkd = 256~rc3-1.fc41 systemd-pam(x86-64) = 256~rc3-1.fc41 systemd-udev = 256~rc3-1.fc41 """ Trying to install with dnf5 correctly filters out grubby and sdubby as they are conditional dependencies and shouldn't be installed. However, dnf doesn't do the right thing and tries to install both grubby and sdubby, and since they conflict this causes the build to fail. Let's filter out sdubby and grubby explicitly to work around the bug in dnf as it's unlikely to get fixed since all development effort is now focused on dnf5. --- diff --git a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.prepare b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.prepare index 8b10b242e0e..a2b82871823 100755 --- a/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.prepare +++ b/mkosi.images/system/mkosi.conf.d/10-centos-fedora/mkosi.prepare @@ -23,7 +23,7 @@ for DEPS in --requires --buildrequires; do --define "_topdir /var/tmp" \ --define "_sourcedir pkg/$ID" \ "pkg/$ID/systemd.spec" | - grep --invert-match --regexp systemd --regexp /bin/sh --regexp "rpmlib(" --regexp udev | + grep --invert-match --regexp systemd --regexp /bin/sh --regexp "rpmlib(" --regexp udev --regexp grubby --regexp sdubby | sort --unique | tee /tmp/buildrequires | xargs --delimiter '\n' mkosi-install