[PATCH 12/25] Added RHEL7 content into SSG RHEL RPM process

Shawn Wells shawn at redhat.com
Tue Dec 24 01:59:14 UTC 2013


-------------- next part --------------
>From e836ac9c0ed8c9910d82ec5fde31c1715e4136ca Mon Sep 17 00:00:00 2001
From: Shawn Wells <shawn at redhat.com>
Date: Mon, 23 Dec 2013 04:38:26 -0500
Subject: [PATCH 12/25] Added RHEL7 content into SSG RHEL RPM process

Tested by installing the RPM && verifying content

Signed-off-by: Shawn Wells <shawn at redhat.com>
---
:100644 100644 aeb5a46... 00c53e9... M	Makefile
:100644 100644 cc0d82a... 23fd2df... M	RHEL/6/Makefile
:100644 100644 3afcb8b... dc3b820... M	scap-security-guide.spec
 Makefile                 | 13 +++++++++----
 RHEL/6/Makefile          |  6 ++++--
 scap-security-guide.spec | 29 +++++++++++++++++++++--------
 3 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index aeb5a46..00c53e9 100644
--- a/Makefile
+++ b/Makefile
@@ -62,14 +62,17 @@ rhevm3:
 tarball:
 	$(call rpm-prep)
 
-	# Copy in the source trees for both RHEL6
+	# Copy in the source trees for both RHEL
 	# and JBossEAP5 content
-	cp -r RHEL/6/ $(RPM_TMPDIR)/$(PKG)
+	cp -r shared/ $(RPM_TMPDIR)/$(PKG)
+	cp -r --preserve=links --parents RHEL/6/ $(RPM_TMPDIR)/$(PKG)
+	cp -r --preserve=links --parents RHEL/7/ $(RPM_TMPDIR)/$(PKG)
 	cp -r JBossEAP5 $(RPM_TMPDIR)/$(PKG)
 
 	# Don't trust the developers, clean out the build
 	# environment before packaging
-	cd $(RPM_TMPDIR)/$(PKG)/RHEL/6/ && $(MAKE) clean
+	(cd $(RPM_TMPDIR)/$(PKG)/RHEL/6/ && $(MAKE) clean)
+	(cd $(RPM_TMPDIR)/$(PKG)/RHEL/7/ && $(MAKE) clean)
 
 	# Create the source tar, copy it to $TARBALL
 	# (e.g. somewhere in the SOURCES directory)
@@ -124,7 +127,9 @@ srpm: $(RPM_DEPS)
 	$(eval SOURCE := $(shell echo $(SOURCE) | sed -ne "s/%{redhatssgrelease}/$(REDHAT_SSG_RELEASE)/p"))
 	# Download the tarball
 	@echo "Downloading the $(SOURCE) tarball..."
-	@wget -O $(TARBALL) $(SOURCE)
+	# If performing a real RPM build, uncomment the next line
+	# (+remember to upload tarball to repos.ssgproject.org first!)
+	#@wget -O $(TARBALL) $(SOURCE)
 	@echo "Copying the SPEC file to proper location..."
 	cat $(RPM_SPEC) > $(RPM_TOPDIR)/SPECS/$(notdir $(RPM_SPEC))
 	@echo "Building $(PKGNAME) SRPM..."
diff --git a/RHEL/6/Makefile b/RHEL/6/Makefile
index cc0d82a..23fd2df 100644
--- a/RHEL/6/Makefile
+++ b/RHEL/6/Makefile
@@ -1,7 +1,7 @@
 IN = input
 OUT = output
 TRANS = transforms
-REFS = "../../shared/references"
+REFS = ../../shared/references
 UTILS = utils
 DIST = dist
 
@@ -64,6 +64,7 @@ table-stigs: shorthand2xccdf table-srgmap checks
 	xsltproc -o $(OUT)/table-rhel5-stig.html $(TRANS)/xccdf2table-stig.xslt $(REFS)/disa-stig-rhel5-v1r0.6-xccdf.xml  
 	xsltproc -o $(OUT)/table-rhel5-stig-manual.html $(TRANS)/xccdf2table-stig.xslt $(REFS)/disa-stig-rhel5-v1r0.6-xccdf-manual.xml  
 #	xsltproc -stringparam notes "../$(IN)/auxiliary/transition_notes.xml" -o $(OUT)/table-rhel5-stig-manual-withnotes.html \
+	# asdasd
 #		$(TRANS)/xccdf2table-stig.xslt \
 #		$(REFS)/disa-stig-rhel5-v1r0.6-xccdf-manual.xml
 #	temporarily retain an output file showing the short titles as well
@@ -75,7 +76,8 @@ table-stigs: shorthand2xccdf table-srgmap checks
 		$(OUT)/unlinked-rhel6-xccdf.xml
 	xsltproc -o $(OUT)/table-rhel6-stig.html $(TRANS)/xccdf2table-stig.xslt $(OUT)/unlinked-stig-rhel6-xccdf.xml  
 
-tables: table-refs table-idents table-srgmap table-stigs
+tables: table-refs table-idents table-stigs
+#tables: table-refs table-idents table-srgmap table-stigs
 
 content: shorthand2xccdf guide checks
 #	the relabelids.py script chdirs to ./output, so refer to files from there.
diff --git a/scap-security-guide.spec b/scap-security-guide.spec
index 3afcb8b..dc3b820 100644
--- a/scap-security-guide.spec
+++ b/scap-security-guide.spec
@@ -33,31 +33,44 @@ guideline. Refer to scap-security-guide(8) manual page for further information.
 %setup -q -n %{name}-%{version}-%{redhatssgrelease}
 
 %build
-cd RHEL6 && make dist
+(cd RHEL/6 && make dist)
+(cd RHEL/7 && make dist)
 
 %install
 mkdir -p %{buildroot}%{_datadir}/xml/scap/ssg/content
 mkdir -p %{buildroot}%{_mandir}/en/man8/
 
 # Add in core content (SCAP)
-cp -a RHEL6/dist/content/* %{buildroot}%{_datadir}/xml/scap/ssg/content/
+cp -a RHEL/6/dist/content/* %{buildroot}%{_datadir}/xml/scap/ssg/content/
+cp -a RHEL/7/dist/content/* %{buildroot}%{_datadir}/xml/scap/ssg/content/
 cp -a JBossEAP5/eap5-* %{buildroot}%{_datadir}/xml/scap/ssg/content/
 
 # Add in manpage
-cp -a RHEL6/input/auxiliary/scap-security-guide.8 %{buildroot}%{_mandir}/en/man8/scap-security-guide.8
+cp -a RHEL/6/input/auxiliary/scap-security-guide.8 %{buildroot}%{_mandir}/en/man8/scap-security-guide.8
 
 %files
 %{_datadir}/xml/scap
 %lang(en) %{_mandir}/en/man8/scap-security-guide.8.gz
-%doc RHEL6/LICENSE RHEL6/output/rhel6-guide.html RHEL6/output/table-rhel6-cces.html RHEL6/output/table-rhel6-nistrefs-common.html RHEL6/output/table-rhel6-nistrefs.html RHEL6/output/table-rhel6-srgmap-flat.html RHEL6/output/table-rhel6-srgmap-flat.xhtml RHEL6/output/table-rhel6-srgmap.html RHEL6/output/table-rhel6-stig.html JBossEAP5/docs/JBossEAP5_Guide.html
+%doc RHEL/6/LICENSE RHEL/6/output/rhel6-guide.html RHEL/6/output/table-rhel6-cces.html RHEL/6/output/table-rhel6-nistrefs-common.html RHEL/6/output/table-rhel6-nistrefs.html RHEL/6/output/table-rhel6-srgmap-flat.html RHEL/6/output/table-rhel6-srgmap-flat.xhtml RHEL/6/output/table-rhel6-srgmap.html RHEL/6/output/table-rhel6-stig.html JBossEAP5/docs/JBossEAP5_Guide.html
 
 %changelog
+* Mon Dec 23 2013 Shawn Wells <shawn at redhat.com> 0.1-16.rc1
++ Added RHEL7 content to SSG rpm
+- partition_for_tmp
+- partition_for_var
+- partition_for_var_log
+- partition_for_var_log_audit
+- selinux_state
+- selinux_policytype
+- ensure_redhat_gpgkey_installed
+- ensure_gpgcheck_never_disabled
+
 * Fri Nov 01 2013 Jan iankko Lieskovsky <jlieskov at redhat.com> 0.1-15
 - Version bump
 
 * Sat Oct 26 2013 Jan iankko Lieskovsky <jlieskov at redhat.com> 0.1-15.rc5
 - Point the spec's source to proper remote tarball location
-- Modify the main Makefile to use remote tarball when building RHEL6's SRPM
+- Modify the main Makefile to use remote tarball when building RHEL/6's SRPM
 
 * Sat Oct 26 2013 Jan iankko Lieskovsky <jlieskov at redhat.com> 0.1-15.rc4
 - Don't include the table html files two times
@@ -70,7 +83,7 @@ cp -a RHEL6/input/auxiliary/scap-security-guide.8 %{buildroot}%{_mandir}/en/man8
 
 * Fri Oct 25 2013 Shawn Wells <shawn at redhat.com> 0.1-15.rc2
 - Updated file permissions of JBossEAP5/eap5-cpe-dictionary.xml (chmod -x) to resolve rpmlint errors
-- RHEL6 HTML table naming bugfixes (table-rhel6-*, not table-*-rhel6)
+- RHEL/6 HTML table naming bugfixes (table-rhel6-*, not table-*-rhel6)
 
 * Fri Oct 25 2013 Jan iankko Lieskovsky <jlieskov at redhat.com> 0.1-15.rc1
 - Apply spec file changes required by review request (RH BZ#1018905)
@@ -93,7 +106,7 @@ cp -a RHEL6/input/auxiliary/scap-security-guide.8 %{buildroot}%{_mandir}/en/man8
 
 * Fri Apr 26 2013 Shawn Wells <shawn at redhat.com> 0.1-11
 - Significant amount of OVAL bugfixes
-- Incorporation of Draft RHEL6 STIG feedback
+- Incorporation of Draft RHEL/6 STIG feedback
 
 * Sat Feb 16 2013 Shawn Wells <shawn at redhat.com> 0.1-10
 - SSG now includes JBoss EAP5 content!
@@ -107,7 +120,7 @@ cp -a RHEL6/input/auxiliary/scap-security-guide.8 %{buildroot}%{_mandir}/en/man8
 
 * Tue Nov 27 2012 Shawn Wells <shawn at redhat.com> 0.1-8
 - Significant copy editing to XCCDF rules per community
-  feedback on the DISA RHEL6 STIG Initial Draft
+  feedback on the DISA RHEL/6 STIG Initial Draft
 
 * Thu Nov 1 2012 Shawn Wells <shawn at redhat.com> 0.1-7
 - Corrected XCCDF content errors
-- 
1.8.3.1



More information about the scap-security-guide mailing list