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

            A new commit has been pushed.

            Repo   : rpms/icecream
            Branch : epel8
            Commit : 866bf44a65f9146eb583b7fbdd98ab68c88b9b15
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2025-02-11T15:35:20+01:00
            Stats  : +8/-8 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/icecream/c/866bf44a65f9146eb583b7fbdd98ab68c88b9b15?branch=epel8

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

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

---
diff --git a/icecream.spec b/icecream.spec
index 0b3bc49..aef219f 100644
--- a/icecream.spec
+++ b/icecream.spec
@@ -39,7 +39,6 @@ BuildRequires: autoconf automake libtool
 
 Requires:         firewalld-filesystem
 Requires:         environment(modules)
-Requires(pre):    shadow-utils
 Requires(post):   systemd
 Requires(preun):  systemd
 Requires(postun): systemd
@@ -90,6 +89,11 @@ cp -p %{SOURCE3} %{SOURCE4} %{SOURCE5} SELinux
 mkdir fedora
 cp -p %{SOURCE6} %{SOURCE7} %{SOURCE9} %{SOURCE10} %{SOURCE11} fedora
 
+# Create a sysusers.d config file
+cat >icecream.sysusers.conf <<EOF
+u icecc - 'Icecream distributed compiler' %{_localstatedir}/cache/icecream -
+EOF
+
 %build
 ./autogen.sh
 
@@ -172,19 +176,14 @@ if [ $? == 0  -a "${SELINUXTYPE}" == %1 -a -f ${FILE_CONTEXT}.%{name} ]; then \
 	rm -f ${FILE_CONTEXT}.%name; \
 fi;
 
+install -m0644 -D icecream.sysusers.conf %{buildroot}%{_sysusersdir}/icecream.conf
+
 %pre
 %if %{with selinux}
 for selinuxvariant in %{selinux_variants}; do
 	%saveFileContext ${selinuxvariant}
 done
 %endif
-
-getent group icecc >/dev/null || groupadd -r icecc
-getent passwd icecc >/dev/null || \
-	useradd -r -g icecc -d %{_localstatedir}/cache/icecream \
-	-s /sbin/nologin -c "Icecream distributed compiler" icecc
-exit 0
-
 %post
 /sbin/ldconfig
 %if %{with selinux}
@@ -265,6 +264,7 @@ exit 0
 %{?with_selinux:%{_datadir}/selinux/*/icecream.pp}
 %{_prefix}/lib/firewalld/services/icecream.xml
 %{_prefix}/lib/firewalld/services/icecream-scheduler.xml
+%{_sysusersdir}/icecream.conf
 
 %files devel
 %dir %{_includedir}/icecc/

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

only message in thread, other threads:[~2026-07-31  6:34 UTC | newest]

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