From 709cc5be77f48cda442e970d2c17825cfc0f9439 Mon Sep 17 00:00:00 2001 From: yangchenguang Date: Thu, 11 Jul 2024 14:20:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=A7=84=E8=8C=83=E7=9A=84=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E7=BC=96=E8=AF=91=E9=80=89=E9=A1=B9=20rpath/runpath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yangchenguang --- ceph.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ceph.spec b/ceph.spec index 61550ca..8f9e7ce 100644 --- a/ceph.spec +++ b/ceph.spec @@ -174,7 +174,7 @@ ################################################################################# Name: ceph Version: 18.2.2 -Release: 5 +Release: 6 %if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler} Epoch: 2 %endif @@ -229,7 +229,7 @@ BuildRequires: selinux-policy-devel BuildRequires: python3-unversioned-command BuildRequires: gperf BuildRequires: cmake > 3.5 -BuildRequires: fuse-devel +BuildRequires: fuse-devel chrpath %if 0%{?fedora} || 0%{?suse_version} > 1500 || 0%{?rhel} == 9 || 0%{?openEuler} BuildRequires: gcc-c++ >= 11 %endif @@ -1563,6 +1563,14 @@ install -m 644 -D -t %{buildroot}%{_datadir}/snmp/mibs monitoring/snmp/CEPH-MIB. %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib} %endif +# remove rpath +for file in $(find $RPM_BUILD_ROOT/ -type f -exec file {} ';' | grep -w ELF | awk -F':' '{print $1}') +do + chrpath --delete $file +done +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/%{name}" > $RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf + %clean rm -rf %{buildroot} # built binaries are no longer necessary at this point, @@ -2317,6 +2325,7 @@ fi %{_libdir}/librados_tp.so.* %endif %dir %{_sysconfdir}/ceph +%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %post -n librados2 -p /sbin/ldconfig @@ -2380,6 +2389,7 @@ fi %endif %dir %{_libdir}/ceph/librbd %{_libdir}/ceph/librbd/libceph_*.so* +%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %post -n librbd1 -p /sbin/ldconfig @@ -2643,6 +2653,9 @@ exit 0 %{_datadir}/snmp/mibs %changelog +* Thu Jul 11 2024 yangchenguang - 2:18.2.2-6 +- remove rpath + * Sat May 25 2024 laokz - 2:18.2.2-5 - let BuildRequires:valgrind-devel depend on system arch macro - fix riscv64 build -- Gitee