From 6ab115a60efe39f7944bfca9cdb4ba2c29b5dc51 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 19 Feb 2024 14:23:04 -0500 Subject: [PATCH] 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. --- openscap.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openscap.spec b/openscap.spec index e62c684..bc1fab0 100644 --- a/openscap.spec +++ b/openscap.spec @@ -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