From 9a522c2a5ad910bfc93dcd6e41d79f42dbabe953 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sep 27 2023 15:22:47 +0000 Subject: Change versioned Conflicts to rich Requires ... (rhbz#2240828) We currently have grubby-8.40-72.fc39 and sdubby-1.0-3.fc39. systemd had 'Conflicts: grubby < 8.40-72', which is satisfied by grubby. But sdubby has 'Provides: grubby' (with no version), which prevented installation: $ sudo rpm -i ./sdubby-1.0-3.fc39.noarch.rpm error: Failed dependencies: grubby < 8.40-72 conflicts with (installed) systemd-udev-254.2-7.fc39.x86_64 The rpm docs don't actually say what the meaning of the 'if' is: is it only satisfied by actual package names, or also by Provides. But experiments suggest that Provides are not used. The rich dependency seems to avoid the issue. --- diff --git a/systemd.spec b/systemd.spec index cf86d44..9a9f1f6 100644 --- a/systemd.spec +++ b/systemd.spec @@ -358,8 +358,8 @@ Obsoletes: systemd < 245.6-1 Provides: udev = %{version} Provides: udev%{_isa} = %{version} Obsoletes: udev < 183 -Conflicts: grubby < 8.40-72 -Conflicts: sdubby < 1.0-3 +Requires: (grubby > 8.40-72 if grubby) +Requires: (sdubby > 1.0-3 if sdubby) # Recommends to replace normal Requires deps for stuff that is dlopen()ed # used by dissect, integritysetup, veritysetyp, growfs, repart, cryptenroll, home