[med-svn] [baitfisher] 01/01: Hardening

Andreas Tille tille at debian.org
Mon Jan 8 07:57:40 UTC 2018


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

tille pushed a commit to branch master
in repository baitfisher.

commit a71b5f130e48365021dd4eb3d2ed2a8764b8bcb9
Author: Andreas Tille <tille at debian.org>
Date:   Mon Jan 8 08:56:07 2018 +0100

    Hardening
---
 debian/changelog               |  7 +++-
 debian/patches/hardening.patch | 77 ++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series          |  1 +
 3 files changed, 84 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index c9a2855..8b8de9d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,15 @@
 baitfisher (1.0+dfsg-3) UNRELEASED; urgency=medium
 
+  [ Steffen Moeller ]
   * debian/upstream/metadata:
     - Added registries
     - yamllint cleanliness
 
- -- Steffen Moeller <moeller at debian.org>  Wed, 06 Sep 2017 23:35:43 +0200
+  [ Andreas Tille ]
+  * Enable hardening (thanks for the patch to Juhani Numminen
+    <juhaninumminen0 at gmail.com>)
+
+ -- Andreas Tille <tille at debian.org>  Mon, 11 Dec 2017 20:34:33 +0100
 
 baitfisher (1.0+dfsg-2) unstable; urgency=medium
 
diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
new file mode 100644
index 0000000..e5f1301
--- /dev/null
+++ b/debian/patches/hardening.patch
@@ -0,0 +1,77 @@
+From: Juhani Numminen <juhaninumminen0 at gmail.com>
+Date: Mon, 11 Dec 2017 14:26:43 +0200
+Subject: [PATCH] Allow extra flags in CPPFLAGS, CXXFLAGS and LDFLAGS.
+ Use the standard meaning of the variables CXX, CPPFLAGS, CXXFLAGS and
+ LDFLAGS and does not overwrite them, so that makefile users (eg. Debian
+ packagers) can pass extra build flags in environment variables.
+ .
+ Reference:
+ https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html
+ https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html
+ https://www.gnu.org/prep/standards/standards.html#Command-Variables
+ https://wiki.debian.org/UpstreamGuide#Make
+---
+ makefile     | 10 +++++-----
+ makefile_win | 10 +++++-----
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/makefile b/makefile
+index 609fcd6..596703c 100644
+--- a/makefile
++++ b/makefile
+@@ -1,19 +1,19 @@
+-CPP = g++
+-CPPFLAGS = -I . -O3
++CXX = g++
++BAIT_CXXFLAGS = -I . -O3
+ 
+ OBJECTS1 = bait-fisher-helper.o bait-fisher.o Csequence_cluster_and_center_sequence.o mydir-unix.o
+ OBJECTS2 = bait-filter.o global-types-and-parameters.o
+ 
+ %.o: %.cpp
+-	$(CPP) $(CPPFLAGS) -c $< -o $@
++	$(CXX) $(CPPFLAGS) $(BAIT_CXXFLAGS) $(CXXFLAGS) -c $< -o $@
+ 
+ default: BaitFisher-v1.2.7 BaitFilter-v1.0.5
+ 
+ BaitFisher-v1.2.7: $(OBJECTS1)
+-	$(CPP) $(CPPFLAGS) -lstdc++ $(OBJECTS1) -o $@
++	$(CXX) $(BAIT_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lstdc++ $(OBJECTS1) -o $@
+ 
+ BaitFilter-v1.0.5: $(OBJECTS2)
+-	$(CPP) $(CPPFLAGS) -lstdc++ $(OBJECTS2) -o $@
++	$(CXX) $(BAIT_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lstdc++ $(OBJECTS2) -o $@
+ 
+ clean:
+ 	rm -f *.o
+diff --git a/makefile_win b/makefile_win
+index 9cd3de0..3512232 100644
+--- a/makefile_win
++++ b/makefile_win
+@@ -1,21 +1,21 @@
+ ## Requires mingw to be installed".
+ 
+-CPP = g++
+-CPPFLAGS = -I . -O3
++CXX = g++
++BAIT_CXXFLAGS = -I . -O3
+ 
+ OBJECTS1 = bait-fisher-helper.o bait-fisher.o Csequence_cluster_and_center_sequence.o mydir-unix.o
+ OBJECTS2 = bait-filter.o global-types-and-parameters.o
+ 
+ %.o: %.cpp
+-	$(CPP) $(CPPFLAGS) -c $< -o $@
++	$(CXX) $(CPPFLAGS) $(BAIT_CXXFLAGS) $(CXXFLAGS) -c $< -o $@
+ 
+ default: BaitFisher-v1.2.7 BaitFilter-v1.0.5
+ 
+ BaitFisher-v1.2.7: $(OBJECTS1)
+-	$(CPP) $(CPPFLAGS) -lstdc++ $(OBJECTS1) -o $@
++	$(CXX) $(BAIT_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lstdc++ $(OBJECTS1) -o $@
+ 
+ BaitFilter-v1.0.5: $(OBJECTS2)
+-	$(CPP) $(CPPFLAGS) -lstdc++ $(OBJECTS2) -o $@
++	$(CXX) $(BAIT_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -lstdc++ $(OBJECTS2) -o $@
+ 
+ clean:
+ 	rm -f *.o
diff --git a/debian/patches/series b/debian/patches/series
index 1390f96..e9c36f2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 adapt_examples.patch
 fix_gcc6.patch
+hardening.patch

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



More information about the debian-med-commit mailing list