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

            A new commit has been pushed.

            Repo   : rpms/webalizer
            Branch : epel9
            Commit : eaab36ec0d5eb0ab13a2fa6761be0b9aead48261
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2025-02-11T17:03:12+01:00
            Stats  : +12/-8 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/webalizer/c/eaab36ec0d5eb0ab13a2fa6761be0b9aead48261?branch=epel9

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

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

---
diff --git a/webalizer.spec b/webalizer.spec
index 85ca250..ec83a8e 100644
--- a/webalizer.spec
+++ b/webalizer.spec
@@ -10,7 +10,7 @@
 Name: webalizer
 Summary: A flexible Web server log file analysis program
 Version: 2.23_08
-Release: 27%{?dist}
+Release: 28%{?dist}
 URL: http://www.mrunix.net/webalizer/
 # Automatically converted from old format: GPLv2+ - review is highly recommended.
 License: GPL-2.0-or-later
@@ -33,7 +33,6 @@ BuildRequires: make
 BuildRequires:  gcc
 BuildRequires: gd-devel, %{db_devel}, bzip2-devel
 BuildRequires: GeoIP-devel
-Requires(pre): shadow-utils
 Requires: httpd, crontabs
 
 %description
@@ -55,6 +54,11 @@ Web traffic is coming from easy.
 %patch -P24 -p1 -b .sample_typo
 %patch -P25 -p1 -b .gcc10_common_support
 
+# Create a sysusers.d config file
+cat >webalizer.sysusers.conf <<EOF
+u webalizer - 'Webalizer' %{_localstatedir}/www/usage -
+EOF
+
 %build
 #CPPFLAGS="-I%{_includedir}/db4" ; export CPPFLAGS
 #CFLAGS="$RPM_OPT_FLAGS $CPPFLAGS -D_GNU_SOURCE" ; export CFLAGS
@@ -83,12 +87,8 @@ install -p -m 644 %{SOURCE4} \
 
 rm -f %{buildroot}%{_sysconfdir}/webalizer.conf.sample
 
-%pre
-getent group webalizer >/dev/null || groupadd -r webalizer
-getent passwd webalizer >/dev/null || \
-    useradd -r -g webalizer -d %{_localstatedir}/www/usage -s /sbin/nologin \
-    -c "Webalizer" webalizer
-exit 0
+install -m0644 -D webalizer.sysusers.conf %{buildroot}%{_sysusersdir}/webalizer.conf
+
 
 %files
 %doc README
@@ -101,8 +101,12 @@ exit 0
 %attr(-, webalizer, root) %dir %{_localstatedir}/www/usage
 %attr(-, webalizer, root) %dir %{_localstatedir}/lib/webalizer
 %attr(-, webalizer, root) %{_localstatedir}/www/usage/*.png
+%{_sysusersdir}/webalizer.conf
 
 %changelog
+* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.23_08-28
+- Add sysusers.d config file to allow rpm to create users/groups automatically
+
 * Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.23_08-27
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
 

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

only message in thread, other threads:[~2026-11-08  8:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08  8:18 [rpms/webalizer] epel9: 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