public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/inn] epel10: Add sysusers.d config file to allow rpm to create users/groups automatically
Date: Wed, 26 Aug 2026 08:07:47 GMT	[thread overview]
Message-ID: <178773166746.1.17122231737756486416.rpms-inn-f77fe13c270b@fedoraproject.org> (raw)

            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
 

                 reply	other threads:[~2026-08-26  8:07 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=178773166746.1.17122231737756486416.rpms-inn-f77fe13c270b@fedoraproject.org \
    --to=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