From b7800e3e6629b14ae91743915d23c8681754f350 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Jul 15 2024 11:34:36 +0000 Subject: Drop versions from Conflicts for standalone packages Because the conflicts are in one direction, dnf may try to install older systemd/systemd-duev and newer systemd-standalone-*. This is not what we want: $ sudo dnf5 install systemd-standalone-repart Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Downgrading: systemd x86_64 255.4-1.fc40 fedora 14.6 MiB replacing systemd x86_64 256.2-1.fc40 @commandline 16.8 MiB systemd-container x86_64 255.4-1.fc40 fedora 1.4 MiB replacing systemd-container x86_64 256.2-1.fc40 @commandline 1.5 MiB systemd-devel x86_64 255.4-1.fc40 fedora 550.3 KiB replacing systemd-devel x86_64 256.2-1.fc40 @commandline 556.1 KiB systemd-libs x86_64 255.4-1.fc40 fedora 1.9 MiB replacing systemd-libs x86_64 256.2-1.fc40 @commandline 2.0 MiB systemd-networkd x86_64 255.4-1.fc40 fedora 2.0 MiB replacing systemd-networkd x86_64 256.2-1.fc40 @commandline 2.1 MiB systemd-oomd-defaults noarch 255.4-1.fc40 fedora 187.0 B replacing systemd-oomd-defaults noarch 256.2-1.fc40 @commandline 187.0 B systemd-pam x86_64 255.4-1.fc40 fedora 1.0 MiB replacing systemd-pam x86_64 256.2-1.fc40 @commandline 1.1 MiB systemd-resolved x86_64 255.4-1.fc40 fedora 629.9 KiB replacing systemd-resolved x86_64 256.2-1.fc40 @commandline 667.1 KiB systemd-rpm-macros noarch 255.4-1.fc40 fedora 9.5 KiB replacing systemd-rpm-macros noarch 256.2-1.fc40 @commandline 9.3 KiB systemd-tests x86_64 255.4-1.fc40 fedora 16.5 MiB replacing systemd-tests x86_64 256.2-1.fc40 @commandline 20.0 MiB systemd-udev x86_64 255.4-1.fc40 fedora 11.5 MiB replacing systemd-udev x86_64 256.2-1.fc40 @commandline 11.7 MiB systemd-ukify noarch 255.4-1.fc40 fedora 69.9 KiB replacing systemd-ukify noarch 256.2-1.fc40 @commandline 73.3 KiB Installing: systemd-standalone-repart x86_64 255.8-1.fc40 updates 986.6 KiB Transaction Summary: Installing: 1 packages Replacing: 12 packages Downgrading: 12 packages Also, declare the Conflicts on both sides, so that the issue is resolved immediately. Otherwise, it could still occur when an older version of the non-standalone packages are available (or installed). --- diff --git a/systemd.spec b/systemd.spec index a43c783..44a0f16 100644 --- a/systemd.spec +++ b/systemd.spec @@ -287,11 +287,11 @@ Conflicts: dracut < 059-16 Obsoletes: timedatex < 0.6-3 Provides: timedatex = 0.6-3 -Conflicts: %{name}-standalone-tmpfiles < %{version}-%{release}^ +Conflicts: %{name}-standalone-tmpfiles Provides: %{name}-tmpfiles = %{version}-%{release} -Conflicts: %{name}-standalone-sysusers < %{version}-%{release}^ +Conflicts: %{name}-standalone-sysusers Provides: %{name}-sysusers = %{version}-%{release} -Conflicts: %{name}-standalone-shutdown < %{version}-%{release}^ +Conflicts: %{name}-standalone-shutdown Provides: %{name}-shutdown = %{version}-%{release} %if "%{_sbindir}" == "%{_bindir}" @@ -454,7 +454,7 @@ Obsoletes: u2f-hidraw-policy < 1.0.2-40 # self-obsoletes to install both packages after split of systemd-boot Obsoletes: systemd-udev < 252.2^ -Conflicts: %{name}-standalone-repart < %{version}-%{release}^ +Conflicts: %{name}-standalone-repart Provides: %{name}-repart = %{version}-%{release} %if "%{_sbindir}" == "%{_bindir}" @@ -625,6 +625,7 @@ useful to test systemd internals. %package standalone-repart Summary: Standalone systemd-repart binary for use on systems without systemd Provides: %{name}-repart = %{version}-%{release} +Conflicts: %{name}-udev RemovePathPostfixes: .standalone %description standalone-repart @@ -635,6 +636,7 @@ package and is meant for use on systems without systemd. %package standalone-tmpfiles Summary: Standalone systemd-tmpfiles binary for use on systems without systemd Provides: %{name}-tmpfiles = %{version}-%{release} +Conflicts: %{name} RemovePathPostfixes: .standalone %description standalone-tmpfiles @@ -645,6 +647,7 @@ package and is meant for use on systems without systemd. %package standalone-sysusers Summary: Standalone systemd-sysusers binary for use on systems without systemd Provides: %{name}-sysusers = %{version}-%{release} +Conflicts: %{name} RemovePathPostfixes: .standalone %description standalone-sysusers @@ -655,6 +658,7 @@ package and is meant for use on systems without systemd. %package standalone-shutdown Summary: Standalone systemd-shutdown binary for use on systems without systemd Provides: %{name}-shutdown = %{version}-%{release} +Conflicts: %{name} RemovePathPostfixes: .standalone %description standalone-shutdown