]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
builder-support: Improve consistency of Debian Stretch/Buster configurations
authorKevin P. Fleming <kevin@km6g.us>
Thu, 24 Sep 2020 11:42:46 +0000 (07:42 -0400)
committerKevin P. Fleming <kevin@km6g.us>
Thu, 24 Sep 2020 21:37:22 +0000 (17:37 -0400)
(Also applies to all post-Xenial Ubuntu builds since they use these configurations too)

* Use debhelper version 10.x on both distributions

* Use consistent logic for enabling systemd support

* Remove unnecessary --parallel flags (default mode in debhelper 10.x)

* Always use architecture.mk and pkg-info.mk to set DEB_* variables

* Enable warnings and hardening on Stretch builds

Signed-off-by: Kevin P. Fleming <kevin@km6g.us>
14 files changed:
builder-support/debian/authoritative/debian-buster/compat
builder-support/debian/authoritative/debian-buster/control
builder-support/debian/authoritative/debian-buster/rules
builder-support/debian/authoritative/debian-stretch/compat
builder-support/debian/authoritative/debian-stretch/control
builder-support/debian/authoritative/debian-stretch/rules
builder-support/debian/dnsdist/debian-buster/control
builder-support/debian/dnsdist/debian-buster/rules
builder-support/debian/dnsdist/debian-stretch/control
builder-support/debian/dnsdist/debian-stretch/rules
builder-support/debian/recursor/debian-buster/control
builder-support/debian/recursor/debian-buster/rules
builder-support/debian/recursor/debian-stretch/control
builder-support/debian/recursor/debian-stretch/rules

index 533352390f7721e47dc0de689033f0076a19ef2c..a11956d9064c57593deaa91a057b3a4b8ebdabdb 100644 (file)
@@ -9,11 +9,10 @@ Build-Depends: autoconf,
                autotools-dev,
                bison,
                curl,
-               debhelper (>= 9.20160114~),
+               debhelper (>= 10),
                default-libmysqlclient-dev,
                dh-autoreconf,
                dh-systemd,
-               dpkg-dev (>= 1.17.0~),
                flex,
                libboost-dev,
                libboost-program-options-dev,
index 304916cf0263a82d3e3c73ffa05fa20fe6c5b023..22779b1756700d3eeec729fa65c2e01f67d41621 100755 (executable)
@@ -11,9 +11,10 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 # Backends
 backends := bind ldap pipe gmysql godbc gpgsql gsqlite3 geoip lmdb lua2 remote random tinydns
 
-# Disable systemd integration on non-linux archs
+# Only enable systemd integration on Linux operating systems
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
+DH_ARGS += --with systemd
 else
 CONFIGURE_ARGS += --disable-systemd
 endif
@@ -22,8 +23,7 @@ endif
 %:
        dh $@ \
          --with autoreconf \
-         --with systemd \
-         --parallel
+         $(DH_ARGS)
 
 override_dh_auto_configure:
        test -f pdns/dnslabeltext.cc && mv pdns/dnslabeltext.cc debian/dnslabeltext.cc.moved || true
index 533352390f7721e47dc0de689033f0076a19ef2c..a11956d9064c57593deaa91a057b3a4b8ebdabdb 100644 (file)
@@ -9,11 +9,10 @@ Build-Depends: autoconf,
                autotools-dev,
                bison,
                curl,
-               debhelper (>= 9.20160114~),
+               debhelper (>= 10),
                default-libmysqlclient-dev,
                dh-autoreconf,
                dh-systemd,
-               dpkg-dev (>= 1.17.0~),
                flex,
                libboost-dev,
                libboost-program-options-dev,
index 28e42be93b5e535fba3384df67adde3181c33e48..14bbc43c412870e1bd6cdface3c0230c9a946aa6 100755 (executable)
@@ -1,14 +1,20 @@
 #!/usr/bin/make -f
-DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
-DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/pkg-info.mk
+
+# (Re-)Enable warnings
+CXXFLAGS += -Wall
+
+# Turn on all hardening flags, as we're a networked daemon.
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 # Backends
 backends := bind ldap pipe gmysql godbc gpgsql gsqlite3 geoip lmdb lua2 remote random tinydns
 
-# Disable systemd integration on non-linux archs
+# Only enable systemd integration on Linux operating systems
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
+DH_ARGS += --with systemd
 else
 CONFIGURE_ARGS += --disable-systemd
 endif
@@ -18,8 +24,7 @@ endif
 %:
        dh $@ \
          --with autoreconf \
-         --with systemd \
-         --parallel
+         $(DH_ARGS)
 
 override_dh_auto_configure:
        test -f pdns/dnslabeltext.cc && mv pdns/dnslabeltext.cc debian/dnslabeltext.cc.moved || true
index 66cd8a9dd9828d1bde31582a8469ee23c43efc43..0e2f77ba4ba03906e6108e5d246f1eae1018f24e 100644 (file)
@@ -3,7 +3,7 @@ Section: net
 Priority: optional
 Maintainer: PowerDNS.COM BV <powerdns.support.sales@powerdns.com>
 Uploaders: PowerDNS.COM BV <powerdns.support.sales@powerdns.com>
-Build-Depends: debhelper (>= 10~),
+Build-Depends: debhelper (>= 10),
                libboost-all-dev,
                libcap-dev,
                libcdb-dev,
index 42533bfda07d6bbc2127c1fbc49d4efe15c7fdf7..71b1950e125771ae47c269ca678b4c4b69653913 100755 (executable)
@@ -1,7 +1,6 @@
 #!/usr/bin/make -f
-# See debhelper(7) (uncomment to enable)
-# output every command that modifies files on the build system.
-#DH_VERBOSE = 1
+include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/pkg-info.mk
 
 # Enable hardening features for daemons
 export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow,+pie
@@ -12,16 +11,19 @@ include /usr/share/dpkg/default.mk
 # for atomic support on powerpc (automatic on mipsel)
 LDFLAGS += -latomic
 
-# Disable systemd integration on non-linux archs
+# Only enable systemd integration on Linux operating systems
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
+DH_ARGS += --with systemd
 else
 CONFIGURE_ARGS += --disable-systemd
 endif
 
 
 %:
-       dh $@
+       dh $@ \
+         --with autoreconf \
+         $(DH_ARGS)
 
 override_dh_auto_clean:
        rm -f dnslabeltext.cc
index 1cb8a7dd5767dad753fe0a5c6c7aa677fc62d84b..fc4fe07e158b0587ea0a402fe89bccf82f3f30c4 100644 (file)
@@ -3,7 +3,7 @@ Section: net
 Priority: optional
 Maintainer: Debian DNS Packaging <pkg-dns-devel@lists.alioth.debian.org>
 Uploaders: Chris Hofstaedtler <zeha@debian.org>
-Build-Depends: debhelper (>= 10~),
+Build-Depends: debhelper (>= 10),
                libboost-dev,
                libcap-dev,
                libcdb-dev,
index e058f0e252e5e3a10ca8ae5c9648f4273d929562..d255665a09c8312614d45a5f6a35489257eb9941 100755 (executable)
@@ -1,7 +1,6 @@
 #!/usr/bin/make -f
-# See debhelper(7) (uncomment to enable)
-# output every command that modifies files on the build system.
-#DH_VERBOSE = 1
+include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/pkg-info.mk
 
 # Enable hardening features for daemons
 export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow,+pie
@@ -12,16 +11,19 @@ include /usr/share/dpkg/default.mk
 # for atomic support on powerpc (automatic on mipsel)
 LDFLAGS += -latomic
 
-# Disable systemd integration on non-linux archs
+# Only enable systemd integration on Linux operating systems
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
+DH_ARGS += --with systemd
 else
 CONFIGURE_ARGS += --disable-systemd
 endif
 
 
 %:
-       dh $@
+       dh $@ \
+         --with autoreconf \
+         $(DH_ARGS)
 
 override_dh_auto_clean:
        rm -f dnslabeltext.cc
index 289190b678b3033dbc99970cff7c20016fcb8a96..f99d737a40034edb8156e364417872acfeb1fdd4 100644 (file)
@@ -3,7 +3,7 @@ Section: net
 Priority: extra
 Standards-Version: 4.1.2
 Maintainer: PowerDNS.COM BV <powerdns.support@powerdns.com>
-Build-Depends: debhelper (>= 10~),
+Build-Depends: debhelper (>= 10),
                dh-autoreconf,
                dh-systemd [linux-any],
                libboost-all-dev,
index 1680d6c86e77ea2f86a81cacf056b65273dbce95..1274a166de9e4a49e0df56bde312379007f4f48c 100755 (executable)
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f
-DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/pkg-info.mk
 
 # Enable hardening features for daemons
 # Note: blhc (build log hardening check) will find these false positives: CPPFLAGS 2 missing, LDFLAGS 1 missing
@@ -8,7 +9,7 @@ DPKG_EXPORT_BUILDFLAGS = 1
 # Include buildflags.mk so we can append to the vars it sets.
 include /usr/share/dpkg/buildflags.mk
 
-# Disable systemd integration on non-linux archs
+# Only enable systemd integration on Linux operating systems
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
 DH_ARGS += --with systemd
index 289190b678b3033dbc99970cff7c20016fcb8a96..f99d737a40034edb8156e364417872acfeb1fdd4 100644 (file)
@@ -3,7 +3,7 @@ Section: net
 Priority: extra
 Standards-Version: 4.1.2
 Maintainer: PowerDNS.COM BV <powerdns.support@powerdns.com>
-Build-Depends: debhelper (>= 10~),
+Build-Depends: debhelper (>= 10),
                dh-autoreconf,
                dh-systemd [linux-any],
                libboost-all-dev,
index 1680d6c86e77ea2f86a81cacf056b65273dbce95..1274a166de9e4a49e0df56bde312379007f4f48c 100755 (executable)
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f
-DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+include /usr/share/dpkg/architecture.mk
+include /usr/share/dpkg/pkg-info.mk
 
 # Enable hardening features for daemons
 # Note: blhc (build log hardening check) will find these false positives: CPPFLAGS 2 missing, LDFLAGS 1 missing
@@ -8,7 +9,7 @@ DPKG_EXPORT_BUILDFLAGS = 1
 # Include buildflags.mk so we can append to the vars it sets.
 include /usr/share/dpkg/buildflags.mk
 
-# Disable systemd integration on non-linux archs
+# Only enable systemd integration on Linux operating systems
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
 DH_ARGS += --with systemd