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
```
%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
%{__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