Skip to content

Commit

Permalink
Fix pathfix usage in spec
Browse files Browse the repository at this point in the history
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: OpenSCAP#1997
  • Loading branch information
jan-cerny committed Aug 21, 2023
1 parent aa6c6fe commit 4071bb5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openscap.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4071bb5

Please sign in to comment.