From c6464a7d468d7cf363116f49e4c6fb541bc9805bc4ba556b83257cf507523c81 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 27 Oct 2008 15:56:36 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kdump?expand=0&rev=30 --- ...p-56814cf5d03dff1d6233de996e79e1dd54cf5144 | 83 +++++++++++++++++++ kdump.changes | 7 ++ kdump.spec | 12 ++- 3 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 kdump-56814cf5d03dff1d6233de996e79e1dd54cf5144 diff --git a/kdump-56814cf5d03dff1d6233de996e79e1dd54cf5144 b/kdump-56814cf5d03dff1d6233de996e79e1dd54cf5144 new file mode 100644 index 0000000..9516eb9 --- /dev/null +++ b/kdump-56814cf5d03dff1d6233de996e79e1dd54cf5144 @@ -0,0 +1,83 @@ +# HG changeset patch +# User Bernhard Walle +# Date 1225046677 -3600 +# Node ID 56814cf5d03dff1d6233de996e79e1dd54cf5144 +# Parent ab17d673947837b991853adf412862a67e8862b6 +boot.kdump: Use the full kernel release for initrd name + +Use the full kernel release (obtained with /sbin/get_kernel_version) to build +the initrd name also when symlinks are used. + +diff -r ab17d6739478 -r 56814cf5d03d ChangeLog +--- a/ChangeLog Sun Oct 26 17:06:56 2008 +0100 ++++ b/ChangeLog Sun Oct 26 19:44:37 2008 +0100 +@@ -1,3 +1,9 @@ ++2008-10-26 Bernhard Walle ++ ++ * boot.kdump: Use the full kernel release (obtained with ++ /sbin/get_kernel_version) to build the initrd name also when symlinks ++ are used. ++ + 2008-10-22 Bernhard Walle + + * actually check -kdump before - when +diff -r ab17d6739478 -r 56814cf5d03d NEWS +--- a/NEWS Sun Oct 26 17:06:56 2008 +0100 ++++ b/NEWS Sun Oct 26 19:44:37 2008 +0100 +@@ -3,6 +3,9 @@ + * change default location for KDUMP_SAVEDIR to "/var/crash" + * actually check -kdump before - when looking for + a suitable kdump kernel ++ * boot.kdump: Use the full kernel release (obtained with ++ /sbin/get_kernel_version) to build the initrd name also when symlinks are ++ used. + + 0.6.3 + ----- +diff -r ab17d6739478 -r 56814cf5d03d init/boot.kdump +--- a/init/boot.kdump Sun Oct 26 17:06:56 2008 +0100 ++++ b/init/boot.kdump Sun Oct 26 19:44:37 2008 +0100 +@@ -158,18 +158,31 @@ + } + + # +-# Returns the initrd for the kernel. If the kernel already contains ++# Prints the initrd for the kernel. If the kernel already contains + # "kdump", then return "/boot/initrd-", else return + # "/boot/initrd--kdump". ++# ++# @param kdump_kernel: Full path to the kernel ++# @returncode: 0 on success, 1 on failure + function find_initrd () + { +- local kdump_kver=$1 ++ local kdump_kernel=$1 ++ ++ # canonicalize the kernel version ++ local kdump_kver=$(/sbin/get_kernel_version "$kdump_kernel") ++ if [ -z "$kdump_kver" ] ; then ++ echo >&2 "Getting version for $kdump_kernel failed." ++ echo "${BOOTDIR}/initrd-kdump" ++ return 1 ++ fi + + if [[ "$kdump_kver" == *kdump* ]] ; then +- echo "${BOOTDIR}/initrd${kdump_kver}" ++ echo "${BOOTDIR}/initrd${kdump_kver:+-}${kdump_kver}" + else + echo "${BOOTDIR}/initrd${kdump_kver:+-}${kdump_kver}-kdump" + fi ++ ++ return 0 + } + + # +@@ -240,7 +253,7 @@ + rc_exit + fi + +- kdump_initrd=$(find_initrd "$kdump_kver") ++ kdump_initrd=$(find_initrd "$kdump_kernel") + + # rebuilding the kdump initramfs if necessary + mkdumprd -K "$kdump_kernel" -I "$kdump_initrd" -q diff --git a/kdump.changes b/kdump.changes index 183879d..e8ee544 100644 --- a/kdump.changes +++ b/kdump.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Oct 26 19:49:16 CET 2008 - bwalle@suse.de + +- Use the full kernel release (obtained with get_kernel_version) + to build the initrd name also when symlinks are used + (bnc#438218). + ------------------------------------------------------------------- Wed Oct 22 23:05:50 CEST 2008 - bwalle@suse.de diff --git a/kdump.spec b/kdump.spec index 0de1026..3676954 100644 --- a/kdump.spec +++ b/kdump.spec @@ -22,7 +22,7 @@ Url: http://freehg.org/u/bwalle/kdump/ Name: kdump License: GPL v2 or later Version: 0.6.3 -Release: 31 +Release: 32 Requires: curl openssh makedumpfile Summary: Script for kdump Group: System/Kernel @@ -39,6 +39,7 @@ Patch0: %{name}-f4cf2ef3cc3e6414d7d9386de0ebf7d633cbfed5 Patch1: %{name}-2860e7a5d481633aca345b07db28d95fdb04d649 Patch2: %{name}-8580f201f2f759eb78c646a6b98727b4508101d3 Patch3: %{name}-8712f642965d13539148e385aefb805e3464b62d +Patch4: %{name}-56814cf5d03dff1d6233de996e79e1dd54cf5144 BuildRoot: %{_tmppath}/%{name}-%{version}-build # rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2) Provides: kdump-helpers = 0.2.4 @@ -64,6 +65,7 @@ Authors: %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build export CFLAGS="%optflags" @@ -132,6 +134,10 @@ rm /var/log/dump &>/dev/null || true %config %{_sysconfdir}/udev/rules.d/70-kdump.rules %changelog +* Sun Oct 26 2008 bwalle@suse.de +- Use the full kernel release (obtained with get_kernel_version) + to build the initrd name also when symlinks are used + (bnc#438218). * Thu Oct 23 2008 bwalle@suse.de - Actually check -kdump before - when looking for a suitable kdump kernel. @@ -171,7 +177,7 @@ rm /var/log/dump &>/dev/null || true o add vmcore(5) manual page o implement email support - use PreReq for mkinitrd instead of BuildRequires -* Tue Aug 05 2008 bwalle@suse.de +* Mon Aug 04 2008 bwalle@suse.de - Don't report ELF32 as "invalid ELF class" * Fri Aug 01 2008 bwalle@suse.de - update to 0.5.5 @@ -202,7 +208,7 @@ rm /var/log/dump &>/dev/null || true o mount dump partition and boot partition in initrd o don't exit with error code when the dump directory does not yet exist in the 'delete_dumps' command -* Fri Jul 25 2008 bwalle@suse.de +* Thu Jul 24 2008 bwalle@suse.de - update to 0.5.1 o add 'print_target' sub command o implement SSH public/private key authentication