#5 Unified the spec file with its RHEL8 counterpart.
Closed 3 years ago by matyc. Opened 3 years ago by matyc.

file modified
+27 -4
@@ -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:	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 @@ 

  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 @@ 

  

  %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 @@ 

  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_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 @@ 

  %doc %{_docdir}/%{name}/tables/*.html

  

  %changelog

+ * Fri Feb 12 2021 Matej Tyc <matyc@redhat.com> - 0.1.54-2

+ - Moved the spec file closer to the RHEL one.

+ 

  * Fri Feb 05 2021 Vojtech Polasek <vpolasek@redhat.com> - 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

As of 02/2021, RHEL build system doesn't handle the VPATH build well, but other from that, this form of spec file should work.

I think we can remove RHEL6 as it is no longer in the upstream.

1 new commit added

  • Removed the RHEL6 product build.
3 years ago

@matyc I think you need to rebase and resolve conflicts.

Closed in favor of #6 as I have used a wrong branch for this one.

Pull-Request has been closed by matyc

3 years ago
Metadata