From a657150be2d9350a3900d984fc78074cc67631cd Mon Sep 17 00:00:00 2001 From: Matej Tyc Date: Wed, 10 Feb 2021 16:29:40 +0100 Subject: [PATCH 1/2] Unified the spec file with its RHEL8 counterpart. --- scap-security-guide.spec | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/scap-security-guide.spec b/scap-security-guide.spec index de934ef..80e7708 100644 --- a/scap-security-guide.spec +++ b/scap-security-guide.spec @@ -1,7 +1,15 @@ +# SSG build system and tests count with build directory name `build`. +# For more details see: +# https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds +%global _vpath_builddir build + Name: scap-security-guide Version: 0.1.54 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Security guidance and baselines in SCAP formats +%if 0%{?rhel} +Group: Applications/System +%endif License: BSD-3-Clause URL: https://github.com/ComplianceAsCode/content/ Source0: https://github.com/ComplianceAsCode/content/releases/download/v%{version}/scap-security-guide-%{version}.tar.bz2 @@ -11,9 +19,12 @@ BuildRequires: libxslt BuildRequires: expat BuildRequires: openscap-scanner >= 1.2.5 BuildRequires: cmake >= 2.8 +# To get python3 inside the buildroot require its path explicitly in BuildRequires +BuildRequires: /usr/bin/python3 BuildRequires: python%{python3_pkgversion} BuildRequires: python%{python3_pkgversion}-jinja2 BuildRequires: python%{python3_pkgversion}-PyYAML +BuildRequires: python%{python3_pkgversion}-lxml Requires: xml-common, openscap-scanner >= 1.2.5 Obsoletes: openscap-content < 0:0.9.13 Provides: openscap-content @@ -24,7 +35,7 @@ system from the final system's security point of view. The guidance is specified in the Security Content Automation Protocol (SCAP) format and constitutes a catalog of practical hardening advice, linked to government requirements where applicable. The project bridges the gap between generalized policy -requirements and specific implementation guidelines. The Fedora system +requirements and specific implementation guidelines. The system administrator can use the oscap CLI tool from openscap-scanner package, or the scap-workbench GUI tool from scap-workbench package to verify that the system conforms to provided guideline. Refer to scap-security-guide(8) manual page for @@ -32,6 +43,9 @@ further information. %package doc Summary: HTML formatted security guides generated from XCCDF benchmarks +%if 0%{?rhel} +Group: System Environment/Base +%endif Requires: %{name} = %{version}-%{release} %description doc @@ -40,10 +54,16 @@ hardening guidances that have been generated from XCCDF benchmarks present in %{name} package. %prep -%setup -q +%autosetup + +%define cmake_defines %{nil} +%if 0%{?rhel} +%define cmake_defines -DSSG_PRODUCT_DEFAULT:BOOLEAN=FALSE -DSSG_PRODUCT_RHEL6:BOOLEAN=TRUE -DSSG_PRODUCT_RHEL7:BOOLEAN=TRUE -DSSG_PRODUCT_RHEL8:BOOLEAN=TRUE -DSSG_PRODUCT_FIREFOX:BOOLEAN=TRUE -DSSG_PRODUCT_JRE:BOOLEAN=TRUE -DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED:BOOL=OFF +%endif %build -%cmake +%cmake %{cmake_defines} +mkdir -p build %cmake_build %install @@ -64,6 +84,9 @@ present in %{name} package. %doc %{_docdir}/%{name}/tables/*.html %changelog +* Fri Feb 12 2021 Matej Tyc - 0.1.54-2 +- Moved the spec file closer to the RHEL one. + * Fri Feb 05 2021 Vojtech Polasek - 0.1.54-1 - Update to latest upstream SCAP-Security-Guide-0.1.54 release: https://github.com/ComplianceAsCode/content/releases/tag/v0.1.54 From 86985e5aebf24baaeb07eaf7151d98fd007e6e7f Mon Sep 17 00:00:00 2001 From: Matej Tyc Date: Tue, 16 Feb 2021 12:19:09 +0100 Subject: [PATCH 2/2] Removed the RHEL6 product build. --- scap-security-guide.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scap-security-guide.spec b/scap-security-guide.spec index 80e7708..aa9439d 100644 --- a/scap-security-guide.spec +++ b/scap-security-guide.spec @@ -58,7 +58,7 @@ present in %{name} package. %define cmake_defines %{nil} %if 0%{?rhel} -%define cmake_defines -DSSG_PRODUCT_DEFAULT:BOOLEAN=FALSE -DSSG_PRODUCT_RHEL6:BOOLEAN=TRUE -DSSG_PRODUCT_RHEL7:BOOLEAN=TRUE -DSSG_PRODUCT_RHEL8:BOOLEAN=TRUE -DSSG_PRODUCT_FIREFOX:BOOLEAN=TRUE -DSSG_PRODUCT_JRE:BOOLEAN=TRUE -DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED:BOOL=OFF +%define cmake_defines -DSSG_PRODUCT_DEFAULT:BOOLEAN=FALSE -DSSG_PRODUCT_RHEL7:BOOLEAN=TRUE -DSSG_PRODUCT_RHEL8:BOOLEAN=TRUE -DSSG_PRODUCT_FIREFOX:BOOLEAN=TRUE -DSSG_PRODUCT_JRE:BOOLEAN=TRUE -DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED:BOOL=OFF %endif %build