From 106138f301dc67f3474f03bf803e4dbbe455d3ae Mon Sep 17 00:00:00 2001 From: panxiaohe Date: Mon, 6 Sep 2021 16:42:37 +0800 Subject: [PATCH] remove rpath and runpath of exec files and libraries (cherry picked from commit 29b562c4ac719aae3933791831cecd3878342878) --- mcpp.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mcpp.spec b/mcpp.spec index 8ae4f68..06695b3 100644 --- a/mcpp.spec +++ b/mcpp.spec @@ -1,6 +1,6 @@ Name: mcpp Version: 2.7.2 -Release: 27 +Release: 28 Summary: A portable C preprocessor License: BSD URL: http://mcpp.sourceforge.net/ @@ -8,7 +8,7 @@ Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Patch0: backport-mcpp.2.7.2.patch Patch1: backport-CVE-2019-14274-05-gniibe-fix-13.patch -BuildRequires: gcc +BuildRequires: gcc chrpath Provides: libmcpp Obsoletes: libmcpp @@ -53,6 +53,12 @@ This is the development package for mcpp. rm -f %{buildroot}%{_docdir}/%{name}/%{name}-manual-jp* rm -f %{buildroot}%{_libdir}/libmcpp*a +#remove rpath +chrpath -d %{buildroot}%{_bindir}/%{name} + +mkdir -p %{buildroot}/etc/ld.so.conf.d +echo "%{_libdir}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf + %check make check @@ -65,6 +71,7 @@ make check %{_docdir}/%{name}/LICENSE %{_bindir}/%{name} %{_libdir}/libmcpp.so.* +%config(noreplace) /etc/ld.so.conf.d/* %files devel %defattr(-, root, root) @@ -77,6 +84,9 @@ make check %{_mandir}/man1/%{name}.1.gz %changelog +* Mon Sep 6 2021 panxiaohe - 2.7.2-28 +- remove rpath and runpath of exec files and libraries + * Tue Jul 20 2021 fuanan - 2.7.2-27 - Remove redundant gdb from BuildRequires -- Gitee