From 39fa7d5495dc9bd31113a9b9dd445d637411c126 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 Related: rhbz#2145149 --- setroubleshoot.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setroubleshoot.spec b/setroubleshoot.spec index 184911c..1ac3ab6 100644 --- a/setroubleshoot.spec +++ b/setroubleshoot.spec @@ -84,6 +84,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} @@ -106,7 +107,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 @@ -187,6 +187,7 @@ 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