forked from pool/kdump
Accepting request 157672 from Kernel:kdump
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/157672 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kdump?expand=0&rev=55
This commit is contained in:
commit
8274184d28
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:a34cf1e389876fc28f7f361b1cd689a14521592edca01c7a757947615f7cf138
|
|
||||||
size 92128
|
|
3
kdump-0.8.2.tar.bz2
Normal file
3
kdump-0.8.2.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:eaa918aefa9e9124762293700e76f1c21f34fcf14fa3711ca2d0bbf4be273669
|
||||||
|
size 99742
|
@ -1,71 +0,0 @@
|
|||||||
From: Jeff Mahoney <jeffm@suse.com>
|
|
||||||
Subject: kdump: Add 'none' format
|
|
||||||
|
|
||||||
Now that we have the ability to dump the dmesg log after a crash, it's
|
|
||||||
useful for users who don't have any use for a crash dump other than
|
|
||||||
to generate the dmesg log to avoid saving the dump at all. This avoids
|
|
||||||
both using the disk space required for a lot as well as the time
|
|
||||||
involved in waiting for the dump to complete only to later have to
|
|
||||||
remove it manually.
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
||||||
---
|
|
||||||
kdumptool/savedump.cc | 17 ++++++++++-------
|
|
||||||
sysconfig.kdump | 5 +++--
|
|
||||||
2 files changed, 13 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
--- a/kdumptool/savedump.cc
|
|
||||||
+++ b/kdumptool/savedump.cc
|
|
||||||
@@ -277,12 +277,13 @@ void SaveDump::saveDump()
|
|
||||||
|
|
||||||
bool useElf = strcasestr(dumpformat.c_str(), "elf") != NULL;
|
|
||||||
bool useCompressed = strcasestr(dumpformat.c_str(), "compressed") != NULL;
|
|
||||||
+ bool noDump = strcasestr(dumpformat.c_str(), "none") != NULL;
|
|
||||||
|
|
||||||
if (useElf && dumplevel == 0) {
|
|
||||||
// use file source?
|
|
||||||
provider = new FileDataProvider(m_dump.c_str());
|
|
||||||
m_useMakedumpfile = false;
|
|
||||||
- } else {
|
|
||||||
+ } else if (!noDump) {
|
|
||||||
// use makedumpfile
|
|
||||||
stringstream cmdline;
|
|
||||||
cmdline << "makedumpfile ";
|
|
||||||
@@ -316,12 +317,14 @@ void SaveDump::saveDump()
|
|
||||||
cout << "Saving dump using makedumpfile" << endl;
|
|
||||||
terminal.printLine();
|
|
||||||
}
|
|
||||||
- TerminalProgress progress("Saving dump");
|
|
||||||
- if (config->getVerbose() & Configuration::VERB_PROGRESS)
|
|
||||||
- provider->setProgress(&progress);
|
|
||||||
- else
|
|
||||||
- cout << "Saving dump ..." << endl;
|
|
||||||
- m_transfer->perform(provider, "vmcore", &m_usedDirectSave);
|
|
||||||
+ if (provider) {
|
|
||||||
+ TerminalProgress progress("Saving dump");
|
|
||||||
+ if (config->getVerbose() & Configuration::VERB_PROGRESS)
|
|
||||||
+ provider->setProgress(&progress);
|
|
||||||
+ else
|
|
||||||
+ cout << "Saving dump ..." << endl;
|
|
||||||
+ m_transfer->perform(provider, "vmcore", &m_usedDirectSave);
|
|
||||||
+ }
|
|
||||||
m_transfer->perform(logProvider, "dmesg.txt", NULL);
|
|
||||||
if (m_useMakedumpfile)
|
|
||||||
terminal.printLine();
|
|
||||||
--- a/sysconfig.kdump
|
|
||||||
+++ b/sysconfig.kdump
|
|
||||||
@@ -154,11 +154,12 @@ KDUMP_VERBOSE=3
|
|
||||||
#
|
|
||||||
KDUMP_DUMPLEVEL=0
|
|
||||||
|
|
||||||
-## Type: list(,compressed,ELF)
|
|
||||||
+## Type: list(,compressed,ELF,none)
|
|
||||||
## Default: "compressed"
|
|
||||||
## ServiceRestart: kdump
|
|
||||||
#
|
|
||||||
-# This variable specifies the dump format.
|
|
||||||
+# This variable specifies the dump format. Using the 'none' option will
|
|
||||||
+# skip capturing the dump entirely and only save the log messages.
|
|
||||||
#
|
|
||||||
# See also: kdump(5).
|
|
||||||
KDUMP_DUMPFORMAT="compressed"
|
|
@ -1,12 +0,0 @@
|
|||||||
Index: kdump-0.8.1/kdumptool/util.cc
|
|
||||||
===================================================================
|
|
||||||
--- kdump-0.8.1.orig/kdumptool/util.cc
|
|
||||||
+++ kdump-0.8.1/kdumptool/util.cc
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
|
|
||||||
#include <libelf.h>
|
|
@ -1,27 +0,0 @@
|
|||||||
From: Jeff Mahoney <jeffm@suse.com>
|
|
||||||
Subject: kdump: Allow format to be a list
|
|
||||||
|
|
||||||
/etc/sysconfig/kdump specifies that the KDUMP_FORMAT variable is a comma
|
|
||||||
separated list of options. The kdumptool itself doesn't treat it as a list
|
|
||||||
and will ignore all options if more than one is specified.
|
|
||||||
|
|
||||||
This patch searches for the option and uses it if it is present.
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
||||||
---
|
|
||||||
kdumptool/savedump.cc | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/kdumptool/savedump.cc
|
|
||||||
+++ b/kdumptool/savedump.cc
|
|
||||||
@@ -275,8 +275,8 @@ void SaveDump::saveDump()
|
|
||||||
string dumpformat = config->getDumpFormat();
|
|
||||||
DataProvider *provider;
|
|
||||||
|
|
||||||
- bool useElf = strcasecmp(dumpformat.c_str(), "elf") == 0;
|
|
||||||
- bool useCompressed = strcasecmp(dumpformat.c_str(), "compressed") == 0;
|
|
||||||
+ bool useElf = strcasestr(dumpformat.c_str(), "elf") != NULL;
|
|
||||||
+ bool useCompressed = strcasestr(dumpformat.c_str(), "compressed") != NULL;
|
|
||||||
|
|
||||||
if (useElf && dumplevel == 0) {
|
|
||||||
// use file source?
|
|
@ -1,36 +0,0 @@
|
|||||||
Index: kdump-0.8.1/kdumptool/dataprovider.cc
|
|
||||||
===================================================================
|
|
||||||
--- kdump-0.8.1.orig/kdumptool/dataprovider.cc
|
|
||||||
+++ kdump-0.8.1/kdumptool/dataprovider.cc
|
|
||||||
@@ -20,6 +20,7 @@
|
|
||||||
#include <cstdarg>
|
|
||||||
#include <cerrno>
|
|
||||||
#include <algorithm>
|
|
||||||
+#include <unistd.h>
|
|
||||||
|
|
||||||
#include "dataprovider.h"
|
|
||||||
#include "global.h"
|
|
||||||
Index: kdump-0.8.1/kdumptool/debug.cc
|
|
||||||
===================================================================
|
|
||||||
--- kdump-0.8.1.orig/kdumptool/debug.cc
|
|
||||||
+++ kdump-0.8.1/kdumptool/debug.cc
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
#include <cstring>
|
|
||||||
#include <string>
|
|
||||||
#include <sstream>
|
|
||||||
+#include <unistd.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
Index: kdump-0.8.1/kdumptool/socket.cc
|
|
||||||
===================================================================
|
|
||||||
--- kdump-0.8.1.orig/kdumptool/socket.cc
|
|
||||||
+++ kdump-0.8.1/kdumptool/socket.cc
|
|
||||||
@@ -16,6 +16,7 @@
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
||||||
* 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
+#include <unistd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netdb.h>
|
|
@ -1,42 +0,0 @@
|
|||||||
From: Jeff Mahoney <jeffm@suse.com>
|
|
||||||
Subject: kdump: Save dmesg during dump
|
|
||||||
|
|
||||||
makedumpfile added a --dump-dmesg option in version 1.4.0. This allows
|
|
||||||
users to capture just the log messages rather than setting up a full
|
|
||||||
development environment to generate it.
|
|
||||||
|
|
||||||
It will also work on the generated vmcore, but just dumping in in
|
|
||||||
$DIR/$TIMESTAMP/dmesg.txt and asking users to attach that file to bug
|
|
||||||
reports is a lot easier for everyone involved.
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
||||||
---
|
|
||||||
kdumptool/savedump.cc | 9 +++++++++
|
|
||||||
sysconfig.kdump | 5 +++--
|
|
||||||
2 files changed, 12 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- a/kdumptool/savedump.cc
|
|
||||||
+++ b/kdumptool/savedump.cc
|
|
||||||
@@ -302,6 +302,14 @@ void SaveDump::saveDump()
|
|
||||||
m_useMakedumpfile = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // Save a copy of dmesg
|
|
||||||
+ DataProvider *logProvider;
|
|
||||||
+ string logDirectCmdline = "makedumpfile --dump-dmesg " + m_dump;
|
|
||||||
+ string logPipeCmdline = "makedumpfile --dump-dmesg -F " + m_dump;
|
|
||||||
+
|
|
||||||
+ logProvider = new ProcessDataProvider(logPipeCmdline.c_str(),
|
|
||||||
+ logDirectCmdline.c_str());
|
|
||||||
+
|
|
||||||
try {
|
|
||||||
Terminal terminal;
|
|
||||||
if (m_useMakedumpfile) {
|
|
||||||
@@ -314,6 +322,7 @@ void SaveDump::saveDump()
|
|
||||||
else
|
|
||||||
cout << "Saving dump ..." << endl;
|
|
||||||
m_transfer->perform(provider, "vmcore", &m_usedDirectSave);
|
|
||||||
+ m_transfer->perform(logProvider, "dmesg.txt", NULL);
|
|
||||||
if (m_useMakedumpfile)
|
|
||||||
terminal.printLine();
|
|
||||||
} catch (...) {
|
|
@ -1,28 +0,0 @@
|
|||||||
From: Jeff Mahoney <jeffm@suse.com>
|
|
||||||
Subject: kdump: Use correct script location in udev rule
|
|
||||||
|
|
||||||
The kdump init script is located at /etc/init.d/boot.kdump, so point there.
|
|
||||||
|
|
||||||
This fixes seeing a bunch of these messages during every boot:
|
|
||||||
Ä 12.264399Ü udevdÄ916Ü: failed to execute '/etc/init.d/kdump' '/etc/init.d/kdump try-restart': No such file or directory
|
|
||||||
|
|
||||||
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
||||||
---
|
|
||||||
70-kdump.rules | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
--- a/70-kdump.rules
|
|
||||||
+++ b/70-kdump.rules
|
|
||||||
@@ -5,8 +5,8 @@
|
|
||||||
# Novell Bug #389658
|
|
||||||
#
|
|
||||||
|
|
||||||
-SUBSYSTEM=="cpu", ACTION=="online", PROGRAM="/etc/init.d/kdump try-restart"
|
|
||||||
-SUBSYSTEM=="cpu", ACTION=="offline", PROGRAM="/etc/init.d/kdump try-restart"
|
|
||||||
-SUBSYSTEM=="memory", ACTION=="add", PROGRAM="/etc/init.d/kdump try-restart"
|
|
||||||
-SUBSYSTEM=="memory", ACTION=="remove", PROGRAM="/etc/init.d/kdump try-restart"
|
|
||||||
+SUBSYSTEM=="cpu", ACTION=="online", PROGRAM="/etc/init.d/boot.kdump try-restart"
|
|
||||||
+SUBSYSTEM=="cpu", ACTION=="offline", PROGRAM="/etc/init.d/boot.kdump try-restart"
|
|
||||||
+SUBSYSTEM=="memory", ACTION=="add", PROGRAM="/etc/init.d/boot.kdump try-restart"
|
|
||||||
+SUBSYSTEM=="memory", ACTION=="remove", PROGRAM="/etc/init.d/boot.kdump try-restart"
|
|
||||||
|
|
@ -1,3 +1,31 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 2 16:05:51 UTC 2013 - ptesarik@suse.cz
|
||||||
|
|
||||||
|
- Fix the broken package rename from kdump-helpers.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 2 15:38:25 UTC 2013 - ptesarik@suse.cz
|
||||||
|
|
||||||
|
- Update to 0.8.2
|
||||||
|
o FATE#314283: kdump: log-only mode
|
||||||
|
o checking of SSH keys
|
||||||
|
o lots of cleanups and bugfixes
|
||||||
|
- Drop the following patches (included in upstream now):
|
||||||
|
o kdump-fix-gcc46.diff
|
||||||
|
o kdump-gcc47.patch
|
||||||
|
o kdump-save-log
|
||||||
|
o kdump-add-none-format
|
||||||
|
o kdump-udev-rule
|
||||||
|
o kdump-usrmerge.patch
|
||||||
|
- kdump-format-list: Dropped (wrong).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 7 22:16:04 UTC 2012 - crrodriguez@opensuse.org
|
||||||
|
|
||||||
|
- Since the /usr merge, the mkinitrd bits are broken
|
||||||
|
since tools have changed locations.
|
||||||
|
- Recommend nfs-client and cifs-utils too.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 11 03:45:19 UTC 2012 - jeffm@suse.com.
|
Wed Apr 11 03:45:19 UTC 2012 - jeffm@suse.com.
|
||||||
|
|
||||||
|
26
kdump.spec
26
kdump.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package kdump
|
# spec file for package kdump
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -19,7 +19,7 @@
|
|||||||
Url: http://freehg.org/u/bwalle/kdump/
|
Url: http://freehg.org/u/bwalle/kdump/
|
||||||
|
|
||||||
Name: kdump
|
Name: kdump
|
||||||
Version: 0.8.1
|
Version: 0.8.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Requires: curl
|
Requires: curl
|
||||||
Requires: makedumpfile
|
Requires: makedumpfile
|
||||||
@ -33,6 +33,7 @@ BuildRequires: gcc-c++
|
|||||||
BuildRequires: libcurl-devel
|
BuildRequires: libcurl-devel
|
||||||
BuildRequires: libelf0-devel
|
BuildRequires: libelf0-devel
|
||||||
BuildRequires: libesmtp-devel
|
BuildRequires: libesmtp-devel
|
||||||
|
BuildRequires: libopenssl-devel
|
||||||
BuildRequires: libxslt
|
BuildRequires: libxslt
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
#!BuildIgnore: fop
|
#!BuildIgnore: fop
|
||||||
@ -42,20 +43,14 @@ BuildRequires: libssh2-devel
|
|||||||
PreReq: %insserv_prereq %fillup_prereq mkinitrd
|
PreReq: %insserv_prereq %fillup_prereq mkinitrd
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
Source2: %{name}-%{version}-rpmlintrc
|
Source2: %{name}-%{version}-rpmlintrc
|
||||||
Patch0: %{name}-fix-gcc46.diff
|
|
||||||
Patch1: kdump-gcc47.patch
|
|
||||||
Patch2: kdump-format-list
|
|
||||||
Patch3: kdump-save-log
|
|
||||||
Patch4: kdump-add-none-format
|
|
||||||
Patch5: kdump-udev-rule
|
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
# rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2)
|
# rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2)
|
||||||
Provides: kdump-helpers = 0.2.4
|
Provides: kdump-helpers = %{version}
|
||||||
Obsoletes: kdump-helpers <= 0.2.4
|
Obsoletes: kdump-helpers < %{version}
|
||||||
# update should detect the split-off from kexec-tools
|
# update should detect the split-off from kexec-tools
|
||||||
Provides: kexec-tools:/etc/init.d/kdump
|
Provides: kexec-tools:/etc/init.d/kdump
|
||||||
Requires: kexec-tools
|
Requires: kexec-tools
|
||||||
|
Recommends: nfs-client cifs-utils
|
||||||
PreReq: coreutils sed
|
PreReq: coreutils sed
|
||||||
ExcludeArch: s390 s390x ppc
|
ExcludeArch: s390 s390x ppc
|
||||||
|
|
||||||
@ -82,13 +77,6 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%optflags"
|
export CFLAGS="%optflags"
|
||||||
export CXXFLAGS="%optflags"
|
export CXXFLAGS="%optflags"
|
||||||
@ -155,6 +143,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_sysconfdir}/init.d/boot.kdump
|
%{_sysconfdir}/init.d/boot.kdump
|
||||||
/var/adm/fillup-templates/sysconfig.kdump
|
/var/adm/fillup-templates/sysconfig.kdump
|
||||||
/lib/mkinitrd/scripts/*-kdump.sh
|
/lib/mkinitrd/scripts/*-kdump.sh
|
||||||
|
/lib/mkinitrd/scripts/setup-kdumpfs.sh
|
||||||
|
/lib/mkinitrd/scripts/setup-mkdumprd.sh
|
||||||
%config %{_sysconfdir}/udev/rules.d/70-kdump.rules
|
%config %{_sysconfdir}/udev/rules.d/70-kdump.rules
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user