batch of fixes 2025-08-07
- fix: improve hostonly sloppy mode - fix(dracut.sh): don't pass empty string as dir - feat(systemd): drop unnecessary dependency on libgcrypt - fix(kernel-modules-extra): remove stray before / - Revert "fix(base): do not require chroot inside initramfs" Resolves: RHEL-93173,RHEL-95542,RHEL-95897,RHEL-97473 From-source-git-commit: 4c3a997b8d8c575490a082d04badf05e5a26d7da
This commit is contained in:
parent
e68b4f0939
commit
acd08f40d7
40
0016-fix-improve-hostonly-sloppy-mode.patch
Normal file
40
0016-fix-improve-hostonly-sloppy-mode.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 36d81322f0bcc2ff92cd7c1bee9a0c175b988693 Mon Sep 17 00:00:00 2001
|
||||
From: Jo Zzsi <jozzsicsataban@gmail.com>
|
||||
Date: Sun, 11 May 2025 21:16:42 -0400
|
||||
Subject: [PATCH 16/20] fix: improve hostonly sloppy mode
|
||||
|
||||
Resolve regression introduced by 8519dcd.
|
||||
|
||||
Fixes #1321 .
|
||||
|
||||
(cherry picked from commit bcf0093945b8d7b45006f410c52402450062a993)
|
||||
|
||||
Related: RHEL-97473
|
||||
---
|
||||
modules.d/90kernel-modules/module-setup.sh | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh
|
||||
index 72fbc41f..2daacb93 100755
|
||||
--- a/modules.d/90kernel-modules/module-setup.sh
|
||||
+++ b/modules.d/90kernel-modules/module-setup.sh
|
||||
@@ -122,11 +122,11 @@ installkernel() {
|
||||
|
||||
# if not on strict hostonly mode, install all known filesystems,
|
||||
# if the required list is not set via the filesystems variable
|
||||
- if [[ $hostonly_mode != "strict" ]]; then
|
||||
- if [[ -z $filesystems ]]; then
|
||||
- dracut_instmods -o -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
|
||||
- fi
|
||||
- elif [[ "${host_fs_types[*]}" ]]; then
|
||||
+ if [[ $hostonly_mode != "strict" ]] && [[ -z $filesystems ]]; then
|
||||
+ dracut_instmods -o -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
|
||||
+ fi
|
||||
+
|
||||
+ if [[ $hostonly ]] && [[ "${host_fs_types[*]}" ]]; then
|
||||
hostonly='' instmods "${host_fs_types[@]}"
|
||||
fi
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
36
0017-fix-dracut.sh-don-t-pass-empty-string-as-dir.patch
Normal file
36
0017-fix-dracut.sh-don-t-pass-empty-string-as-dir.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From dcd5368818a3a428c1e86690ef26ba8e3e887014 Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Tue, 20 May 2025 09:31:52 +0200
|
||||
Subject: [PATCH 17/20] fix(dracut.sh): don't pass empty string as dir
|
||||
|
||||
That causes dropindirs_sort() to look for .conf files in / due to
|
||||
expansion:
|
||||
|
||||
for d in "$@"; do
|
||||
for i in "$d/"*"$suffix"; do
|
||||
|
||||
Fixes #1275
|
||||
|
||||
(cherry picked from commit 000cfa0c278c0858e81c8dd2ff7231f069f0afb1)
|
||||
|
||||
Resolves: RHEL-95897
|
||||
---
|
||||
dracut.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dracut.sh b/dracut.sh
|
||||
index c2b2c949..3b8b0435 100755
|
||||
--- a/dracut.sh
|
||||
+++ b/dracut.sh
|
||||
@@ -972,7 +972,7 @@ if [[ -f $conffile ]]; then
|
||||
fi
|
||||
|
||||
# source our config dir
|
||||
-for f in $(dropindirs_sort ".conf" "$confdir" "$add_confdir" "$dracutbasedir/dracut.conf.d"); do
|
||||
+for f in $(dropindirs_sort ".conf" "$confdir" ${add_confdir:+"$add_confdir"} "$dracutbasedir/dracut.conf.d"); do
|
||||
check_conf_file "$f"
|
||||
# shellcheck disable=SC1090
|
||||
[[ -e $f ]] && . "$f"
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
From 639a04bca8cc22a0b3f0e52fc60ec28e911e1189 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Mon, 4 Aug 2025 23:26:14 +0200
|
||||
Subject: [PATCH 18/20] feat(systemd): drop unnecessary dependency on libgcrypt
|
||||
|
||||
Resolves: RHEL-95542
|
||||
---
|
||||
modules.d/00systemd/module-setup.sh | 1 -
|
||||
modules.d/01systemd-journald/module-setup.sh | 1 -
|
||||
2 files changed, 2 deletions(-)
|
||||
|
||||
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
|
||||
index 8f25475e..482bdfa1 100755
|
||||
--- a/modules.d/00systemd/module-setup.sh
|
||||
+++ b/modules.d/00systemd/module-setup.sh
|
||||
@@ -144,7 +144,6 @@ EOF
|
||||
# Install library file(s)
|
||||
_arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
inst_libdir_file \
|
||||
- {"tls/$_arch/",tls/,"$_arch/",}"libgcrypt.so*" \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"libbpf.so*" \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"libnss_*" \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"systemd/libsystemd*.so"
|
||||
diff --git a/modules.d/01systemd-journald/module-setup.sh b/modules.d/01systemd-journald/module-setup.sh
|
||||
index 77d6a2e9..01a71741 100755
|
||||
--- a/modules.d/01systemd-journald/module-setup.sh
|
||||
+++ b/modules.d/01systemd-journald/module-setup.sh
|
||||
@@ -54,7 +54,6 @@ install() {
|
||||
# Install library file(s)
|
||||
_arch=${DRACUT_ARCH:-$(uname -m)}
|
||||
inst_libdir_file \
|
||||
- {"tls/$_arch/",tls/,"$_arch/",}"libgcrypt.so*" \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"liblz4.so.*" \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"liblzma.so.*" \
|
||||
{"tls/$_arch/",tls/,"$_arch/",}"libzstd.so.*"
|
||||
--
|
||||
2.50.1
|
||||
|
||||
31
0019-fix-kernel-modules-extra-remove-stray-before.patch
Normal file
31
0019-fix-kernel-modules-extra-remove-stray-before.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From ad1ac0f85f4228ea25d38c8e50bf5ef0b59fadcf Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Mon, 4 Aug 2025 23:48:59 +0200
|
||||
Subject: [PATCH 19/20] fix(kernel-modules-extra): remove stray \ before /
|
||||
|
||||
Fixes grep warning:
|
||||
```grep: warning: stray \ before /```
|
||||
|
||||
Introduced in grep version 3.11.
|
||||
|
||||
Resolves: RHEL-97473
|
||||
---
|
||||
modules.d/90kernel-modules-extra/module-setup.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules.d/90kernel-modules-extra/module-setup.sh b/modules.d/90kernel-modules-extra/module-setup.sh
|
||||
index 85e2e0ad..c2809356 100755
|
||||
--- a/modules.d/90kernel-modules-extra/module-setup.sh
|
||||
+++ b/modules.d/90kernel-modules-extra/module-setup.sh
|
||||
@@ -35,7 +35,7 @@ installkernel() {
|
||||
# Escape a string for usage as a part of extended regular expression.
|
||||
# $1 - string to escape
|
||||
re_escape() {
|
||||
- printf "%s" "$1" | sed 's/\([.+?^$\/\\|()\[]\|\]\)/\\\0/'
|
||||
+ printf "%s" "$1" | sed 's/\([.+?^$\\|()\[]\|\]\)/\\\0/'
|
||||
}
|
||||
|
||||
local cfg
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
From 6fe66a3d55682de7dc24ee8be31752ae2ea08082 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Tue, 5 Aug 2025 00:00:30 +0200
|
||||
Subject: [PATCH 20/20] Revert "fix(base): do not require chroot inside
|
||||
initramfs"
|
||||
|
||||
This reverts commit 518133714b769160448a51c512d5e152ea6332da.
|
||||
|
||||
rhel-only
|
||||
|
||||
Resolves: RHEL-93173
|
||||
---
|
||||
modules.d/99base/module-setup.sh | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh
|
||||
index 7292ba71..9403706a 100755
|
||||
--- a/modules.d/99base/module-setup.sh
|
||||
+++ b/modules.d/99base/module-setup.sh
|
||||
@@ -9,6 +9,7 @@ depends() {
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_multiple \
|
||||
+ chroot \
|
||||
cp \
|
||||
dmesg \
|
||||
flock \
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
From f7c8c809798d5980d182509f9e1a448a7c65af73 Mon Sep 17 00:00:00 2001
|
||||
From: Coiby Xu <coxu@redhat.com>
|
||||
Date: Mon, 26 May 2025 15:34:30 +0800
|
||||
Subject: [PATCH 21/23] fix: let check_vol_slaves_all return 1 when checks on
|
||||
all slaves fail
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Currently check_vol_slaves_all return 0 even after checks on all slaves
|
||||
fail. And this leads to an issue that "dracut -hostonly-mode strict"
|
||||
gets stuck forever because instmods keeps waiting for user input when
|
||||
it's passed empty argument in the kernel-modules module.
|
||||
|
||||
Fixes: c7c8c498 ("dracut-functions.sh: catch all lvm slaves")
|
||||
Reported-by: Tomáš Bžatek <tbzatek@redhat.com>
|
||||
Signed-off-by: Coiby Xu <coxu@redhat.com>
|
||||
|
||||
(cherry picked from commit 1fcfb2bffdad22873a804043eeeb9bb65a99caa8)
|
||||
|
||||
Resolves: RHEL-104223
|
||||
---
|
||||
dracut-functions.sh | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
||||
index 94f0228f..8eadc345 100755
|
||||
--- a/dracut-functions.sh
|
||||
+++ b/dracut-functions.sh
|
||||
@@ -685,7 +685,7 @@ check_vol_slaves() {
|
||||
}
|
||||
|
||||
check_vol_slaves_all() {
|
||||
- local _vg _pv _majmin _dm
|
||||
+ local _vg _pv _majmin _dm _ret=1
|
||||
_majmin="$2"
|
||||
_dm=$(get_lvm_dm_dev "$_majmin")
|
||||
[[ -z $_dm ]] && return 1 # not an LVM device-mapper device
|
||||
@@ -699,11 +699,10 @@ check_vol_slaves_all() {
|
||||
fi
|
||||
|
||||
for _pv in $(lvm vgs --noheadings -o pv_name "$_vg" 2> /dev/null); do
|
||||
- check_block_and_slaves_all "$1" "$(get_maj_min "$_pv")"
|
||||
+ check_block_and_slaves_all "$1" "$(get_maj_min "$_pv")" && _ret=0
|
||||
done
|
||||
- return 0
|
||||
fi
|
||||
- return 1
|
||||
+ return $_ret
|
||||
}
|
||||
|
||||
# fs_get_option <filesystem options> <search for option>
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
From ad715d9108148a25b003df7dd0b3013104d6d717 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||
Date: Tue, 3 Jun 2025 18:34:39 +0200
|
||||
Subject: [PATCH 22/23] improvement(74nvmf): lookup required NIC kernel modules
|
||||
for NBFT interfaces
|
||||
|
||||
When dracut is called with '--hostonly-mode strict' and perhaps even
|
||||
with --hostonly-nics '' as done by kdump/mkdumprd, all the kernel
|
||||
modules related to hostonly networking are stripped down. In such
|
||||
a case it is viable to lookup and install the required kernel modules
|
||||
ourselves, based on any currently present nbft interfaces.
|
||||
|
||||
Note: the lookup depends on the current 'nbftX' network interface
|
||||
naming.
|
||||
|
||||
Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
|
||||
(cherry picked from commit e949a76aaa8f1a1e4cb01d4cacf89c69c7bbd801)
|
||||
|
||||
Resolves: RHEL-104223
|
||||
---
|
||||
modules.d/95nvmf/module-setup.sh | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/modules.d/95nvmf/module-setup.sh b/modules.d/95nvmf/module-setup.sh
|
||||
index b9888a56..9962ce41 100755
|
||||
--- a/modules.d/95nvmf/module-setup.sh
|
||||
+++ b/modules.d/95nvmf/module-setup.sh
|
||||
@@ -72,6 +72,14 @@ installkernel() {
|
||||
instmods nvme_fc nvme_tcp nvme_rdma lpfc qla2xxx
|
||||
# 802.1q VLAN may be set up in Firmware later. Include the module always.
|
||||
hostonly="" instmods 8021q
|
||||
+ # lookup NIC kernel modules for active NBFT interfaces
|
||||
+ if [[ $hostonly ]]; then
|
||||
+ for i in /sys/class/net/nbft*; do
|
||||
+ [ -d "$i" ] || continue
|
||||
+ _driver=$(basename "$(readlink -f "$i/device/driver/module")")
|
||||
+ [ -z "$_driver" ] || instmods "$_driver"
|
||||
+ done
|
||||
+ fi
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
--
|
||||
2.50.1
|
||||
|
||||
38
0023-fix-74nvmf-set-root-nvmf.patch
Normal file
38
0023-fix-74nvmf-set-root-nvmf.patch
Normal file
@ -0,0 +1,38 @@
|
||||
From 575585575b6309fc3563e58856d6c8f54df0f4a1 Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||
Date: Tue, 24 Jun 2025 16:50:31 +0200
|
||||
Subject: [PATCH 23/23] fix(74nvmf): set root=nvmf
|
||||
|
||||
In a restricted image like kdump the kernel commandline argument root=
|
||||
is typically absent. However it is required by the 45net-lib/netroot.sh
|
||||
module that fails with:
|
||||
|
||||
[ 23.599862] dracut: FATAL: No or empty root= argument
|
||||
[ 23.604956] dracut: Refusing to continue
|
||||
|
||||
Inspired by the 74iscsi module, let's set it to root=nvmf if not set
|
||||
before.
|
||||
|
||||
Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
|
||||
(cherry picked from commit a6dce328ea9738a558db848fa8dbed253b15ee3d)
|
||||
|
||||
Resolves: RHEL-104223
|
||||
---
|
||||
modules.d/95nvmf/parse-nvmf-boot-connections.sh | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/modules.d/95nvmf/parse-nvmf-boot-connections.sh b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
index aad2a458..5288553f 100755
|
||||
--- a/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
+++ b/modules.d/95nvmf/parse-nvmf-boot-connections.sh
|
||||
@@ -326,3 +326,7 @@ fi
|
||||
|
||||
/sbin/initqueue --settled --onetime --name nvmf-connect-settled /sbin/nvmf-autoconnect.sh settled
|
||||
/sbin/initqueue --timeout --onetime --name nvmf-connect-timeout /sbin/nvmf-autoconnect.sh timeout
|
||||
+
|
||||
+# shellcheck disable=SC2034
|
||||
+rootok=1
|
||||
+[ -z "$root" ] && root="nvmf"
|
||||
--
|
||||
2.50.1
|
||||
|
||||
37
dracut.spec
37
dracut.spec
@ -8,7 +8,7 @@
|
||||
|
||||
Name: dracut
|
||||
Version: 107
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
Summary: Initramfs generator using udev
|
||||
|
||||
@ -67,6 +67,30 @@ Patch14: 0014-Revert-chore-remove-unused-function.patch
|
||||
# fix(ossl): ignore compiler warnings
|
||||
# Author: Pavel Valena <pvalena@redhat.com>
|
||||
Patch15: 0015-fix-ossl-ignore-compiler-warnings.patch
|
||||
# fix: improve hostonly sloppy mode
|
||||
# Author: Jo Zzsi <jozzsicsataban@gmail.com>
|
||||
Patch16: 0016-fix-improve-hostonly-sloppy-mode.patch
|
||||
# fix(dracut.sh): don't pass empty string as dir
|
||||
# Author: David Tardon <dtardon@redhat.com>
|
||||
Patch17: 0017-fix-dracut.sh-don-t-pass-empty-string-as-dir.patch
|
||||
# feat(systemd): drop unnecessary dependency on libgcrypt
|
||||
# Author: Pavel Valena <pvalena@redhat.com>
|
||||
Patch18: 0018-feat-systemd-drop-unnecessary-dependency-on-libgcryp.patch
|
||||
# fix(kernel-modules-extra): remove stray \ before /
|
||||
# Author: Pavel Valena <pvalena@redhat.com>
|
||||
Patch19: 0019-fix-kernel-modules-extra-remove-stray-before.patch
|
||||
# Revert "fix(base): do not require chroot inside initramfs"
|
||||
# Author: Pavel Valena <pvalena@redhat.com>
|
||||
Patch20: 0020-Revert-fix-base-do-not-require-chroot-inside-initram.patch
|
||||
# fix: let check_vol_slaves_all return 1 when checks on all slaves fail
|
||||
# Author: Coiby Xu <coxu@redhat.com>
|
||||
Patch21: 0021-fix-let-check_vol_slaves_all-return-1-when-checks-on.patch
|
||||
# improvement(74nvmf): lookup required NIC kernel modules for NBFT interfaces
|
||||
# Author: Tomas Bzatek <tbzatek@redhat.com>
|
||||
Patch22: 0022-improvement-74nvmf-lookup-required-NIC-kernel-module.patch
|
||||
# fix(74nvmf): set root=nvmf
|
||||
# Author: Tomas Bzatek <tbzatek@redhat.com>
|
||||
Patch23: 0023-fix-74nvmf-set-root-nvmf.patch
|
||||
|
||||
# Please use source-git to work with this spec file:
|
||||
# HowTo: https://packit.dev/source-git/work-with-source-git
|
||||
@ -489,6 +513,17 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
|
||||
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
|
||||
|
||||
%changelog
|
||||
* Thu Aug 07 2025 Pavel Valena <pvalena@redhat.com> - 107-2
|
||||
- fix: improve hostonly sloppy mode
|
||||
- fix(dracut.sh): don't pass empty string as dir
|
||||
- feat(systemd): drop unnecessary dependency on libgcrypt
|
||||
- fix(kernel-modules-extra): remove stray before /
|
||||
- Revert "fix(base): do not require chroot inside initramfs"
|
||||
- fix: let check_vol_slaves_all return 1 when checks on all slaves fail
|
||||
- improvement(74nvmf): lookup required NIC kernel modules for NBFT interfaces
|
||||
- fix(74nvmf): set root=nvmf
|
||||
Resolves: RHEL-104223,RHEL-93173,RHEL-95542,RHEL-95897
|
||||
|
||||
* Thu Jul 17 2025 Pavel Valena <pvalena@redhat.com> - 107-1
|
||||
- Upgrade to dracut 107
|
||||
Resolves: RHEL-97473
|
||||
|
||||
Loading…
Reference in New Issue
Block a user