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 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
|
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
|
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
|
fi
|
||||||
|
|
||||||
# Install python-swss-common package and all its dependent packages
|
# Install python-swss-common package and all its dependent packages
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
# kdump-tools package
|
# kdump-tools package
|
||||||
|
|
||||||
KDUMP_TOOLS_VERSION_BASE = 1.6.1
|
KDUMP_TOOLS_VERSION = 1.6.8.4
|
||||||
KDUMP_TOOLS_VERSION = $(KDUMP_TOOLS_VERSION_BASE)-1
|
|
||||||
export KDUMP_TOOLS_VERSION_BASE
|
export KDUMP_TOOLS_VERSION_BASE
|
||||||
export KDUMP_TOOLS_VERSION
|
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
|
$(KDUMP_TOOLS)_SRC_PATH = $(SRC_PATH)/kdump-tools
|
||||||
SONIC_MAKE_DEBS += $(KDUMP_TOOLS)
|
SONIC_MAKE_DEBS += $(KDUMP_TOOLS)
|
||||||
|
|
||||||
|
@ -6,15 +6,11 @@ MAIN_TARGET = $(KDUMP_TOOLS)
|
|||||||
|
|
||||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||||
# Remove any stale files
|
# Remove any stale files
|
||||||
rm -rf ./makedumpfile_$(KDUMP_TOOLS_VERSION_BASE).orig.tar.gz ./makedumpfile_$(KDUMP_TOOLS_VERSION).debian.tar.xz
|
rm -rf ./kdump-tools-$(KDUMP_TOOLS_VERSION)*
|
||||||
rm -rf ./makedumpfile-$(KDUMP_TOOLS_VERSION_BASE)
|
|
||||||
|
|
||||||
# Get makedumpfile release
|
# Get kdump-tools release
|
||||||
wget http://deb.debian.org/debian/pool/main/m/makedumpfile/makedumpfile_$(KDUMP_TOOLS_VERSION_BASE).orig.tar.gz
|
dget https://deb.debian.org/debian/pool/main/k/kdump-tools/kdump-tools_$(KDUMP_TOOLS_VERSION).dsc
|
||||||
wget http://deb.debian.org/debian/pool/main/m/makedumpfile/makedumpfile_$(KDUMP_TOOLS_VERSION).debian.tar.xz
|
pushd ./kdump-tools-$(KDUMP_TOOLS_VERSION)
|
||||||
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
|
|
||||||
|
|
||||||
git init
|
git init
|
||||||
git add -f *
|
git add -f *
|
||||||
@ -25,7 +21,7 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
|||||||
stg import -s ../patch/series
|
stg import -s ../patch/series
|
||||||
|
|
||||||
# Build source and Debian packages
|
# 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
|
popd
|
||||||
|
|
||||||
# Move the newly-built .deb packages to the destination directory
|
# 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
|
diff --git a/debian/kdump-config.in b/debian/kdump-config.in
|
||||||
+++ b/debian/kdump-config 2019-10-24 12:16:23.791899000 -0700
|
index 564ab94..7396e54 100755
|
||||||
@@ -639,8 +639,8 @@
|
--- 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_STAMP=$(date +"%Y%m%d%H%M")
|
||||||
KDUMP_STAMPDIR=$(define_stampdir $KDUMP_STAMP)
|
KDUMP_STAMPDIR=$(define_stampdir "$KDUMP_STAMP" "$KDUMP_COREDIR")
|
||||||
- KDUMP_CORETEMP="$KDUMP_STAMPDIR/dump-incomplete"
|
- KDUMP_CORETEMP="$KDUMP_STAMPDIR/dump-incomplete$(compression_extension)"
|
||||||
- KDUMP_COREFILE="$KDUMP_STAMPDIR/dump.$KDUMP_STAMP"
|
- KDUMP_COREFILE="$KDUMP_STAMPDIR/dump.$KDUMP_STAMP$(compression_extension)"
|
||||||
+ KDUMP_CORETEMP="$KDUMP_STAMPDIR/kdump-incomplete"
|
+ KDUMP_CORETEMP="$KDUMP_STAMPDIR/kdump-incomplete$(compression_extension)"
|
||||||
+ KDUMP_COREFILE="$KDUMP_STAMPDIR/kdump.$KDUMP_STAMP"
|
+ KDUMP_COREFILE="$KDUMP_STAMPDIR/kdump.$KDUMP_STAMP$(compression_extension)"
|
||||||
KDUMP_DMESGFILE="$KDUMP_STAMPDIR/dmesg.$KDUMP_STAMP"
|
KDUMP_DMESGFILE="$KDUMP_STAMPDIR/dmesg.$KDUMP_STAMP"
|
||||||
|
|
||||||
# If we use NFS, verify that we can mount the FS
|
# If we use NFS, verify that we can mount the FS
|
||||||
@@ -755,8 +755,8 @@
|
@@ -928,8 +928,8 @@ kdump_save_core_to_ssh()
|
||||||
KDUMP_STAMP=`date +"%Y%m%d%H%M"`
|
SSH_STAMP=$(date +"%Y%m%d%H%M")
|
||||||
KDUMP_STAMPDIR=$(define_stampdir $KDUMP_STAMP)
|
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
|
0002-core-file-prefixed-by-kdump.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user