From aff1e4ac91c4db946055d214e3989c35460ef628 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Tue, 9 Jun 2026 16:00:08 +0000 Subject: [PATCH] Add AlmaLinux 10 support --- add-almalinux10-support.sh | 11 +++++++++++ scap-security-guide.spec | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/add-almalinux10-support.sh b/add-almalinux10-support.sh index 56422cb..39f7382 100644 --- a/add-almalinux10-support.sh +++ b/add-almalinux10-support.sh @@ -36,9 +36,20 @@ find ./shared -type f -exec sed -i \ -e 's|multi_platform_rhel|multi_platform_rhel\nmulti_platform_almalinux|g' {} \; # 5. Improve Ansible support in conditionals +# Two product-gating idioms are used in the shared rule templates: +# - list membership: {% if product in [..., "rhel10"] %} +# - equality: {% if product == "rhel10" %} +# The list form is rewritten below. The equality form is NOT a substring of +# the list form, so it must be handled separately, otherwise almalinux10 +# silently falls through to the generic `else` branch of those rules (e.g. +# configure_custom_crypto_policy_cis emits DEFAULT:NO-SHA1, a module dropped +# from crypto-policies on EL10, breaking `update-crypto-policies --set`). find ./linux_os -type d -name ensure_redhat_gpgkey_installed -prune -o -type f -exec sed -i \ -e '/if product in/ s/"rhel10"/"rhel10", "almalinux10"/g' {} \; +find ./linux_os ./shared -type d -name ensure_redhat_gpgkey_installed -prune -o -type f -exec sed -i -E \ + -e 's/product == (["'\''])rhel10\1/(product == \1rhel10\1 or product == \1almalinux10\1)/g' {} \; + # 6. Add AlmaLinux 10 constants sed -i \ -e 's/ALMALINUX9/ALMALINUX10/g' \ diff --git a/scap-security-guide.spec b/scap-security-guide.spec index f841eb9..adf7751 100644 --- a/scap-security-guide.spec +++ b/scap-security-guide.spec @@ -5,7 +5,7 @@ Name: scap-security-guide Version: 0.1.80 -Release: 1%{?dist}.alma.1 +Release: 1%{?dist}.alma.2 Summary: Security guidance and baselines in SCAP formats License: BSD-3-Clause URL: https://github.com/ComplianceAsCode/content/ @@ -111,7 +111,7 @@ rm %{buildroot}/%{_docdir}/%{name}/Contributors.md %endif %changelog -* Tue Mar 31 2026 Andrew Lukoshko - 0.1.80-1.alma.1 +* Tue Jun 09 2026 Andrew Lukoshko - 0.1.80-1.alma.2 - Add AlmaLinux 10 support * Tue Mar 10 2026 Vojtech Polasek - 0.1.80-1