From 72f8cfa1d9806ea00c47111911e0fe74c1a6e6ecd7964cffab85df84b34174bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Fri, 28 Feb 2014 19:23:14 +0000 Subject: [PATCH 1/2] - Update to 0.8.9 o fix dracut support o fix dump save when /boot is not a mount point - kdumptool_find_kernel.patch: Dropped. - Update to 0.8.8 o dracut support o new kdumptool command: calibrate o new kdumptool flag: NOSPLIT o better support for SMP dumps - kdump-0.8.7-bsp.patch: Dropped. - kdump-0.8.7-calibrate.patch: Dropped. - kdump-0.8.7-nr_cpus.patch: Dropped. OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=59 --- kdump-0.8.7-bsp.patch | 49 ----- kdump-0.8.7-calibrate.patch | 200 ------------------ kdump-0.8.7-nr_cpus.patch | 64 ------ kdump-0.8.7.tar.bz2 | 3 - ...p-0.8.7-rpmlintrc => kdump-0.8.9-rpmlintrc | 0 kdump-0.8.9.tar.bz2 | 3 + kdump.changes | 22 ++ kdump.spec | 14 +- kdumptool_find_kernel.patch | 11 - 9 files changed, 30 insertions(+), 336 deletions(-) delete mode 100644 kdump-0.8.7-bsp.patch delete mode 100644 kdump-0.8.7-calibrate.patch delete mode 100644 kdump-0.8.7-nr_cpus.patch delete mode 100644 kdump-0.8.7.tar.bz2 rename kdump-0.8.7-rpmlintrc => kdump-0.8.9-rpmlintrc (100%) create mode 100644 kdump-0.8.9.tar.bz2 delete mode 100644 kdumptool_find_kernel.patch diff --git a/kdump-0.8.7-bsp.patch b/kdump-0.8.7-bsp.patch deleted file mode 100644 index 07898ce..0000000 --- a/kdump-0.8.7-bsp.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Petr Tesarik -Subject: Add disable_cpu_apicid for BSP to the commandline -References: bnc#861981 -Patch-mainline: v0.8.8 - -Since the BSP cannot be brought up in the kdump environment, and there is no -reliable way of getting the APIC ID of an offlined CPU, it must be figured -out by the primary kernel and passed as a command-line option. - -Signed-off-by: Petr Tesarik - ---- - NEWS | 2 ++ - init/rc.kdump.functions | 13 +++++++++++-- - 2 files changed, 13 insertions(+), 2 deletions(-) - ---- a/NEWS -+++ b/NEWS -@@ -1,5 +1,7 @@ - 0.8.8 - ----- -+ * Add disable_cpu_apicid parameter to the command line on x86 to prevent -+ bringing up the BSP in the kdump kernel. - * Use nr_cpus instead of maxcpus with recent kernels. - - 0.8.7 ---- a/init/rc.kdump.functions -+++ b/init/rc.kdump.functions -@@ -103,9 +103,18 @@ function build_kdump_commandline() - < /proc/cmdline) - # Use deadline for saving the memory footprint - commandline="$commandline elevator=deadline sysrq=yes reset_devices" -- case `uname -i` in -+ local arch=$(uname -i) -+ case "$arch" in - i?86|x86_64|ia64) -- commandline="$commandline irqpoll maxcpus=${KDUMP_CPUS:-1}" -+ local nr_cpus=$(cpus_param "$kdump_kernel") -+ commandline="$commandline irqpoll ${nr_cpus}=${KDUMP_CPUS:-1}" -+ if [ "$arch" = "x86_64" -o -z "${arch#i?86}" ]; then -+ local boot_apicid=$( -+ awk -F':[ \t]' '/^initial apicid[ \t]*:/ {print $2; exit}' \ -+ /proc/cpuinfo) -+ test -n "$boot_apicid" && -+ commandline="$commandline disable_cpu_apicid=$boot_apicid" -+ fi - ;; - s390*) - commandline="$commandline zfcp.allow_lun_scan=0" diff --git a/kdump-0.8.7-calibrate.patch b/kdump-0.8.7-calibrate.patch deleted file mode 100644 index 8f50adb..0000000 --- a/kdump-0.8.7-calibrate.patch +++ /dev/null @@ -1,200 +0,0 @@ -From: Petr Tesarik -Subject: Implement kdump memory calibration -References: FATE#315241 -Patch-mainline: v0.8.8 - -This command is used by yast-kdump to find out how much RAM should -be reserved for the crash kernel. - -Signed-off-by: Petr Tesarik - ---- - NEWS | 1 - kdumptool/CMakeLists.txt | 2 + - kdumptool/calibrate.cc | 78 +++++++++++++++++++++++++++++++++++++++++++++++ - kdumptool/calibrate.h | 60 ++++++++++++++++++++++++++++++++++++ - kdumptool/main.cc | 2 + - 5 files changed, 143 insertions(+) - ---- a/NEWS -+++ b/NEWS -@@ -1,5 +1,6 @@ - 0.8.8 - ----- -+ * New command: calibrate - * Add disable_cpu_apicid parameter to the command line on x86 to prevent - bringing up the BSP in the kdump kernel. - * Use nr_cpus instead of maxcpus with recent kernels. ---- a/kdumptool/CMakeLists.txt -+++ b/kdumptool/CMakeLists.txt -@@ -86,6 +86,8 @@ SET(COMMON_SRC - quotedstring.h - multipath.cc - multipath.h -+ calibrate.cc -+ calibrate.h - ) - - add_library(common STATIC ${COMMON_SRC}) ---- /dev/null -+++ b/kdumptool/calibrate.cc -@@ -0,0 +1,78 @@ -+/* -+ * (c) 2014, Petr Tesarik , SUSE LINUX Products GmbH -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ * 02110-1301, USA. -+ */ -+#include -+ -+#include "subcommand.h" -+#include "debug.h" -+#include "calibrate.h" -+ -+// Default reservation size depends on architecture -+#if defined(__x86_64__) -+# define DEF_RESERVE_MB 128 -+#elif defined(__i386__) -+# define DEF_RESERVE_MB 128 -+#elif defined(__powerpc64__) -+# define DEF_RESERVE_MB 256 -+#elif defined(__powerpc__) -+# define DEF_RESERVE_MB 128 -+#elif defined(__s390x__) -+# define DEF_RESERVE_MB 128 -+#elif defined(__s390__) -+# define DEF_RESERVE_MB 128 -+#elif defined(__ia64__) -+# define DEF_RESERVE_MB 512 -+#elif defined(__aarch64__) -+# define DEF_RESERVE_MB 128 -+#elif defined(__arm__) -+# define DEF_RESERVE_MB 128 -+#else -+# error "No default crashkernel reservation for your architecture!" -+#endif -+ -+using std::cout; -+using std::endl; -+ -+//{{{ Calibrate ---------------------------------------------------------------- -+ -+// ----------------------------------------------------------------------------- -+Calibrate::Calibrate() -+ throw () -+{} -+ -+// ----------------------------------------------------------------------------- -+const char *Calibrate::getName() const -+ throw () -+{ -+ return "calibrate"; -+} -+ -+// ----------------------------------------------------------------------------- -+void Calibrate::execute() -+ throw (KError) -+{ -+ unsigned long required; -+ Debug::debug()->trace("Calibrate::execute()"); -+ -+ required = DEF_RESERVE_MB; -+ cout << required << endl; -+} -+ -+//}}} -+ -+// vim: set sw=4 ts=4 fdm=marker et: :collapseFolds=1: ---- /dev/null -+++ b/kdumptool/calibrate.h -@@ -0,0 +1,60 @@ -+/* -+ * (c) 2014, Petr Tesarik , SUSE LINUX Products GmbH -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License -+ * as published by the Free Software Foundation; either version 2 -+ * of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -+ * 02110-1301, USA. -+ */ -+#ifndef CALIBRATE_H -+#define CALIBRATE_H -+ -+#include "subcommand.h" -+ -+//{{{ Calibrate ---------------------------------------------------------------- -+ -+/** -+ * Subcommand to calibrate reserved memory -+ */ -+class Calibrate : public Subcommand { -+ -+ public: -+ /** -+ * Creates a new Calibrate object. -+ */ -+ Calibrate() -+ throw (); -+ -+ public: -+ /** -+ * Returns the name of the subcommand (calibrate). -+ */ -+ const char *getName() const -+ throw (); -+ -+ /** -+ * Executes the function. -+ * -+ * @throw KError on any error. No exception indicates success. -+ */ -+ void execute() -+ throw (KError); -+ -+ private: -+}; -+ -+//}}} -+ -+#endif /* CALIBRATE_H */ -+ -+// vim: set sw=4 ts=4 fdm=marker et: :collapseFolds=1: ---- a/kdumptool/main.cc -+++ b/kdumptool/main.cc -@@ -38,6 +38,7 @@ - #include "read_ikconfig.h" - #include "read_vmcoreinfo.h" - #include "savedump.h" -+#include "calibrate.h" - - using std::cerr; - using std::cout; -@@ -61,6 +62,7 @@ int main(int argc, char *argv[]) - kdt.addSubcommand(new ReadIKConfig); - kdt.addSubcommand(new ReadVmcoreinfo); - kdt.addSubcommand(new SaveDump); -+ kdt.addSubcommand(new Calibrate); - - kdt.parseCommandline(argc, argv); - kdt.readConfiguration(); diff --git a/kdump-0.8.7-nr_cpus.patch b/kdump-0.8.7-nr_cpus.patch deleted file mode 100644 index a02c547..0000000 --- a/kdump-0.8.7-nr_cpus.patch +++ /dev/null @@ -1,64 +0,0 @@ -From: Petr Tesarik -Subject: Use nr_cpus instead of maxcpus with recent kernels. -References: FATE#315725 -Patch-mainline: v0.8.8 - -Linux 2.6.34+ has nr_cpus, which limits the number of possible CPUs -(unlike maxcpus, which only limits the number of online CPUs at boot). - -For compatibility, use maxcpus with older kernels. - -Signed-off-by: Petr Tesarik - ---- - NEWS | 4 ++++ - init/rc.kdump.functions | 18 +++++++++++++++++- - 2 files changed, 21 insertions(+), 1 deletion(-) - ---- a/NEWS -+++ b/NEWS -@@ -1,3 +1,7 @@ -+0.8.8 -+----- -+ * Use nr_cpus instead of maxcpus with recent kernels. -+ - 0.8.7 - ----- - * Change libelf interface to elfutils (libelf1) ---- a/init/rc.kdump.functions -+++ b/init/rc.kdump.functions -@@ -75,9 +75,25 @@ function remove_from_commandline() - } - - # -+# Get the name of kernel parameter to limit CPUs -+# Linux 2.6.34+ has nr_cpus, older versions must use maxcpus -+function cpus_param() -+{ -+ local version=$(get_kernel_version "$1") -+ version="${version%%-*}" -+ local verhex=$(IFS=. ; set -- $version ; printf "0x%02x%02x%02x" $1 $2 $3) -+ if [ $(( $verhex )) -ge $(( 0x020622 )) ] ; then -+ echo nr_cpus -+ else -+ echo maxcpus -+ fi -+} -+ -+# - # Builds the kdump command line from KDUMP_COMMANDLINE. - function build_kdump_commandline() - { -+ local kdump_kernel="$1" - local commandline="$KDUMP_COMMANDLINE" - - if [ -z "$commandline" ]; then -@@ -168,7 +184,7 @@ function load_kdump_kexec() - rc_exit - fi - -- local kdump_commandline=$(build_kdump_commandline) -+ local kdump_commandline=$(build_kdump_commandline "$kdump_kernel") - local kexec_options=$(build_kexec_options "$kdump_kernel") - - KEXEC_CALL="$KEXEC -p $kdump_kernel --append=\"$kdump_commandline\"" diff --git a/kdump-0.8.7.tar.bz2 b/kdump-0.8.7.tar.bz2 deleted file mode 100644 index c408943..0000000 --- a/kdump-0.8.7.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0668537bf197b5e49a27d245f45dbcf753aae52f2b133e304c1420a9157cbd83 -size 107201 diff --git a/kdump-0.8.7-rpmlintrc b/kdump-0.8.9-rpmlintrc similarity index 100% rename from kdump-0.8.7-rpmlintrc rename to kdump-0.8.9-rpmlintrc diff --git a/kdump-0.8.9.tar.bz2 b/kdump-0.8.9.tar.bz2 new file mode 100644 index 0000000..187f8f0 --- /dev/null +++ b/kdump-0.8.9.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c94bd8c4c577fc05db4d01f07b0cdb794d94588c1bede848fe99afc0ff8b1133 +size 109350 diff --git a/kdump.changes b/kdump.changes index 1a4063a..e0e0acd 100644 --- a/kdump.changes +++ b/kdump.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Fri Feb 28 19:18:00 UTC 2014 - ptesarik@suse.cz + +- Update to 0.8.9 + o fix dracut support + o fix dump save when /boot is not a mount point + +- kdumptool_find_kernel.patch: Dropped. + +------------------------------------------------------------------- +Fri Feb 28 17:21:29 UTC 2014 - ptesarik@suse.cz + +- Update to 0.8.8 + o dracut support + o new kdumptool command: calibrate + o new kdumptool flag: NOSPLIT + o better support for SMP dumps + +- kdump-0.8.7-bsp.patch: Dropped. +- kdump-0.8.7-calibrate.patch: Dropped. +- kdump-0.8.7-nr_cpus.patch: Dropped. + ------------------------------------------------------------------- Fri Feb 14 16:14:45 UTC 2014 - ptesarik@suse.cz diff --git a/kdump.spec b/kdump.spec index c9a770c..491f01e 100644 --- a/kdump.spec +++ b/kdump.spec @@ -16,10 +16,12 @@ # +%define dracutlibdir %{_prefix}/lib/dracut + Url: http://freehg.org/u/bwalle/kdump/ Name: kdump -Version: 0.8.7 +Version: 0.8.9 Release: 0 Requires: curl Requires: makedumpfile @@ -47,10 +49,6 @@ PreReq: %insserv_prereq %fillup_prereq mkinitrd Source: %{name}-%{version}.tar.bz2 Source2: %{name}-%{version}-rpmlintrc Source3: kdump.service -Patch1: kdumptool_find_kernel.patch -Patch2: %{name}-%{version}-nr_cpus.patch -Patch3: %{name}-%{version}-bsp.patch -Patch4: %{name}-%{version}-calibrate.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2) Provides: kdump-helpers = %{version} @@ -88,10 +86,6 @@ Authors: %prep %setup -%patch1 -p0 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 %build export CFLAGS="%optflags" @@ -181,6 +175,8 @@ rm -rf $RPM_BUILD_ROOT /lib/mkinitrd/scripts/*-kdump.sh /lib/mkinitrd/scripts/setup-kdumpfs.sh /lib/mkinitrd/scripts/setup-mkdumprd.sh +%dir %{dracutlibdir}/modules.d/99kdump +%{dracutlibdir}/modules.d/99kdump/* %dir /lib/kdump /lib/kdump/* %config %{_sysconfdir}/udev/rules.d/70-kdump.rules diff --git a/kdumptool_find_kernel.patch b/kdumptool_find_kernel.patch deleted file mode 100644 index 474095e..0000000 --- a/kdumptool_find_kernel.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- init/rc.kdump.functions.old 2014-01-13 07:35:41.000000000 +0100 -+++ init/rc.kdump.functions 2014-02-14 12:46:28.375308000 +0100 -@@ -261,7 +261,7 @@ - find_kernel_args="-D" - fi - -- local output=$(kdumptool find_kernel $find_kernel_args) -+ local output=$(kdumptool $find_kernel_args find_kernel) - if [ $? -ne 0 ] ; then - rc_status -s - rc_failed 6 From a18b114be1acc1ddcc8350a04794e268490adc18ece3242c94490349bb08bc9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Fri, 28 Feb 2014 19:28:53 +0000 Subject: [PATCH 2/2] Fix directories not owned by a package. OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=60 --- kdump.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kdump.spec b/kdump.spec index 491f01e..4bc55df 100644 --- a/kdump.spec +++ b/kdump.spec @@ -175,6 +175,8 @@ rm -rf $RPM_BUILD_ROOT /lib/mkinitrd/scripts/*-kdump.sh /lib/mkinitrd/scripts/setup-kdumpfs.sh /lib/mkinitrd/scripts/setup-mkdumprd.sh +%dir %{dracutlibdir} +%dir %{dracutlibdir}/modules.d %dir %{dracutlibdir}/modules.d/99kdump %{dracutlibdir}/modules.d/99kdump/* %dir /lib/kdump