From b2132c049f881a0be1283507894d2443f5bf5caf Mon Sep 17 00:00:00 2001 From: Sam Wouters <231222691+swoutersup@users.noreply.github.com> Date: Wed, 15 Jul 2026 18:06:18 +0200 Subject: [PATCH] Extend product-in sed to cover shared/, not-in, and single quotes The existing sed only searched linux_os/ and only matched double-quoted product names in 'if product in' blocks. This missed: - Rules in shared/ that gate on product (e.g. PAM OVAL checks) - Exclusion lists using 'if product not in [...]' - Single-quoted product names in either form Extend the find path to linux_os/ and shared/, and add the three missing -e expressions to cover all four combinations. --- files/add-almalinux10-support.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/files/add-almalinux10-support.sh b/files/add-almalinux10-support.sh index 39f7382..96cf57f 100644 --- a/files/add-almalinux10-support.sh +++ b/files/add-almalinux10-support.sh @@ -44,8 +44,11 @@ find ./shared -type f -exec sed -i \ # 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 '/if product in/ s/"rhel10"/"rhel10", "almalinux10"/g' \ + -e "/if product in/ s/'rhel10'/'rhel10', 'almalinux10'/g" \ + -e '/if product not in/ s/"rhel10"/"rhel10", "almalinux10"/g' \ + -e "/if product not 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' {} \; -- 2.47.3