diff --git a/CMakeLists.txt b/CMakeLists.txt
index aca3f1c8967..9d40a2e3ac5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,6 +122,7 @@ option(SSG_PRODUCT_UBUNTU2404 "If enabled, the Ubuntu 24.04 SCAP content will be
option(SSG_PRODUCT_AL2023 "If enabled, the AL2023 SCAP content will be built" ${SSG_PRODUCT_DEFAULT})
# Products derivatives
option(SSG_CENTOS_DERIVATIVES_ENABLED "If enabled, CentOS derivative content will be built from the RHEL content" TRUE)
+option(SSG_ALMALINUX_DERIVATIVES_ENABLED "If enabled, AlmaLinux derivative content will be built from the RHEL content" TRUE)
if("$ENV{PYTHONPATH}" STREQUAL "")
set(ENV{PYTHONPATH} "${PROJECT_SOURCE_DIR}")
diff --git a/build-scripts/enable_derivatives.py b/build-scripts/enable_derivatives.py
index 3d83aae9ea2..ac368e117d6 100755
--- a/build-scripts/enable_derivatives.py
+++ b/build-scripts/enable_derivatives.py
@@ -25,8 +25,10 @@
oval_ns = ssg.constants.oval_namespace
CENTOS_NOTICE_ELEMENT = ssg.xml.ElementTree.fromstring(ssg.constants.CENTOS_NOTICE)
+ALMALINUX_NOTICE_ELEMENT = ssg.xml.ElementTree.fromstring(ssg.constants.ALMALINUX_NOTICE)
CENTOS_WARNING = 'centos_warning'
+ALMALINUX_WARNING = 'almalinux_warning'
def parse_args():
@@ -34,6 +36,8 @@ def parse_args():
parser = OptionParser(usage=usage)
parser.add_option("--enable-centos", dest="centos", default=False,
action="store_true", help="Enable CentOS")
+ parser.add_option("--enable-almalinux", dest="almalinux", default=False,
+ action="store_true", help="Enable AlmaLinux")
parser.add_option("-i", "--input", dest="input_content", default=False,
action="store",
help="INPUT can be XCCDF or Source data stream")
@@ -73,6 +77,12 @@ def main():
warning = CENTOS_WARNING
derivative = "CentOS"
+ if options.almalinux:
+ mapping = ssg.constants.RHEL_ALMALINUX_CPE_MAPPING
+ notice = ALMALINUX_NOTICE_ELEMENT
+ warning = ALMALINUX_WARNING
+ derivative = "AlmaLinux"
+
tree = ssg.xml.open_xml(options.input_content)
root = tree.getroot()
@@ -89,9 +99,10 @@ def main():
raise RuntimeError("No Benchmark found!")
for namespace, benchmark in benchmarks:
- if args[1] not in ("cs9", "cs10") and not args[1].startswith("centos"):
+ if args[1] not in ("cs9", "cs10", "almalinux9") and not args[1].startswith("centos"):
# In all CentOS and CentOS Streams, profiles are kept because they are systems
# intended to test content that will get into RHEL
+ # In AlmaLinux, profiles are kept because this is a clone of RHEL.
ssg.build_derivatives.profile_handling(benchmark, namespace)
if not ssg.build_derivatives.add_cpes(benchmark, namespace, mapping):
import pprint
diff --git a/build_product b/build_product
index d7d7092bae9..aef893ad16a 100755
--- a/build_product
+++ b/build_product
@@ -335,6 +335,9 @@ set_no_derivatives_options() {
if grep -q 'rhel' <<< "${_arg_product[*]}"; then
CMAKE_OPTIONS+=("-DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=OFF")
fi
+ if grep -q 'rhel' <<< "${_arg_product[*]}"; then
+ CMAKE_OPTIONS+=("-DSSG_ALMALINUX_DERIVATIVES_ENABLED:BOOL=OFF")
+ fi
}
set_sce_options() {
diff --git a/linux_os/guide/system/software/updating/ensure_redhat_gpgkey_installed/oval/shared.xml b/linux_os/guide/system/software/updating/ensure_redhat_gpgkey_installed/oval/shared.xml
index 13970997c3e..b37094fea66 100644
--- a/linux_os/guide/system/software/updating/ensure_redhat_gpgkey_installed/oval/shared.xml
+++ b/linux_os/guide/system/software/updating/ensure_redhat_gpgkey_installed/oval/shared.xml
@@ -22,6 +22,13 @@
test_ref="test_redhat_package_gpgkey-{{{ centos_pkg_version }}}-{{{ centos_pkg_release }}}_installed" />
{{%- endif %}}
+ {{%- if almalinux_major_version %}}
+
This benchmark is a direct port of a SCAP Security Guide " \ @@ -355,6 +359,41 @@ ".
" \ "This benchmark is a direct port of a SCAP Security Guide " \ + "benchmark developed for Red Hat Enterprise Linux. It has been " \ + "modified through an automated process to remove specific dependencies " \ + "on Red Hat Enterprise Linux and to function with AlmaLinux. " \ + "The result is a generally useful SCAP Security Guide benchmark " \ + "with the following caveats:
\n" \ + "Members of the AlmaLinux community are invited to participate in " \ + "OpenSCAP and " \ + "" \ + "SCAP Security Guide development. Bug reports and patches " \ + "can be sent to GitHub: " \ + "" \ + "https://github.com/ComplianceAsCode/content. " \ + "The mailing list is at " \ + "" \ + "https://fedorahosted.org/mailman/listinfo/scap-security-guide" \ + ".
" \ + "