Skip to content

Commit 4071bb5

Browse files
committed
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
1 parent aa6c6fe commit 4071bb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

openscap.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ ctest -V %{?_smp_mflags}
154154
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
155155

156156
# fix python shebangs
157+
%if 0%{?fedora}
158+
%{__python3} %{_rpmconfigdir}/redhat/pathfix.py -i %{__python3} -p -n $RPM_BUILD_ROOT%{_bindir}/scap-as-rpm
159+
%else
157160
pathfix.py -i %{__python3} -p -n $RPM_BUILD_ROOT%{_bindir}/scap-as-rpm
161+
%endif
158162

159163
%ldconfig_scriptlets
160164

0 commit comments

Comments
 (0)