Fix RHEL 9 builds

CentOS Stream 9 python-rpm-macros has the private pathfix.py, but that
will only be released with RHEL 9.4.
This commit is contained in:
Yaakov Selkowitz 2024-02-19 14:23:04 -05:00
parent bd0d9a7274
commit 6ab115a60e

View File

@ -155,7 +155,7 @@ Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%{?python_provide:%python_provide python%{python3_pkgversion}-openscap }
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
%if 0%{?fedora}
%if 0%{?fedora} || 0%{?rhel} >= 10
BuildRequires: python-rpm-macros
%endif
@ -269,7 +269,7 @@ ctest -V -E sce/test_sce_in_ds.sh
find %{buildroot} -name '*.la' -exec rm -f {} ';'
# fix python shebangs
%if 0%{?fedora} || 0%{?rhel} >= 9
%if 0%{?fedora} || 0%{?rhel} >= 10
%{__python3} %{_rpmconfigdir}/redhat/pathfix.py -i %{__python3} -p -n %{buildroot}%{_bindir}/scap-as-rpm
%else
pathfix.py -i %{__python3} -p -n %{buildroot}%{_bindir}/scap-as-rpm