[cod-tools] 02/03: Adding a patch to enable RELRO for Perl and Python interfaces to codcif.

Andrius Merkys merkys-guest at moszumanska.debian.org
Fri Sep 29 07:58:33 UTC 2017


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

merkys-guest pushed a commit to branch master
in repository cod-tools.

commit f3d6529bafca8e22ededcdf08bfff0c1494c5158
Author: Andrius Merkys <andrius.merkys at gmail.com>
Date:   Fri Sep 29 10:56:51 2017 +0300

    Adding a patch to enable RELRO for Perl and Python interfaces to codcif.
---
 debian/patches/relro.diff | 22 ++++++++++++++++++++++
 debian/patches/series     |  1 +
 2 files changed, 23 insertions(+)

diff --git a/debian/patches/relro.diff b/debian/patches/relro.diff
new file mode 100644
index 0000000..bbe18db
--- /dev/null
+++ b/debian/patches/relro.diff
@@ -0,0 +1,22 @@
+--- a/src/lib/perl5/COD/CIF/Parser/Bison/Makelocal-SWIG-module
++++ b/src/lib/perl5/COD/CIF/Parser/Bison/Makelocal-SWIG-module
+@@ -21,7 +21,7 @@
+ 
+ OBJS = ${OBJ} ${SWIG_WRAPPER_OBJ}
+ 
+-PERL_LDDLFLAGS = $(shell perl -MConfig -e 'print $$Config{lddlflags}')
++PERL_LDDLFLAGS = $(shell perl -MConfig -e 'print $$Config{lddlflags}') -z relro
+ PERL_CCFLAGS = $(shell perl -MConfig -e 'print join(" ", @Config{qw(ccflags optimize cccdlflags)}, "-I$$Config{archlib}/CORE")')
+ 
+ # ${LIB_DIRS} variable contains a list of directories, each of them
+--- a/src/components/pycodcif/Makelocal-SWIG-module
++++ b/src/components/pycodcif/Makelocal-SWIG-module
+@@ -28,7 +28,7 @@
+ all: ${SWIG_MODULE} ${SWIG_SO_FILE}
+ 
+ ${SWIG_SO_FILE}: ${OBJS} ${LIBRARIES}
+-	gcc -shared ${OBJS} -lcodcif -lcexceptions \
++	gcc -z relro -shared ${OBJS} -lcodcif -lcexceptions \
+ 		-L${CIF_PARSER_C_DIR}/lib -L${CEXCEPTIONS_DIR}/lib -o $@
+ 
+ ${OBJ} ${SWIG_WRAPPER_OBJ}: ${SWIG_SOURCE} ${SWIG_WRAPPER}
diff --git a/debian/patches/series b/debian/patches/series
index 73c26be..e7946ac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+relro.diff
 codcif-manpages.diff
 distclean-tmp.diff
 executables-in-codcif.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cod-tools.git



More information about the debian-science-commits mailing list