public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/systemd] rawhide: Add sbin_compat bcond to rely on filesystem file triggers for sbin symlinks
@ 2026-07-15  6:59 Stewart Smith
  0 siblings, 0 replies; only message in thread
From: Stewart Smith @ 2026-07-15  6:59 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/systemd
            Branch : rawhide
            Commit : cca95abc4619e91186ef00a194c5b9616e570722
            Author : Stewart Smith <trawets@amazon.com>
            Date   : 2026-07-14T10:45:17-07:00
            Stats  : +10/-5 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/systemd/c/cca95abc4619e91186ef00a194c5b9616e570722?branch=rawhide

            Log:
            Add sbin_compat bcond to rely on filesystem file triggers for sbin symlinks

Instead of shipping /usr/sbin symlinks directly in the RPM, rely on
filesystem(unmerged-sbin-symlinks) file triggers to create them at
install time. This avoids file conflicts when the package (built on an
unmerged system) is installed into a merged-sbin buildroot, eliminating
the bootstrap ordering problem with the bin/sbin merge.

On unmerged systems, the filesystem file trigger creates the symlinks
when files are installed to /usr/bin. On merged systems, /usr/sbin is
already a symlink to bin so no action is needed.

The bcond defaults to enabled. Use --without sbin_compat to revert to
the old behavior of shipping sbin symlinks in the package.

---
diff --git a/systemd.spec b/systemd.spec
index 9bf8c7b..c172dc5 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -19,6 +19,12 @@
 %bcond bootstrap 0
 %bcond tests     1
 
+# When enabled, rely on filesystem(unmerged-sbin-symlinks) file triggers to
+# create /usr/sbin symlinks instead of shipping them in the package. This
+# avoids file conflicts when installing on merged-sbin systems and eliminates
+# bootstrap ordering issues with the bin/sbin merge.
+%bcond sbin_compat 1
+
 # riscv64 has LTO disabled globally
 %bcond lto       %["%_arch" != "riscv64"]
 
@@ -349,8 +355,7 @@ Provides:       systemd-tmpfiles = %{version}-%{release}
 Conflicts:      systemd-standalone-shutdown
 Provides:       systemd-shutdown = %{version}-%{release}
 
-
-%if "%{_sbindir}" == "%{_bindir}"
+%if %{with sbin_compat} || "%{_sbindir}" == "%{_bindir}"
 # Compat symlinks for Requires in other packages.
 # We rely on filesystem to create the symlinks for us.
 Requires:       filesystem(unmerged-sbin-symlinks)
@@ -547,7 +552,7 @@ Provides:       systemd-repart = %{version}-%{release}
 Conflicts:      xorg-x11-drv-evdev < 2.11.0
 Conflicts:      xorg-x11-drv-libinput < 1.5.0
 
-%if "%{_sbindir}" == "%{_bindir}"
+%if %{with sbin_compat} || "%{_sbindir}" == "%{_bindir}"
 # Compat symlinks for Requires in other packages.
 # We rely on filesystem to create the symlinks for us.
 Requires:       filesystem(unmerged-sbin-symlinks)
@@ -1032,7 +1037,7 @@ sed -r 's|/system/|/user/|g' %{SOURCE16} >10-timeout-abort.conf.user
 %meson_install
 
 # udev links
-%if "%{_sbindir}" != "%{_bindir}"
+%if !%{with sbin_compat} && "%{_sbindir}" != "%{_bindir}"
 mkdir -p %{buildroot}/%{_sbindir}
 ln -sf ../bin/udevadm %{buildroot}%{_sbindir}/udevadm
 %endif
@@ -1181,7 +1186,7 @@ install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/network/ %{SOURCE25}
 ln -s --relative %{buildroot}%{_bindir}/kernel-install %{buildroot}%{_sbindir}/installkernel
 %endif
 
-%if "%{_sbindir}" == "%{_bindir}"
+%if %{with sbin_compat} || "%{_sbindir}" == "%{_bindir}"
 # Systemd has the split-sbin option which is also used to select the directory
 # for alias symlinks. We need to keep split-sbin=true for now, to support
 # unmerged systems. Move the symlinks here instead.

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-15  6:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-15  6:59 [rpms/systemd] rawhide: Add sbin_compat bcond to rely on filesystem file triggers for sbin symlinks Stewart Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox