forked from pool/kdump
Accepting request 933926 from Kernel:kdump
- kdump-Store-kdump-initrd-in-kernel-image-path.patch: Fix kdumprd location for usrmerge kernels (boo#1190920). OBS-URL: https://build.opensuse.org/request/show/933926 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kdump?expand=0&rev=118
This commit is contained in:
commit
91c91ae092
54
kdump-Store-kdump-initrd-in-kernel-image-path.patch
Normal file
54
kdump-Store-kdump-initrd-in-kernel-image-path.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From: Petr Tesarik <ptesarik@suse.com>
|
||||||
|
Date: Thu Nov 25 21:40:15 2021 +0100
|
||||||
|
Subject: Store kdump initrd in the kernel image path
|
||||||
|
Upstream: merged
|
||||||
|
Git-commit: 202eef81d13fb0488f6e462e78ce20841a477c86
|
||||||
|
|
||||||
|
If the kernel image is a symlink, store the kdump initrd in the
|
||||||
|
same directory as the symlink. This fixes kdump for usrmerge
|
||||||
|
kernels, where the kernel image is under /usr.
|
||||||
|
|
||||||
|
Canonical path is still used to get the kernel version.
|
||||||
|
|
||||||
|
References: boo#1190920
|
||||||
|
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
||||||
|
|
||||||
|
---
|
||||||
|
kdumptool/findkernel.cc | 4 +---
|
||||||
|
kdumptool/kerneltool.cc | 5 ++---
|
||||||
|
2 files changed, 3 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
--- a/kdumptool/kerneltool.cc
|
||||||
|
+++ b/kdumptool/kerneltool.cc
|
||||||
|
@@ -142,7 +142,7 @@ bool KernelTool::stripImageName(const Fi
|
||||||
|
string &rest)
|
||||||
|
{
|
||||||
|
directory = kernelImage.dirName();
|
||||||
|
- KString kernel = kernelImage.baseName();
|
||||||
|
+ KString kernel = kernelImage.getCanonicalPath().baseName();
|
||||||
|
|
||||||
|
list<string> imageNames = KernelTool::imageNames(Util::getArch());
|
||||||
|
for (list<string>::const_iterator it = imageNames.begin();
|
||||||
|
@@ -470,8 +470,7 @@ Kconfig *KernelTool::retrieveKernelConfi
|
||||||
|
// at first, search for the config on disk
|
||||||
|
string dir, stripped;
|
||||||
|
|
||||||
|
- if (KernelTool::stripImageName(
|
||||||
|
- m_kernel.getCanonicalPath(), dir, stripped)) {
|
||||||
|
+ if (KernelTool::stripImageName(m_kernel, dir, stripped)) {
|
||||||
|
FilePath config = dir;
|
||||||
|
config.appendPath("config-" + stripped);
|
||||||
|
Debug::debug()->dbg("Trying %s for config", config.c_str());
|
||||||
|
--- a/kdumptool/findkernel.cc
|
||||||
|
+++ b/kdumptool/findkernel.cc
|
||||||
|
@@ -313,9 +313,7 @@ string FindKernel::findInitrd(const File
|
||||||
|
// use the resolved name, not the symlink to generate the initrd
|
||||||
|
FilePath dir;
|
||||||
|
string stripped;
|
||||||
|
- KernelTool::stripImageName(
|
||||||
|
- kernelPath.getCanonicalPath(), dir, stripped
|
||||||
|
- );
|
||||||
|
+ KernelTool::stripImageName(kernelPath, dir, stripped);
|
||||||
|
|
||||||
|
string dash;
|
||||||
|
if (stripped.size() > 0) {
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 25 21:04:51 UTC 2021 - Petr Tesařík <ptesarik@suse.com>
|
||||||
|
|
||||||
|
- kdump-Store-kdump-initrd-in-kernel-image-path.patch: Fix kdumprd
|
||||||
|
location for usrmerge kernels (boo#1190920).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri May 28 10:33:45 UTC 2021 - Petr Tesařík <ptesarik@suse.com>
|
Fri May 28 10:33:45 UTC 2021 - Petr Tesařík <ptesarik@suse.com>
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ Patch13: %{name}-do-not-iterate-past-end-of-string.patch
|
|||||||
Patch14: %{name}-fix-incorrect-exit-code-checking.patch
|
Patch14: %{name}-fix-incorrect-exit-code-checking.patch
|
||||||
Patch15: %{name}-avoid-endless-loop-on-EAI_AGAIN.patch
|
Patch15: %{name}-avoid-endless-loop-on-EAI_AGAIN.patch
|
||||||
Patch16: %{name}-install-real-resolv.conf.patch
|
Patch16: %{name}-install-real-resolv.conf.patch
|
||||||
|
Patch17: %{name}-Store-kdump-initrd-in-kernel-image-path.patch
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -63,7 +64,9 @@ Requires: makedumpfile
|
|||||||
Requires: openssh
|
Requires: openssh
|
||||||
# FIXME: use proper Requires(pre/post/preun/...)
|
# FIXME: use proper Requires(pre/post/preun/...)
|
||||||
PreReq: %fillup_prereq
|
PreReq: %fillup_prereq
|
||||||
PreReq: /usr/bin/mkdir /usr/bin/rm /usr/bin/touch
|
PreReq: /usr/bin/mkdir
|
||||||
|
PreReq: /usr/bin/rm
|
||||||
|
PreReq: /usr/bin/touch
|
||||||
Recommends: cifs-utils
|
Recommends: cifs-utils
|
||||||
Recommends: nfs-client
|
Recommends: nfs-client
|
||||||
# update should detect the split-off from kexec-tools
|
# update should detect the split-off from kexec-tools
|
||||||
@ -101,6 +104,7 @@ after a crash dump has occured.
|
|||||||
%patch14 -p1
|
%patch14 -p1
|
||||||
%patch15 -p1
|
%patch15 -p1
|
||||||
%patch16 -p1
|
%patch16 -p1
|
||||||
|
%patch17 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CXXFLAGS="%{optflags} -std=c++11"
|
export CXXFLAGS="%{optflags} -std=c++11"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user