Fix RHEL builds

openscap is a RHEL package, and therefore ineligible for EPEL, and
when building for EPEL, epel-rpm-macros is automatically available.
Also, the new pathfix path applies to RHEL 9 and newer as well.
This commit is contained in:
Yaakov Selkowitz 2024-02-16 13:58:29 -05:00
parent e8beccd6cf
commit bd0d9a7274

View File

@ -60,10 +60,6 @@ Patch4: openscap-1.3.9-c99-libxml2.patch
# https://github.com/OpenSCAP/openscap/pull/2069
Patch5: openscap-1.3.9-c99-python.patch
%if 0%{?rhel} && ! 0%{?eln}
BuildRequires: epel-rpm-macros
%endif
BuildRequires: systemd-rpm-macros
BuildRequires: make
@ -273,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}
%if 0%{?fedora} || 0%{?rhel} >= 9
%{__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