diff --git a/0086.patch b/0086.patch new file mode 100644 index 0000000..ea7ee99 --- /dev/null +++ b/0086.patch @@ -0,0 +1,32 @@ +From 94969152cfa4ac9dd87f7a25133638935a5cd4d5 Mon Sep 17 00:00:00 2001 +From: Pavel Valena +Date: Thu, 6 Mar 2025 14:30:26 +0100 +Subject: [PATCH] fix(rescue): create hmac file for rescue kernel + +Resolves: RHEL-53364 +--- + install.d/51-dracut-rescue.install | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/install.d/51-dracut-rescue.install b/install.d/51-dracut-rescue.install +index 8bf9a6d9..e27f72ba 100755 +--- a/install.d/51-dracut-rescue.install ++++ b/install.d/51-dracut-rescue.install +@@ -95,6 +95,17 @@ case "$COMMAND" in + echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/$KERNEL'!" >&2 + fi + ++ HMAC=".${KERNEL}.hmac" ++ ++ KERNEL_DIR="${KERNEL_IMAGE%/*}" ++ KERNEL_FILE="${KERNEL_IMAGE##*/}" ++ ++ HMAC_FILE="${KERNEL_DIR}/.${KERNEL_FILE}.hmac" ++ ++ if ! sed -E "s/([0-9a-f]+)(\s+).*$/\1\2${KERNEL}/" "$HMAC_FILE" > "$BOOT_DIR_ABS/$HMAC"; then ++ echo "Can't create '$BOOT_DIR_ABS/$HMAC' from '$HMAC_FILE'!" >&2 ++ fi ++ + if [[ ! -f "$BOOT_DIR_ABS/$INITRD" ]]; then + dracut -f --no-hostonly -a "rescue" "$BOOT_DIR_ABS/$INITRD" "$KERNEL_VERSION" + ((ret+=$?)) diff --git a/dracut.spec b/dracut.spec index 3c7efbf..709b869 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 86.git20250217 +%define dist_free_release 87.git20250311 Name: dracut Version: 057 @@ -114,6 +114,7 @@ Patch82: 0082.patch Patch83: 0083.patch Patch84: 0084.patch Patch85: 0085.patch +Patch86: 0086.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -570,6 +571,9 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/ %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install %changelog +* Tue Mar 11 2025 Pavel Valena - 057-87.git20250311 +- fix(rescue): create hmac file for rescue kernel + * Mon Feb 17 2025 Pavel Valena - 057-86.git20250217 - fix(35network-manager): remove duplicate installkernel - feat(fips): include fips module unconditionally