diff --git a/0231.patch b/0231.patch new file mode 100644 index 0000000..b0f490d --- /dev/null +++ b/0231.patch @@ -0,0 +1,50 @@ +From d28f91126a6d76503155e462b4e9f1a052f412ad Mon Sep 17 00:00:00 2001 +From: Antonio Alvarez Feijoo +Date: Mon, 14 Aug 2023 12:28:11 +0200 +Subject: [PATCH] fix(dracut.sh): remove microcode check based on + CONFIG_MICROCODE_[AMD|INTEL] + +`CONFIG_MICROCODE_AMD` and `CONFIG_MICROCODE_INTEL` are hidden since +https://lore.kernel.org/all/20230810160805.081212701@linutronix.de/, therefore +this check is wrong and early microcode is always disabled. + +(Cherry-picked commit: 61b9cd16e049434597e398be61a47e0112382c5b) + +Resolves: RHEL-21023 +--- + dracut.sh | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +diff --git a/dracut.sh b/dracut.sh +index 869b90b0..42e1650a 100755 +--- a/dracut.sh ++++ b/dracut.sh +@@ -1084,23 +1084,20 @@ fi + + if [[ $early_microcode = yes ]]; then + if [[ $hostonly ]]; then +- if [[ $(get_cpu_vendor) == "AMD" ]]; then +- check_kernel_config CONFIG_MICROCODE_AMD || unset early_microcode +- elif [[ $(get_cpu_vendor) == "Intel" ]]; then +- check_kernel_config CONFIG_MICROCODE_INTEL || unset early_microcode ++ if [[ $(get_cpu_vendor) == "AMD" || $(get_cpu_vendor) == "Intel" ]]; then ++ check_kernel_config CONFIG_MICROCODE || unset early_microcode + else + unset early_microcode + fi + else +- ! check_kernel_config CONFIG_MICROCODE_AMD \ +- && ! check_kernel_config CONFIG_MICROCODE_INTEL \ ++ ! check_kernel_config CONFIG_MICROCODE \ + && unset early_microcode + fi + # Do not complain on non-x86 architectures as it makes no sense + case $(uname -m) in + x86_64|i?86) + [[ $early_microcode != yes ]] \ +- && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y" ++ && dwarn "Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE!=y" + ;; + *) ;; + esac + diff --git a/0232.patch b/0232.patch new file mode 100644 index 0000000..e4d1081 --- /dev/null +++ b/0232.patch @@ -0,0 +1,41 @@ +From 141a2ecf03efb77c0622dcc96b503e6344f63938 Mon Sep 17 00:00:00 2001 +From: Coiby Xu +Date: Wed, 14 Jul 2021 15:26:10 +0800 +Subject: [PATCH] fix(qeth_rules): check the existence of + /sys/devices/qeth/*/online beforehand + +On s390x KVM machines, the follow errors occurred, + $ kdumpctl rebuild + kdump: Rebuilding /boot/initramfs-4.18.0-321.el8.s390xkdump.img + /usr/lib/dracut/modules.d/95qeth_rules/module-setup.sh: line 13: /sys/devices/qeth/*/online: No such file or directory + /usr/lib/dracut/modules.d/95qeth_rules/module-setup.sh: line 13: /sys/devices/qeth/*/online: No such file or directory + +because s390x KVM uses virtual devices and /sys/devices/qeth/*/online +doesn't exist. Eliminate this error by checking the existence +beforehand. + +(Cherry-picked commit: 04fd4f0139c25e6f3846e759de15ac80ec807887) + +Resolves: RHEL-17239 +--- + modules.d/95qeth_rules/module-setup.sh | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/modules.d/95qeth_rules/module-setup.sh b/modules.d/95qeth_rules/module-setup.sh +index d4d15118..1a067e90 100755 +--- a/modules.d/95qeth_rules/module-setup.sh ++++ b/modules.d/95qeth_rules/module-setup.sh +@@ -10,9 +10,10 @@ check() { + + [[ $hostonly ]] && { + for i in /sys/devices/qeth/*/online; do +- read _online < $i +- [ $_online -eq 1 ] && return 0 +- done ++ [ ! -f "$i" ] && continue ++ read -r _online < "$i" ++ [ "$_online" -eq 1 ] && return 0 ++ done + } + return 255 + } diff --git a/dracut.spec b/dracut.spec index 61792ef..671cf38 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 231.git20231115 +%define dist_free_release 233.git20240115 Name: dracut Version: 049 @@ -258,6 +258,8 @@ Patch227: 0227.patch Patch228: 0228.patch Patch229: 0229.patch Patch230: 0230.patch +Patch231: 0231.patch +Patch232: 0232.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -713,6 +715,10 @@ echo '# Since rhel-8.3 dracut moved to use NetworkManager add_dracutmodules+=" network-legacy "' > /etc/dracut.conf.d/50-network-legacy.conf %changelog +* Mon Jan 15 2024 Pavel Valena - 049-233.git20240115 +- fix(dracut.sh): remove microcode check based on +- fix(qeth_rules): check the existence of + * Thu Nov 16 2023 Pavel Valena - 049-231.git20231115 - fix(iscsi): do not exit in handle_netroot() if discovery - feat(systemd): install systemd-sysroot-fstab-check