d38412baaf
Resolves: RHEL-50942 Upstream: https://github.com/rhkdump/kdump-utils.git Conflict: Dropped hunks concerning OVS bridge support in patch 3 and 5 due to missing 224d310 ("Support setting up Open vSwitch (Ovs) Bridge network") Also contains upstream commit commit 2970176d9e9b7b6a1191a9ee54423d2f1c56fbaf Author: Philipp Rudo <prudo@redhat.com> Date: Tue Sep 24 10:39:32 2024 +0200 spec: fix patching of files in subdirectories With 23df04b ("dracut: create sub-directories for dracut modules") the dracut modules were moved to subdirectories. This causes problems when someone wants to include a patch to the spec file to change one of the files in those subdirectories. Reason is that '%autosetup' in the spec file calls 'patch' per default. 'patch' however, will strip all directories when it is called without option -p. Which means that it will search the file in the root directory and then fail because it cannot find it. Thus add option -p1 to '%autosetup' which will be passed on to 'patch'. Choose -p1 as that will work with the most common patch creation tools like git and packit. Signed-off-by: Philipp Rudo <prudo@redhat.com> Signed-off-by: Philipp Rudo <prudo@redhat.com>
87 lines
2.7 KiB
Diff
87 lines
2.7 KiB
Diff
From 1b262cde62fed38f124ed2cdf408ae01de508efc Mon Sep 17 00:00:00 2001
|
|
From: Philipp Rudo <prudo@redhat.com>
|
|
Date: Tue, 13 Aug 2024 16:12:35 +0200
|
|
Subject: [PATCH 06/16] 99earlykdump: fix shellcheck warnings
|
|
|
|
Fix the shellcheck warnings for 99earlykdump. With this
|
|
|
|
$ shellcheck -x dracut/99earlykdump/*.sh
|
|
|
|
now returns without finding.
|
|
|
|
Signed-off-by: Philipp Rudo <prudo@redhat.com>
|
|
---
|
|
dracut/99earlykdump/early-kdump.sh | 5 +++++
|
|
dracut/99earlykdump/module-setup.sh | 5 +++++
|
|
2 files changed, 10 insertions(+)
|
|
|
|
diff --git a/dracut/99earlykdump/early-kdump.sh b/dracut/99earlykdump/early-kdump.sh
|
|
index a355010..c56ed82 100755
|
|
--- a/dracut/99earlykdump/early-kdump.sh
|
|
+++ b/dracut/99earlykdump/early-kdump.sh
|
|
@@ -8,9 +8,13 @@ EARLY_KDUMP_KERNEL=""
|
|
EARLY_KDUMP_CMDLINE=""
|
|
EARLY_KEXEC_ARGS=""
|
|
|
|
+# shellcheck source=/dev/null
|
|
. /etc/sysconfig/kdump
|
|
+# shellcheck source=/dev/null
|
|
. /lib/dracut-lib.sh
|
|
+# shellcheck source=SCRIPTDIR/../../kdump-lib.sh
|
|
. /lib/kdump-lib.sh
|
|
+# shellcheck source=SCRIPTDIR/../../kdump-logger.sh
|
|
. /lib/kdump-logger.sh
|
|
|
|
# initiate the kdump logger
|
|
@@ -41,6 +45,7 @@ early_kdump_load() {
|
|
|
|
prepare_parameters
|
|
|
|
+ # shellcheck disable=SC2153
|
|
EARLY_KEXEC_ARGS=$(prepare_kexec_args "${KEXEC_ARGS}")
|
|
|
|
# Here, only output the messages, but do not save these messages
|
|
diff --git a/dracut/99earlykdump/module-setup.sh b/dracut/99earlykdump/module-setup.sh
|
|
index 0451118..98486c5 100755
|
|
--- a/dracut/99earlykdump/module-setup.sh
|
|
+++ b/dracut/99earlykdump/module-setup.sh
|
|
@@ -1,5 +1,6 @@
|
|
#!/bin/bash
|
|
|
|
+# shellcheck source=/dev/null
|
|
. /etc/sysconfig/kdump
|
|
|
|
KDUMP_KERNEL=""
|
|
@@ -19,11 +20,13 @@ depends() {
|
|
}
|
|
|
|
prepare_kernel_initrd() {
|
|
+ # shellcheck source=SCRIPTDIR/../../kdump-lib.sh
|
|
. /lib/kdump/kdump-lib.sh
|
|
|
|
prepare_kdump_bootinfo
|
|
|
|
# $kernel is a variable from dracut
|
|
+ # shellcheck disable=SC2154
|
|
if [[ $KDUMP_KERNELVER != "$kernel" ]]; then
|
|
dwarn "Using kernel version '$KDUMP_KERNELVER' for early kdump," \
|
|
"but the initramfs is generated for kernel version '$kernel'"
|
|
@@ -54,6 +57,7 @@ install() {
|
|
inst_script "/lib/kdump/kdump-lib.sh" "/lib/kdump-lib.sh"
|
|
inst_script "/lib/kdump/kdump-lib-initramfs.sh" "/lib/kdump/kdump-lib-initramfs.sh"
|
|
inst_script "/lib/kdump/kdump-logger.sh" "/lib/kdump-logger.sh"
|
|
+ # shellcheck disable=SC2154
|
|
inst_hook cmdline 00 "$moddir/early-kdump.sh"
|
|
inst_binary "$KDUMP_KERNEL"
|
|
inst_binary "$KDUMP_INITRD"
|
|
@@ -61,5 +65,6 @@ install() {
|
|
ln_r "$KDUMP_KERNEL" "/boot/kernel-earlykdump"
|
|
ln_r "$KDUMP_INITRD" "/boot/initramfs-earlykdump"
|
|
|
|
+ # shellcheck disable=SC2154
|
|
chmod -x "${initdir}/$KDUMP_KERNEL"
|
|
}
|
|
--
|
|
2.46.1
|
|
|