public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/NetworkManager-openconnect] epel10.3: Add sysusers.d config file to allow rpm to create users/groups automatically
Date: Thu, 12 Nov 2026 20:00:02 GMT	[thread overview]
Message-ID: <179451360286.1.11465423803358564849.rpms-NetworkManager-openconnect-298e6305de69@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/NetworkManager-openconnect
            Branch : epel10.3
            Commit : 298e6305de69e4ec55556e98efce2e694bb4f168
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2025-02-11T15:53:24+01:00
            Stats  : +12/-8 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/NetworkManager-openconnect/c/298e6305de69e4ec55556e98efce2e694bb4f168?branch=epel10.3

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

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

---
diff --git a/NetworkManager-openconnect.spec b/NetworkManager-openconnect.spec
index ea0f8b1..1e6a381 100644
--- a/NetworkManager-openconnect.spec
+++ b/NetworkManager-openconnect.spec
@@ -24,7 +24,7 @@
 Summary:   NetworkManager VPN plugin for openconnect
 Name:      NetworkManager-openconnect
 Version:   1.2.10
-Release:   7%{?dist}
+Release:   8%{?dist}
 License:   GPL-2.0-or-later AND LGPL-2.1-only
 URL:       http://www.gnome.org/projects/NetworkManager/
 Source:    https://download.gnome.org/sources/NetworkManager-openconnect/1.2/%{name}-%{version}.tar.xz
@@ -60,8 +60,6 @@ Requires: openconnect      >= %{openconnect_version}
 Requires: dbus-common
 Obsoletes: NetworkManager-openconnect < 1.2.3-0
 
-Requires(pre): %{_sbindir}/useradd
-Requires(pre): %{_sbindir}/groupadd
 
 %global __provides_exclude ^libnm-.*\\.so
 
@@ -82,6 +80,11 @@ the OpenConnect client with NetworkManager (GNOME files).
 %prep
 %autosetup -p1
 
+# Create a sysusers.d config file
+cat >networkmanager-openconnect.sysusers.conf <<EOF
+u nm-openconnect - 'NetworkManager user for OpenConnect' - -
+EOF
+
 %build
 %configure \
         --enable-more-warnings=yes \
@@ -104,11 +107,8 @@ rm -f %{buildroot}%{_libdir}/NetworkManager/lib*.la
 
 %find_lang %{name}
 
-%pre
-%{_sbindir}/groupadd -r nm-openconnect &>/dev/null || :
-%{_sbindir}/useradd  -r -s /sbin/nologin -d / -M \
-                     -c 'NetworkManager user for OpenConnect' \
-                     -g nm-openconnect nm-openconnect &>/dev/null || :
+install -m0644 -D networkmanager-openconnect.sysusers.conf %{buildroot}%{_sysusersdir}/networkmanager-openconnect.conf
+
 
 %if 0%{?rhel} && 0%{?rhel} <= 7
 %post
@@ -134,6 +134,7 @@ fi
 %{_libexecdir}/nm-openconnect-service-openconnect-helper
 %doc AUTHORS ChangeLog NEWS
 %license COPYING
+%{_sysusersdir}/networkmanager-openconnect.conf
 
 %files gnome
 %{_libexecdir}/nm-openconnect-auth-dialog
@@ -151,6 +152,9 @@ fi
 
 
 %changelog
+* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.2.10-8
+- Add sysusers.d config file to allow rpm to create users/groups automatically
+
 * Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.10-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
 

                 reply	other threads:[~2026-11-12 20:00 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=179451360286.1.11465423803358564849.rpms-NetworkManager-openconnect-298e6305de69@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