spec: switch to use sysusers compat macro
This switches the %pre scriplet to use the sysusers compat macro when creating system user/group. This ensures that only dnsmasq entries are created, without triggering actions for other sysusers.d files that may be on disk. Refs: * https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format * https://bugzilla.redhat.com/show_bug.cgi?id=1792462
This commit is contained in:
parent
08446b0eff
commit
b7481f49d6
@ -57,6 +57,7 @@ Buildrequires: gcc
|
||||
BuildRequires: gnupg2
|
||||
|
||||
BuildRequires: systemd
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%{?systemd_requires}
|
||||
%if %{with sourcegit}
|
||||
BuildRequires: git-core
|
||||
@ -152,7 +153,7 @@ install -Dpm 644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf
|
||||
|
||||
%pre
|
||||
#precreate users so that rpm can install files owned by that user
|
||||
%sysusers_create_package %{name} %{SOURCE2}
|
||||
%sysusers_create_compat %{SOURCE2}
|
||||
|
||||
%post
|
||||
%systemd_post dnsmasq.service
|
||||
|
Loading…
Reference in New Issue
Block a user