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 <antorres@redhat.com>
This commit is contained in:
Antonio Torres 2021-08-03 15:47:39 +02:00
parent c204840130
commit e8749e86e7

View File

@ -1,7 +1,7 @@
Summary: High-performance and highly configurable free RADIUS server Summary: High-performance and highly configurable free RADIUS server
Name: freeradius Name: freeradius
Version: 3.0.21 Version: 3.0.21
Release: 15%{?dist} Release: 16%{?dist}
License: GPLv2+ and LGPLv2+ License: GPLv2+ and LGPLv2+
URL: http://www.freeradius.org/ URL: http://www.freeradius.org/
@ -44,6 +44,7 @@ BuildRequires: libpcap-devel
BuildRequires: systemd-units BuildRequires: systemd-units
BuildRequires: libtalloc-devel BuildRequires: libtalloc-devel
BuildRequires: pcre-devel BuildRequires: pcre-devel
BuildRequires: chrpath
%if ! 0%{?rhel} %if ! 0%{?rhel}
BuildRequires: libyubikey-devel BuildRequires: libyubikey-devel
@ -279,6 +280,15 @@ install -m 0644 %{SOURCE104} %{buildroot}%{_tmpfilesdir}/radiusd.conf
mkdir -p $RPM_BUILD_ROOT%{_datadir}/snmp/mibs/ mkdir -p $RPM_BUILD_ROOT%{_datadir}/snmp/mibs/
install -m 644 mibs/*RADIUS*.mib $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 # remove unneeded stuff
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.crt rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.crt
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.crl rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.crl
@ -377,6 +387,7 @@ exit 0
# system # system
%config(noreplace) %{_sysconfdir}/pam.d/radiusd %config(noreplace) %{_sysconfdir}/pam.d/radiusd
%config(noreplace) %{_sysconfdir}/logrotate.d/radiusd %config(noreplace) %{_sysconfdir}/logrotate.d/radiusd
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%{_unitdir}/radiusd.service %{_unitdir}/radiusd.service
%{_tmpfilesdir}/radiusd.conf %{_tmpfilesdir}/radiusd.conf
%dir %attr(710,radiusd,radiusd) %{_localstatedir}/run/radiusd %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 %attr(640,root,radiusd) %config(noreplace) /etc/raddb/mods-available/rest
%changelog %changelog
Mon Jul 19 2021 Antonio Torres <antorres@redhat.com> - 3.0.21-15 * Mon Aug 02 2021 Antonio Torres <antorres@redhat.com> - 3.0.21-16
- Remove RPATH usage
Resolves: bz#1986968
* Mon Jul 19 2021 Antonio Torres <antorres@redhat.com> - 3.0.21-15
- Fix coredump not being able to be enabled - Fix coredump not being able to be enabled
Resolves: bz#1977722 Resolves: bz#1977722