dracut-057-87.git20250311

Resolves: RHEL-53364
This commit is contained in:
Pavel Valena 2025-03-11 04:21:20 +01:00
parent 53f49f958c
commit 1dea2ffdcb
2 changed files with 37 additions and 1 deletions

32
0086.patch Normal file
View File

@ -0,0 +1,32 @@
From 94969152cfa4ac9dd87f7a25133638935a5cd4d5 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
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+=$?))

View File

@ -5,7 +5,7 @@
# strip the automatically generated dep here and instead co-own the # strip the automatically generated dep here and instead co-own the
# directory. # directory.
%global __requires_exclude pkg-config %global __requires_exclude pkg-config
%define dist_free_release 86.git20250217 %define dist_free_release 87.git20250311
Name: dracut Name: dracut
Version: 057 Version: 057
@ -114,6 +114,7 @@ Patch82: 0082.patch
Patch83: 0083.patch Patch83: 0083.patch
Patch84: 0084.patch Patch84: 0084.patch
Patch85: 0085.patch Patch85: 0085.patch
Patch86: 0086.patch
Source1: https://www.gnu.org/licenses/lgpl-2.1.txt 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 %{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
%changelog %changelog
* Tue Mar 11 2025 Pavel Valena <pvalena@redhat.com> - 057-87.git20250311
- fix(rescue): create hmac file for rescue kernel
* Mon Feb 17 2025 Pavel Valena <pvalena@redhat.com> - 057-86.git20250217 * Mon Feb 17 2025 Pavel Valena <pvalena@redhat.com> - 057-86.git20250217
- fix(35network-manager): remove duplicate installkernel - fix(35network-manager): remove duplicate installkernel
- feat(fips): include fips module unconditionally - feat(fips): include fips module unconditionally