>From e84316b5a9069796ad1bdaef75f1929a8a31f29d Mon Sep 17 00:00:00 2001
From: Shawn Wells <[email protected]>
Date: Sat, 15 Feb 2014 09:55:39 -0500
Subject: [PATCH 2/3] Updated Fedora build process to generate datastream

Same as patch #1, except for Fedora
---
 Fedora/Makefile |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/Fedora/Makefile b/Fedora/Makefile
index 1dee3a0..0cc965e 100644
--- a/Fedora/Makefile
+++ b/Fedora/Makefile
@@ -36,6 +36,17 @@ guide: shorthand2xccdf
 content: shorthand2xccdf guide checks
        $(TRANS)/cpe_generate.py $(OUT)/unlinked-$(PROD)-oval.xml 
$(IN)/checks/platform/$(PROD)-cpe-dictionary.xml $(ID)
        $(TRANS)/relabelids.py unlinked-$(PROD)-xccdf.xml $(ID)
+#       Once things are relabelled, create a datastream
+       xsltproc /usr/share/openscap/xsl/xccdf_1.1_remove_dangling_sub.xsl 
$(OUT)/$(ID)-$(PROD)-xccdf.xml \
+               > $(OUT)/$(ID)-$(PROD)-xccdf-nodangles.xml
+       xsltproc --stringparam reverse_DNS org.ssgproject.content 
/usr/share/openscap/xsl/xccdf_1.1_to_1.2.xsl \
+               $(OUT)/$(ID)-$(PROD)-xccdf-nodangles.xml > 
$(OUT)/$(ID)-$(PROD)-xccdf-1.2.xml
+       sed -i '/idref="dangling reference to /d' 
$(OUT)/$(ID)-$(PROD)-xccdf-1.2.xml
+       oscap ds sds-compose $(OUT)/$(ID)-$(PROD)-xccdf-1.2.xml 
$(OUT)/$(ID)-$(PROD)-ds.xml
+#       Add in CPE and OVAL content to datastream
+       oscap ds sds-add $(OUT)/$(ID)-$(PROD)-cpe-dictionary.xml 
$(OUT)/$(ID)-$(PROD)-ds.xml
+       oscap ds sds-add $(OUT)/$(ID)-$(PROD)-oval.xml 
$(OUT)/$(ID)-$(PROD)-ds.xml
+
 
 validate-xml:
        oscap xccdf validate-xml $(OUT)/$(ID)-$(PROD)-xccdf.xml
-- 
1.7.1

_______________________________________________
scap-security-guide mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide

Reply via email to