commit 6b3e3540e03918395d86fd88aa390b4426dd25b9 Author: CentOS Sources Date: Tue May 7 00:59:05 2019 -0400 import spacewalk-oscap-2.8.5-4.module+el8+2757+b847be8a diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ca060ab --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/spacewalk-oscap-2.8.5.tar.gz diff --git a/.spacewalk-oscap.metadata b/.spacewalk-oscap.metadata new file mode 100644 index 0000000..1cc4dc7 --- /dev/null +++ b/.spacewalk-oscap.metadata @@ -0,0 +1 @@ +533e06d65dec8271920902b3e611721eb26f9cd1 SOURCES/spacewalk-oscap-2.8.5.tar.gz diff --git a/SOURCES/spacewalk-oscap-2.8.5-1-to-spacewalk-oscap-2.8.5-2-el8.patch b/SOURCES/spacewalk-oscap-2.8.5-1-to-spacewalk-oscap-2.8.5-2-el8.patch new file mode 100644 index 0000000..0b5c909 --- /dev/null +++ b/SOURCES/spacewalk-oscap-2.8.5-1-to-spacewalk-oscap-2.8.5-2-el8.patch @@ -0,0 +1,72 @@ +diff --git a/spacewalk-oscap.spec b/spacewalk-oscap.spec +index b51ffa8476..e2fda374ae 100644 +--- a/spacewalk-oscap.spec ++++ b/spacewalk-oscap.spec +@@ -3,11 +3,15 @@ + %global default_py3 1 + %endif + ++%if ( 0%{?fedora} && 0%{?fedora} < 28 ) || ( 0%{?rhel} && 0%{?rhel} < 8 ) ++%global build_py2 1 ++%endif ++ + %define pythonX %{?default_py3: python3}%{!?default_py3: python2} + + Name: spacewalk-oscap + Version: 2.8.5 +-Release: 1%{?dist} ++Release: 2%{?dist} + Summary: OpenSCAP plug-in for rhn-check + + License: GPLv2 +@@ -27,6 +31,7 @@ Requires: %{pythonX}-%{name} = %{version}-%{release} + spacewalk-oscap is a plug-in for rhn-check. With this plugin, user is able + to run OpenSCAP scan from Spacewalk or Red Hat Satellite server. + ++%if 0%{?build_py2} + %package -n python2-%{name} + Summary: OpenSCAP plug-in for rhn-check + %{?python_provide:%python_provide python2-%{name}} +@@ -37,6 +42,7 @@ BuildRequires: python-devel + BuildRequires: rhnlib >= 2.8.3 + %description -n python2-%{name} + Python 2 specific files for %{name}. ++%endif + + %if 0%{?build_py3} + %package -n python3-%{name} +@@ -60,7 +66,9 @@ make -f Makefile.spacewalk-oscap + + + %install ++%if 0%{?build_py2} + make -f Makefile.spacewalk-oscap install PREFIX=$RPM_BUILD_ROOT PYTHONPATH=%{python_sitelib} ++%endif + %if 0%{?build_py3} + make -f Makefile.spacewalk-oscap install PREFIX=$RPM_BUILD_ROOT PYTHONPATH=%{python3_sitelib} + %endif +@@ -86,11 +94,13 @@ make -f Makefile.spacewalk-oscap install PREFIX=$RPM_BUILD_ROOT PYTHONPATH=%{pyt + %dir %{_datadir}/openscap/xsl + %endif + ++%if 0%{?build_py2} + %files -n python2-%{name} + %{python_sitelib}/rhn/actions/scap.* + %if 0%{?suse_version} + %dir %{python_sitelib}/rhn/actions + %endif ++%endif + + %if 0%{?build_py3} + %files -n python3-%{name} +@@ -103,6 +113,10 @@ make -f Makefile.spacewalk-oscap install PREFIX=$RPM_BUILD_ROOT PYTHONPATH=%{pyt + %endif + + %changelog ++* Tue Mar 20 2018 Tomas Kasparek 2.8.5-2 ++- don't build python2 subpackages on systems with default python3 ++ (tkasparek@redhat.com) ++ + * Fri Feb 09 2018 Michael Mraka 2.8.5-1 + - remove install/clean section initial cleanup + - removed Group from specfile diff --git a/SOURCES/spacewalk-oscap-2.8.5-2-el8-to-spacewalk-oscap-2.8.5-3-el8.patch b/SOURCES/spacewalk-oscap-2.8.5-2-el8-to-spacewalk-oscap-2.8.5-3-el8.patch new file mode 100644 index 0000000..7aeb42c --- /dev/null +++ b/SOURCES/spacewalk-oscap-2.8.5-2-el8-to-spacewalk-oscap-2.8.5-3-el8.patch @@ -0,0 +1,29 @@ +diff --git a/spacewalk-oscap.spec b/spacewalk-oscap.spec +index e2fda374ae..ddcac62824 100644 +--- a/spacewalk-oscap.spec ++++ b/spacewalk-oscap.spec +@@ -1,4 +1,4 @@ +-%if 0%{?fedora} || 0%{?suse_version} > 1320 ++%if 0%{?fedora} || 0%{?suse_version} > 1320 || 0%{?rhel} >= 8 + %global build_py3 1 + %global default_py3 1 + %endif +@@ -11,7 +11,7 @@ + + Name: spacewalk-oscap + Version: 2.8.5 +-Release: 2%{?dist} ++Release: 3%{?dist} + Summary: OpenSCAP plug-in for rhn-check + + License: GPLv2 +@@ -113,6 +113,9 @@ make -f Makefile.spacewalk-oscap install PREFIX=$RPM_BUILD_ROOT PYTHONPATH=%{pyt + %endif + + %changelog ++* Wed Mar 21 2018 Tomas Kasparek 2.8.5-3 ++- build python3 variant of the package (tkasparek@redhat.com) ++ + * Tue Mar 20 2018 Tomas Kasparek 2.8.5-2 + - don't build python2 subpackages on systems with default python3 + (tkasparek@redhat.com) diff --git a/SOURCES/spacewalk-oscap-2.8.5-3-el8-to-spacewalk-oscap-2.8.5-4-el8.patch b/SOURCES/spacewalk-oscap-2.8.5-3-el8-to-spacewalk-oscap-2.8.5-4-el8.patch new file mode 100644 index 0000000..95cc3f7 --- /dev/null +++ b/SOURCES/spacewalk-oscap-2.8.5-3-el8-to-spacewalk-oscap-2.8.5-4-el8.patch @@ -0,0 +1,32 @@ +diff --git a/spacewalk-oscap.spec b/spacewalk-oscap.spec +index ddcac62824..d1a3cc87f8 100644 +--- a/spacewalk-oscap.spec ++++ b/spacewalk-oscap.spec +@@ -11,7 +11,7 @@ + + Name: spacewalk-oscap + Version: 2.8.5 +-Release: 3%{?dist} ++Release: 4%{?dist} + Summary: OpenSCAP plug-in for rhn-check + + License: GPLv2 +@@ -19,7 +19,7 @@ URL: https://github.com/spacewalkproject/spacewalk + Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version}.tar.gz + BuildArch: noarch + BuildRequires: libxslt +-%if 0%{?rhel} ++%if 0%{?rhel} && 0%{?rhel} < 8 + Requires: openscap-utils + %else + Requires: openscap-scanner +@@ -113,6 +113,9 @@ make -f Makefile.spacewalk-oscap install PREFIX=$RPM_BUILD_ROOT PYTHONPATH=%{pyt + %endif + + %changelog ++* Mon May 14 2018 Tomas Kasparek 2.8.5-4 ++- require openscap-scanner on newer versions of RHEL (tkasparek@redhat.com) ++ + * Wed Mar 21 2018 Tomas Kasparek 2.8.5-3 + - build python3 variant of the package (tkasparek@redhat.com) + diff --git a/SPECS/spacewalk-oscap.spec b/SPECS/spacewalk-oscap.spec new file mode 100644 index 0000000..ab0b770 --- /dev/null +++ b/SPECS/spacewalk-oscap.spec @@ -0,0 +1,184 @@ +%if 0%{?fedora} || 0%{?suse_version} > 1320 || 0%{?rhel} >= 8 +%global build_py3 1 +%global default_py3 1 +%endif + +%if ( 0%{?fedora} && 0%{?fedora} < 28 ) || ( 0%{?rhel} && 0%{?rhel} < 8 ) +%global build_py2 1 +%endif + +%define pythonX %{?default_py3: python3}%{!?default_py3: python2} + +Name: spacewalk-oscap +Version: 2.8.5 +Release: 4%{?dist} +Summary: OpenSCAP plug-in for rhn-check + +License: GPLv2 +URL: https://github.com/spacewalkproject/spacewalk +Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version}.tar.gz +Patch0: spacewalk-oscap-2.8.5-1-to-spacewalk-oscap-2.8.5-2-el8.patch +Patch1: spacewalk-oscap-2.8.5-2-el8-to-spacewalk-oscap-2.8.5-3-el8.patch +Patch2: spacewalk-oscap-2.8.5-3-el8-to-spacewalk-oscap-2.8.5-4-el8.patch +BuildArch: noarch +BuildRequires: libxslt +%if 0%{?rhel} && 0%{?rhel} < 8 +Requires: openscap-utils +%else +Requires: openscap-scanner +%endif +Requires: libxslt +Requires: %{pythonX}-%{name} = %{version}-%{release} + +%description +spacewalk-oscap is a plug-in for rhn-check. With this plugin, user is able +to run OpenSCAP scan from Spacewalk or Red Hat Satellite server. + +%if 0%{?build_py2} +%package -n python2-%{name} +Summary: OpenSCAP plug-in for rhn-check +%{?python_provide:%python_provide python2-%{name}} +Requires: %{name} = %{version}-%{release} +Requires: rhnlib >= 2.8.3 +Requires: python2-rhn-check >= 2.8.4 +BuildRequires: python-devel +BuildRequires: rhnlib >= 2.8.3 +%description -n python2-%{name} +Python 2 specific files for %{name}. +%endif + +%if 0%{?build_py3} +%package -n python3-%{name} +Summary: OpenSCAP plug-in for rhn-check +%{?python_provide:%python_provide python3-%{name}} +Requires: %{name} = %{version}-%{release} +Requires: python3-rhnlib >= 2.8.3 +Requires: python3-rhn-check >= 2.8.4 +BuildRequires: python3-devel +BuildRequires: python3-rhnlib >= 2.8.3 +%description -n python3-%{name} +Python 3 specific files for %{name}. +%endif + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + + +%build +make -f Makefile.spacewalk-oscap + + +%install +%if 0%{?build_py2} +make -f Makefile.spacewalk-oscap install PREFIX=$RPM_BUILD_ROOT PYTHONPATH=%{python_sitelib} +%endif +%if 0%{?build_py3} +make -f Makefile.spacewalk-oscap install PREFIX=$RPM_BUILD_ROOT PYTHONPATH=%{python3_sitelib} +%endif + +%if 0%{?suse_version} +%py_compile -O %{buildroot}/%{python_sitelib} +%if 0%{?build_py3} +%py3_compile -O %{buildroot}/%{python3_sitelib} +%endif +%endif + + +%clean + + +%files +%config /etc/sysconfig/rhn/clientCaps.d/scap +%{_datadir}/openscap/xsl/xccdf-resume.xslt +%if 0%{?suse_version} +%dir /etc/sysconfig/rhn +%dir /etc/sysconfig/rhn/clientCaps.d +%dir %{_datadir}/openscap +%dir %{_datadir}/openscap/xsl +%endif + +%if 0%{?build_py2} +%files -n python2-%{name} +%{python_sitelib}/rhn/actions/scap.* +%if 0%{?suse_version} +%dir %{python_sitelib}/rhn/actions +%endif +%endif + +%if 0%{?build_py3} +%files -n python3-%{name} +%{python3_sitelib}/rhn/actions/scap.* +%{python3_sitelib}/rhn/actions/__pycache__/scap.* +%if 0%{?suse_version} +%dir %{python3_sitelib}/rhn/actions +%dir %{python3_sitelib}/rhn/actions/__pycache__ +%endif +%endif + +%changelog +* Mon May 14 2018 Tomas Kasparek 2.8.5-4 +- require openscap-scanner on newer versions of RHEL (tkasparek@redhat.com) + +* Wed Mar 21 2018 Tomas Kasparek 2.8.5-3 +- build python3 variant of the package (tkasparek@redhat.com) + +* Tue Mar 20 2018 Tomas Kasparek 2.8.5-2 +- don't build python2 subpackages on systems with default python3 + (tkasparek@redhat.com) + +* Fri Feb 09 2018 Michael Mraka 2.8.5-1 +- remove install/clean section initial cleanup +- removed Group from specfile +- removed BuildRoot from specfiles + +* Mon Oct 23 2017 Michael Mraka 2.8.4-1 +- spacewalk-oscap: add missing directories to filelist and enable py3 build for + Tumbleweed + +* Fri Sep 29 2017 Michael Mraka 2.8.3-1 +- require new version of rhn-client-tools and rhnlib +- move client actions to rhn namespace + +* Fri Sep 22 2017 Michael Mraka 2.8.2-1 +- install files into python_sitelib/python3_sitelib +- split spacewalk-oscap into python2/python3 specific packages + +* Wed Sep 06 2017 Michael Mraka 2.8.1-1 +- purged changelog entries for Spacewalk 2.0 and older +- Bumping package versions for 2.8. + +* Thu May 18 2017 Tomas Kasparek 2.7.1-1 +- 1451778 - require openscap-utils on rhel for backward compatibility +- Updated links to github in spec files +- Migrating Fedorahosted to GitHub +- Bumping package versions for 2.7. + +* Mon Sep 12 2016 Ondrej Gajdusek 2.6.1-1 +- Increasing required version of rhnlib in due to ImportError module i18n in + scap.py +- Bumping package versions for 2.6. + +* Mon May 23 2016 Gennadii Altukhov 2.5.3-1 +- convert code to work in python 2/3 + +* Fri May 20 2016 Grant Gainey 2.5.2-1 +- spacewalk-oscap: build on openSUSE + +* Fri Jan 22 2016 Tomas Lestach 2.5.1-1 +- 1232596 - still require openscap-utils on RHEL5 +- Bumping package versions for 2.5. + +* Fri Jun 19 2015 Tomas Kasparek 2.4.1-1 +- rhbz#1232596: Require just openscap-scanner package everywhere +- Bumping package versions for 2.4. + +* Mon Sep 22 2014 Matej Kollar 2.3.1-1 +- 1107841 - Avoid creating profile with empty id +- Typo +- Retab +- Bumping package versions for 2.3. +- Bumping package versions for 2.2. +