public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Enable sysusers.d integration with systemd-sysusers
@ 2026-11-23  9:35 Panu Matilainen
  0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23  9:35 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : 8649a762c59ef03fab557cae6c1de9579d84e73f
            Author : Panu Matilainen <pmatilai@redhat.com>
            Date   : 2025-01-22T10:11:30+02:00
            Stats  : +23/-15 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/8649a762c59ef03fab557cae6c1de9579d84e73f?branch=pmatilai-v6

            Log:
            Enable sysusers.d integration with systemd-sysusers

https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers

We can't use the default rpm sysusers.sh script due to
https://github.com/shadow-maint/shadow/issues/940 so point rpm
to the native systemd-sysusers implementation instead. This is not
a bad thing, it's how the feature was originally developed anyhow. The
reason rpm defaults to something else is avoiding a systemd dependency.

Add a dependency on /usr/bin/systemd-sysusers to allow
systemd-standalone-sysusers to be used where full systemd isn't needed.

---
diff --git a/rpm-4.18.92-disable-sysusers.patch b/rpm-4.18.92-disable-sysusers.patch
deleted file mode 100644
index 80582a5..0000000
--- a/rpm-4.18.92-disable-sysusers.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -up rpm-4.18.92/macros.in.orig rpm-4.18.92/macros.in
---- rpm-4.18.92/macros.in.orig	2023-08-02 17:56:49.858065935 +0200
-+++ rpm-4.18.92/macros.in	2023-08-02 17:57:01.967988065 +0200
-@@ -138,7 +138,7 @@
- 
- # sysusers helper binary (or a replacement script), uncomment to disable
- #%__systemd_sysusers	@__SYSTEMD_SYSUSERS@
--%__systemd_sysusers	%{_rpmconfigdir}/sysusers.sh
-+#%__systemd_sysusers	%{_rpmconfigdir}/sysusers.sh
- 
- #
- #	Path to script that creates debug symbols in a /usr/lib/debug

diff --git a/rpm-4.20-sysusers.patch b/rpm-4.20-sysusers.patch
new file mode 100644
index 0000000..9886c2d
--- /dev/null
+++ b/rpm-4.20-sysusers.patch
@@ -0,0 +1,14 @@
+diff -up rpm-4.20.0/macros.in.sysusers rpm-4.20.0/macros.in
+--- rpm-4.20.0/macros.in.sysusers	2025-01-22 09:55:40.799341395 +0200
++++ rpm-4.20.0/macros.in	2025-01-22 09:55:50.779431597 +0200
+@@ -142,8 +142,8 @@
+ %_sysusersdir		@sysusersdir@
+ 
+ # sysusers helper binary (or a replacement script), uncomment to disable
+-#%__systemd_sysusers	@__SYSTEMD_SYSUSERS@
+-%__systemd_sysusers	%{_rpmconfigdir}/sysusers.sh
++%__systemd_sysusers	@__SYSTEMD_SYSUSERS@
++#%__systemd_sysusers	%{_rpmconfigdir}/sysusers.sh
+ 
+ #
+ #	Path to script that creates debug symbols in a /usr/lib/debug

diff --git a/rpm.spec b/rpm.spec
index 016ba39..6c299fb 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -28,7 +28,7 @@
 
 %global rpmver 4.20.0
 #global snapver rc1
-%global baserelease 7
+%global baserelease 8
 %global sover 10
 
 %global srcver %{rpmver}%{?snapver:-%{snapver}}
@@ -124,8 +124,8 @@ rpm-4.18.x-siteconfig.patch
 # In current Fedora, man-pages pkg owns all the localized man directories
 rpm-4.9.90-no-man-dirs.patch
 
-# Disable new user/group handling
-rpm-4.18.92-disable-sysusers.patch
+# Use systemd-sysusers due to https://github.com/shadow-maint/shadow/issues/940
+rpm-4.20-sysusers.patch
 rpm-4.19.91-weak-user-group.patch
 
 # Temporarily disable the deprecation warning for
@@ -158,6 +158,8 @@ the package like its version, a description, etc.
 %package libs
 Summary:  Libraries for manipulating RPM packages
 License:  GPL-2.0-or-later OR LGPL-2.1-or-later
+# Either full systemd or systemd-standalone-sysusers
+Requires: /usr/bin/systemd-sysusers
 Requires(meta): %{name} = %{version}-%{release}
 # >= 1.4.0 required for pgpVerifySignature2() and pgpPrtParams2()
 Requires: rpm-sequoia%{_isa} >= 1.4.0
@@ -624,6 +626,10 @@ fi
 %doc %{_defaultdocdir}/rpm/API/
 
 %changelog
+* Wed Jan 22 2025 Panu Matilai <pmatilai@redhat.com> - 4.20.0-8
+- Enable rpm sysusers.d integration via native systemd-sysusers for
+  https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers
+
 * Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 4.20.0-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
 

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

only message in thread, other threads:[~2026-11-23  9:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:35 [rpms/rpm] pmatilai-v6: Enable sysusers.d integration with systemd-sysusers Panu Matilainen

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