[mapcache] 08/43: Enable hardening build flags.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Thu Jun 25 20:52:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch wheezy-backports
in repository mapcache.

commit e8467c397c36929a343fc87391e424ae56d9a056
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Jun 21 17:48:00 2013 +0200

    Enable hardening build flags.
---
 debian/changelog                           |  1 +
 debian/control                             |  2 +-
 debian/patches/libmapcache_hardening.patch | 11 +++++++++++
 debian/patches/series                      |  1 +
 debian/rules                               |  8 +++++++-
 5 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 490fb25..5621c3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,7 @@ mapcache (1.0.0-3) UNRELEASED; urgency=low
   * Create /var/cache/mapcache in postinst.
   * Build-Depend on libproj-dev instead of the proj source package.
   * Drop explicit dependency on libmapcache0, already set by shlibs:Depends.
+  * Enable hardening build flags.
   * Add patch to fix typos in demo service javascript.
   * Add patch to use a valid variable name for the WMSGetFeatureInfo control.
   * Add patch to set the HTML5 DOCTYPE in the demo service.
diff --git a/debian/control b/debian/control
index 58799c7..b253243 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: devel
 Priority: extra
 Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
 Uploaders: Francesco Paolo Lovergine <frankie at debian.org>, Alan Boudreault <aboudreault at mapgears.com>, Bas Couwenberg <sebastic at xs4all.nl>
-Build-Depends: debhelper (>= 9), autotools-dev,
+Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1.1), autotools-dev,
  apache2-prefork-dev, libpng-dev, libjpeg-dev, libcurl4-gnutls-dev,
  libpcre3-dev, libpixman-1-dev, libfcgi-dev, libgdal1-dev, libgeos-dev,
  libsqlite3-dev, libtiff4-dev, libmapserver, libmapserver-dev,
diff --git a/debian/patches/libmapcache_hardening.patch b/debian/patches/libmapcache_hardening.patch
new file mode 100644
index 0000000..805d6f7
--- /dev/null
+++ b/debian/patches/libmapcache_hardening.patch
@@ -0,0 +1,11 @@
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -17,7 +17,7 @@ source_mapserver.lo: source_mapserver.c
+ 
+ 
+ libmapcache.la: $(LOBJS)
+-	$(LIBTOOL) --mode=link --tag CC $(CC) -rpath $(libdir) $(LOBJS) $(LIBS) -o $@
++	$(LIBTOOL) --mode=link --tag CC $(CC) -rpath $(libdir) $(LOBJS) $(LIBS) $(LDFLAGS) -o $@
+ 
+ clean:
+ 	rm -f *.o
diff --git a/debian/patches/series b/debian/patches/series
index d60ce6c..a5aeb20 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,6 @@
 includepath.patch
 fixwithmapserv.patch
+libmapcache_hardening.patch
 demo_service_js_typos.patch
 demo_service_valid_js_var.patch
 demo_service_html5_doctype.patch
diff --git a/debian/rules b/debian/rules
index 5c55ab3..f1c9df4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,12 @@
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
+# Enable hardening build flags
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
 %:
 	dh $@ 
@@ -26,7 +32,7 @@ override_dh_clean:
 	-$(RM) Makefile.inc apache/Makefile cgi/Makefile lib/Makefile util/Makefile
 
 override_dh_auto_configure:
-	dh_auto_configure -- --with-mapserver=/usr/bin --with-fastcgi
+	dh_auto_configure -- --with-mapserver=/usr/bin --with-fastcgi CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)"
 
 override_dh_auto_build:
 	dh_auto_build

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/mapcache.git



More information about the Pkg-grass-devel mailing list