Disable broken RPATH usage in binaries

Since Fedora 35, broken RPATH usage is detected in packages, causing
a build failure: https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild
With this changes rpath usage is deleted in conflicting files.

Signed-off-by: Antonio Torres <antorres@redhat.com>
This commit is contained in:
Antonio Torres 2021-06-07 14:32:44 +02:00
parent eaa7823ffa
commit c2fdf85d80

View File

@ -43,6 +43,7 @@ BuildRequires: libpcap-devel
BuildRequires: systemd-units
BuildRequires: libtalloc-devel
BuildRequires: pcre-devel
BuildRequires: chrpath
%if ! 0%{?rhel}
BuildRequires: libyubikey-devel
@ -278,6 +279,10 @@ 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/rlm_sql_postgresql.so
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/freeradius/rlm_sql_unixodbc.so
# remove unneeded stuff
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.crt
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/raddb/certs/*.crl