Package: cpio
Version: 2.11-7
Severity: important
Tags: patch
Please enabled hardened build flags through dpkg-buildflags.
Patch attached. (dpkg-buildflags abides "noopt" from DEB_BUILD_OPTIONS)
Cheers,
Moritz
diff -aur cpio-2.11.orig/debian/rules cpio-2.11/debian/rules
--- cpio-2.11.orig/debian/rules 2010-12-16 10:15:46.000000000 +0100
+++ cpio-2.11/debian/rules 2012-01-03 23:00:10.000000000 +0100
@@ -17,12 +17,6 @@
CROSS= --build $(DEB_BUILD_GNU_TYPE)
endif
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-CFLAGS += -O0
-else
-CFLAGS += -O2
-endif
-
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
@@ -30,7 +24,7 @@
obj/Makefile:
$(checkdir)
mkdir -p obj
- cd obj && CFLAGS='$(CFLAGS)' CPIO_MT_PROG=mt ../configure --prefix=/usr $(CROSS) \
+ cd obj && CPIO_MT_PROG=mt ../configure $(shell dpkg-buildflags --export=configure) --prefix=/usr $(CROSS) \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--bindir=/bin \