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

            A new commit has been pushed.

            Repo   : rpms/inn
            Branch : epel10
            Commit : f77fe13c270b3e36ef0a51c3de0258e9ec5830c3
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2025-02-11T15:35:20+01:00
            Stats  : +13/-8 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/inn/c/f77fe13c270b3e36ef0a51c3de0258e9ec5830c3?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/inn.spec b/inn.spec
index 7dee1f6..315498c 100644
--- a/inn.spec
+++ b/inn.spec
@@ -3,7 +3,7 @@
 Summary: The InterNetNews system, an Usenet news server
 Name: inn
 Version: 2.7.2
-Release: 3%{?dist}
+Release: 4%{?dist}
 # most files are under ISC, except:
 # contrib/analyze-traffic.in: public-domain
 # contrib/mm_ckpasswd: GPL-2.0-or-later
@@ -77,7 +77,6 @@ Recommends: perl(GD)
 Recommends: perl(subs)
 Recommends: uucp
 %endif
-Requires(pre): shadow-utils
 Requires: bash >= 2.0
 Requires: coreutils
 Requires: grep
@@ -136,6 +135,12 @@ This package contains dynamic libraries provided by INN project
 gpgv2 --keyring %{S:3} %{S:1} %{S:0}
 %autosetup -p1
 
+# Create a sysusers.d config file
+cat >inn.sysusers.conf <<EOF
+g news 13
+u news 9 'News server user' /etc/news -
+EOF
+
 %build
 %configure \
   --disable-static \
@@ -282,18 +287,14 @@ EOF
 install -dm755 %{buildroot}%{_sysconfdir}/rsyslog.d
 install -pm644 %{S:30} %{buildroot}%{_sysconfdir}/rsyslog.d/inn.conf
 
+install -m0644 -D inn.sysusers.conf %{buildroot}%{_sysusersdir}/inn.conf
+
 %check
 LD_LIBRARY_PATH=%{buildroot}%{_libdir} make -C tests test
 
 %global inn_units_with_restart innd.service innd-expire.timer innd-nntpsend.timer innd-rnews.timer
 %global inn_units innd-expire.service innd-nntpsend.service innd-rnews.service
 
-%pre -n inews
-getent group news >/dev/null || groupadd -g 13 -r news
-getent passwd news >/dev/null || \
-useradd -r -u 9 -g news -d /etc/news  \
--c "News server user" news
-exit 0
 
 %pre
 getent group news >/dev/null || groupadd -g 13 -r news
@@ -585,8 +586,12 @@ fi
 %{_bindir}/inews
 %attr(0755,root,root) %{_libexecdir}/news/inews
 %{_mandir}/man1/inews*
+%{_sysusersdir}/inn.conf
 
 %changelog
+* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.7.2-4
+- Add sysusers.d config file to allow rpm to create users/groups automatically
+
 * Sat Feb 01 2025 Björn Esser <besser82@fedoraproject.org> - 2.7.2-3
 - Add explicit BR: libxcrypt-devel
 

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

only message in thread, other threads:[~2026-08-26  8:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26  8:07 [rpms/inn] 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