From 9dd21d3b55075d90f140c67aba43a7adb933dcfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Wed, 9 Feb 2022 11:56:04 +0100 Subject: [PATCH] Install sysusers configuration User and group are now created by the macro but the configuration file should be installed on the systemd too: https://docs.fedoraproject.org/en-US/packaging-guidelines/UsersAndGroups/#_dynamic_allocation Also remove the Requires(pre) for useradd & groupadd as it is handled by the %sysusers_create_compat macro: https://src.fedoraproject.org/rpms/systemd/blob/rawhide/f/macros.sysusers --- setroubleshoot.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setroubleshoot.spec b/setroubleshoot.spec index 5fc613a..c0c22f6 100644 --- a/setroubleshoot.spec +++ b/setroubleshoot.spec @@ -4,7 +4,7 @@ Summary: Helps troubleshoot SELinux problems Name: setroubleshoot Version: 3.3.28 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://gitlab.com/setroubleshoot/setroubleshoot Source0: https://gitlab.com/setroubleshoot/setroubleshoot/-/archive/%{version}/setroubleshoot-%{version}.tar.gz @@ -82,6 +82,7 @@ touch %{buildroot}%{pkgvardatadir}/email_alert_recipients rm -rf %{buildroot}/usr/share/doc/ # create /run/setroubleshoot on boot install -p -m644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf +install -p -m644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysusersdir}/%{name}.conf %find_lang %{name} @@ -104,7 +105,6 @@ Requires: dbus Requires: python3-dbus python3-dasbus Requires: polkit Requires: initscripts-service -Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd %description server Provides tools to help diagnose SELinux problems. When AVC messages @@ -185,10 +185,15 @@ to user preference. The same tools can be run on existing log files. %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.fedoraproject.SetroubleshootFixit.conf %{_datadir}/dbus-1/system-services/org.fedoraproject.SetroubleshootFixit.service %attr(0644,root,root) %{_tmpfilesdir}/%{name}.conf +%attr(0644,root,root) %{_sysusersdir}/%{name}.conf %attr(0711,setroubleshoot,setroubleshoot) %dir %{_rundir}/setroubleshoot %doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO %changelog +* Wed Feb 09 2022 Timothée Ravier - 3.3.28-3 +- Install systemd-sysusers config +- Remove Requires(pre) useradd & groupadd + * Tue Feb 8 2022 Petr Lautrbach - 3.3.28-2 - Use %sysusers_create_compat instead of useradd - Set right ownership on /var/lib/setroubleshoot