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

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Thu Jun 25 20:52:28 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 1923c3cc5f3deca4bb8c2b14dc61c436a888cd8a
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/rules     | 18 +++++++++++++++++-
 3 files changed, 19 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/rules b/debian/rules
index 5c55ab3..a810647 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,22 @@
 # 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)
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
+FFLAGS:=$(shell dpkg-buildflags --get FFLAGS)
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
+
+CFLAGS+=$(CPPFLAGS)
+CFLAGS+=$(FFLAGS)
+CFLAGS+=$(LDFLAGS)
+
+CPPFLAGS=$(CFLAGS)
+CXXFLAGS=$(CFLAGS)
+LDFLAGS=$(CFLAGS)
 
 %:
 	dh $@ 
@@ -26,7 +42,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 -- CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" libmapcache_LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" --with-mapserver=/usr/bin --with-fastcgi
 
 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