improve %ghc_delete_rpaths to delete leading and trailing %_libdir

+ /usr/lib/rpm/check-rpaths
:
ERROR   0001: file '/usr/lib64/ghc-9.6.6/lib/libHSdigest-0.0.2.1-EXQLl7EOUopLcWJlJWaOr-ghc9.6.6.so' contains a standard runpath '/usr/lib64' in [/usr/lib64/ghc-9.6.6/lib/x86_64-linux-ghc-9.6.6:/usr/lib64]

ERROR   0001: file '/usr/lib64/ghc-9.6.6/lib/libHSyesod-1.6.2.1-8tHwkPWZJUX8yU5pD0ck2v-ghc9.6.6.so' contains a standard runpath '/usr/lib64' in [/usr/lib64:/usr/lib64/ghc-9.6.6/lib/x86_64-linux-ghc-9.6.6:/usr/lib64/ghc-9.6.6/lib]
epel9 imports/epel9/ghc-rpm-macros-2.7.2-1.el9
Jens Petersen 5 months ago
parent 8f46ab51f2
commit f20cf923ae

@ -206,6 +206,7 @@ mkdir -p %{buildroot}%{_docdir}/ghc/html/libraries
%changelog
* Mon Jul 29 2024 Jens Petersen <petersen@redhat.com> - 2.7.2-1
- improve ghc_delete_rpaths to delete trailing :_libdir
- extra: add ghc_merge_filelist from ghc.spec
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-2

@ -244,20 +244,17 @@ done\
echo "deleting rpaths:"\
if ! type chrpath > /dev/null; then exit 1; fi\
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \\; -print); do\
if [ -x "$i" ]; then\
%if %{defined _ghcdynlibdir}\
chrpath -d $i\
%else\
rpath=$(chrpath $i | sed -e "s@^$i: R.*PATH=@@")\
case "$rpath" in\
*$PWD/*) chrpath -r "%{ghclibdir}/lib:%{ghclibdir}/lib/%{ghcplatform}" $i ;;\
*:%{_libdir}) chrpath -r $(echo "$rpath" | sed -e 's!:%{_libdir}$!!') $i ;;\
%{_libdir}:*) chrpath -r $(echo "$rpath" | sed -e 's!^%{_libdir}:!!') $i ;;\
*) ;;\
esac\
%endif\
else\
echo "%0: no $i executable"\
exit 1\
fi\
done\
%endif

Loading…
Cancel
Save