Blame SOURCES/add_rhel8_cpe.patch

9319e0
From f600c0d3768d824be658c66ff49c34918d160f5a Mon Sep 17 00:00:00 2001
9319e0
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
9319e0
Date: Thu, 9 Aug 2018 04:20:42 -0400
9319e0
Subject: [PATCH] Add RHEL8 CPE to OpenSCAP CPE dictionary
9319e0
9319e0
---
9319e0
 cpe/openscap-cpe-dict.xml |  4 ++++
9319e0
 cpe/openscap-cpe-oval.xml | 22 ++++++++++++++++++++++
9319e0
 2 files changed, 26 insertions(+)
9319e0
9319e0
diff --git a/cpe/openscap-cpe-dict.xml b/cpe/openscap-cpe-dict.xml
9319e0
index 6c44333bb..b97245b38 100644
9319e0
--- a/cpe/openscap-cpe-dict.xml
9319e0
+++ b/cpe/openscap-cpe-dict.xml
9319e0
@@ -17,6 +17,10 @@
9319e0
             <title xml:lang="en-us">Red Hat Enterprise Linux 7</title>
9319e0
             <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.rhel:def:7</check>
9319e0
       </cpe-item>
9319e0
+      <cpe-item name="cpe:/o:redhat:enterprise_linux:8">
9319e0
+            <title xml:lang="en-us">Red Hat Enterprise Linux 8</title>
9319e0
+            <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.rhel:def:8</check>
9319e0
+      </cpe-item>
9319e0
       <cpe-item name="cpe:/o:oracle:linux:5">
9319e0
             <title xml:lang="en-us">Oracle Linux 5</title>
9319e0
             <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.ol:def:5</check>
9319e0
diff --git a/cpe/openscap-cpe-oval.xml b/cpe/openscap-cpe-oval.xml
9319e0
index bb338de7e..4be890041 100644
9319e0
--- a/cpe/openscap-cpe-oval.xml
9319e0
+++ b/cpe/openscap-cpe-oval.xml
9319e0
@@ -68,6 +68,19 @@
9319e0
                          </criteria>
9319e0
                   </criteria>
9319e0
             </definition>
9319e0
+            <definition class="inventory" id="oval:org.open-scap.cpe.rhel:def:8" version="1">
9319e0
+                  <metadata>
9319e0
+                        <title>Red Hat Enterprise Linux 8</title>
9319e0
+                        <affected family="unix">
9319e0
+                              <platform>Red Hat Enterprise Linux 8</platform>
9319e0
+                        </affected>
9319e0
+                        <reference ref_id="cpe:/o:redhat:enterprise_linux:8" source="CPE"/>
9319e0
+                        <description>The operating system installed on the system is Red Hat Enterprise Linux 8</description>
9319e0
+                  </metadata>
9319e0
+                  <criteria>
9319e0
+                        <criterion comment="Red Hat Enterprise Linux 8 is installed" test_ref="oval:org.open-scap.cpe.rhel:tst:8"/>
9319e0
+                  </criteria>
9319e0
+            </definition>
9319e0
             <definition class="inventory" id="oval:org.open-scap.cpe.ol:def:5" version="1">
9319e0
                   <metadata>
9319e0
                         <title>Oracle Linux 5</title>
9319e0
@@ -620,6 +633,11 @@
9319e0
                   <object object_ref="oval:org.open-scap.cpe.redhat-release:obj:3"/>
9319e0
                   <state state_ref="oval:org.open-scap.cpe.rhel:ste:7"/>
9319e0
             </rpmverifyfile_test>
9319e0
+            
9319e0
+                  xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
9319e0
+                  <object object_ref="oval:org.open-scap.cpe.redhat-release:obj:3"/>
9319e0
+                  <state state_ref="oval:org.open-scap.cpe.rhel:ste:8"/>
9319e0
+            </rpmverifyfile_test>
9319e0
             
9319e0
                   xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
9319e0
                   <object object_ref="oval:org.open-scap.cpe.oraclelinux-release:obj:1"/>
9319e0
@@ -921,6 +939,10 @@
9319e0
                   <name operation="pattern match">^redhat-release</name>
9319e0
                   <version operation="pattern match">^7[^\d]</version>
9319e0
             </rpmverifyfile_state>
9319e0
+            <rpmverifyfile_state id="oval:org.open-scap.cpe.rhel:ste:8" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
9319e0
+                  <name operation="pattern match">^redhat-release</name>
9319e0
+                  <version operation="pattern match">^8[^\d]</version>
9319e0
+            </rpmverifyfile_state>
9319e0
             <rpmverifyfile_state id="oval:org.open-scap.cpe.rhel:ste:1005" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
9319e0
                   <name operation="pattern match">^centos-release</name>
9319e0
                   <version operation="pattern match">^5</version>
9319e0
-- 
9319e0
2.17.0
9319e0