From: Remi Gacogne Date: Tue, 1 Aug 2023 08:04:54 +0000 (+0200) Subject: dnsdist: Fix the group of the dnsdist.conf file when installed via RPM X-Git-Tag: rec-5.0.0-alpha1~81^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F13084%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Fix the group of the dnsdist.conf file when installed via RPM I _hope_ the `%attr` directive does the right thing, based on http://ftp.rpm.org/max-rpm/s1-rpm-anywhere-specifying-file-attributes.html I'm using this directive instead of calling `chgrp` in `%post` because I'm told using `chgrp` would make `verify` complain about the ownership later. --- diff --git a/builder-support/specs/dnsdist.spec b/builder-support/specs/dnsdist.spec index 8089a0d6d0..d1e4e0939a 100644 --- a/builder-support/specs/dnsdist.spec +++ b/builder-support/specs/dnsdist.spec @@ -113,7 +113,6 @@ make %{?_smp_mflags} check || (cat test-suite.log && false) %make_install 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 @@ -156,5 +155,5 @@ systemctl daemon-reload ||: %{_bindir}/* %{_mandir}/man1/* %dir %{_sysconfdir}/dnsdist -%config(noreplace) %{_sysconfdir}/%{name}/dnsdist.conf +%attr(-, root, dnsdist) %config(noreplace) %{_sysconfdir}/%{name}/dnsdist.conf %{_unitdir}/dnsdist*