From 56723f4b10d77c4650dc22e726642974d22e0bad Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 26 Jan 2026 16:56:59 +0100 Subject: [PATCH] dnsdist: Stop overriding `dh_fixperms` in Deb packages Signed-off-by: Remi Gacogne --- .../debian/dnsdist/debian-bookworm/dnsdist.postinst | 4 ++-- builder-support/debian/dnsdist/debian-bookworm/rules | 8 -------- .../debian/dnsdist/debian-bullseye/dnsdist.postinst | 4 ++-- builder-support/debian/dnsdist/debian-bullseye/rules | 8 -------- 4 files changed, 4 insertions(+), 20 deletions(-) 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 -- 2.47.3