Fix python3 not being correctly linked

Since Python 3.8, there is a new way to link against libpython.
https://docs.python.org/3/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build

Signed-off-by: Antonio Torres <antorres@redhat.com>
This commit is contained in:
Antonio Torres 2021-06-25 17:10:33 +02:00
parent 3b6878a0e0
commit d2c4303d25

View File

@ -1,7 +1,7 @@
Summary: High-performance and highly configurable free RADIUS server
Name: freeradius
Version: 3.0.22
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2+ and LGPLv2+
URL: http://www.freeradius.org/
@ -215,9 +215,8 @@ This plugin provides the REST support for the FreeRADIUS server project.
# Hack: rlm_python3 as stable; prevents building other unstable modules.
sed 's/rlm_python/rlm_python3/g' src/modules/stable -i
# python3-config is broken:
# https://bugzilla.redhat.com/show_bug.cgi?id=1772988
export PY3_LIB_DIR=%{_libdir}/"$(python3-config --configdir | sed 's#/usr/lib/##g')"
%global build_ldflags %{build_ldflags} $(python3-config --embed --libs)
export PY3_LIB_DIR="$(python3-config --configdir)"
export PY3_INC_DIR="$(python3 -c 'import sysconfig; print(sysconfig.get_config_var("INCLUDEPY"))')"
# In order for the above hack to stick, do a fake configure so
@ -888,6 +887,9 @@ exit 0
%attr(640,root,radiusd) %config(noreplace) /etc/raddb/mods-available/rest
%changelog
* Fri Jun 25 2021 Antonio Torres <antorres@redhat.com> - 3.0.22-4
- Fix python3 not being correctly linked
* Mon Jun 07 2021 Python Maint <python-maint@redhat.com> - 3.0.22-2
- Rebuilt for Python 3.10