From d2c4303d251bb50a7f7366025eab495d59d88102 Mon Sep 17 00:00:00 2001 From: Antonio Torres Date: Fri, 25 Jun 2021 17:10:33 +0200 Subject: [PATCH] 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 --- freeradius.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/freeradius.spec b/freeradius.spec index dee7325..58a9641 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.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 - 3.0.22-4 +- Fix python3 not being correctly linked + * Mon Jun 07 2021 Python Maint - 3.0.22-2 - Rebuilt for Python 3.10