From a10f72aa5e9f4e6201f19e2d275ce098d5165d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Sun, 28 Jun 2020 17:35:02 +0300 Subject: [PATCH] Deb: Proper DH_ and DEB_ flag use in debian/rules - DEB_BUILD_HARDENING is only used with hardening-wrapper which is deprecated in Debian, so remove it - The word 'terse' should be checked in DEB_BUILD_OPTIONS and verbosity controlled by it --- debian/rules | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index 59f4c571679..b3ef1bab11a 100755 --- a/debian/rules +++ b/debian/rules @@ -1,12 +1,10 @@ #!/usr/bin/make -f -export DH_VERBOSE=1 -export DEB_BUILD_HARDENING=1 - -# enable Debian Hardening -# see: https://wiki.debian.org/Hardening +# Enable Debian Hardening +# https://wiki.debian.org/Hardening export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 +# Include all defaults, including buildflags.mk include /usr/share/dpkg/default.mk # CPPFLAGS are nor read by CMake, so copy them to CXXFLAGS # See why at https://cmake.org/Bug/view.php?id=12928 @@ -22,6 +20,12 @@ TMP:=$(CURDIR)/debian/tmp CC := $(DEB_HOST_GNU_TYPE)-gcc CXX := $(DEB_HOST_GNU_TYPE)-g++ +# According to Debian Policy version 4.2.0 builds should be as verbose as +# possible unless 'terse' is specifically passed. +ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS))) + export DH_VERBOSE=1 +endif + # Parallel build support as advised # at https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))