[med-svn] [ea-utils] 03/03: Hardening

Andreas Tille tille at debian.org
Sat Jul 25 06:38:35 UTC 2015


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

tille pushed a commit to branch master
in repository ea-utils.

commit ec035c09b74a33760116b6d4a4022f790e61e8b6
Author: Andreas Tille <tille at debian.org>
Date:   Sat Jul 25 08:37:12 2015 +0200

    Hardening
---
 debian/patches/hardening.patch                    | 51 +++++++++++++++++++++++
 debian/patches/{makefile_patch => makefile.patch} |  0
 debian/patches/series                             |  3 +-
 debian/rules                                      | 22 +---------
 4 files changed, 55 insertions(+), 21 deletions(-)

diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..bd42682
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,51 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Sat, 25 Jul 2015 07:51:46 +0200
+Description: Propagate hardening options
+
+--- a/Makefile
++++ b/Makefile
+@@ -64,21 +64,21 @@ $(PKG).${VER}-${REL}.tar.gz: $(PKG).tar.
+ 	cp $< $@
+ 
+ %: %.c fastq-lib.cpp fastq-lib.h 
+-	$(CC) $(CFLAGS) fastq-lib.cpp -o $@ $<
++	$(CC) $(CFLAGS) fastq-lib.cpp -o $@ $< $(LDFLAGS)
+ 
+ %: %.cpp fastq-lib.cpp fastq-lib.h
+-	$(CC) $(CFLAGS) fastq-lib.cpp -o $@ $<
++	$(CC) $(CFLAGS) fastq-lib.cpp -o $@ $< $(LDFLAGS)
+ 
+ 
+ %: %.c gcModel.c gcModel.h
+-	$(CC) $(CFLAGS) gcModel.c -o $@ $<
++	$(CC) $(CFLAGS) gcModel.c -o $@ $< $(LDFLAGS)
+ 
+ %: %.cpp gcModel.c gcModel.h
+-	$(CC) $(CFLAGS) gcModel.c -o $@ $<
++	$(CC) $(CFLAGS) gcModel.c -o $@ $< $(LDFLAGS)
+ 
+ # why the libbam.a doesn't work?  not sure... *.o works
+ sam-stats: sam-stats.cpp fastq-lib.h
+-	$(CC) $(CFLAGS) fastq-lib.cpp $< -lbam -lz -lpthread -o $@
++	$(CC) $(CFLAGS) fastq-lib.cpp $< -lbam -lz -lpthread -o $@ $(LDFLAGS)
+ 
+ samtools/libbam.a: samtools/*.c samtools/*.h
+ 	cd samtools && make libbam.a
+@@ -87,14 +87,14 @@ varcall: varcall.cpp fastq-lib.cpp tidx/
+ ifeq ($(OS),Windows_NT)
+ 	echo varcall: not supported yet
+ else
+-	$(CC) $(CFLAGS) fastq-lib.cpp tidx/tidx-lib.cpp -o $@ $< -lgsl -lgslcblas
++	$(CC) $(CFLAGS) fastq-lib.cpp tidx/tidx-lib.cpp -o $@ $< -lgsl -lgslcblas $(LDFLAGS)
+ endif
+ 
+ fastq-stats: fastq-stats.cpp fastq-lib.cpp gcModel.c
+-	$(CC) $(CFLAGS) fastq-lib.cpp gcModel.c -o $@ $<
++	$(CC) $(CFLAGS) fastq-lib.cpp gcModel.c -o $@ $< $(LDFLAGS)
+ 
+ bam-filter:  bam-filter.cpp 
+-	$(CC) $(CFLAGS) fastq-lib.cpp -o $@  $< -lbamtools 
++	$(CC) $(CFLAGS) fastq-lib.cpp -o $@  $< -lbamtools $(LDFLAGS)
+ 
+ clean:
+ 	rm -f *.o $(BIN)
diff --git a/debian/patches/makefile_patch b/debian/patches/makefile.patch
similarity index 100%
rename from debian/patches/makefile_patch
rename to debian/patches/makefile.patch
diff --git a/debian/patches/series b/debian/patches/series
index 6a0d9f3..0ccdd2a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-makefile_patch
+makefile.patch
+hardening.patch
diff --git a/debian/rules b/debian/rules
index 88913a2..5db379d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,18 +2,8 @@
 
 # DH_VERBOSE := 1
 
-# some helpful variables - uncomment them if needed
-# shamelessly stolen from http://jmtd.net/log/awk/
-#DEBVERS        := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
-#VERSION        := $(shell echo '$(DEBVERS)' | sed -e 's/^[0-9]*://' -e 's/-.*//')
-#DEBFLAVOR      := $(shell dpkg-parsechangelog | awk '/^Distribution:/ {print $$2}')
-#DEBPKGNAME     := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
-#DEBIAN_BRANCH  := $(shell awk 'BEGIN{FS="[= ]+"} /debian-branch/ {print $$2}' debian/gbp.conf)
-#GIT_TAG        := $(subst ~,_,$(VERSION))
-
-# To build with packages sparsehash change this to -I/usr/include/google
-export CFLAGS:=$(CFLAGS) -I/usr/include/google
-export CPPFLAGS:=$(CPPFLAGS) -I/usr/include/google
+export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) -I/usr/include/google
+export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) -I/usr/include/google
 
 %:
 	dh $@
@@ -21,11 +11,3 @@ export CPPFLAGS:=$(CPPFLAGS) -I/usr/include/google
 override_dh_auto_install:
 	dh_auto_install -- PREFIX='$${DESTDIR}/usr'
 
-override_dh_auto_clean:
-	dh_auto_clean
-
-override_dh_clean:
-	dh_clean
-	#Kill convenience copies of code
-	rm -rf samtools
-	rm -rf google sparsehash

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/ea-utils.git



More information about the debian-med-commit mailing list