From dfa7bab7d747d15d2aba26a97bc835002078277f Mon Sep 17 00:00:00 2001 From: XWwalker Date: Wed, 31 Aug 2022 16:02:51 +0800 Subject: [PATCH] remove rpath of libldb's binary files --- libldb.spec | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/libldb.spec b/libldb.spec index f353733..c06f610 100644 --- a/libldb.spec +++ b/libldb.spec @@ -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 - 2.0.12-4 +- Type:requirement +- ID:NA +- SUG:NA +- DESC:remove rpath of libldb's binary files + * Mon Aug 01 2022 gaihuiying - 2.0.12-3 - Type:CVE - ID:CVE-2022-32746 -- Gitee