Debian: add kdump-tools package.

There is a need to modify the source code of the kdump-tools package to
adapt it to Debian-based StarlingX. This commit replaces the binary
package with a source package.

The default kernel image is located at /boot/vmlinuz-${kernel_version}
in Debian system. But it is /boot/1/vmlinuz-${kernel_version} in the
current starlingx system. In addition, initrd.img is also different
because we use ostree. So this commit creates two soft links for
vmlinuz and initrd.img.

Test Plan:
PASS: Image builds successfully.
PASS: kdump-tools installs successfully.
PASS: Can generate vmcore files in /var/crash after kernel panic.

Story: 2009964
Task: 45623

Depends-On: https://review.opendev.org/c/starlingx/tools/+/845886
Depends-On: https://review.opendev.org/c/starlingx/tools/+/845884

Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
Change-Id: Ifffbf0e436e79d9547a478f8b725e18f283d138e
This commit is contained in:
Jiping Ma 2022-06-14 02:48:59 +00:00 committed by Jiping Ma
parent 8dd7885e4e
commit c2e79d80b5
5 changed files with 47 additions and 0 deletions

View File

@ -1,6 +1,7 @@
# List of packages to be included/installed in ISO
facter
kdump-tools
puppet
drbd-tools
parted

View File

@ -82,3 +82,4 @@ security/python-keyring
security/shim-unsigned
security/openscap
storage-drivers/trident-installer
tools/kdump-tools

View File

@ -0,0 +1,33 @@
From bc657ad181e105e225849a78fd08ddcb630cb9e9 Mon Sep 17 00:00:00 2001
From: Jiping Ma <jiping.ma2@windriver.com>
Date: Sun, 12 Jun 2022 23:54:50 -0700
Subject: [PATCH] kdump-tools: add vmlinuz and initrd.img soft link.
Default vmlinuz is in the folder /boot, but our vmlinuz is in /boot/1.
so create the soft link for vmlinuz and initrd.img.
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
---
debian/kdump-config.in | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/debian/kdump-config.in b/debian/kdump-config.in
index 564ab94..eb23da1 100755
--- a/debian/kdump-config.in
+++ b/debian/kdump-config.in
@@ -494,6 +494,12 @@ kernel_version=$1
exit 1
fi
+ if [ ! -e "/boot/vmlinux-${kernel_version}" ] && [ ! -e "/boot/vmlinuz-${kernel_version}" ]; then
+ ln -s /boot/1/vmlinuz-${kernel_version} /boot/vmlinuz-${kernel_version}
+ fi
+ if [ ! -f "${KDUMP_DIR}/initrd.img-${kernel_version}" ]; then
+ ln -s /boot/1/initramfs /var/lib/kdump/initrd.img-${kernel_version}
+ fi
if [ -e "/boot/vmlinux-${kernel_version}" ] || [ -e "/boot/vmlinuz-${kernel_version}" ]; then
create_symlink vmlinuz "$kernel_version"
--
2.34.1

View File

@ -0,0 +1 @@
0001-kdump-tools-add-vmlinuz-and-initrd.img-soft-link.patch

View File

@ -0,0 +1,11 @@
---
debver: 1:1.6.8.4
debname: kdump-tools
dl_path:
name: kdump-tools_1.6.8.4.tar.xz
url: "https://deb.debian.org/debian/pool/main/k/kdump-tools/kdump-tools_1.6.8.4.tar.xz"
md5sum: 26bcae7c27b729d614a4a85e2a01cb64
sha256sum: 5d91fb4277e305e7d621d0205131ca69e1677a10645f74657e0e0eaaf2f73fe7
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true