]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Stop overriding `dh_fixperms` in Deb packages 16779/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 26 Jan 2026 15:56:59 +0000 (16:56 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 27 Jan 2026 13:26:53 +0000 (14:26 +0100)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
builder-support/debian/dnsdist/debian-bookworm/dnsdist.postinst
builder-support/debian/dnsdist/debian-bookworm/rules
builder-support/debian/dnsdist/debian-bullseye/dnsdist.postinst
builder-support/debian/dnsdist/debian-bullseye/rules

index 2811365b1c1b4fbdc7f6ffd55f707fed342f0c31..5a5c1e5c76a935cbab7fad049d6f49849d156401 100644 (file)
@@ -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
index cae7296df1366617feafe522dfd73e401bf15bd8..d823d1987bfe3bc7209ff5c1ef5d1b57e55ad759 100755 (executable)
@@ -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
index 2811365b1c1b4fbdc7f6ffd55f707fed342f0c31..5a5c1e5c76a935cbab7fad049d6f49849d156401 100644 (file)
@@ -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
index fceeb417b189f6b791dcf8bc29d68c068e539045..ca583ef5b79cfbe97efdebfb1d9bd717838133e0 100755 (executable)
@@ -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