Accepting request 847312 from security

- openscap-leap-cpe-15.12.patch: add CPE dict entries for openSUSE
  Leap 15.1 and 15.2

- add dbus-1-devel buildrequires to enable systemd tests (bsc#1178301)

OBS-URL: https://build.opensuse.org/request/show/847312
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openscap?expand=0&rev=68
This commit is contained in:
Dominique Leuenberger 2020-11-10 12:45:55 +00:00 committed by Git OBS Bridge
commit bb18737f6b
3 changed files with 100 additions and 0 deletions

View File

@ -0,0 +1,86 @@
Index: openscap-1.3.4/cpe/openscap-cpe-dict.xml
===================================================================
--- openscap-1.3.4.orig/cpe/openscap-cpe-dict.xml
+++ openscap-1.3.4/cpe/openscap-cpe-dict.xml
@@ -205,6 +205,14 @@
<title xml:lang="en-us">openSUSE Leap 15.0</title>
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.opensuse:def:150</check>
</cpe-item>
+ <cpe-item name="cpe:/o:opensuse:leap:15.1">
+ <title xml:lang="en-us">openSUSE Leap 15.1</title>
+ <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.opensuse:def:151</check>
+ </cpe-item>
+ <cpe-item name="cpe:/o:opensuse:leap:15.2">
+ <title xml:lang="en-us">openSUSE Leap 15.2</title>
+ <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.opensuse:def:152</check>
+ </cpe-item>
<cpe-item name="cpe:/o:opensuse:opensuse">
<title xml:lang="en-us">openSUSE All Versions</title>
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.opensuse:def:1</check>
Index: openscap-1.3.4/cpe/openscap-cpe-oval.xml
===================================================================
--- openscap-1.3.4.orig/cpe/openscap-cpe-oval.xml
+++ openscap-1.3.4/cpe/openscap-cpe-oval.xml
@@ -678,6 +678,32 @@
<criterion comment="openSUSE Leap 15.0 is installed" test_ref="oval:org.open-scap.cpe.opensuse:tst:150"/>
</criteria>
</definition>
+ <definition class="inventory" id="oval:org.open-scap.cpe.opensuse:def:151" version="1">
+ <metadata>
+ <title>openSUSE Leap 15.1</title>
+ <affected family="unix">
+ <platform>openSUSE Leap 15.1</platform>
+ </affected>
+ <reference ref_id="cpe:/o:opensuse:leap:15.1" source="CPE"/>
+ <description>The operating system installed on the system is openSUSE Leap 15.1</description>
+ </metadata>
+ <criteria>
+ <criterion comment="openSUSE Leap 15.1 is installed" test_ref="oval:org.open-scap.cpe.opensuse:tst:151"/>
+ </criteria>
+ </definition>
+ <definition class="inventory" id="oval:org.open-scap.cpe.opensuse:def:152" version="1">
+ <metadata>
+ <title>openSUSE Leap 15.2</title>
+ <affected family="unix">
+ <platform>openSUSE Leap 15.2</platform>
+ </affected>
+ <reference ref_id="cpe:/o:opensuse:leap:15.2" source="CPE"/>
+ <description>The operating system installed on the system is openSUSE Leap 15.2</description>
+ </metadata>
+ <criteria>
+ <criterion comment="openSUSE Leap 15.2 is installed" test_ref="oval:org.open-scap.cpe.opensuse:tst:152"/>
+ </criteria>
+ </definition>
<definition class="inventory" id="oval:org.open-scap.cpe.wrlinux:def:1" version="1" >
<metadata>
<title>Wind River Linux</title>
@@ -1067,6 +1093,16 @@
<object object_ref="oval:org.open-scap.cpe.openSUSE-release:obj:1"/>
<state state_ref="oval:org.open-scap.cpe.opensuse:ste:150"/>
</rpminfo_test>
+ <rpminfo_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.opensuse:tst:151" version="2" check="at least one" comment="openSUSE-release is version 15.1"
+ xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
+ <object object_ref="oval:org.open-scap.cpe.openSUSE-release:obj:1"/>
+ <state state_ref="oval:org.open-scap.cpe.opensuse:ste:151"/>
+ </rpminfo_test>
+ <rpminfo_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.opensuse:tst:152" version="2" check="at least one" comment="openSUSE-release is version 15.2"
+ xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
+ <object object_ref="oval:org.open-scap.cpe.openSUSE-release:obj:1"/>
+ <state state_ref="oval:org.open-scap.cpe.opensuse:ste:152"/>
+ </rpminfo_test>
<family_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.wrlinux:tst:1" version="1" check="only one"
comment="Installed operating system is part of the Unix family."
xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
@@ -1379,6 +1415,12 @@
<rpminfo_state id="oval:org.open-scap.cpe.opensuse:ste:150" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
<version operation="pattern match">^15.0$</version>
</rpminfo_state>
+ <rpminfo_state id="oval:org.open-scap.cpe.opensuse:ste:151" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
+ <version operation="pattern match">^15.1$</version>
+ </rpminfo_state>
+ <rpminfo_state id="oval:org.open-scap.cpe.opensuse:ste:152" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
+ <version operation="pattern match">^15.2$</version>
+ </rpminfo_state>
<textfilecontent54_state
id="oval:org.open-scap.cpe.wrlinux-release:ste:8"
comment="Check the /etc/wrlinux-release file for VERSION 8 specification."

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Nov 9 13:10:09 UTC 2020 - Marcus Meissner <meissner@suse.com>
- openscap-leap-cpe-15.12.patch: add CPE dict entries for openSUSE
Leap 15.1 and 15.2
-------------------------------------------------------------------
Sat Oct 31 08:33:48 UTC 2020 - Marcus Meissner <meissner@suse.com>
- add dbus-1-devel buildrequires to enable systemd tests (bsc#1178301)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Oct 2 08:03:23 UTC 2020 - Robert Frohl <rfrohl@suse.com> Fri Oct 2 08:03:23 UTC 2020 - Robert Frohl <rfrohl@suse.com>

View File

@ -39,6 +39,7 @@ Source4: scap-yast2sec-oval.xml
Source5: oscap-scan.service Source5: oscap-scan.service
Source6: oscap-scan.sh Source6: oscap-scan.sh
Patch0: openscap-new-suse.patch Patch0: openscap-new-suse.patch
Patch1: openscap-leap-cpe-15.12.patch
URL: https://www.open-scap.org/ URL: https://www.open-scap.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: asciidoc BuildRequires: asciidoc
@ -57,6 +58,7 @@ BuildRequires: libgcrypt-devel
BuildRequires: libxml2-devel BuildRequires: libxml2-devel
# Use package name cause of "have choice for perl(XML::Parser): brp-check-suse perl-XML-Parser" # Use package name cause of "have choice for perl(XML::Parser): brp-check-suse perl-XML-Parser"
BuildRequires: cmake BuildRequires: cmake
BuildRequires: dbus-1-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libblkid-devel BuildRequires: libblkid-devel
BuildRequires: libcap-devel BuildRequires: libcap-devel
@ -172,6 +174,7 @@ This package contains the Script Checking Engine Library (SCE) for OpenSCAP.
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
%if 0%{?with_bindings} %if 0%{?with_bindings}