| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # This template generates OVAL definitions for rpmverifypackage_object. |
| 4 | |
| 5 | RPM_NAME=$1 |
| 6 | RPM_EPOCH=$2 |
| 7 | RPM_ARCH=$3 |
| 8 | RPM_VERSION=$4 |
| 9 | RPM_RELEASE=$5 |
| 10 | |
| 11 | cat <<EOF |
| 12 | <?xml version="1.0"?> |
| 13 | <oval_definitions xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:lin-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd"> |
| 14 | |
| 15 | <generator> |
| 16 | <oval:product_name>me</oval:product_name> |
| 17 | <oval:product_version>0.123</oval:product_version> |
| 18 | <oval:schema_version>5.11</oval:schema_version> |
| 19 | <oval:timestamp>2008-03-31T00:00:00-00:00</oval:timestamp> |
| 20 | </generator> |
| 21 | |
| 22 | <definitions> |
| 23 | <definition class="compliance" version="1" id="oval:x:def:1"> |
| 24 | <metadata> |
| 25 | <title></title> |
| 26 | <description></description> |
| 27 | </metadata> |
| 28 | <criteria> |
| 29 | <criterion test_ref="oval:x:tst:1"/> |
| 30 | </criteria> |
| 31 | </definition> |
| 32 | </definitions> |
| 33 | |
| 34 | <tests> |
| 35 | <rpmverifypackage_test id="oval:x:tst:1" version="1" check="all" comment="blablabla" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 36 | <object object_ref="oval:x:obj:1"/> |
| 37 | </rpmverifypackage_test> |
| 38 | </tests> |
| 39 | |
| 40 | <objects> |
| 41 | <rpmverifypackage_object id="oval:x:obj:1" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 42 | <name>$RPM_NAME</name> |
| 43 | <epoch>$RPM_EPOCH</epoch> |
| 44 | <version>$RPM_VERSION</version> |
| 45 | <release>$RPM_RELEASE</release> |
| 46 | <arch>$RPM_ARCH</arch> |
| 47 | </rpmverifypackage_object> |
| 48 | </objects> |
| 49 | |
| 50 | </oval_definitions> |
| 51 | EOF |