public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Stewart Smith <trawets@amazon.com>
To: git-commits@fedoraproject.org
Subject: [rpms/systemd] rawhide: Add sbin_compat bcond to rely on filesystem file triggers for sbin symlinks
Date: Wed, 15 Jul 2026 06:59:14 GMT	[thread overview]
Message-ID: <178409875407.1.11318892187182466803.rpms-systemd-cca95abc4619@fedoraproject.org> (raw)

            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.

                 reply	other threads:[~2026-07-15  6:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178409875407.1.11318892187182466803.rpms-systemd-cca95abc4619@fedoraproject.org \
    --to=trawets@amazon.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox