Package: fetchmail
Version: 6.3.21-2
Severity: important
Tags: patch

Please enable hardened build flags using dpkg-buildflags.

Patch attached.

Cheers,
        Moritz
diff -aur fetchmail-6.3.21.orig/debian/rules fetchmail-6.3.21/debian/rules
--- fetchmail-6.3.21.orig/debian/rules	2011-09-04 16:08:44.000000000 +0200
+++ fetchmail-6.3.21/debian/rules	2011-12-29 07:00:34.000000000 +0100
@@ -92,13 +92,12 @@
 endif
 
 # Turn off optimization if the user requests it.
-CFLAGS = -Wall -pipe -g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
-export CFLAGS
+CFLAGS = -Wall -pipe
+CFLAGS += `dpkg-buildflags --get CFLAGS`
+
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
+
 
 clean: unpatch
 	dh_testdir
@@ -116,7 +115,7 @@
 	cp /usr/share/misc/config.sub config.sub
 	cp /usr/share/misc/config.guess config.guess
 
-	./configure $(CONFFLAGS) --prefix=/usr --enable-nls \
+	./configure CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(CONFFLAGS) --prefix=/usr --enable-nls \
 		--disable-fallback $(FETCHCONFOPT)
 
 	sed -e "s/-lcrypt//; s/-lk5crypto//g;"  < Makefile > Makefile.tmp
Nur in fetchmail-6.3.21/debian: rules~.

Reply via email to