From ca052ae6861ded9981795020cba7046224e4850b Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 2 Feb 2015 16:23:09 +0100 Subject: [PATCH] Fix build and rpath issue handling --- udisks2.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/udisks2.spec b/udisks2.spec index bf5195e..f17bf92 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -23,6 +23,7 @@ BuildRequires: libgudev1-devel >= %{systemd_version} BuildRequires: gtk-doc BuildRequires: systemd-devel BuildRequires: libacl-devel +BuildRequires: chrpath # needed to pull in the system bus daemon Requires: dbus >= %{dbus_version} @@ -98,8 +99,9 @@ daemon. This package is for the udisks 2.x series. export CFLAGS='-fPIC %optflags' export LDFLAGS='-pie -Wl,-z,now -Wl,-z,relro' %configure --enable-gtk-doc -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +# the following rpath workaround causes build breakage due to wrong library path while performing GIR introspection dump +# sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +# sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %install @@ -108,6 +110,10 @@ make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.a +chrpath --delete $RPM_BUILD_ROOT%{_sbindir}/umount.udisks2 +chrpath --delete $RPM_BUILD_ROOT%{_bindir}/udisksctl +chrpath --delete $RPM_BUILD_ROOT%{_prefix}/lib/udisks2/udisksd + %find_lang %{name} %post -n libudisks2 -p /sbin/ldconfig