From: Remi Gacogne Date: Tue, 1 Aug 2023 07:56:40 +0000 (+0200) Subject: dnsdist: Stop passing -u dnsdist -g dnsdist on systemd's ExecStart X-Git-Tag: rec-5.0.0-alpha1~80^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2f3cfe6c16ecace72d33ab47cc06e9a2e47de80d;p=thirdparty%2Fpdns.git dnsdist: Stop passing -u dnsdist -g dnsdist on systemd's ExecStart 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 ``` --- diff --git a/builder-support/specs/dnsdist.spec b/builder-support/specs/dnsdist.spec index 8089a0d6d0..dd11d3e6da 100644 --- a/builder-support/specs/dnsdist.spec +++ b/builder-support/specs/dnsdist.spec @@ -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