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>
54 lines
1.5 KiB
Diff
54 lines
1.5 KiB
Diff
From 6fca9109dadc087265ccd785fbd60003ea69318c Mon Sep 17 00:00:00 2001
|
|
From: Philipp Rudo <prudo@redhat.com>
|
|
Date: Tue, 13 Aug 2024 16:29:39 +0200
|
|
Subject: [PATCH 09/16] mkdumprd: fix shellcheck warnings
|
|
|
|
Fix the shellcheck warnings for mkdumprd. With this
|
|
|
|
$ shellcheck -x mkdumprd
|
|
|
|
now returns without finding.
|
|
|
|
Signed-off-by: Philipp Rudo <prudo@redhat.com>
|
|
---
|
|
mkdumprd | 8 ++++++--
|
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/mkdumprd b/mkdumprd
|
|
index 27eed5e..7a35217 100644
|
|
--- a/mkdumprd
|
|
+++ b/mkdumprd
|
|
@@ -11,8 +11,11 @@ if [[ -f /etc/sysconfig/kdump ]]; then
|
|
fi
|
|
|
|
[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
|
|
-. $dracutbasedir/dracut-functions.sh
|
|
+# shellcheck source=/dev/null
|
|
+. "$dracutbasedir"/dracut-functions.sh
|
|
+# shellcheck source=SCRIPTDIR/kdump-lib.sh
|
|
. /lib/kdump/kdump-lib.sh
|
|
+# shellcheck source=SCRIPTDIR/kdump-logger.sh
|
|
. /lib/kdump/kdump-logger.sh
|
|
export IN_KDUMP=1
|
|
|
|
@@ -32,6 +35,7 @@ MKDUMPRD_TMPDIR="$(mktemp -d -t mkdumprd.XXXXXX)"
|
|
[ -d "$MKDUMPRD_TMPDIR" ] || perror_exit "dracut: mktemp -p -d -t dracut.XXXXXX failed."
|
|
MKDUMPRD_TMPMNT="$MKDUMPRD_TMPDIR/target"
|
|
|
|
+# shellcheck disable=SC2154
|
|
trap '
|
|
ret=$?;
|
|
is_mounted $MKDUMPRD_TMPMNT && umount -f $MKDUMPRD_TMPMNT;
|
|
@@ -256,7 +260,7 @@ check_user_configured_target()
|
|
verify_core_collector()
|
|
{
|
|
local _cmd="${1%% *}"
|
|
- local _params="${1#${_cmd}}"
|
|
+ local _params="${1#"${_cmd}"}"
|
|
|
|
if [[ $_cmd != "makedumpfile" ]]; then
|
|
if is_raw_dump_target; then
|
|
--
|
|
2.46.1
|
|
|