From b7481f49d69514c16cc72ad7dec8bffcfbd7aeab Mon Sep 17 00:00:00 2001 From: Luca BRUNO Date: Thu, 10 Dec 2020 12:11:57 +0000 Subject: [PATCH] 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 --- dnsmasq.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dnsmasq.spec b/dnsmasq.spec index 4ece5a0..bb98d33 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -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