From 4071bb5b90d486371274fdf7f01782b36bbcb048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= Date: Thu, 20 Jul 2023 09:48:37 +0200 Subject: [PATCH] Fix pathfix usage in spec Python 3.12 removes the pathfix utility but in Fedora it's just moved to python3-rpm-macros. Fixes broken build and broken CI on Rawhide. Described in: https://fedoraproject.org/wiki/Changes/Python3.12#pathfix.py_tool_will_be_removed Similar to: https://src.fedoraproject.org/rpms/openscap/pull-request/17#request_diff Fixes: #1997 --- openscap.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openscap.spec b/openscap.spec index 72c5e6d98b..47bb3bd915 100644 --- a/openscap.spec +++ b/openscap.spec @@ -154,7 +154,11 @@ ctest -V %{?_smp_mflags} find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' # fix python shebangs +%if 0%{?fedora} +%{__python3} %{_rpmconfigdir}/redhat/pathfix.py -i %{__python3} -p -n $RPM_BUILD_ROOT%{_bindir}/scap-as-rpm +%else pathfix.py -i %{__python3} -p -n $RPM_BUILD_ROOT%{_bindir}/scap-as-rpm +%endif %ldconfig_scriptlets