From: Stefan Schantl Date: Tue, 11 Apr 2023 14:00:23 +0000 (+0200) Subject: pdns: Switch to systemd sysusers mechanism for user/group creation X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=df22d5f026c149b7ea9fbd341f266e427666bc15;p=people%2Fstevee%2Fipfire-3.x.git pdns: Switch to systemd sysusers mechanism for user/group creation Signed-off-by: Stefan Schantl --- diff --git a/pdns/pdns.nm b/pdns/pdns.nm index 7fcaa64cd..d40074089 100644 --- a/pdns/pdns.nm +++ b/pdns/pdns.nm @@ -5,7 +5,7 @@ name = pdns version = 4.7.3 -release = 1 +release = 2 thisapp = %{name}-%{version} groups = Networking/DNS @@ -38,6 +38,7 @@ build shadow-utils sqlite-devel systemd-devel + systemd-sysusers zlib-devel end @@ -54,10 +55,6 @@ build --enable-unit-tests \ --disable-static - prepare_cmds - %{create_user} - end - test make -C pdns check || : end @@ -88,18 +85,10 @@ build end end -create_user - getent group pdns >/dev/null || groupadd -r pdns - getent passwd pdns >/dev/null || \ - useradd -r -g pdns -d %{sharedstatedir}/pdns -s /sbin/nologin \ - -c "PowerDNS user" pdns -end - packages package %{name} prerequires coreutils - shadow-utils sqlite end @@ -111,10 +100,6 @@ packages %{sharedstatedir}/pdns/pdns.db end - script prein - %{create_user} - end - script postin systemctl daemon-reload >/dev/null 2>&1 || : diff --git a/pdns/pdns.sysusers b/pdns/pdns.sysusers new file mode 100644 index 000000000..43c21ea37 --- /dev/null +++ b/pdns/pdns.sysusers @@ -0,0 +1 @@ +u pdns - "User for PowerDNS" /var/lib/pdns /usr/sbin/nologin