From 529ed2a9d4dad5ab62af12f59776a95677fed3ed Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Mon, 6 Sep 2021 11:42:09 +0800 Subject: [PATCH] Delete rpath and runpath from exec files and libraries --- cracklib.spec | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/cracklib.spec b/cracklib.spec index 0c1276e..a07218b 100644 --- a/cracklib.spec +++ b/cracklib.spec @@ -5,7 +5,7 @@ Name: cracklib Version: 2.9.7 -Release: 6 +Release: 7 Summary: A password-checking library License: LGPLv2+ @@ -14,7 +14,7 @@ Source0: https://github.com/cracklib/cracklib/releases/download/v%{version}/crac Source1: https://github.com/cracklib/cracklib/releases/download/v%{version}/cracklib-words-%{version}.gz Patch9000: fix-problem-of-error-message-about-simplistic-passwo.patch -BuildRequires: gcc, words, gettext, gettext-autopoint, zlib-devel +BuildRequires: gcc, words, gettext, gettext-autopoint, zlib-devel, chrpath %if %{with python3} BuildRequires: python3-devel %endif @@ -113,6 +113,18 @@ ln -s $toprelpath%{dictpath}.pwi $RPM_BUILD_ROOT/%{_libdir}/cracklib_dict.pwi fi rm -f $RPM_BUILD_ROOT/%{_libdir}/python*/site-packages/_cracklib*.*a rm -f $RPM_BUILD_ROOT/%{_libdir}/libcrack.la + +# delete rpath and runpath from exec files and libraries +chrpath -d $RPM_BUILD_ROOT/%{_sbindir}/cracklib-check +chrpath -d $RPM_BUILD_ROOT/%{_sbindir}/cracklib-packer +chrpath -d $RPM_BUILD_ROOT/%{_sbindir}/cracklib-unpacker +chrpath -d $RPM_BUILD_ROOT/%{python3_sitearch}/_cracklib.so + +mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d +echo "%{_libdir}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf +%if %{with python3} +echo "%{_libdir}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/python3-%{name}-%{_arch}.conf +%endif %find_lang %{name} @@ -134,6 +146,7 @@ make test %config(noreplace) %{_datadir}/cracklib/pw_dict.* %{_datadir}/cracklib/cracklib-small.* %{_datadir}/cracklib/cracklib.magic +%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf %files devel %{_includedir}/* @@ -147,9 +160,13 @@ make test %{_libdir}/python3*/site-packages/_cracklib*.so %{_libdir}/python3*/site-packages/*.py* %{_libdir}/python3*/site-packages/__pycache__/* +%config(noreplace) /etc/ld.so.conf.d/python3-%{name}-%{_arch}.conf %endif %changelog +* Mon Sep 6 2021 yixiangzhike - 2.9.7-7 +- delete rpath and runpath from exec files and libraries + * Mon May 24 2021 yixiangzhike - 2.9.7-6 - add %%config(noreplace) for pw_dict -- Gitee