!13 【openEuler-21.09】Delete rpath and runpath from exec files and libraries

From: @yixiangzhike
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
This commit is contained in:
openeuler-ci-bot 2021-09-08 01:07:22 +00:00 committed by Gitee
commit 5f0d3ef16a

View File

@ -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 <zhangxingliang3@huawei.com> - 2.9.7-7
- delete rpath and runpath from exec files and libraries
* Mon May 24 2021 yixiangzhike <zhangxingliang3@huawei.com> - 2.9.7-6
- add %%config(noreplace) for pw_dict