Package: lurker
Version: 2.3-2
Severity: important
Tags: patch

Please enable hardened build flags through dpkg-buildflags.

Patch attached. (dpkg-buildflags abides "noopt" from DEB_BUILD_OPTIONS)

Cheers,
        Moritz
diff -aur lurker-2.3.harden/debian/rules lurker-2.3/debian/rules
--- lurker-2.3.harden/debian/rules	2011-06-20 12:44:41.000000000 +0200
+++ lurker-2.3/debian/rules	2012-01-27 19:49:44.000000000 +0100
@@ -14,13 +14,11 @@
   confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 endif
 
-CFLAGS = -Wall -g
+CXXFLAGS = `dpkg-buildflags --get CXXFLAGS`
+CXXFLAGS += -Wall
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 endif
@@ -33,7 +31,7 @@
 configure-stamp:
 	dh_testdir
 	# Add here commands to configure the package.
-	CXXFLAGS="$(CFLAGS)" ./configure $(confflags) \
+	CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure $(confflags) \
 		--prefix=/usr \
 		--sysconfdir=/etc \
 		--localstatedir=/var \
Nur in lurker-2.3/debian: rules~.

Reply via email to