diff options
author | Tatsuya Kinoshita <tats@vega.ocn.ne.jp> | 2012-05-19 08:21:03 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@vega.ocn.ne.jp> | 2012-05-19 08:21:03 +0000 |
commit | ad797e531290412a6981c2b199a1c9ec94221c91 (patch) | |
tree | b898da8e187e4ea1c4333517251c700c1d6f25af /debian | |
parent | Release Debian version 0.5.3-7 (diff) | |
download | w3m-ad797e531290412a6981c2b199a1c9ec94221c91.tar.gz w3m-ad797e531290412a6981c2b199a1c9ec94221c91.zip |
Fix CPPFLAGS hardening flags missing (closes: #665491)
Patch from <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665491>
provided by Simon Ruderich.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/100_use-cppflags.patch | 17 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rwxr-xr-x | debian/rules | 9 |
3 files changed, 24 insertions, 3 deletions
diff --git a/debian/patches/100_use-cppflags.patch b/debian/patches/100_use-cppflags.patch new file mode 100644 index 0000000..0b76fb2 --- /dev/null +++ b/debian/patches/100_use-cppflags.patch @@ -0,0 +1,17 @@ +Description: Use $(CPPFLAGS) with $(CPP) + Use CPPFLAGS from environment (dpkg-buildflags). + Necessary for hardening flags. +Author: Simon Ruderich <simon@ruderich.org> +Bug-Debian: http://bugs.debian.org/665491 + +--- w3m-0.5.3.orig/Makefile.in ++++ w3m-0.5.3/Makefile.in +@@ -150,7 +150,7 @@ parsetagx.o: html.c + + funcname.tab: $(DEFUNS) + (echo '#define DEFUN(x,y,z) x y';\ +- sed -ne '/^DEFUN/{p;n;/^[ ]/p;}' $(DEFUNS)) | $(CPP) - | \ ++ sed -ne '/^DEFUN/{p;n;/^[ ]/p;}' $(DEFUNS)) | $(CPP) $(CPPFLAGS) - | \ + awk '$$1 ~ /^[_A-Za-z]/ { \ + for (i=2;i<=NF;i++) { print $$i, $$1} \ + }' > $@.tmp diff --git a/debian/patches/series b/debian/patches/series index 4e54238..b106e0a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -7,3 +7,4 @@ 070_glibc2.14.patch 080_gc72.patch 090_parallel-make.patch +100_use-cppflags.patch diff --git a/debian/rules b/debian/rules index 0c4dc36..b70cfe9 100755 --- a/debian/rules +++ b/debian/rules @@ -2,8 +2,11 @@ #export DH_VERBOSE=1 -CFLAGS=$(shell dpkg-buildflags --get CFLAGS) -LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) dpkg-buildflags +CFLAGS=$(shell $(dpkg_buildflags) --get CFLAGS) +CPPFLAGS=$(shell $(dpkg_buildflags) --get CPPFLAGS) +LDFLAGS=$(shell $(dpkg_buildflags) --get LDFLAGS) ifeq ($(DEB_BUILD_GNU_SYSTEM),linux-gnu) DEVS=x11,fb+s @@ -29,7 +32,7 @@ build-arch: build-stamp build-stamp: dh_testdir cd $(builddir) && dh_autotools-dev_updateconfig - cd $(builddir) && CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure $(confargs) + cd $(builddir) && CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure $(confargs) cd $(builddir) && LC_ALL=C $(MAKE) OPTS="-Wall -g -DDEBIAN" cd $(builddir)/po && LC_ALL=C $(MAKE) update-gmo touch build-stamp |