backend/satellite_tools
by Milan Zazrivec
backend/satellite_tools/reposync.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 39088b67a5f28d5f0ecb8a2a2fc959db815f2098
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu Dec 13 10:44:46 2012 +0100
Do not use value attribute of an exception
This is to avoid traceback like:
File "/usr/bin/spacewalk-repo-sync", line 103, in
<module> sys.exit(abs(main() or 0))
File "/usr/bin/spacewalk-repo-sync", line 96, in
main sync.sync()
File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/reposync.py", line 112, in sync
self.error_msg("ERROR: %s" % e.value)
AttributeError: 'IntegrityError' object has no attribute 'value'
diff --git a/backend/satellite_tools/reposync.py b/backend/satellite_tools/reposync.py
index 293bb15..29c1de6 100644
--- a/backend/satellite_tools/reposync.py
+++ b/backend/satellite_tools/reposync.py
@@ -109,7 +109,7 @@ class RepoSync(object):
if not self.no_errata:
self.import_updates(plugin, url)
except Exception, e:
- self.error_msg("ERROR: %s" % e.value)
+ self.error_msg("ERROR: %s" % e)
continue
if self.regen:
taskomatic.add_to_repodata_queue_for_channel_package_subscription(
11 years, 4 months
client/tools
by Milan Zazrivec
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 83cece4aafcd01804d31b399f0e476deab1787b7
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Dec 12 18:19:14 2012 +0100
properly specify device for 'ip route' command
diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
index 2f3e053..9a2d606 100644
--- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
+++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
@@ -81,8 +81,8 @@ def find_name_servers():
ret.append(s)
return ret
-def find_gateway():
- response = execute("ip -f inet route list dev %s|awk '/^default/ {print $3}'")
+def find_gateway(device):
+ response = execute("ip -f inet route list dev %s|awk '/^default/ {print $3}'" % device)
if response:
return response[0]
else:
@@ -103,7 +103,7 @@ def getSystemId():
def update_static_device_records(kickstart_host, static_device):
client = xmlrpclib.Server("https://" + kickstart_host + "/rpc/api")
- data = {"gateway" : find_gateway(),\
+ data = {"gateway" : find_gateway(static_device),\
"nameservers": find_name_servers(),\
"hostname" : find_host_name(),\
"device" : static_device,\
11 years, 4 months
client/tools
by Milan Zazrivec
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 268a67ff9aa5e7563941d0695d836d721b599046
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Dec 12 18:15:54 2012 +0100
typo fix
diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
index 9fada04..2f3e053 100644
--- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
+++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
@@ -82,7 +82,7 @@ def find_name_servers():
return ret
def find_gateway():
- response = execute("ip -f inet4 route list dev %s|awk '/^default/ {print $3}'")
+ response = execute("ip -f inet route list dev %s|awk '/^default/ {print $3}'")
if response:
return response[0]
else:
11 years, 4 months
client/tools
by Milan Zazrivec
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit e17408a64ff5865765a29e64805e12bb40255779
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Dec 12 18:11:39 2012 +0100
use ip instead of route to determine default gateway
route (part of net-tools) will not always be available in a @base installation.
diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
index a499223..9fada04 100644
--- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
+++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
@@ -82,7 +82,7 @@ def find_name_servers():
return ret
def find_gateway():
- response = execute("route -n | awk '/^0\.0\.0\.0/ {print $2}'")
+ response = execute("ip -f inet4 route list dev %s|awk '/^default/ {print $3}'")
if response:
return response[0]
else:
11 years, 4 months
client/tools
by Milan Zazrivec
client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 050a067098ef5ec8154efd6de34c33b9b7d64647
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Wed Dec 12 17:20:42 2012 +0100
use ip instead of ifconfig to get networking info
ifconfig (part of net-tools) will not always be part of a @base installation.
diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
index 51c8f06..a499223 100644
--- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
+++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py
@@ -46,28 +46,28 @@ def find_host_name():
return execute("hostname")[0]
def find_netmask(device):
- nm = execute("LANG=C ifconfig %s | perl -lne '/Mask:([\d.]+)/ and print $1'" % device)
+ nm = execute("LANG=C ipcalc -4ms $(ip -4 -o addr show dev %s | awk '{print $4}')|awk -F= '{print $2}'" % device)
if nm:
return nm[0]
else:
return ""
def find_netmask6(device):
- nm6 = execute("LANG=C ifconfig %s | perl -lne '/inet6 addr: [[:xdigit:]:]+\/([\d]+).+Scope:Global/ and print $1'" % device)
+ nm6 = execute("LANG=C ip -6 -o addr show dev %s | perl -lne 'print $1 if m!/(.+) scope global!'" % device)
if nm6:
return nm6[0]
else:
return ""
def find_ip(device):
- ip = execute("LANG=C ifconfig %s | perl -lne '/inet addr:([\d.]+)/ and print $1'" % device)
+ ip = execute("LANG=C ip -4 -o addr show dev %s | perl -lne 'print $1 if m!.+\s(.+)/.+ scope global!'" % device)
if ip:
return ip[0]
else:
return ""
def find_ip6(device):
- ip6 = execute("LANG=C ifconfig %s | perl -lne '/inet6 addr: ([[:xdigit:]:]+).+Scope:Global/ and print $1'" % device)
+ ip6 = execute("LANG=C ip -6 -o addr show dev %s | perl -lne 'print $1 if m!.+\s(.+)/.+ scope global!'" % device)
if ip6:
return ip6[0]
else:
11 years, 4 months
java/buildconf
by Tomáš Kašpárek
java/buildconf/build-webapp.xml | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
New commits:
commit ed0bccb751ba9999aa90e8aad4d87e9675360311
Author: Tomas Kasparek <tkasparek(a)redhat.com>
Date: Wed Dec 12 14:03:33 2012 +0100
Determining tomcat version and using it when building webapp instead hardcode tomcat5
Building webapp couldn't work with any other tomcat than tomcat5.
diff --git a/java/buildconf/build-webapp.xml b/java/buildconf/build-webapp.xml
index 2bcc983..d63d726 100644
--- a/java/buildconf/build-webapp.xml
+++ b/java/buildconf/build-webapp.xml
@@ -1,6 +1,10 @@
<?xml version="1.0"?>
<project name="build-webapp">
+<!-- determine tomcat version -->
+ <property name="tomcat" value="tomcat5" />
+ <available file="/usr/share/java/tomcat6" type="dir" property="tomcat" value="tomcat6" />
+ <available file="/usr/share/java/tomcat" type="dir" property="tomcat" value="tomcat7" />
<!-- ================ Local Deployment Tasks ==================== -->
<!--
@@ -196,19 +200,19 @@
<target name="install-java"
description="Used to setup the java side of spacewalk devel environment">
- <mkdir dir="/var/lib/tomcat5/webapps.save"/>
- <move file="/var/lib/tomcat5/webapps/rhn"
- tofile="/var/lib/tomcat5/webapps.save/rhn"/>
- <symlink link="/var/lib/tomcat5/webapps/rhn"
+ <mkdir dir="/var/lib/${tomcat}/webapps.save"/>
+ <move file="/var/lib/${tomcat}/webapps/rhn"
+ tofile="/var/lib/${tomcat}/webapps.save/rhn"/>
+ <symlink link="/var/lib/${tomcat}/webapps/rhn"
resource="${git.home}/java/rhnwebapp"/>
</target>
<target name="uninstall-java"
description="Used to uninstall the java side of spacewalk devel environment">
- <symlink action="delete" link="/var/lib/tomcat5/webapps/rhn"/>
- <move file="/var/lib/tomcat5/webapps.save/rhn"
- tofile="/var/lib/tomcat5/webapps/rhn"/>
- <delete dir="/var/lib/tomcat5/webapps.save"/>
+ <symlink action="delete" link="/var/lib/${tomcat}/webapps/rhn"/>
+ <move file="/var/lib/${tomcat}/webapps.save/rhn"
+ tofile="/var/lib/${tomcat}/webapps/rhn"/>
+ <delete dir="/var/lib/${tomcat}/webapps.save"/>
</target>
<target name="install-devel"
11 years, 4 months
Changes to 'refs/tags/spacewalk-oscap-0.0.13-1'
by Šimon Lukašík
Tag 'spacewalk-oscap-0.0.13-1' created by Simon Lukasik <slukasik(a)redhat.com> at 2012-12-11 20:44 +0000
Tagging package [spacewalk-oscap] version [0.0.13-1] in directory [client/rhel/spacewalk-oscap/].
Changes since spacewalk-oscap-0.0.12-1:
Simon Lukasik (2):
Support for XCCDF 1.2.
Automatic commit of package [spacewalk-oscap] release [0.0.13-1].
---
client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap | 5
client/rhel/spacewalk-oscap/gxm.xml | 83 +++++++++++++++
client/rhel/spacewalk-oscap/spacewalk-oscap.spec | 6 -
client/rhel/spacewalk-oscap/xccdf-resume.xslt | 103 -------------------
client/rhel/spacewalk-oscap/xccdf-resume.xslt.in | 103 +++++++++++++++++++
rel-eng/packages/spacewalk-oscap | 2
6 files changed, 196 insertions(+), 106 deletions(-)
---
11 years, 4 months
client/rhel rel-eng/packages
by Šimon Lukašík
client/rhel/spacewalk-oscap/spacewalk-oscap.spec | 5 ++++-
rel-eng/packages/spacewalk-oscap | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 5fae4497fe070b00198748bb2c9cc59b8f482da9
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Tue Dec 11 21:44:42 2012 +0100
Automatic commit of package [spacewalk-oscap] release [0.0.13-1].
diff --git a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
index 2209d08..6b03026 100644
--- a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
+++ b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
@@ -1,5 +1,5 @@
Name: spacewalk-oscap
-Version: 0.0.12
+Version: 0.0.13
Release: 1%{?dist}
Summary: OpenSCAP plug-in for rhn-check
@@ -43,6 +43,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Dec 11 2012 Simon Lukasik <slukasik(a)redhat.com> 0.0.13-1
+- Support for XCCDF 1.2.
+
* Tue Dec 11 2012 Simon Lukasik <slukasik(a)redhat.com> 0.0.12-1
- Allow --cpe command-line argument to oscap.
diff --git a/rel-eng/packages/spacewalk-oscap b/rel-eng/packages/spacewalk-oscap
index b95d4db..1f43a14 100644
--- a/rel-eng/packages/spacewalk-oscap
+++ b/rel-eng/packages/spacewalk-oscap
@@ -1 +1 @@
-0.0.12-1 client/rhel/spacewalk-oscap/
+0.0.13-1 client/rhel/spacewalk-oscap/
11 years, 4 months
client/rhel
by Šimon Lukašík
client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap | 5
client/rhel/spacewalk-oscap/gxm.xml | 83 +++++++++++++++
client/rhel/spacewalk-oscap/spacewalk-oscap.spec | 1
client/rhel/spacewalk-oscap/xccdf-resume.xslt | 103 -------------------
client/rhel/spacewalk-oscap/xccdf-resume.xslt.in | 103 +++++++++++++++++++
5 files changed, 191 insertions(+), 104 deletions(-)
New commits:
commit 3a92473ab3cada8b278194525e02fb0d2be44975
Author: Simon Lukasik <slukasik(a)redhat.com>
Date: Tue Dec 11 21:11:42 2012 +0100
Support for XCCDF 1.2.
XSLT 1.0 transformation cannot handle multiple namespaces easily.
Let's use XSLT to build the final XSLT.
diff --git a/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap b/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap
index 463cb97..5de4aaa 100644
--- a/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap
+++ b/client/rhel/spacewalk-oscap/Makefile.spacewalk-oscap
@@ -18,6 +18,9 @@ DIR = -m 755 --verbose -d
all: $(OBJECTS)
+%.xslt: %.xslt.in
+ xsltproc gxm.xml $< > $@
+
%.pyc: %.py
python -c "import py_compile; py_compile.compile('$<')"
@@ -28,4 +31,4 @@ install: all
$(INSTALL) $(FILE) $(CAPABILITY) $(CAPSDIR)
clean:
- @rm -rf *.pyc *~ .*~
+ @rm -rf *.pyc *~ .*~ $(XSLT)
diff --git a/client/rhel/spacewalk-oscap/gxm.xml b/client/rhel/spacewalk-oscap/gxm.xml
new file mode 100644
index 0000000..9fccd87
--- /dev/null
+++ b/client/rhel/spacewalk-oscap/gxm.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- GNU XSLT Multiplexer -->
+
+<!-- Copyright 2012 Red Hat Inc., Durham, North Carolina. All Rights Reserved.
+
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free
+Software Foundation; either version 2.1 of the License.
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+details.
+
+You should have received a copy of the GNU Lesser General Public License along
+with this library; if not, write to the Free Software Foundation, Inc., 59
+Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Authors:
+ Simon Lukasik <slukasik(a)redhat.com>
+ -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:xccdf_12="http://checklists.nist.gov/xccdf/1.2">
+ <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
+
+ <xsl:template match="/">
+ <xsl:apply-templates select="/*"/>
+ </xsl:template>
+
+ <xsl:template match="xsl:stylesheet">
+ <xsl:copy xmlns:xccdf_12="http://checklists.nist.gov/xccdf/1.2">
+ <xsl:copy-of select="document('')/xsl:stylesheet/namespace::*[local-name() = 'xccdf_12']"/>
+ <xsl:apply-templates select="*|@*" mode="copy"/>
+ <xsl:apply-templates select="*[not(local-name()='output')][not(@match='/')]" mode="flourish"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="@*|node()" mode="copy">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" mode="copy"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="@*|node()" mode="flourish">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()" mode="flourish"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="@select|@match" mode="flourish">
+ <xsl:variable name="tmp" select="name()"/>
+ <xsl:attribute name="{$tmp}">
+ <xsl:call-template name="string-replace-all">
+ <xsl:with-param name="text" select="." />
+ <xsl:with-param name="replace" select="'cdf:'" />
+ <xsl:with-param name="by" select="'xccdf_12:'" />
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:template>
+
+
+ <xsl:template name="string-replace-all">
+ <!-- Poor XSLT 1.0 does not know how to replase strings. -->
+ <xsl:param name="text" />
+ <xsl:param name="replace" />
+ <xsl:param name="by" />
+ <xsl:choose>
+ <xsl:when test="contains($text, $replace)">
+ <xsl:value-of select="substring-before($text,$replace)" />
+ <xsl:value-of select="$by" />
+ <xsl:call-template name="string-replace-all">
+ <xsl:with-param name="text" select="substring-after($text,$replace)" />
+ <xsl:with-param name="replace" select="$replace" />
+ <xsl:with-param name="by" select="$by" />
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$text" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
+
diff --git a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
index 85cb910..2209d08 100644
--- a/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
+++ b/client/rhel/spacewalk-oscap/spacewalk-oscap.spec
@@ -11,6 +11,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: rhnlib
+BuildRequires: libxslt
Requires: openscap-utils >= 0.9.2
Requires: libxslt
Requires: rhnlib
diff --git a/client/rhel/spacewalk-oscap/xccdf-resume.xslt b/client/rhel/spacewalk-oscap/xccdf-resume.xslt
deleted file mode 100644
index 0c458d9..0000000
--- a/client/rhel/spacewalk-oscap/xccdf-resume.xslt
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright 2012 Red Hat Inc., Durham, North Carolina. All Rights Reserved.
-
-This library is free software; you can redistribute it and/or modify it under
-the terms of the GNU Lesser General Public License as published by the Free
-Software Foundation; either version 2.1 of the License.
-
-This library is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
-details.
-
-You should have received a copy of the GNU Lesser General Public License along
-with this library; if not, write to the Free Software Foundation, Inc., 59
-Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-Authors:
- Simon Lukasik <slukasik(a)redhat.com>
--->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:cdf="http://checklists.nist.gov/xccdf/1.1">
- <xsl:output method="xml" encoding="UTF-8"/>
-
- <xsl:template match="/">
- <benchmark-resume>
- <xsl:apply-templates select="cdf:Benchmark"/>
- </benchmark-resume>
- </xsl:template>
-
- <xsl:template match="cdf:Benchmark">
- <xsl:copy-of select="@id"/>
- <xsl:attribute name="version">
- <xsl:value-of select="normalize-space(cdf:version/text())"/>
- </xsl:attribute>
-
- <xsl:variable name="profileId" select="cdf:TestResult[1]/cdf:profile/@idref"/>
- <xsl:apply-templates select="cdf:Profile[@id = $profileId]"/>
- <xsl:apply-templates select="cdf:TestResult[1]"/>
- </xsl:template>
-
- <xsl:template match="cdf:Profile">
- <profile>
- <xsl:attribute name="title">
- <xsl:value-of select="normalize-space(cdf:title/text())"/>
- </xsl:attribute>
- <xsl:copy-of select="@id"/>
- <xsl:attribute name="description">
- <xsl:value-of select="normalize-space(cdf:description[@xml:lang='en-US']/text())"/>
- </xsl:attribute>
- </profile>
- </xsl:template>
-
- <xsl:template match="cdf:TestResult">
- <TestResult>
- <xsl:copy-of select="@id"/>
- <xsl:copy-of select="@start-time"/>
- <xsl:copy-of select="@end-time"/>
- <pass>
- <xsl:apply-templates select="cdf:rule-result[cdf:result = 'pass']"/>
- </pass>
- <fail>
- <xsl:apply-templates select="cdf:rule-result[cdf:result = 'fail']"/>
- </fail>
- <error>
- <xsl:apply-templates select="cdf:rule-result[cdf:result = 'error']"/>
- </error>
- <unknown>
- <xsl:apply-templates select="cdf:rule-result[cdf:result = 'unknown']"/>
- </unknown>
- <notapplicable>
- <xsl:apply-templates select="cdf:rule-result[cdf:result = 'notapplicable']"/>
- </notapplicable>
- <notchecked>
- <xsl:apply-templates select="cdf:rule-result[cdf:result = 'notchecked']"/>
- </notchecked>
- <notselected>
- <xsl:apply-templates select="cdf:rule-result[cdf:result = 'notselected']"/>
- </notselected>
- <informational>
- <xsl:apply-templates select="cdf:rule-result[cdf:result = 'informational']"/>
- </informational>
- <fixed>
- <xsl:apply-templates select="cdf:rule-result[cdf:result = 'fixed']"/>
- </fixed>
- </TestResult>
- </xsl:template>
-
- <xsl:template match="cdf:rule-result">
- <rr>
- <xsl:attribute name="id">
- <xsl:value-of select="normalize-space(@idref)"/>
- </xsl:attribute>
- <xsl:apply-templates select="cdf:ident"/>
- </rr>
- </xsl:template>
-
- <xsl:template match="cdf:ident">
- <ident>
- <xsl:copy-of select="@system"/>
- <xsl:value-of select="normalize-space(text())"/>
- </ident>
- </xsl:template>
-</xsl:stylesheet>
diff --git a/client/rhel/spacewalk-oscap/xccdf-resume.xslt.in b/client/rhel/spacewalk-oscap/xccdf-resume.xslt.in
new file mode 100644
index 0000000..30d294c
--- /dev/null
+++ b/client/rhel/spacewalk-oscap/xccdf-resume.xslt.in
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2012 Red Hat Inc., Durham, North Carolina. All Rights Reserved.
+
+This library is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free
+Software Foundation; either version 2.1 of the License.
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+details.
+
+You should have received a copy of the GNU Lesser General Public License along
+with this library; if not, write to the Free Software Foundation, Inc., 59
+Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Authors:
+ Simon Lukasik <slukasik(a)redhat.com>
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:cdf="http://checklists.nist.gov/xccdf/1.1">
+ <xsl:output method="xml" encoding="UTF-8"/>
+
+ <xsl:template match="/">
+ <benchmark-resume>
+ <xsl:apply-templates select="*[local-name()='Benchmark']"/>
+ </benchmark-resume>
+ </xsl:template>
+
+ <xsl:template match="cdf:Benchmark">
+ <xsl:copy-of select="@id"/>
+ <xsl:attribute name="version">
+ <xsl:value-of select="normalize-space(cdf:version/text())"/>
+ </xsl:attribute>
+
+ <xsl:variable name="profileId" select="cdf:TestResult[1]/cdf:profile/@idref"/>
+ <xsl:apply-templates select="cdf:Profile[@id = $profileId]"/>
+ <xsl:apply-templates select="cdf:TestResult[1]"/>
+ </xsl:template>
+
+ <xsl:template match="cdf:Profile">
+ <profile>
+ <xsl:attribute name="title">
+ <xsl:value-of select="normalize-space(cdf:title/text())"/>
+ </xsl:attribute>
+ <xsl:copy-of select="@id"/>
+ <xsl:attribute name="description">
+ <xsl:value-of select="normalize-space(cdf:description[@xml:lang='en-US']/text())"/>
+ </xsl:attribute>
+ </profile>
+ </xsl:template>
+
+ <xsl:template match="cdf:TestResult">
+ <TestResult>
+ <xsl:copy-of select="@id"/>
+ <xsl:copy-of select="@start-time"/>
+ <xsl:copy-of select="@end-time"/>
+ <pass>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'pass']"/>
+ </pass>
+ <fail>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'fail']"/>
+ </fail>
+ <error>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'error']"/>
+ </error>
+ <unknown>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'unknown']"/>
+ </unknown>
+ <notapplicable>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'notapplicable']"/>
+ </notapplicable>
+ <notchecked>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'notchecked']"/>
+ </notchecked>
+ <notselected>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'notselected']"/>
+ </notselected>
+ <informational>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'informational']"/>
+ </informational>
+ <fixed>
+ <xsl:apply-templates select="cdf:rule-result[cdf:result = 'fixed']"/>
+ </fixed>
+ </TestResult>
+ </xsl:template>
+
+ <xsl:template match="cdf:rule-result">
+ <rr>
+ <xsl:attribute name="id">
+ <xsl:value-of select="normalize-space(@idref)"/>
+ </xsl:attribute>
+ <xsl:apply-templates select="cdf:ident"/>
+ </rr>
+ </xsl:template>
+
+ <xsl:template match="cdf:ident">
+ <ident>
+ <xsl:copy-of select="@system"/>
+ <xsl:value-of select="normalize-space(text())"/>
+ </ident>
+ </xsl:template>
+</xsl:stylesheet>
11 years, 4 months
Changes to 'refs/tags/spacewalk-oscap-0.0.12-1'
by Šimon Lukašík
Tag 'spacewalk-oscap-0.0.12-1' created by Simon Lukasik <slukasik(a)redhat.com> at 2012-12-11 13:29 +0000
Tagging package [spacewalk-oscap] version [0.0.12-1] in directory [client/rhel/spacewalk-oscap/].
Changes since heirloom-pkgtools-1.070227-9:
Jan Pazdziora (1):
Put heirloom-pkgtools back to composes.
Simon Lukasik (2):
Allow --cpe command-line argument to oscap.
Automatic commit of package [spacewalk-oscap] release [0.0.12-1].
---
client/rhel/spacewalk-oscap/scap.py | 3 +--
client/rhel/spacewalk-oscap/spacewalk-oscap.spec | 5 ++++-
rel-eng/comps/comps-spacewalk-server-fedora16.xml | 1 +
rel-eng/comps/comps-spacewalk-server-fedora17.xml | 1 +
rel-eng/comps/comps-spacewalk-server-rhel5.xml | 1 +
rel-eng/comps/comps-spacewalk-server-rhel6.xml | 1 +
rel-eng/packages/spacewalk-oscap | 2 +-
rel-eng/tito.props | 8 ++++----
8 files changed, 14 insertions(+), 8 deletions(-)
---
11 years, 4 months