public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/slrn] epel10: Add sysusers.d config file to allow rpm to create users/groups automatically
@ 2026-10-14 13:16 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-10-14 13:16 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/slrn
            Branch : epel10
            Commit : b6234b582688872f89863fb4ff6cc95df0831bb3
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2025-02-11T16:44:36+01:00
            Stats  : +13/-7 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/slrn/c/b6234b582688872f89863fb4ff6cc95df0831bb3?branch=epel10

            Log:
            Add sysusers.d config file to allow rpm to create users/groups automatically

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

---
diff --git a/slrn.spec b/slrn.spec
index 38e1c5b..1d3603b 100644
--- a/slrn.spec
+++ b/slrn.spec
@@ -1,7 +1,7 @@
 Summary: A threaded Internet news reader
 Name: slrn
 Version: 1.0.3a
-Release: 18%{?dist}
+Release: 19%{?dist}
 # Automatically converted from old format: GPLv2+ - review is highly recommended.
 License: GPL-2.0-or-later
 URL: http://slrn.sourceforge.net/
@@ -28,7 +28,6 @@ BuildRequires: openssl-devel, gcc
 BuildRequires: slang-devel >= 2.2.3
 # Some s-lang scripts (smime.sl) use slsh interpreter
 Requires:      slang-slsh
-Requires(pre): shadow-utils
 # For source verification with gpgv
 BuildRequires:  gnupg2
 
@@ -65,6 +64,12 @@ done
 
 chmod 644 doc/slrnpull/* contrib/*
 
+# Create a sysusers.d config file
+cat >slrn.sysusers.conf <<EOF
+g news 13
+u news 9 'news user' - -
+EOF
+
 %build
 %configure \
     --with-ssl=%{_prefix} \
@@ -101,11 +106,8 @@ install -p -m644 %{SOURCE4} doc/slrnpull/README.rpm
 rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/slrn
 
 # Static UID and GID defined by /usr/share/doc/setup-*/uidgid
-%pre
-getent group news >/dev/null || groupadd -r -g 13 news
-getent passwd news >/dev/null || \
-  useradd -r -u 9 -g news -d / -s /sbin/nologin -c "news user" news
-exit 0
+
+install -m0644 -D slrn.sysusers.conf %{buildroot}%{_sysusersdir}/slrn.conf
 
 %files -f %{name}.lang
 %license COPYING COPYRIGHT
@@ -116,6 +118,7 @@ exit 0
 %{_bindir}/slrn
 %{_datadir}/slrn
 %{_mandir}/man1/slrn.1*
+%{_sysusersdir}/slrn.conf
 
 %files pull
 %doc doc/slrnpull/*
@@ -128,6 +131,9 @@ exit 0
 %{_mandir}/man1/slrnpull.1*
 
 %changelog
+* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.3a-19
+- Add sysusers.d config file to allow rpm to create users/groups automatically
+
 * Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3a-18
 - 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-10-14 13:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 13:16 [rpms/slrn] epel10: Add sysusers.d config file to allow rpm to create users/groups automatically 

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