diff --git a/grub.macros b/grub.macros index 70ccd4b..7c9021c 100644 --- a/grub.macros +++ b/grub.macros @@ -25,7 +25,8 @@ %global cflags_sed \\\ sed \\\ -e 's/-O. //g' \\\ - -e 's/-fno-stack-protector//g' \\\ + -e 's/-fplugin=annobin//g' \\\ + -e 's,-specs=[[:alnum:]/_-]*annobin[[:alnum:]_-]*,,g' \\\ -e 's/-[^ ]*D_FORTIFY_SOURCE=[[:digit:]][^ ]*\\+//g' \\\ -e 's/--param=ssp-buffer-size=4//g' \\\ -e 's/-mregparm=3/-mregparm=4/g' \\\ @@ -35,7 +36,7 @@ -e 's/^/ -fno-strict-aliasing /' \\\ %{nil} -%global host_cflags_ %{expand:%%(echo %{build_cflags} %{?_hardening_cflags} -fstack-protector-strong | %{cflags_sed})} +%global host_cflags_ %{expand:%%(echo %{build_cflags} %{?_hardening_cflags} | %{cflags_sed})} %ifarch x86_64 %global host_cflags %{host_cflags_} -fcf-protection %else @@ -49,7 +50,7 @@ )} %global efi_host_cflags %{expand:%%(echo %{host_cflags})} -%global target_cflags %{expand:%%(echo %{build_cflags} -fstack-protector-strong | %{cflags_sed})} +%global target_cflags %{expand:%%(echo %{build_cflags} | %{cflags_sed})} -fstack-protector-strong %global legacy_target_cflags \\\ %{expand:%%(echo %{target_cflags} | \\\ %{cflags_sed} \\\ diff --git a/grub2.spec b/grub2.spec index 8f86325..17cdf1c 100644 --- a/grub2.spec +++ b/grub2.spec @@ -17,7 +17,7 @@ Name: grub2 Epoch: 1 Version: 2.12 -Release: 26%{?dist} +Release: 27%{?dist} Summary: Bootloader with support for Linux, Multiboot and more License: GPL-3.0-or-later URL: http://www.gnu.org/software/grub/ @@ -574,6 +574,10 @@ fi %endif %changelog +* Fri Aug 15 2025 Leo Sandoval 2.12-27 +- Revert annobin's regex removal into cflags_sed +- Resolves: #RHEL-89464 + * Thu Jul 31 2025 Leo Sandoval 2.12-26 - Enable strong stack protector on EFI configurations - Resolves: #RHEL-89464