public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/autossh] epel10: Add sysusers.d config file to allow rpm to create users/groups automatically
Date: Sun, 11 Oct 2026 14:41:57 GMT	[thread overview]
Message-ID: <179172971787.1.17083527667655298970.rpms-autossh-b7a9a10a9410@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/autossh
            Branch : epel10
            Commit : b7a9a10a941046c561598c9722b0f8d818f3432f
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2025-02-11T14:36:18+01:00
            Stats  : +12/-8 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/autossh/c/b7a9a10a941046c561598c9722b0f8d818f3432f?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/autossh.spec b/autossh.spec
index 28f8096..f8ff608 100644
--- a/autossh.spec
+++ b/autossh.spec
@@ -1,7 +1,7 @@
 Summary: Utility to autorestart SSH tunnels
 Name: autossh
 Version: 1.4g
-Release: 17%{?dist}
+Release: 18%{?dist}
 # Automatically converted from old format: BSD - review is highly recommended.
 License: LicenseRef-Callaway-BSD
 URL: https://www.harding.motd.ca/autossh/
@@ -14,7 +14,6 @@ BuildRequires: /usr/bin/ssh
 BuildRequires: systemd
 BuildRequires: make
 %{?systemd_requires}
-Requires(pre): shadow-utils
 Requires: /usr/bin/ssh
 
 %description
@@ -26,6 +25,11 @@ dies or stops passing traffic, autossh will automatically restart it.
 %patch -P0 -p1
 cp -p %{SOURCE2} .
 
+# Create a sysusers.d config file
+cat >autossh.sysusers.conf <<EOF
+u autossh - 'autossh service account' %{_sysconfdir}/autossh -
+EOF
+
 %build
 %configure
 make %{?_smp_mflags}
@@ -47,12 +51,8 @@ cp -p autossh.1 $RPM_BUILD_ROOT%{_mandir}/man1
 
 install -m 0644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}
 
-%pre
-getent group autossh >/dev/null || groupadd -r autossh
-getent passwd autossh >/dev/null || \
-    useradd -r -g autossh -d %{_sysconfdir}/autossh -s %{_sbindir}/nologin \
-    -c "autossh service account" autossh
-exit 0
+install -m0644 -D autossh.sysusers.conf %{buildroot}%{_sysusersdir}/autossh.conf
+
 
 %post
 %systemd_post autossh@.service
@@ -80,8 +80,12 @@ fi
 %attr(750,autossh,autossh) %dir %{_sysconfdir}/autossh/
 %{_mandir}/man1/*
 %{_unitdir}/*
+%{_sysusersdir}/autossh.conf
 
 %changelog
+* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.4g-18
+- Add sysusers.d config file to allow rpm to create users/groups automatically
+
 * Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.4g-17
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
 

                 reply	other threads:[~2026-10-11 14:41 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=179172971787.1.17083527667655298970.rpms-autossh-b7a9a10a9410@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