[med-svn] [libvcflib] 01/02: Fix soname, hardening

Andreas Tille tille at debian.org
Thu Sep 15 21:00:59 UTC 2016


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

tille pushed a commit to branch master
in repository libvcflib.

commit ae37e10ecbb1dbeafc04a2a90b347503452fe1af
Author: Andreas Tille <tille at debian.org>
Date:   Thu Sep 15 22:58:59 2016 +0200

    Fix soname, hardening
---
 debian/control                  |  7 +++++--
 debian/libvcflib-tools.install  |  3 ++-
 debian/libvcflib1.install       |  2 ++
 debian/patches/shared_lib.patch | 14 ++++++++++----
 debian/rules                    |  2 ++
 5 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/debian/control b/debian/control
index 3986f1f..905af39 100644
--- a/debian/control
+++ b/debian/control
@@ -17,8 +17,9 @@ Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/libvcflib.git
 Vcs-Git: https://anonscm.debian.org/git/debian-med/libvcflib.git
 Homepage: https://github.com/ekg/vcflib
 
-Package: libvcflib0
+Package: libvcflib1
 Architecture: any
+Section: libs
 Depends: ${shlibs:Depends},
          ${misc:Depends}
 Description: C++ library for parsing and manipulating VCF files
@@ -38,8 +39,10 @@ Description: C++ library for parsing and manipulating VCF files
 
 Package: libvcflib-dev
 Architecture: any
+Section: libdevel
 Depends: ${shlibs:Depends},
-         ${misc:Depends}
+         ${misc:Depends},
+         libvcflib1 (= ${binary:Version})
 Description: C++ library for parsing and manipulating VCF files (development)
  The Variant Call Format (VCF) is a flat-file, tab-delimited textual format
  intended to concisely describe reference-indexed variations between
diff --git a/debian/libvcflib-tools.install b/debian/libvcflib-tools.install
index 0b02e87..e6c501a 100644
--- a/debian/libvcflib-tools.install
+++ b/debian/libvcflib-tools.install
@@ -1 +1,2 @@
-bin	usr
+bin		usr/lib/vcflib
+debian/bin	usr
diff --git a/debian/libvcflib1.install b/debian/libvcflib1.install
new file mode 100755
index 0000000..4b569e9
--- /dev/null
+++ b/debian/libvcflib1.install
@@ -0,0 +1,2 @@
+#! /usr/bin/dh-exec
+lib/lib*.so.1	usr/lib/${DEB_HOST_MULTIARCH}/
diff --git a/debian/patches/shared_lib.patch b/debian/patches/shared_lib.patch
index 2c4d792..d9227ee 100644
--- a/debian/patches/shared_lib.patch
+++ b/debian/patches/shared_lib.patch
@@ -1,3 +1,7 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 15 Sep 2016 22:26:26 +0200
+Description: Create shared lib instead of static
+
 --- a/Makefile
 +++ b/Makefile
 @@ -115,11 +115,11 @@ BINS = $(addprefix bin/,$(notdir $(BIN_S
@@ -63,7 +67,7 @@
  #$(FSOM):
  #	cd fsom && $(CXX) $(CXXFLAGS) -c fsom.c -lm
  
-@@ -186,18 +173,19 @@ $(FILEVERCMP): pre
+@@ -186,19 +173,20 @@ $(FILEVERCMP): pre
  	#cp /usr/share/gnulib/lib/filevercmp.* filevercmp
  	#echo 'Proper use of filevercmp would be: `gnulib-tool --import filevercmp` - but it needs ./configure.ac'
  	#We here go with quilt patches from upstream files
@@ -81,13 +85,15 @@
 -libvcflib.a: $(OBJECTS) $(SMITHWATERMAN) $(REPEATS) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) pre
 -	ar rs libvcflib.a $(OBJECTS) $(SSW) $(FILEVERCMP)
 -	cp libvcflib.a $(LIB_DIR)
+-
 +libvcflib.so: $(OBJECTS) $(SMITHWATERMAN) $(REPEATS) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) pre
 +	# ar rs libvcflib.a $(OBJECTS) $(SSW) $(FILEVERCMP)
-+	gcc -shared -o $@ $(OBJECTS) $(SSW) $(FILEVERCMP) 
-+	cp -a $@ $(LIB_DIR)
- 
++	gcc -shared  -Wl,-soname -Wl,libvcflib.so.1 -o libvcflib.so.1 $(OBJECTS) $(SSW) $(FILEVERCMP)
++	ln -s libvcflib.so.1 libvcflib.so
++	cp -a libvcflib.so* $(LIB_DIR)
  
  test: $(BINS)
+ 	@prove -Itests/lib -w tests/*.t
 @@ -218,7 +206,7 @@ update: pull all
  clean:
  	rm -f $(BINS) $(OBJECTS)
diff --git a/debian/rules b/debian/rules
index d739f98..cc04c97 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,8 @@
 
 # DH_VERBOSE := 1
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie
+
 %:
 	dh $@
 

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



More information about the debian-med-commit mailing list