diff --git a/build_pie.patch b/build_pie.patch new file mode 100644 index 0000000..900877f --- /dev/null +++ b/build_pie.patch @@ -0,0 +1,35 @@ +Index: tdb-1.2.10/wscript +=================================================================== +--- tdb-1.2.10.orig/wscript ++++ tdb-1.2.10/wscript +@@ -94,20 +94,27 @@ def build(bld): + + bld.SAMBA_BINARY('tdbrestore', + 'tools/tdbrestore.c', +- 'tdb', manpages='manpages/tdbrestore.8') ++ 'tdb', ++ cflags='-fPIE', ldflags='-pie', ++ manpages='manpages/tdbrestore.8') + + bld.SAMBA_BINARY('tdbdump', + 'tools/tdbdump.c', +- 'tdb', manpages='manpages/tdbdump.8') ++ 'tdb', ++ cflags='-fPIE', ldflags='-pie', ++ manpages='manpages/tdbdump.8') + + bld.SAMBA_BINARY('tdbbackup', + 'tools/tdbbackup.c', + 'tdb', ++ cflags='-fPIE', ldflags='-pie', + manpages='manpages/tdbbackup.8') + + bld.SAMBA_BINARY('tdbtool', + 'tools/tdbtool.c', +- 'tdb', manpages='manpages/tdbtool.8') ++ 'tdb', ++ cflags='-fPIE', ldflags='-pie', ++ manpages='manpages/tdbtool.8') + + # FIXME: This hardcoded list is stupid, stupid, stupid. + bld.SAMBA_SUBSYSTEM('tdb-test-helpers', diff --git a/tdb.changes b/tdb.changes index 8d52da7..3d37b07 100644 --- a/tdb.changes +++ b/tdb.changes @@ -13,6 +13,11 @@ Thu Jun 21 20:40:55 UTC 2012 - adrian@suse.de - disable test suite on qemu emulated builds +------------------------------------------------------------------- +Wed Jun 13 10:23:35 UTC 2012 - ddiss@suse.com + +- Build and link binaries with PIE flags. + ------------------------------------------------------------------- Tue Jun 5 12:08:57 UTC 2012 - lmuelle@suse.com diff --git a/tdb.spec b/tdb.spec index 699bec6..08f2b84 100644 --- a/tdb.spec +++ b/tdb.spec @@ -43,6 +43,7 @@ Source: http://download.samba.org/pub/tdb/tdb-%{version}.tar.gz Source1: http://download.samba.org/pub/tdb/tdb-%{version}.tar.asc Source4: baselibs.conf Patch0: ignore-tdb1-run-transaction-expand.diff +Patch1: build_pie.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -118,6 +119,7 @@ This package contains the python bindings for the Tdb library. %ifarch ppc ppc64 %patch0 -p1 %endif +%patch1 -p1 %build %if 0%{?suse_version} && 0%{?suse_version} < 911