From ef9b332868ae035e639d2ca330a536ca6a9532c8f2720ea4d05fbf9ca8fecd1a Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 6 Aug 2013 13:06:41 +0000 Subject: [PATCH] - Improve pie_compile.diff (bnc#828874). - dnssec-checkds and dnssec-coverage need python-base. - disable rpath in libtool. OBS-URL: https://build.opensuse.org/package/show/network/bind?expand=0&rev=127 --- bind.changes | 7 ++ bind.spec | 11 +++ pie_compile.diff | 203 +++++++++++++++++++++++++++++++---------------- 3 files changed, 151 insertions(+), 70 deletions(-) diff --git a/bind.changes b/bind.changes index 9626e01..4d3a6f5 100644 --- a/bind.changes +++ b/bind.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Aug 6 10:09:22 UTC 2013 - max@suse.com + +- Improve pie_compile.diff (bnc#828874). +- dnssec-checkds and dnssec-coverage need python-base. +- disable rpath in libtool. + ------------------------------------------------------------------- Mon Aug 5 14:50:20 UTC 2013 - max@suse.com diff --git a/bind.spec b/bind.spec index 5cd05b4..2387005 100644 --- a/bind.spec +++ b/bind.spec @@ -264,6 +264,7 @@ CONFIGURE_OPTIONS="\ --includedir=%{_includedir}/bind \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ + --disable-static \ --with-openssl \ --enable-threads \ --with-libtool \ @@ -273,9 +274,19 @@ CONFIGURE_OPTIONS="\ " cp -f -p config.guess config.sub contrib/idn/idnkit-1.0-src/ ./configure ${CONFIGURE_OPTIONS} +# disable rpath +sed -i ' + s|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g + s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g +' libtool %{__make} %{?_smp_mflags} pushd contrib/idn/idnkit-1.0-src ./configure ${CONFIGURE_OPTIONS} +# disable rpath +sed -i ' + s|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g + s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g +' libtool %{__make} %{?_smp_mflags} popd # running BIND system tests diff --git a/pie_compile.diff b/pie_compile.diff index 2c1b5a7..71a2d1a 100644 --- a/pie_compile.diff +++ b/pie_compile.diff @@ -1,12 +1,46 @@ -Index: bin/Makefile.in +Index: bin/check/Makefile.in =================================================================== ---- bin/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 -+++ bin/Makefile.in 2013-08-05 14:14:38.988411490 +0200 -@@ -23,4 +23,8 @@ - check confgen @PYTHON_TOOLS@ @PKCS11_TOOLS@ - TARGETS = +--- bin/check/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 ++++ bin/check/Makefile.in 2013-08-06 12:08:19.492457714 +0200 +@@ -57,8 +57,12 @@ -+EXT_CFLAGS = -fPIE + MANOBJS = ${MANPAGES} ${HTMLPAGES} + ++EXT_CFLAGS = -fPIE -static ++ + @BIND9_MAKE_RULES@ + ++LDFLAGS += -pie ++ + named-checkconf.@O@: named-checkconf.c + ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ + -DVERSION=\"${VERSION}\" \ +Index: bin/confgen/Makefile.in +=================================================================== +--- bin/confgen/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 ++++ bin/confgen/Makefile.in 2013-08-06 12:08:19.492457714 +0200 +@@ -64,8 +64,12 @@ + + UOBJS = unix/os.@O@ + ++EXT_CFLAGS = -fPIE -static ++ + @BIND9_MAKE_RULES@ + ++LDFLAGS += -pie ++ + rndc-confgen.@O@: rndc-confgen.c + ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ + -DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" \ +Index: bin/confgen/unix/Makefile.in +=================================================================== +--- bin/confgen/unix/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 ++++ bin/confgen/unix/Makefile.in 2013-08-06 12:08:19.492457714 +0200 +@@ -32,4 +32,8 @@ + + TARGETS = ${OBJS} + ++EXT_CFLAGS = -fPIE -static + @BIND9_MAKE_RULES@ + @@ -14,12 +48,12 @@ Index: bin/Makefile.in Index: bin/dig/Makefile.in =================================================================== --- bin/dig/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 -+++ bin/dig/Makefile.in 2013-08-05 14:14:38.988411490 +0200 ++++ bin/dig/Makefile.in 2013-08-06 12:08:19.492457714 +0200 @@ -69,8 +69,12 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES} -+EXT_CFLAGS = -fPIE ++EXT_CFLAGS = -fPIE -static + @BIND9_MAKE_RULES@ @@ -31,12 +65,12 @@ Index: bin/dig/Makefile.in Index: bin/dnssec/Makefile.in =================================================================== --- bin/dnssec/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 -+++ bin/dnssec/Makefile.in 2013-08-05 14:14:38.988411490 +0200 ++++ bin/dnssec/Makefile.in 2013-08-06 12:08:19.493457729 +0200 @@ -64,8 +64,12 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES} -+EXT_CFLAGS = -fPIE ++EXT_CFLAGS = -fPIE -static + @BIND9_MAKE_RULES@ @@ -45,66 +79,28 @@ Index: bin/dnssec/Makefile.in dnssec-dsfromkey@EXEEXT@: dnssec-dsfromkey.@O@ ${OBJS} ${DEPLIBS} export BASEOBJS="dnssec-dsfromkey.@O@ ${OBJS}"; \ ${FINALBUILDCMD} -Index: bin/nsupdate/Makefile.in +Index: bin/Makefile.in =================================================================== ---- bin/nsupdate/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 -+++ bin/nsupdate/Makefile.in 2013-08-05 14:14:38.988411490 +0200 -@@ -66,8 +66,12 @@ +--- bin/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 ++++ bin/Makefile.in 2013-08-06 12:08:19.493457729 +0200 +@@ -23,4 +23,8 @@ + check confgen @PYTHON_TOOLS@ @PKCS11_TOOLS@ + TARGETS = - MANOBJS = ${MANPAGES} ${HTMLPAGES} - -+EXT_CFLAGS = -fPIE ++EXT_CFLAGS = -fPIE -static + @BIND9_MAKE_RULES@ - ++ +LDFLAGS += -pie -+ - nsupdate.@O@: nsupdate.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DSESSION_KEYFILE=\"${localstatedir}/run/named/session.key\" \ -Index: bin/rndc/Makefile.in -=================================================================== ---- bin/rndc/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 -+++ bin/rndc/Makefile.in 2013-08-05 14:14:38.988411490 +0200 -@@ -59,8 +59,12 @@ - - MANOBJS = ${MANPAGES} ${HTMLPAGES} - -+EXT_CFLAGS = -fPIE -+ - @BIND9_MAKE_RULES@ - -+LDFLAGS += -pie -+ - rndc.@O@: rndc.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ -Index: bin/check/Makefile.in -=================================================================== ---- bin/check/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 -+++ bin/check/Makefile.in 2013-08-05 14:14:38.988411490 +0200 -@@ -57,8 +57,12 @@ - - MANOBJS = ${MANPAGES} ${HTMLPAGES} - -+EXT_CFLAGS = -fPIE -+ - @BIND9_MAKE_RULES@ - -+LDFLAGS += -pie -+ - named-checkconf.@O@: named-checkconf.c - ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DVERSION=\"${VERSION}\" \ Index: bin/named/Makefile.in =================================================================== ---- bin/named/Makefile.in.orig 2013-08-05 14:14:27.313264836 +0200 -+++ bin/named/Makefile.in 2013-08-05 14:14:38.988411490 +0200 +--- bin/named/Makefile.in.orig 2013-08-06 12:08:17.653432490 +0200 ++++ bin/named/Makefile.in 2013-08-06 12:08:19.493457729 +0200 @@ -115,8 +115,12 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES} -+EXT_CFLAGS = -fPIE ++EXT_CFLAGS = -fPIE -static + @BIND9_MAKE_RULES@ @@ -116,28 +112,95 @@ Index: bin/named/Makefile.in Index: bin/named/unix/Makefile.in =================================================================== --- bin/named/unix/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 -+++ bin/named/unix/Makefile.in 2013-08-05 14:14:38.989411502 +0200 ++++ bin/named/unix/Makefile.in 2013-08-06 12:08:19.493457729 +0200 @@ -34,4 +34,6 @@ TARGETS = ${OBJS} -+EXT_CFLAGS = -fPIE ++EXT_CFLAGS = -fPIE -static + @BIND9_MAKE_RULES@ -Index: bin/confgen/Makefile.in +Index: bin/nsupdate/Makefile.in =================================================================== ---- bin/confgen/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 -+++ bin/confgen/Makefile.in 2013-08-05 14:14:38.989411502 +0200 -@@ -64,8 +64,12 @@ +--- bin/nsupdate/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 ++++ bin/nsupdate/Makefile.in 2013-08-06 12:08:19.493457729 +0200 +@@ -66,8 +66,12 @@ - UOBJS = unix/os.@O@ + MANOBJS = ${MANPAGES} ${HTMLPAGES} -+EXT_CFLAGS = -fPIE ++EXT_CFLAGS = -fPIE -static + @BIND9_MAKE_RULES@ +LDFLAGS += -pie + - rndc-confgen.@O@: rndc-confgen.c + nsupdate.@O@: nsupdate.c ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ - -DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" \ + -DSESSION_KEYFILE=\"${localstatedir}/run/named/session.key\" \ +Index: bin/rndc/Makefile.in +=================================================================== +--- bin/rndc/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 ++++ bin/rndc/Makefile.in 2013-08-06 12:08:19.493457729 +0200 +@@ -59,8 +59,12 @@ + + MANOBJS = ${MANPAGES} ${HTMLPAGES} + ++EXT_CFLAGS = -fPIE -static ++ + @BIND9_MAKE_RULES@ + ++LDFLAGS += -pie ++ + rndc.@O@: rndc.c + ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \ + -DVERSION=\"${VERSION}\" \ +Index: bin/tools/Makefile.in +=================================================================== +--- bin/tools/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 ++++ bin/tools/Makefile.in 2013-08-06 12:08:19.493457729 +0200 +@@ -53,8 +53,12 @@ + genrandom.html isc-hmac-fixup.html + MANOBJS = ${MANPAGES} ${HTMLPAGES} + ++EXT_CFLAGS = -fPIE -static ++ + @BIND9_MAKE_RULES@ + ++LDFLAGS += -pie ++ + arpaname@EXEEXT@: arpaname.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} + ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ arpaname.@O@ \ + ${ISCLIBS} ${LIBS} +Index: contrib/idn/idnkit-1.0-src/tools/idnconv/Makefile.in +=================================================================== +--- contrib/idn/idnkit-1.0-src/tools/idnconv/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 ++++ contrib/idn/idnkit-1.0-src/tools/idnconv/Makefile.in 2013-08-06 12:08:19.493457729 +0200 +@@ -68,8 +68,8 @@ + INCS = -I$(srcdir) -I$(srcdir)/../../include -I../../include $(ICONVINC) + DEFS = + +-CFLAGS = $(INCS) $(DEFS) @CPPFLAGS@ @CFLAGS@ +-LDFLAGS = @LDFLAGS@ ++CFLAGS = $(INCS) $(DEFS) @CPPFLAGS@ @CFLAGS@ -fPIE ++LDFLAGS = @LDFLAGS@ -pie + + SRCS = idnconv.c util.c selectiveencode.c + OBJS = idnconv.o util.o selectiveencode.o +Index: contrib/zkt/Makefile.in +=================================================================== +--- contrib/zkt/Makefile.in.orig 2013-07-17 00:13:06.000000000 +0200 ++++ contrib/zkt/Makefile.in 2013-08-06 12:08:19.494457743 +0200 +@@ -13,11 +13,11 @@ + OPTIM = # -O3 -DNDEBUG + + #CFLAGS ?= @CFLAGS@ @DEFS@ -I@top_srcdir@ +-CFLAGS += -g @DEFS@ -I@top_srcdir@ ++CFLAGS += -g @DEFS@ -I@top_srcdir@ -fPIE + CFLAGS += -Wall #-DDBG + CFLAGS += -Wmissing-prototypes + CFLAGS += $(PROFILE) $(OPTIM) +-LDFLAGS += $(PROFILE) ++LDFLAGS += $(PROFILE) -fPIE -pie + LIBS = @LIBS@ + + PROJECT = @PACKAGE_TARNAME@