]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Stop passing -u dnsdist -g dnsdist on systemd's ExecStart 13088/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 1 Aug 2023 07:56:40 +0000 (09:56 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 1 Aug 2023 07:56:40 +0000 (09:56 +0200)
This is useless as long as @service_user@ and @service_group@ are
set to 'dnsdist' (which is always true in our build system), and
would not have worked otherwise because dnsdist would have rejected
it with:
```
--gid/-g set on command-line, but dnsdist was started as a systemd service.
Use the 'Group' setting in the systemd unit file to set the group to run as
```

builder-support/specs/dnsdist.spec

index 8089a0d6d0eab2d8b952ccb8ec0ad3db65df69e9..dd11d3e6daa2f9149ec4df1bede2a7d80d80ebe0 100644 (file)
@@ -62,9 +62,6 @@ dnsdist is a high-performance DNS loadbalancer that is scriptable in Lua.
 %prep
 %autosetup -p1 -n %{name}-%{getenv:BUILDER_VERSION}
 
-# run as dnsdist user
-sed -i '/^ExecStart/ s/dnsdist/dnsdist -u dnsdist -g dnsdist/' dnsdist.service.in
-
 %build
 %if 0%{?rhel} < 8
 export CPPFLAGS=-I/usr/include/boost169
@@ -115,8 +112,6 @@ install -d %{buildroot}/%{_sysconfdir}/dnsdist
 %{__mv} %{buildroot}%{_sysconfdir}/dnsdist/dnsdist.conf-dist %{buildroot}%{_sysconfdir}/dnsdist/dnsdist.conf
 chgrp dnsdist %{buildroot}/%{_sysconfdir}/dnsdist/dnsdist.conf
 chmod 0640 %{buildroot}/%{_sysconfdir}/dnsdist/dnsdist.conf
-sed -i "s,/^\(ExecStart.*\)dnsdist\(.*\)\$,\1dnsdist -u dnsdist -g dnsdist\2," %{buildroot}/%{_unitdir}/dnsdist.service
-sed -i "s,/^\(ExecStart.*\)dnsdist\(.*\)\$,\1dnsdist -u dnsdist -g dnsdist\2," %{buildroot}/%{_unitdir}/dnsdist@.service
 
 %pre
 getent group dnsdist >/dev/null || groupadd -r dnsdist