Update kdump-tools for bullseye
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
This commit is contained in:
parent
06d793e985
commit
2b0ad74db6
@ -293,6 +293,11 @@ if [[ $CONFIGURED_ARCH == amd64 ]]; then
|
||||
sudo DEBIAN_FRONTEND=noninteractive dpkg --root=$FILESYSTEM_ROOT -i $debs_path/kdump-tools_*.deb || \
|
||||
sudo LANG=C DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true chroot $FILESYSTEM_ROOT apt-get -q --no-install-suggests --no-install-recommends install
|
||||
cat $IMAGE_CONFIGS/kdump/kdump-tools | sudo tee -a $FILESYSTEM_ROOT/etc/default/kdump-tools > /dev/null
|
||||
|
||||
for kernel_release in $(ls $FILESYSTEM_ROOT/lib/modules/); do
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT /etc/kernel/postinst.d/kdump-tools $kernel_release > /dev/null 2>&1
|
||||
sudo LANG=C chroot $FILESYSTEM_ROOT kdump-config symlinks $kernel_release
|
||||
done
|
||||
fi
|
||||
|
||||
# Install python-swss-common package and all its dependent packages
|
||||
|
@ -1,11 +1,10 @@
|
||||
# kdump-tools package
|
||||
|
||||
KDUMP_TOOLS_VERSION_BASE = 1.6.1
|
||||
KDUMP_TOOLS_VERSION = $(KDUMP_TOOLS_VERSION_BASE)-1
|
||||
KDUMP_TOOLS_VERSION = 1.6.8.4
|
||||
export KDUMP_TOOLS_VERSION_BASE
|
||||
export KDUMP_TOOLS_VERSION
|
||||
|
||||
KDUMP_TOOLS = kdump-tools_$(KDUMP_TOOLS_VERSION)_all.deb
|
||||
KDUMP_TOOLS = kdump-tools_$(KDUMP_TOOLS_VERSION)_$(CONFIGURED_ARCH).deb
|
||||
$(KDUMP_TOOLS)_SRC_PATH = $(SRC_PATH)/kdump-tools
|
||||
SONIC_MAKE_DEBS += $(KDUMP_TOOLS)
|
||||
|
||||
|
@ -6,15 +6,11 @@ MAIN_TARGET = $(KDUMP_TOOLS)
|
||||
|
||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
# Remove any stale files
|
||||
rm -rf ./makedumpfile_$(KDUMP_TOOLS_VERSION_BASE).orig.tar.gz ./makedumpfile_$(KDUMP_TOOLS_VERSION).debian.tar.xz
|
||||
rm -rf ./makedumpfile-$(KDUMP_TOOLS_VERSION_BASE)
|
||||
rm -rf ./kdump-tools-$(KDUMP_TOOLS_VERSION)*
|
||||
|
||||
# Get makedumpfile release
|
||||
wget http://deb.debian.org/debian/pool/main/m/makedumpfile/makedumpfile_$(KDUMP_TOOLS_VERSION_BASE).orig.tar.gz
|
||||
wget http://deb.debian.org/debian/pool/main/m/makedumpfile/makedumpfile_$(KDUMP_TOOLS_VERSION).debian.tar.xz
|
||||
tar -f makedumpfile_$(KDUMP_TOOLS_VERSION_BASE).orig.tar.gz -x
|
||||
pushd ./makedumpfile-$(KDUMP_TOOLS_VERSION_BASE)
|
||||
tar -f ../makedumpfile_$(KDUMP_TOOLS_VERSION).debian.tar.xz -x
|
||||
# Get kdump-tools release
|
||||
dget https://deb.debian.org/debian/pool/main/k/kdump-tools/kdump-tools_$(KDUMP_TOOLS_VERSION).dsc
|
||||
pushd ./kdump-tools-$(KDUMP_TOOLS_VERSION)
|
||||
|
||||
git init
|
||||
git add -f *
|
||||
@ -25,7 +21,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
stg import -s ../patch/series
|
||||
|
||||
# Build source and Debian packages
|
||||
dpkg-buildpackage -rfakeroot -b -us -uc -Tbinary-indep -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
|
||||
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS) --admindir $(SONIC_DPKG_ADMINDIR)
|
||||
popd
|
||||
|
||||
# Move the newly-built .deb packages to the destination directory
|
||||
|
@ -1,41 +0,0 @@
|
||||
From 7e6c0d5b0c7299154f75f281c02cf02cf85fb80e Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Drung <benjamin.drung@profitbricks.com>
|
||||
Date: Thu, 2 Mar 2017 19:52:23 +0100
|
||||
Subject: [PATCH] Generate initramfs for installed kernels in chroot
|
||||
|
||||
The postinst script from kdump-tools creates an initramfs for the
|
||||
running kernel. When running inside a chroot, the running kernel (from
|
||||
the host) might differ from the kernels that are available in the
|
||||
chroot.
|
||||
|
||||
Thus generate the initramfs only when the running kernel is installed in
|
||||
the system. Otherwise generate the initramfs for all installed kernels.
|
||||
|
||||
Bug-Debian: #856594
|
||||
---
|
||||
debian/kdump-tools.postinst | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/debian/kdump-tools.postinst b/debian/kdump-tools.postinst
|
||||
index 4b6c6be..f604c8e 100755
|
||||
--- a/debian/kdump-tools.postinst
|
||||
+++ b/debian/kdump-tools.postinst
|
||||
@@ -33,7 +33,15 @@ update_param() {
|
||||
case "$1" in
|
||||
configure)
|
||||
# create smaller initrd.img files for kdump use
|
||||
- /etc/kernel/postinst.d/kdump-tools $(uname -r) > /dev/null 2>&1
|
||||
+ if test -d /lib/modules/$(uname -r); then
|
||||
+ /etc/kernel/postinst.d/kdump-tools $(uname -r) > /dev/null 2>&1
|
||||
+ else
|
||||
+ # Running kernel not installed. Running in chroot?
|
||||
+ for kernel_release in $(ls /lib/modules/); do
|
||||
+ /etc/kernel/postinst.d/kdump-tools $kernel_release > /dev/null 2>&1
|
||||
+ kdump-config symlinks $kernel_release
|
||||
+ done
|
||||
+ fi
|
||||
|
||||
# Customize crashkernel= value according to architecture
|
||||
ARCH="$(arch)"
|
||||
--
|
||||
2.9.3
|
@ -1,24 +1,26 @@
|
||||
--- a/debian/kdump-config.orig 2019-10-24 09:38:19.006679000 -0700
|
||||
+++ b/debian/kdump-config 2019-10-24 12:16:23.791899000 -0700
|
||||
@@ -639,8 +639,8 @@
|
||||
diff --git a/debian/kdump-config.in b/debian/kdump-config.in
|
||||
index 564ab94..7396e54 100755
|
||||
--- a/debian/kdump-config.in
|
||||
+++ b/debian/kdump-config.in
|
||||
@@ -728,8 +728,8 @@ kdump_save_core()
|
||||
{
|
||||
KDUMP_STAMP=`date +"%Y%m%d%H%M"`
|
||||
KDUMP_STAMPDIR=$(define_stampdir $KDUMP_STAMP)
|
||||
- KDUMP_CORETEMP="$KDUMP_STAMPDIR/dump-incomplete"
|
||||
- KDUMP_COREFILE="$KDUMP_STAMPDIR/dump.$KDUMP_STAMP"
|
||||
+ KDUMP_CORETEMP="$KDUMP_STAMPDIR/kdump-incomplete"
|
||||
+ KDUMP_COREFILE="$KDUMP_STAMPDIR/kdump.$KDUMP_STAMP"
|
||||
KDUMP_STAMP=$(date +"%Y%m%d%H%M")
|
||||
KDUMP_STAMPDIR=$(define_stampdir "$KDUMP_STAMP" "$KDUMP_COREDIR")
|
||||
- KDUMP_CORETEMP="$KDUMP_STAMPDIR/dump-incomplete$(compression_extension)"
|
||||
- KDUMP_COREFILE="$KDUMP_STAMPDIR/dump.$KDUMP_STAMP$(compression_extension)"
|
||||
+ KDUMP_CORETEMP="$KDUMP_STAMPDIR/kdump-incomplete$(compression_extension)"
|
||||
+ KDUMP_COREFILE="$KDUMP_STAMPDIR/kdump.$KDUMP_STAMP$(compression_extension)"
|
||||
KDUMP_DMESGFILE="$KDUMP_STAMPDIR/dmesg.$KDUMP_STAMP"
|
||||
|
||||
# If we use NFS, verify that we can mount the FS
|
||||
@@ -755,8 +755,8 @@
|
||||
KDUMP_STAMP=`date +"%Y%m%d%H%M"`
|
||||
KDUMP_STAMPDIR=$(define_stampdir $KDUMP_STAMP)
|
||||
@@ -928,8 +928,8 @@ kdump_save_core_to_ssh()
|
||||
SSH_STAMP=$(date +"%Y%m%d%H%M")
|
||||
SSH_STAMPDIR=$(define_stampdir "$SSH_STAMP" "$KDUMP_COREDIR")
|
||||
|
||||
- SSH_CORETEMP="$SSH_STAMPDIR/dump-incomplete$(compression_extension)"
|
||||
- SSH_COREFILE="$SSH_STAMPDIR/dump.$SSH_STAMP$(compression_extension)"
|
||||
+ SSH_CORETEMP="$SSH_STAMPDIR/kdump-incomplete$(compression_extension)"
|
||||
+ SSH_COREFILE="$SSH_STAMPDIR/kdump.$SSH_STAMP$(compression_extension)"
|
||||
SSH_TMPDMESG="/tmp/dmesg.ssh.$SSH_STAMP"
|
||||
SSH_DMESGFILE="$SSH_STAMPDIR/dmesg.$SSH_STAMP"
|
||||
|
||||
- KDUMP_CORETEMP="$KDUMP_STAMPDIR/dump-incomplete"
|
||||
- KDUMP_COREFILE="$KDUMP_STAMPDIR/dump.$KDUMP_STAMP"
|
||||
+ KDUMP_CORETEMP="$KDUMP_STAMPDIR/kdump-incomplete"
|
||||
+ KDUMP_COREFILE="$KDUMP_STAMPDIR/kdump.$KDUMP_STAMP"
|
||||
KDUMP_TMPDMESG="/tmp/dmesg.$KDUMP_STAMP"
|
||||
KDUMP_DMESGFILE="$KDUMP_STAMPDIR/dmesg.$KDUMP_STAMP"
|
||||
ERROR=0
|
||||
|
@ -1,2 +1 @@
|
||||
0001-Generate-initramfs-for-installed-kernels-in-chroot.patch
|
||||
0002-core-file-prefixed-by-kdump.patch
|
||||
|
Loading…
Reference in New Issue
Block a user