From: Remi Gacogne Date: Mon, 26 Jan 2026 15:56:59 +0000 (+0100) Subject: dnsdist: Stop overriding `dh_fixperms` in Deb packages X-Git-Tag: dnsdist-2.1.0-alpha1~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16779%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Stop overriding `dh_fixperms` in Deb packages Signed-off-by: Remi Gacogne --- diff --git a/builder-support/debian/dnsdist/debian-bookworm/dnsdist.postinst b/builder-support/debian/dnsdist/debian-bookworm/dnsdist.postinst index 2811365b1c..5a5c1e5c76 100644 --- a/builder-support/debian/dnsdist/debian-bookworm/dnsdist.postinst +++ b/builder-support/debian/dnsdist/debian-bookworm/dnsdist.postinst @@ -19,12 +19,12 @@ case "$1" in adduser --force-badname --system --home /nonexistent --group \ --no-create-home --quiet _dnsdist || true - if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then + if [ -e /etc/dnsdist/dnsdist.conf ] && [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then chown root:_dnsdist /etc/dnsdist/dnsdist.conf # Make sure that dnsdist can read it; the default used to be 0600 chmod g+r /etc/dnsdist/dnsdist.conf fi - if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.yml`" = "root:root" ]; then + if [ -e /etc/dnsdist/dnsdist.yml ] && [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.yml`" = "root:root" ]; then chown root:_dnsdist /etc/dnsdist/dnsdist.yml # Make sure that dnsdist can read it; the default used to be 0600 chmod g+r /etc/dnsdist/dnsdist.yml diff --git a/builder-support/debian/dnsdist/debian-bookworm/rules b/builder-support/debian/dnsdist/debian-bookworm/rules index cae7296df1..d823d1987b 100755 --- a/builder-support/debian/dnsdist/debian-bookworm/rules +++ b/builder-support/debian/dnsdist/debian-bookworm/rules @@ -95,13 +95,5 @@ override_dh_installexamples: override_dh_installinit: # do nothing here. avoids referencing a non-existant init script. -override_dh_fixperms: - dh_fixperms - # these files often contain passwords. 640 as it is chowned to root:_dnsdist - touch debian/dnsdist/etc/dnsdist/dnsdist.conf - chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.conf - touch debian/dnsdist/etc/dnsdist/dnsdist.yml - chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.yml - override_dh_builddeb: dh_builddeb -- -Zgzip diff --git a/builder-support/debian/dnsdist/debian-bullseye/dnsdist.postinst b/builder-support/debian/dnsdist/debian-bullseye/dnsdist.postinst index 2811365b1c..5a5c1e5c76 100644 --- a/builder-support/debian/dnsdist/debian-bullseye/dnsdist.postinst +++ b/builder-support/debian/dnsdist/debian-bullseye/dnsdist.postinst @@ -19,12 +19,12 @@ case "$1" in adduser --force-badname --system --home /nonexistent --group \ --no-create-home --quiet _dnsdist || true - if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then + if [ -e /etc/dnsdist/dnsdist.conf ] && [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then chown root:_dnsdist /etc/dnsdist/dnsdist.conf # Make sure that dnsdist can read it; the default used to be 0600 chmod g+r /etc/dnsdist/dnsdist.conf fi - if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.yml`" = "root:root" ]; then + if [ -e /etc/dnsdist/dnsdist.yml ] && [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.yml`" = "root:root" ]; then chown root:_dnsdist /etc/dnsdist/dnsdist.yml # Make sure that dnsdist can read it; the default used to be 0600 chmod g+r /etc/dnsdist/dnsdist.yml diff --git a/builder-support/debian/dnsdist/debian-bullseye/rules b/builder-support/debian/dnsdist/debian-bullseye/rules index fceeb417b1..ca583ef5b7 100755 --- a/builder-support/debian/dnsdist/debian-bullseye/rules +++ b/builder-support/debian/dnsdist/debian-bullseye/rules @@ -89,13 +89,5 @@ override_dh_installexamples: override_dh_installinit: # do nothing here. avoids referencing a non-existant init script. -override_dh_fixperms: - dh_fixperms - # these files often contain passwords. 640 as it is chowned to root:_dnsdist - touch debian/dnsdist/etc/dnsdist/dnsdist.conf - chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.conf - touch debian/dnsdist/etc/dnsdist/dnsdist.yml - chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.yml - override_dh_builddeb: dh_builddeb -- -Zgzip