From e8749e86e7ee6cf9b9481aeefa22e1feca97a1a5 Mon Sep 17 00:00:00 2001 From: Antonio Torres Date: Tue, 3 Aug 2021 15:47:39 +0200 Subject: [PATCH] Remove RPATH usage RPATH usage is not allowed by rpminspect, so workaround it by removing the rpath usage and adding the config file for ld. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1986968 Signed-off-by: Antonio Torres --- freeradius.spec | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/freeradius.spec b/freeradius.spec index 0e4a47e..2dcae89 100644 --- a/freeradius.spec +++ b/freeradius.spec @@ -1,7 +1,7 @@ Summary: High-performance and highly configurable free RADIUS server Name: freeradius Version: 3.0.21 -Release: 15%{?dist} +Release: 16%{?dist} License: GPLv2+ and LGPLv2+ URL: http://www.freeradius.org/ @@ -44,6 +44,7 @@ BuildRequires: libpcap-devel BuildRequires: systemd-units BuildRequires: libtalloc-devel BuildRequires: pcre-devel +BuildRequires: chrpath %if ! 0%{?rhel} BuildRequires: libyubikey-devel @@ -279,6 +280,15 @@ install -m 0644 %{SOURCE104} %{buildroot}%{_tmpfilesdir}/radiusd.conf mkdir -p $RPM_BUILD_ROOT%{_datadir}/snmp/mibs/ install -m 644 mibs/*RADIUS*.mib $RPM_BUILD_ROOT%{_datadir}/snmp/mibs/ +# remove rpath where needed +chrpath --delete $RPM_BUILD_ROOT%{_libdir}/freeradius/*.so +for f in $RPM_BUILD_ROOT/usr/sbin/*; do chrpath --delete $f || true; done +for f in $RPM_BUILD_ROOT/usr/bin/*; do chrpath --delete $f || true; done + +# update ld with freeradius libs +mkdir -p %{buildroot}/%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/freeradius" > %{buildroot}/%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf + # remove unneeded stuff rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.crt rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.crl @@ -377,6 +387,7 @@ exit 0 # system %config(noreplace) %{_sysconfdir}/pam.d/radiusd %config(noreplace) %{_sysconfdir}/logrotate.d/radiusd +%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %{_unitdir}/radiusd.service %{_tmpfilesdir}/radiusd.conf %dir %attr(710,radiusd,radiusd) %{_localstatedir}/run/radiusd @@ -840,7 +851,11 @@ exit 0 %attr(640,root,radiusd) %config(noreplace) /etc/raddb/mods-available/rest %changelog -Mon Jul 19 2021 Antonio Torres - 3.0.21-15 +* Mon Aug 02 2021 Antonio Torres - 3.0.21-16 +- Remove RPATH usage + Resolves: bz#1986968 + +* Mon Jul 19 2021 Antonio Torres - 3.0.21-15 - Fix coredump not being able to be enabled Resolves: bz#1977722