[med-svn] [sra-sdk] 01/01: Propagate Debian hardening options into build system (further changes in upstream code will be needed !!!)
Andreas Tille
tille at debian.org
Wed Oct 23 08:42:43 UTC 2013
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository sra-sdk.
commit db849c702ec7f70d19b87d52e4a70e16b8a36169
Author: Andreas Tille <tille at debian.org>
Date: Wed Oct 23 10:46:39 2013 +0200
Propagate Debian hardening options into build system (further changes in upstream code will be needed !!!)
---
debian/changelog | 6 +++---
debian/patches/hardening.patch | 39 +++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 2 +-
4 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 2cf0668..e7474bb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,5 @@
sra-sdk (2.3.3-4~dfsg-1) UNRELEASED; urgency=low
- 3228669 New upstream release.
-
[ Andreas Tille ]
* New upstream version
* debian/upstream: Add citation information
@@ -22,11 +20,13 @@ sra-sdk (2.3.3-4~dfsg-1) UNRELEASED; urgency=low
(thanks to Gert Wollny <gw.fossdev at gmail.com> for the patch)
* debian/sra-toolkit.install: There are neither mod?? nor wmod?? files
shipped in this version any more - so remove these from dh_install
+ * debian/patches/hardening.patch: Propagate Debian hardening options
+ into build system
[ Charles Plessy ]
32dd5cd Updated symbols file.
- -- Andreas Tille <tille at debian.org> Tue, 13 Aug 2013 11:04:25 +0200
+ -- Andreas Tille <tille at debian.org> Wed, 23 Oct 2013 10:43:20 +0200
sra-sdk (2.1.7a-1) unstable; urgency=low
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..48e4fbf
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,39 @@
+Author: Andreas Tille <tille at debian.org>
+LastUpdated: Wed, 23 Oct 2013 10:43:20 +0200
+Description: Propagate Debian hardening options into build system
+ This is most probably not the most elegant way, but when simply
+ setting CFLAGS in debian/rules they simply override the CFLAGS
+ setting inside the sequence of Makefiles which leads to a loss of
+ DEFINES and INCDIRS which are needed to build properly
+
+--- a/build/Makefile.env
++++ b/build/Makefile.env
+@@ -301,9 +301,9 @@ DLLX ?= $(SHLX)
+ ARCHDEFS = -D_ARCH_BITS=$(BITS) -DLIBPREFIX=$(LPFX) -DSHLIBEXT=$(DLLX)
+
+ # default tool parameters
+-CFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(PED) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(INCDIRS)
++CFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(PED) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(INCDIRS) $(DEB_CFLAGS)
+ CPFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(INCDIRS)
+-LDFLAGS = $(DBG) $(PROF) $(CARCH)
++LDFLAGS = $(DBG) $(PROF) $(CARCH) $(DEB_LDFLAGS)
+
+ #-------------------------------------------------------------------------------
+ # runtests
+--- a/Makefile
++++ b/Makefile
+@@ -81,11 +81,11 @@ PASSTHRUS = \
+ $(CONFIG) $(PUBLISH)
+
+ $(PASSTHRUS):
+- @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env $@
+- @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env rebuild-dirlinks config
++ @ $(MAKE) -s TOP=$(CURDIR) DEB_CFLAGS="$(DEB_CFLAGS)" DEB_LDFLAGS="$(DEB_LDFLAGS)" -f build/Makefile.env $@
++ @ $(MAKE) -s TOP=$(CURDIR) DEB_CFLAGS="$(DEB_CFLAGS)" DEB_LDFLAGS="$(DEB_LDFLAGS)" -f build/Makefile.env rebuild-dirlinks config
+
+ $(REPORTS):
+- @ $(MAKE) -s TOP=$(CURDIR) -f build/Makefile.env $@
++ @ $(MAKE) -s TOP=$(CURDIR) DEB_CFLAGS="$(DEB_CFLAGS)" DEB_LDFLAGS="$(DEB_LDFLAGS)" -f build/Makefile.env $@
+
+ .PHONY: $(PASSTHRUS) $(REPORTS)
+
diff --git a/debian/patches/series b/debian/patches/series
index 8bbe9de..538907f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
do_not_build_external_libs.patch
10_portability.patch
build-with-system-libbz2-libz.patch
+hardening.patch
diff --git a/debian/rules b/debian/rules
index 71dcdfb..d256959 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,7 +15,7 @@ override_dh_auto_configure:
export OUTDIR=$(OUTDIR) ; make OUTDIR=$(OUTDIR) out ; make release dynamic
override_dh_auto_build:
- export LD_LIBRARY_PATH="$$LD_LIBRARY_PATH:$(OUTDIR)/lib"; export OUTDIR=$(OUTDIR) ; make
+ export LD_LIBRARY_PATH="$$LD_LIBRARY_PATH:$(OUTDIR)/lib"; export OUTDIR=$(OUTDIR) ; make DEB_CFLAGS="$(CFLAGS)" DEB_LDFLAGS="$(LDFLAGS)"
override_dh_auto_test:
--
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/sra-sdk.git
More information about the debian-med-commit
mailing list