diff --git a/gnupg-2.0.4-install_tools.diff b/gnupg-2.0.4-install_tools.diff index 8ac3976..40cb322 100644 --- a/gnupg-2.0.4-install_tools.diff +++ b/gnupg-2.0.4-install_tools.diff @@ -1,54 +1,6 @@ -Index: common/Makefile.am -=================================================================== ---- common/Makefile.am.orig -+++ common/Makefile.am -@@ -31,7 +31,7 @@ CLEANFILES = audit-events.h status-codes - - AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl - --AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) -+AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) -fPIC - - include $(top_srcdir)/am/cmacros.am - -Index: gl/Makefile.am -=================================================================== ---- gl/Makefile.am.orig -+++ gl/Makefile.am -@@ -13,6 +13,8 @@ - - AUTOMAKE_OPTIONS = 1.5 gnits - -+AM_CFLAGS = -fPIC -+ - noinst_LIBRARIES = libgnu.a - - libgnu_a_SOURCES = -Index: jnlib/Makefile.am -=================================================================== ---- jnlib/Makefile.am.orig -+++ jnlib/Makefile.am -@@ -27,7 +27,7 @@ TESTS = $(module_tests) - AM_CPPFLAGS = -I$(top_srcdir)/intl - - # We need libgcrypt because libjnlib-config includes gcrypt.h --AM_CFLAGS = $(LIBGCRYPT_CFLAGS) -+AM_CFLAGS = $(LIBGCRYPT_CFLAGS) -fPIC - - noinst_LIBRARIES = libjnlib.a - -Index: tools/Makefile.am -=================================================================== --- tools/Makefile.am.orig +++ tools/Makefile.am -@@ -25,14 +25,14 @@ EXTRA_DIST = \ - AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/common - include $(top_srcdir)/am/cmacros.am - --AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS) -+AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) $(LIBASSUAN_CFLAGS) -fPIE - - sbin_SCRIPTS = addgnupghome applygnupgdefaults +@@ -25,8 +25,8 @@ EXTRA_DIST = \ bin_SCRIPTS = gpgsm-gencert.sh if HAVE_USTAR @@ -76,11 +28,3 @@ Index: tools/Makefile.am common_libs = $(libcommon) ../jnlib/libjnlib.a ../gl/libgnu.a pwquery_libs = ../common/libsimple-pwquery.a -@@ -59,6 +59,7 @@ gpgsplit_LDADD = $(common_libs) \ - $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) \ - $(ZLIBS) $(LIBINTL) $(LIBICONV) - -+gpgsplit_LDFLAGS = -pie - gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c - - # jnlib/common sucks in gpg-error, will they, nil they (some compilers diff --git a/gpg2.changes b/gpg2.changes index 699d539..49ae9b9 100644 --- a/gpg2.changes +++ b/gpg2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 12 19:24:37 CET 2008 - bk@suse.de + +- install gpg-zip and gpgsplit again and use -pie for randomisation + ------------------------------------------------------------------- Wed Feb 6 18:16:34 CET 2008 - bk@suse.de diff --git a/gpg2.spec b/gpg2.spec index e0d0dbd..0e959fd 100644 --- a/gpg2.spec +++ b/gpg2.spec @@ -10,9 +10,10 @@ # norootforbuild + Name: gpg2 Version: 2.0.8 -Release: 11 +Release: 14 #krb5 BuildRequires: expect fdupes libassuan-devel pth BuildRequires: libgcrypt-devel libksba-devel opensc-devel @@ -61,7 +62,16 @@ Authors: %patch9 %build -CFLAGS="%{optflags}" \ +# Required for patch7: +autoreconf -fi +# build PIEs (position independent executables) for address space randomisation: +# en.wikipedia.org/wiki/Position_independent_code#Position-independent_executables +%ifarch s390x +# s390x needs to use the large PIE model (at least for gpg.c): +CFLAGS="%{optflags} -fPIE" LDFLAGS=-pie \ +%else +CFLAGS="%{optflags} -fpie" LDFLAGS=-pie \ +%endif ./configure \ --prefix=%{_prefix} \ --sysconfdir=/etc \ @@ -96,12 +106,14 @@ ln -sf gpgv2.1 $RPM_BUILD_ROOT/usr/share/man/man1/gpgv.1 # fix rpmlint invalid-lc-messages-dir: rm -rf $RPM_BUILD_ROOT/%_datadir/locale/en@{bold,}quot %find_lang gnupg2 -%if 0%suse_version > 1020 +%if 0%{?suse_version} > 1020 %fdupes %buildroot %endif %check make check +$RPM_BUILD_ROOT/usr/bin/gpgsplit -v -p pubsplit- --uncompress