From 62f14a5fe70ef6e7569491bcd5292c075f974a2a Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Sun, 10 Jun 2012 01:34:17 +0100 Subject: Added 01-pass-cppflags-and-ldflags-to-compiler.patch to enable build hardening --- debian/changelog | 2 ++ .../01-pass-cppflags-and-ldflags-to-compiler.patch | 42 ++++++++++++++++++++++ .../patches/01-remove-extra-copyright-file.patch | 17 --------- .../patches/02-remove-extra-copyright-file.patch | 17 +++++++++ debian/patches/series | 3 +- 5 files changed, 63 insertions(+), 18 deletions(-) create mode 100644 debian/patches/01-pass-cppflags-and-ldflags-to-compiler.patch delete mode 100644 debian/patches/01-remove-extra-copyright-file.patch create mode 100644 debian/patches/02-remove-extra-copyright-file.patch diff --git a/debian/changelog b/debian/changelog index 5050cda..4088fec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ wavemon (0.7.5-2) UNRELEASED; urgency=low * Mark as linux-any to save CPU cycles on KFreeBSD/Hurd buildds * Bump debhelper to v9 + * Added 01-pass-cppflags-and-ldflags-to-compiler.patch to enable build + hardening -- Jonathan McCrohan Sat, 09 Jun 2012 11:53:56 +0100 diff --git a/debian/patches/01-pass-cppflags-and-ldflags-to-compiler.patch b/debian/patches/01-pass-cppflags-and-ldflags-to-compiler.patch new file mode 100644 index 0000000..41d7cdb --- /dev/null +++ b/debian/patches/01-pass-cppflags-and-ldflags-to-compiler.patch @@ -0,0 +1,42 @@ +From c64fb125cbfa16c8c15f3ae0f56ee6bbda84ec8a Mon Sep 17 00:00:00 2001 +From: Jonathan McCrohan +Date: Sun, 10 Jun 2012 00:25:56 +0100 +Subject: [PATCH] Pass CPPFLAGS and LDFLAGS to compiler + +Required by Debian Debhelper to enable build hardening: +http://wiki.debian.org/Hardening + +Signed-off-by: Jonathan McCrohan +--- + Makefile.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index b7d8ece..6b06437 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -10,9 +10,12 @@ install-suid-root: exec_perms = 4755 + + CC = @CC@ + CFLAGS = @CFLAGS@ ++CPPFLAGS = @CPPFLAGS@ ++LDFLAGS = @LDFLAGS@ + DEFS = @DEFS@ + LDLIBS = @LIBS@ + ++ + INSTALL = @INSTALL@ + RM = rm -vf + +@@ -23,7 +26,7 @@ OBJS = $(PURESRC:.c=.o) + DOCS = README NEWS THANKS AUTHORS COPYING ChangeLog + + %.o: %.c $(HEADERS) +- $(CC) $(CFLAGS) $(DEFS) -c -o $@ $< ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(DEFS) -c -o $@ $< + + all: @PACKAGE_NAME@ + @PACKAGE_NAME@: $(MAIN) $(OBJS) +-- +1.7.10 + diff --git a/debian/patches/01-remove-extra-copyright-file.patch b/debian/patches/01-remove-extra-copyright-file.patch deleted file mode 100644 index da057bd..0000000 --- a/debian/patches/01-remove-extra-copyright-file.patch +++ /dev/null @@ -1,17 +0,0 @@ -From: Jonathan McCrohan -Date: Tue, 21 Feb 2012 22:00:15 +0000 -Subject: Remove extra copyright file from Makefile - -diff --git a/Makefile.in b/Makefile.in -index b7d8ece..fceed72 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -20,7 +20,7 @@ - HEADERS = @PACKAGE_NAME@.h llist.h iw_if.h - PURESRC = $(filter-out $(MAIN),$(wildcard *.c)) - OBJS = $(PURESRC:.c=.o) --DOCS = README NEWS THANKS AUTHORS COPYING ChangeLog -+DOCS = README NEWS THANKS AUTHORS ChangeLog - - %.o: %.c $(HEADERS) - $(CC) $(CFLAGS) $(DEFS) -c -o $@ $< diff --git a/debian/patches/02-remove-extra-copyright-file.patch b/debian/patches/02-remove-extra-copyright-file.patch new file mode 100644 index 0000000..3afe515 --- /dev/null +++ b/debian/patches/02-remove-extra-copyright-file.patch @@ -0,0 +1,17 @@ +From: Jonathan McCrohan +Date: Sun, 10 Jun 2012 00:31:09 +0100 +Subject: Remove extra copyright file from Makefile + +diff --git a/Makefile.in b/Makefile.in +index b7d8ece..fceed72 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -20,7 +20,7 @@ + HEADERS = @PACKAGE_NAME@.h llist.h iw_if.h + PURESRC = $(filter-out $(MAIN),$(wildcard *.c)) + OBJS = $(PURESRC:.c=.o) +-DOCS = README NEWS THANKS AUTHORS COPYING ChangeLog ++DOCS = README NEWS THANKS AUTHORS ChangeLog + + %.o: %.c $(HEADERS) + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(DEFS) -c -o $@ $< diff --git a/debian/patches/series b/debian/patches/series index f5eb0a6..d710877 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ -01-remove-extra-copyright-file.patch +01-pass-cppflags-and-ldflags-to-compiler.patch +02-remove-extra-copyright-file.patch -- cgit v1.2.3