diff --git a/munin.spec b/munin.spec index d9a1781..85e913d 100644 --- a/munin.spec +++ b/munin.spec @@ -1,6 +1,6 @@ Name: munin Version: 2.0.76 -Release: 3%{?dist} +Release: 10%{?dist} Summary: Network-wide resource monitoring tool License: GPL-2.0-only URL: http://munin-monitoring.org/ @@ -36,6 +36,9 @@ Source33: munin-cgi-graph.socket Source34: munin-cgi-html.service Source35: munin-cgi-html.socket +# Common sources +Source40: munin.sysusers + # Patches Patch101: 21b3d860c17d7997d64267963f91ed75ca8a3e03.patch Patch102: cd842e36f3ab1a55c05304d6b78dc07048bd8f84.patch @@ -92,7 +95,6 @@ Requires: perl(Taint::Runtime) Requires: perl(Text::Balanced) Requires: perl(Time::HiRes) Requires: rrdtool -Requires(pre): shadow-utils %{?systemd_requires} BuildArch: noarch @@ -131,7 +133,6 @@ Requires: perl(Net::CIDR) Requires: perl(Net::SSLeay) Requires: perl(Net::Server) Requires: procps-ng -Requires(pre): shadow-utils Requires(pre): %{_sbindir}/semanage Requires(pre): %{_sbindir}/restorecon %{?systemd_requires} @@ -160,8 +161,8 @@ SNMP or similar technology. %package common Summary: Network-wide resource monitoring tool (common files) Requires: acl -Requires(pre): shadow-utils %{?systemd_requires} +%{?sysusers_requires_compat} BuildArch: noarch @@ -232,6 +233,7 @@ FastCGI so you don't need this package. sed -i -e ' s,^PREFIX = \(.*\),PREFIX = $(DESTDIR)%{_prefix},; + s,^SBINDIR = \(.*\),SBINDIR = $(DESTDIR)%{_sbindir},; s,^CONFDIR = \(.*\),CONFDIR = $(DESTDIR)%{_sysconfdir}/munin,; s,^DOCDIR = \(.*\),DOCDIR = $(DESTDIR)%{_docdir}/%{name}-%{version},; s,^MANDIR = \(.*\),MANDIR = $(DESTDIR)%{_mandir},; @@ -396,10 +398,9 @@ touch %{buildroot}%{_sysconfdir}/httpd/conf.d/munin-cgi.conf touch %{buildroot}%{_sysconfdir}/munin/munin-htpasswd -%pre -getent group munin >/dev/null || groupadd -r munin -getent passwd munin >/dev/null || useradd -r -g munin -d %{_sharedstatedir}/munin -s /bin/sh -c "Munin user" munin -exit 0 +### Common ### + +install -m0644 -D %{SOURCE40} %{buildroot}%{_sysusersdir}/munin.conf %post @@ -435,33 +436,6 @@ fi %systemd_postun munin.service -%triggerin -- munin < 2.0.69-2 -if [ -n "$(ls %{_sysconfdir}/munin/conf.d/* 2>/dev/null)" ]; then - mv -f %{_sysconfdir}/munin/conf.d/* %{_sysconfdir}/munin/munin-conf.d/ -fi -exit 0 - - -%triggerpostun -- munin < 2.0.69-2 -if [ -d %{_sysconfdir}/munin/conf.d ]; then - if ! rmdir %{_sysconfdir}/munin/conf.d 2>/dev/null; then - mv -f %{_sysconfdir}/munin/conf.d %{_sysconfdir}/munin/conf.d.rpmold - fi -fi -if [ -f %{_sysconfdir}/munin/munin.conf.rpmnew ]; then - if [ -n "$(ls %{_sysconfdir}/munin/munin-conf.d/* 2>/dev/null)" ]; then - ln -sf munin-conf.d %{_sysconfdir}/munin/conf.d - fi -fi -exit 0 - - -%pre node -getent group munin >/dev/null || groupadd -r munin -getent passwd munin >/dev/null || useradd -r -g munin -d %{_sharedstatedir}/munin -s /bin/sh -c "Munin user" munin -exit 0 - - %post node # Create log file [ -f %{_localstatedir}/log/munin-node/munin-node.log ] || \ @@ -502,9 +476,7 @@ fi %pre common -getent group munin >/dev/null || groupadd -r munin -getent passwd munin >/dev/null || useradd -r -g munin -d %{_sharedstatedir}/munin -s /bin/sh -c "Munin user" munin -exit 0 +%sysusers_create_compat %{SOURCE40} %post nginx @@ -628,6 +600,7 @@ exit 0 %dir %{perl_vendorlib}/Munin %{perl_vendorlib}/Munin/Common %{_tmpfilesdir}/%{name}.conf +%{_sysusersdir}/munin.conf %attr(0775, root, munin) %dir %{_rundir}/munin @@ -659,6 +632,27 @@ exit 0 %changelog +* Thu Jul 16 2026 Fedora Release Engineering - 2.0.76-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + +* Fri Jan 16 2026 Fedora Release Engineering - 2.0.76-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Sun Dec 28 2025 Kim B. Heino - 2.0.76-8 +- rhbz 2406177: Move sysusers.d config to munin-common + +* Thu Jul 24 2025 Fedora Release Engineering - 2.0.76-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 2.0.76-6 +- Add sysusers.d config file to allow rpm to create users/groups automatically + +* Mon Jan 27 2025 Kim B. Heino - 2.0.76-5 +- rhbz 2340895: Fix build on Fedora 42 + +* Fri Jan 17 2025 Fedora Release Engineering - 2.0.76-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Mon Oct 21 2024 Kim B. Heino - 2.0.76-3 - Don't restart firewalld on package update, rhbz #2295597 diff --git a/munin.sysusers b/munin.sysusers new file mode 100644 index 0000000..50515ab --- /dev/null +++ b/munin.sysusers @@ -0,0 +1 @@ +u munin - "Munin user" /var/lib/munin /bin/sh