The following commit has been merged in the jessie branch: commit 5d4a2bb57448de3a48acd229e7e08f35dd7c602f Author: Bas Couwenberg <sebas...@xs4all.nl> Date: Tue Jul 16 19:21:23 2013 +0200
Enable hardening build flags for Ruby mapscript. diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch index a4549df..c5ffdf6 100644 --- a/debian/patches/hardening.patch +++ b/debian/patches/hardening.patch @@ -88,3 +88,14 @@ Last-Update: 2013-06-30 MS_LIB = $(top_builddir)/libmapserver.la +--- a/mapscript/ruby/extconf.rb ++++ b/mapscript/ruby/extconf.rb +@@ -14,7 +14,7 @@ MAPSERVER_LOCAL_LIBS=Pathname.new(File.d + + # $CFLAGS works only with 1.8 ??? -> the -Wall argument is not needed !!! + $CFLAGS = "" +-$CPPFLAGS = make_inc + " -idirafter $(rubylibdir)/$(arch) " + make_define ++$CPPFLAGS += make_inc + " -idirafter $(rubylibdir)/$(arch) " + make_define + $LDFLAGS += " -fPIC -Wl,-rpath,#{MAPSERVER_LOCAL_LIBS}" + #$LOCAL_LIBS += " -L../../.libs/ " + " -lmapserver " + make_static_libs + $LOCAL_LIBS += " -L#{MAPSERVER_LOCAL_LIBS} " + " -lmapserver " diff --git a/debian/rules b/debian/rules index a501885..bf1fa1e 100755 --- a/debian/rules +++ b/debian/rules @@ -17,6 +17,9 @@ LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) CFLAGS+=$(CPPFLAGS) CFLAGS+=$(LDFLAGS) + +# mapscript.so for ruby1.9.1 fails to build with -Werror=format-security +RUBY_CPPFLAGS=$(subst -Werror=format-security,,$(CFLAGS)) package=mapserver @@ -105,7 +108,7 @@ build-arch-stamp: configure-stamp # Build ruby cd $(CURDIR)/mapscript/ruby && set -e ; \ for v in $(RUBYVERS) ; do \ - ruby$$v extconf.rb && $(MAKE) && \ + ruby$$v extconf.rb --with-cppflags="$(RUBY_CPPFLAGS) " && $(MAKE) && \ mv mapscript.so ruby$$v-mapscript.so ; \ done @@ -182,7 +185,7 @@ install-arch-stamp: build-arch # Ruby mapscript cd $(CURDIR)/mapscript/ruby && set -e ; \ for v in $(RUBYVERS) ; do \ - ruby$$v extconf.rb ; \ + ruby$$v extconf.rb --with-cppflags="$(RUBY_CPPFLAGS) " ; \ $(MAKE) install sitedir=$(CURDIR)/debian/libmapscript-ruby$$v/usr/lib/ruby ; \ $(MAKE) distclean ; \ done -- Mapserver _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel