remove rpath of libldb's binary files

(cherry picked from commit dfa7bab7d747d15d2aba26a97bc835002078277f)
This commit is contained in:
XWwalker 2022-08-31 16:02:51 +08:00 committed by openeuler-sync-bot
parent 578b12c7b4
commit 0f5563b303

View File

@ -6,7 +6,7 @@
Name: libldb
Version: 2.0.12
Release: 3
Release: 4
Summary: A schema-less, ldap like, API and database
Requires: libtalloc%{?_isa} >= %{talloc_version}
Requires: libtdb%{?_isa} >= %{tdb_version}
@ -27,6 +27,7 @@ BuildRequires: gcc libtalloc-devel >= %{talloc_version} libtdb-devel >= %{tdb_ve
BuildRequires: libtevent-devel >= %{tevent_version} lmdb-devel >= 0.9.16 popt-devel
BuildRequires: libxslt docbook-style-xsl python3-devel python3-tdb python3-talloc-devel
BuildRequires: python3-tevent doxygen openldap-devel libcmocka-devel gdb
BuildRequires: chrpath
Provides: bundled(libreplace) ldb-tools
Obsoletes: python2-ldb < 2.0.5-1 python2-ldb-devel < 2.0.5-1 pyldb < 1.1.26-2 ldb-tools
@ -102,6 +103,19 @@ make install DESTDIR=$RPM_BUILD_ROOT
cp -a apidocs/man/* $RPM_BUILD_ROOT/%{_mandir}
rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_*
# remove rpath
chrpath -d %{buildroot}%{_bindir}/ldbrename
chrpath -d %{buildroot}%{_bindir}/ldbedit
chrpath -d %{buildroot}%{_bindir}/ldbmodify
chrpath -d %{buildroot}%{_bindir}/ldbadd
chrpath -d %{buildroot}%{_bindir}/ldbdel
chrpath -d %{buildroot}%{_bindir}/ldbsearch
chrpath -d %{buildroot}%{_libdir}/ldb/*.so
chrpath -d %{buildroot}%{_libdir}/ldb/modules/ldb/*.so
mkdir -p %{buildroot}/etc/ld.so.conf.d
echo "%{_libdir}/ldb" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%ldconfig_scriptlets
%files
@ -111,6 +125,7 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_*
%{_bindir}/ldbmodify
%{_bindir}/ldbrename
%{_bindir}/ldbsearch
%config(noreplace) /etc/ld.so.conf.d/*
%dir %{_libdir}/ldb
%{_libdir}/libldb.so.*
%{_libdir}/ldb/libldb-key-value.so
@ -158,6 +173,12 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man3/_*
%{_mandir}/man1/ldbsearch.1.*
%changelog
* Wed Aug 31 2022 xingwei <xingwei14@h-partners.com> - 2.0.12-4
- Type:requirement
- ID:NA
- SUG:NA
- DESC:remove rpath of libldb's binary files
* Mon Aug 01 2022 gaihuiying <eaglegai@163.com> - 2.0.12-3
- Type:CVE
- ID:CVE-2022-32746