]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix the group of the dnsdist.conf file when installed via RPM 13084/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 1 Aug 2023 08:04:54 +0000 (10:04 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 1 Aug 2023 08:06:17 +0000 (10:06 +0200)
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.

builder-support/specs/dnsdist.spec

index 8089a0d6d0eab2d8b952ccb8ec0ad3db65df69e9..d1e4e0939ad0d1257c106b2fd8079c759f4cffe4 100644 (file)
@@ -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*