From cf1d85924b5945506e57f8701be066c83a894378 Mon Sep 17 00:00:00 2001 From: Watson Sato Date: Mon, 5 Oct 2020 16:40:39 +0200 Subject: [PATCH 1/2] Check for grub2-common instead of grub2-pc Check for grub2 intallation based on grub2-common. grub2-pc is a x86_64 package, but other arches use grub2 as well. --- .../checks/oval/installed_env_has_grub2_package.xml | 12 ++++++------ ssg/constants.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/shared/checks/oval/installed_env_has_grub2_package.xml b/shared/checks/oval/installed_env_has_grub2_package.xml index e83f45bc3b..2a170d668e 100644 --- a/shared/checks/oval/installed_env_has_grub2_package.xml +++ b/shared/checks/oval/installed_env_has_grub2_package.xml @@ -6,31 +6,31 @@ multi_platform_all - Checks if package grub2-pc is installed. + Checks if package grub2-common is installed. - + {{% if pkg_system == "rpm" %}} + comment="system has package grub2-common installed"> - grub2-pc + grub2-common {{% elif pkg_system == "dpkg" %}} + comment="system has package grub2-common installed"> - grub2-pc + grub2-common {{% endif %}} diff --git a/ssg/constants.py b/ssg/constants.py index b07fe5f0fe..88316374b5 100644 --- a/ssg/constants.py +++ b/ssg/constants.py @@ -468,7 +468,7 @@ # Default platform to package mapping XCCDF_PLATFORM_TO_PACKAGE = { - "grub2": "grub2-pc", + "grub2": "grub2-common", "login_defs": "login", "sssd": "sssd-common", "zipl": "s390utils-base", From fba876cfc7f85f5b9a696d0f5fa1177299b7c6bb Mon Sep 17 00:00:00 2001 From: Watson Sato Date: Mon, 5 Oct 2020 16:49:15 +0200 Subject: [PATCH 2/2] Handle exception of grub2-coomon in ppc64le ppc64le systems can use Grub2 or OPAL and the package set will be the same in both cases. Add a few more checks to make sure ppc64le arch is handled correctly. --- .../oval/installed_env_has_grub2_package.xml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/shared/checks/oval/installed_env_has_grub2_package.xml b/shared/checks/oval/installed_env_has_grub2_package.xml index 2a170d668e..fb2c9cc784 100644 --- a/shared/checks/oval/installed_env_has_grub2_package.xml +++ b/shared/checks/oval/installed_env_has_grub2_package.xml @@ -9,8 +9,18 @@ Checks if package grub2-common is installed. - + + + + + + + + @@ -34,4 +44,11 @@ {{% endif %}} + + + + + /sys/firmware/opal + +