[PATCH] [RHEL/7] Include SCAP Security Guide logo into generated HTML guide

Shawn Wells shawn at redhat.com
Fri Jul 25 19:09:24 UTC 2014


On 7/25/14, 9:16 AM, Jan Lieskovsky wrote:
> Hello folks,
>
>    this change adds support to display SSG logo in the generated HTML guide
> for RHEL-7 product (depends on the two transformations to be placed
> in the shared/ directory, IOW my previous patch).
>
> Testing status:
> ---------------
> Tested via:
>
>    oscap xccdf generate guide --profile allrules --output /tmp/el7.html ssg-rhel7-xccdf.xml
>
> where 'ssg-rhel7-xccdf.xml' was benchmark built within the RPM build process
> on both Fedora (with openscap 1.0.9) & RHEL-6 (with openscap 1.0.8) versions.
>
> The change works as expected (in both cases).
>
> Please review.
>
> Thank you && Regards, Jan.
> --
> Jan iankko Lieskovsky / Red Hat Security Technologies Team
>
> 0001-RHEL-7-Include-SCAP-Security-Guide-logo-into-generat.patch
>
>
>  From 639b0b03d4fd304debeface00cb9ca1f8372e593 Mon Sep 17 00:00:00 2001
> From: Jan Lieskovsky<jlieskov at redhat.com>
> Date: Fri, 25 Jul 2014 18:06:02 +0200
> Subject: [PATCH] [RHEL/7] Include SCAP Security Guide logo into generated HTML
>   guide
>
> Signed-off-by: Jan Lieskovsky<jlieskov at redhat.com>
> ---
>   RHEL/7/Makefile                        | 7 +++++++
>   RHEL/7/transforms/includelogo.xslt     | 1 +
>   RHEL/7/transforms/oscapsupportssvg.py  | 1 +
>   RHEL/7/transforms/shorthand2xccdf.xslt | 2 +-
>   4 files changed, 10 insertions(+), 1 deletion(-)
>   create mode 120000 RHEL/7/transforms/includelogo.xslt
>   create mode 120000 RHEL/7/transforms/oscapsupportssvg.py
>
> diff --git a/RHEL/7/Makefile b/RHEL/7/Makefile
> index 01aa717..06960bd 100644
> --- a/RHEL/7/Makefile
> +++ b/RHEL/7/Makefile
> @@ -7,10 +7,17 @@ DIST = dist
>   
>   ID = ssg
>   
> +OPENSCAP_SVG := $(shell $(TRANS)/oscapsupportssvg.py; echo $$?)
> +
>   all: shorthand2xccdf tables guide content dist
>   
>   shorthand-guide:
> +ifeq ($(OPENSCAP_SVG), 0)
> +	xsltproc -o $(OUT)/guide.xml $(TRANS)/includelogo.xslt $(IN)/guide.xml
> +	xsltproc -o $(OUT)/rhel7-shorthand.xml $(IN)/guide.xslt $(OUT)/guide.xml
> +else
>   	xsltproc -o $(OUT)/rhel7-shorthand.xml $(IN)/guide.xslt $(IN)/guide.xml
> +endif
>   	xmllint --format --output $(OUT)/rhel7-shorthand.xml $(OUT)/rhel7-shorthand.xml
>   
>   shorthand2xccdf: shorthand-guide
> diff --git a/RHEL/7/transforms/includelogo.xslt b/RHEL/7/transforms/includelogo.xslt
> new file mode 120000
> index 0000000..3bdc4de
> --- /dev/null
> +++ b/RHEL/7/transforms/includelogo.xslt
> @@ -0,0 +1 @@
> +../../../shared/transforms/includelogo.xslt
> \ No newline at end of file
> diff --git a/RHEL/7/transforms/oscapsupportssvg.py b/RHEL/7/transforms/oscapsupportssvg.py
> new file mode 120000
> index 0000000..4dc7d58
> --- /dev/null
> +++ b/RHEL/7/transforms/oscapsupportssvg.py
> @@ -0,0 +1 @@
> +../../../shared/transforms/oscapsupportssvg.py
> \ No newline at end of file
> diff --git a/RHEL/7/transforms/shorthand2xccdf.xslt b/RHEL/7/transforms/shorthand2xccdf.xslt
> index 585f9df..aa5ad2b 100644
> --- a/RHEL/7/transforms/shorthand2xccdf.xslt
> +++ b/RHEL/7/transforms/shorthand2xccdf.xslt
> @@ -249,7 +249,7 @@
>     </xsl:template>
>   
>     <!-- put general formatting xhtml into xhtml namespace -->
> -  <xsl:template match="code | strong | b | em | i | pre | br | hr" >
> +  <xsl:template match="p | code | strong | b | em | i | pre | br | hr" >
>       <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml">
>         <xsl:apply-templates select="@*|node()"/>
>       </xsl:element>
> -- 1.8.3.1

ack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/scap-security-guide/attachments/20140725/ac0f21e1/attachment.html>


More information about the scap-security-guide mailing list