public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/transmission] epel10: Add sysusers.d config file to allow rpm to create users/groups automatically
Date: Mon, 20 Jul 2026 20:37:56 GMT	[thread overview]
Message-ID: <178457987676.1.162111766462285899.rpms-transmission-ae12cd440159@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/transmission
            Branch : epel10
            Commit : ae12cd440159f87975d9a6dd9ce59190ed051007
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2025-02-11T16:44:40+01:00
            Stats  : +12/-8 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/transmission/c/ae12cd440159f87975d9a6dd9ce59190ed051007?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/transmission.spec b/transmission.spec
index 182ecd5..586d054 100644
--- a/transmission.spec
+++ b/transmission.spec
@@ -1,6 +1,6 @@
 Name:           transmission
 Version:        4.0.6
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        A lightweight GTK+ BitTorrent client
 # See COPYING. This licensing situation is... special.
 License:        MIT and GPL-2.0-only
@@ -69,7 +69,6 @@ Command line version of Transmission BitTorrent client.
 %package daemon
 Summary:       Transmission daemon
 Requires:      transmission-common%{?_isa}
-Requires(pre): shadow-utils
 BuildRequires: systemd
 %description daemon
 Transmission BitTorrent client daemon.
@@ -92,12 +91,6 @@ Recommends:    libcanberra-gtk3%{?_isa}
 %description qt
 Qt graphical interface of Transmission BitTorrent client.
 
-%pre daemon
-getent group transmission >/dev/null || groupadd -r transmission
-getent passwd transmission >/dev/null || \
-useradd -r -g transmission -d %{_sharedstatedir}/transmission -s /sbin/nologin \
-        -c "transmission daemon account" transmission
-exit 0
 
 %prep
 %autosetup -p1
@@ -115,6 +108,11 @@ sed -i 's|Icon=%{name}-qt|Icon=%{name}|g' qt/%{name}-qt.desktop
 iconv --from=ISO-8859-1 --to=UTF-8 AUTHORS > AUTHORS.new
 mv AUTHORS.new AUTHORS
 
+# Create a sysusers.d config file
+cat >transmission.sysusers.conf <<EOF
+u transmission - 'transmission daemon account' %{_sharedstatedir}/transmission -
+EOF
+
 %build
 
 CXXFLAGS="%{optflags} -fPIC"
@@ -147,6 +145,8 @@ desktop-file-install \
                 --dir=%{buildroot}%{_datadir}/applications/  \
                   qt/%{name}-qt.desktop
 
+install -m0644 -D transmission.sysusers.conf %{buildroot}%{_sysusersdir}/transmission.conf
+
 %post daemon
 %systemd_post transmission-daemon.service
 
@@ -183,6 +183,7 @@ desktop-file-install \
 %{_unitdir}/transmission-daemon.service
 %attr(-,transmission, transmission)%{_sharedstatedir}/transmission/
 %doc %{_mandir}/man1/transmission-daemon*
+%{_sysusersdir}/transmission.conf
 
 %files gtk -f %{name}-gtk.lang
 %{_bindir}/transmission-gtk
@@ -196,6 +197,9 @@ desktop-file-install \
 %doc %{_mandir}/man1/transmission-qt.*
 
 %changelog
+* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.0.6-6
+- Add sysusers.d config file to allow rpm to create users/groups automatically
+
 * Tue Jan 28 2025 Simone Caronni <negativo17@gmail.com> - 4.0.6-5
 - Rebuild for updated dependencies.
 

                 reply	other threads:[~2026-07-20 20:37 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=178457987676.1.162111766462285899.rpms-transmission-ae12cd440159@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