Hello community,
here is the log from the commit of package kdump
checked in at Sat Aug 2 02:11:06 CEST 2008.
--------
--- kdump/kdump.changes 2008-07-28 11:58:42.000000000 +0200
+++ kdump/kdump.changes 2008-08-01 14:06:03.000000000 +0200
@@ -1,0 +2,35 @@
+Fri Aug 01 12:00:17 CEST 2008 - bwalle@suse.de
+
+- update to 0.5.5
+ o make dependency to libssh2 optional
+
+-------------------------------------------------------------------
+Thu Jul 31 23:41:06 CEST 2008 - bwalle@suse.de
+
+- update to 0.5.4
+ o always create empty ${tmp_mnt}/etc/fstab.kdump
+ o change execution state to 'boot'
+ o use UUID for fstab.kdump
+ o open a shell if something fails and KDUMP_CONTINUE_ON_ERROR is
+ true
+ o don't include JFS to initrd
+ o don't add -s '' parameter to mkinitrd call if the boot splash
+ script is not available
+ o handle more programs in $KDUMP_REQUIRED_PROGRAMS correct
+ o move original /etc/fstab back
+- add %config to udev rule
+
+-------------------------------------------------------------------
+Mon Jul 28 23:39:24 CEST 2008 - bwalle@suse.de
+
+- update to 0.5.3
+ o don't exit with error code when the dump directory does not yet
+ exist in the 'delete_dumps' command
+ o fix syntax error in init/boot-kdump.sh
+
+-------------------------------------------------------------------
+Mon Jul 28 23:12:12 CEST 2008 - bwalle@suse.de
+
+- call mkinitrd_setup in %post and %postun
+
+-------------------------------------------------------------------
Old:
----
kdump-0.5.2.tar.bz2
New:
----
kdump-0.5.5.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdump.spec ++++++
--- /var/tmp/diff_new_pack.GJs311/_old 2008-08-02 02:08:53.000000000 +0200
+++ /var/tmp/diff_new_pack.GJs311/_new 2008-08-02 02:08:53.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package kdump (Version 0.5.2)
+# spec file for package kdump (Version 0.5.5)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,14 +13,17 @@
Name: kdump
License: GPL v2 or later
-Version: 0.5.2
+Version: 0.5.5
Release: 1
Requires: curl openssh makedumpfile
Summary: Script for kdump
Group: System/Kernel
Requires(post): mkinitrd
-BuildRequires: gcc-c++ libcurl-devel libelf0-devel libssh2-devel zlib-devel
+BuildRequires: gcc-c++ libcurl-devel libelf0-devel zlib-devel
BuildRequires: asciidoc cmake libxslt mkinitrd
+%if %suse_version > 1100
+BuildRequires: libssh2-devel
+%endif
PreReq: %insserv_prereq %fillup_prereq
Source: %{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -62,6 +65,7 @@
%post
%{fillup_and_insserv -n kdump kdump}
+/sbin/mkinitrd_setup
%preun
echo "Stopping kexec ..."
@@ -70,6 +74,7 @@
%postun
%restart_on_update kdump
%insserv_cleanup
+/sbin/mkinitrd_setup
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
@@ -86,9 +91,32 @@
%{_sysconfdir}/init.d/kdump
/var/adm/fillup-templates/sysconfig.kdump
/lib/mkinitrd/scripts/*-kdump.sh
-%{_sysconfdir}/udev/rules.d/70-kdump.rules
+%config %{_sysconfdir}/udev/rules.d/70-kdump.rules
%changelog
+* Fri Aug 01 2008 bwalle@suse.de
+- update to 0.5.5
+ o make dependency to libssh2 optional
+* Fri Aug 01 2008 bwalle@suse.de
+- update to 0.5.4
+ o always create empty ${tmp_mnt}/etc/fstab.kdump
+ o change execution state to 'boot'
+ o use UUID for fstab.kdump
+ o open a shell if something fails and KDUMP_CONTINUE_ON_ERROR is
+ true
+ o don't include JFS to initrd
+ o don't add -s '' parameter to mkinitrd call if the boot splash
+ script is not available
+ o handle more programs in $KDUMP_REQUIRED_PROGRAMS correct
+ o move original /etc/fstab back
+- add %%config to udev rule
+* Tue Jul 29 2008 bwalle@suse.de
+- update to 0.5.3
+ o don't exit with error code when the dump directory does not yet
+ exist in the 'delete_dumps' command
+ o fix syntax error in init/boot-kdump.sh
+* Tue Jul 29 2008 bwalle@suse.de
+- call mkinitrd_setup in %%post and %%postun
* Mon Jul 28 2008 bwalle@suse.de
- update to 0.5.2
o copy required programs (KDUMP_REQUIRED_PROGRAMS) in initrd
++++++ kdump-0.5.2.tar.bz2 -> kdump-0.5.5.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/ChangeLog new/kdump-0.5.5/ChangeLog
--- old/kdump-0.5.2/ChangeLog 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/ChangeLog 2008-08-01 13:45:09.000000000 +0200
@@ -1,3 +1,29 @@
+2008-08-01 Bernhard Walle
+
+ * make dependency to libssh2 optional
+
+2008-08-01 Bernhard Walle
+
+ * handle more programs in $KDUMP_REQUIRED_PROGRAMS correct
+ * move original /etc/fstab back
+
+2008-07-31 Bernhard Walle
+
+ * change execution state to 'boot'
+ * use UUID for fstab.kdump
+ * open a shell if something fails and KDUMP_CONTINUE_ON_ERROR is true
+ * don't include JFS to initrd
+ * don't add -s '' parameter to mkinitrd call if the boot splash script
+ is not available
+
+2008-07-28 Bernhard Walle
+
+ * don't exit with error code when the dump directory does not yet
+ exist in the 'delete_dumps' command
+ * remove GDB from list of required programs in initrd
+ * fix syntax error in init/boot-kdump.sh
+ * always create empty ${tmp_mnt}/etc/fstab.kdump
+
2008-07-27 Bernhard Walle
* mount dump partition and boot partition in initrd
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/cmake/Findlibssh2.cmake new/kdump-0.5.5/cmake/Findlibssh2.cmake
--- old/kdump-0.5.2/cmake/Findlibssh2.cmake 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/cmake/Findlibssh2.cmake 2008-08-01 13:45:09.000000000 +0200
@@ -69,7 +69,7 @@
endif (LIBSSH2_FOUND)
# show the LIBSSH2_INCLUDE_DIRS and LIBSSH2_LIBRARIES variables only in the advanced view
- mark_as_advanced(LIBSSH2_INCLUDE_DIRS LIBSSH2_LIBRARIES)
+ mark_as_advanced(LIBSSH2_INCLUDE_DIRS LIBSSH2_INCLUDE_DIR LIBSSH2_LIBRARIES)
endif (LIBSSH2_LIBRARIES AND LIBSSH2_INCLUDE_DIRS)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/CMakeLists.txt new/kdump-0.5.5/CMakeLists.txt
--- old/kdump-0.5.2/CMakeLists.txt 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/CMakeLists.txt 2008-08-01 13:45:09.000000000 +0200
@@ -26,7 +26,7 @@
cmake_minimum_required(VERSION 2.4)
set (PACKAGE_STRING "kdump")
-set (PACKAGE_VERSION "0.5.2")
+set (PACKAGE_VERSION "0.5.5")
include_directories("${PROJECT_BINARY_DIR}")
@@ -81,11 +81,15 @@
# libssh2
INCLUDE(Findlibssh2)
-SET(EXTRA_LIBS ${EXTRA_LIBS} ${LIBSSH2_LIBRARIES})
-INCLUDE_DIRECTORIES(${LIBSSH2_INCLUDE_DIRS})
+IF (LIBSSH2_FOUND)
+ SET(EXTRA_LIBS ${EXTRA_LIBS} ${LIBSSH2_LIBRARIES})
+ INCLUDE_DIRECTORIES(${LIBSSH2_INCLUDE_DIRS})
+ENDIF (LIBSSH2_FOUND)
IF(NOT LIBSSH2_FOUND)
- MESSAGE(FATAL_ERROR "libssh2 not found. Install libssh2-devel or something like that")
+ MESSAGE("libssh2 not found. Install libssh2-devel or something like that")
+ MESSAGE("Building without SSH support")
+ SET(LIBSSH2_FOUND FALSE)
ENDIF(NOT LIBSSH2_FOUND)
#
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/config.h.in new/kdump-0.5.5/config.h.in
--- old/kdump-0.5.2/config.h.in 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/config.h.in 2008-08-01 13:45:09.000000000 +0200
@@ -2,3 +2,7 @@
#define PACKAGE_STRING "@PACKAGE_STRING@"
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
+#define TRUE true
+#define FALSE false
+
+#define HAVE_LIBSSH2 @LIBSSH2_FOUND@
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/doc/man/kdump.5.txt new/kdump-0.5.5/doc/man/kdump.5.txt
--- old/kdump-0.5.2/doc/man/kdump.5.txt 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/doc/man/kdump.5.txt 2008-08-01 13:45:09.000000000 +0200
@@ -320,10 +320,10 @@
KDUMP_CONTINUE_ON_ERROR
~~~~~~~~~~~~~~~~~~~~~~~
-By default, *kdumptool*(8) copies multiple files with the _save_dump_ action.
-Set that value to _true_ to make kdumptool trying to save the next file even if
-saving the previous file failed, or set that to _false_ to let the program
-immediately abort.
+If something goes wrong while saving the dump or deleting old dumps in initrd,
+then *kdumptool*(8) normally just tries to execute the next action. However,
+it can be usedful to open a shell at that point of time to fix the problem
+or just debug it, therefore you can set KDUMP_CONTINUE_ON_ERROR to "true".
Default: "false"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/init/boot-kdump.sh new/kdump-0.5.5/init/boot-kdump.sh
--- old/kdump-0.5.2/init/boot-kdump.sh 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/init/boot-kdump.sh 2008-08-01 13:45:09.000000000 +0200
@@ -17,9 +17,9 @@
#
#%stage: setup
#%depends: mount network
-#%programs: /bin/makedumpfile /bin/awk /bin/gawk /bin/grep /sbin/kdumptool /sbin/showmount /sbin/mount.cifs mount.nfs /bin/gdb
+#%programs: /bin/makedumpfile /bin/awk /bin/gawk /bin/grep /sbin/kdumptool /sbin/showmount /sbin/mount.cifs mount.nfs
#%if: "$use_kdump"
-#%udevmodules: cifs nls_utf8 reiserfs xfs jfs ext2 ext3
+#%udevmodules: cifs nls_utf8 reiserfs xfs ext2 ext3
#
# If KDUMP_IMMEDIATE_REBOOT is false, then open a shell. If it's true, then
@@ -50,8 +50,31 @@
if ! [ "$KDUMP_CONTINUE_ON_ERROR" = "true" -o \
"$KDUMP_CONTINUE_ON_ERROR" = "TRUE" ] ; then
- handle_exit
+ bash
+ fi
+}
+
+#
+# Mounts all partitions listed in /etc/fstab.kdump
+function mount_all()
+{
+ local ret=0
+
+ if [ -f /etc/fstab ] ; then
+ mv /etc/fstab /etc/fstab.orig
+ fi
+
+ cp /etc/fstab.kdump /etc/fstab
+ mount -a
+ ret=$?
+
+ if [ -f /etc/fstab.orig ] ; then
+ mv /etc/fstab.orig /etc/fstab
+ else
+ rm /etc/fstab
fi
+
+ return $ret
}
#
@@ -71,7 +94,7 @@
#
# create mountpoint for NFS/CIFS
-mkdir /mnt
+[ -d /mnt ] || mkdir /mnt
if [ -n "$KDUMP_TRANSFER" ] ; then
echo "Running $KDUMP_TRANSFER"
@@ -83,9 +106,10 @@
protocol=$(echo "$target" | grep '^Protocol' | awk '{ print $2 }')
path=$(echo "$target" | grep '^Path' | awk '{ print $2 }')
+ #
# mount all partitions in fstab
- mv /etc/fstab.kdump /etc/fstab
- mount -a
+ mount_all
+ continue_error $?
#
# prescript
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/init/boot-kdump.sh.orig new/kdump-0.5.5/init/boot-kdump.sh.orig
--- old/kdump-0.5.2/init/boot-kdump.sh.orig 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/init/boot-kdump.sh.orig 1970-01-01 01:00:00.000000000 +0100
@@ -1,147 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-#%stage: setup
-#%depends: mount network
-#%programs: /bin/makedumpfile /bin/grep /sbin/kdumptool /sbin/showmount /sbin/mount.cifs mount.nfs /bin/gdb /usr/bin/chroot
-#%if: "$use_kdump"
-#%udevmodules: cifs nls_utf8 reiserfs ext2 ext3 vfat xfs jfs
-
-#
-# Prints debug message when enabled in KDUMP_VERBOSE.
-# Parameters: 1) message
-# Returns: nothing
-function debug_msg() # {{{
-{
- local msg=$1
-
- if (( "$KDUMP_VERBOSE" & 8 )) ; then
- echo >&2 "$msg"
- fi
-} # }}}
-
-#
-# If KDUMP_IMMEDIATE_REBOOT is false, then open a shell. If it's true, then
-# reboot.
-function handle_exit() # {{{
-{
- if [ $KDUMP_IMMEDIATE_REBOOT = "yes" \
- -o "$KDUMP_IMMEDIATE_REBOOT" = "YES" ] ; then
- reboot -f
- else
- bash
- fi
-} # }}}
-
-#
-# Checks the given parameter. If the status was non-zero, then it checks
-# KDUMP_CONTINUE_ON_ERROR if it should reboot or just continue.
-# In any case, it prints an error message.
-function continue_error() # {{{
-{
- local status=$?
-
- if [ $status -eq 0 ] ; then
- return
- fi
-
- echo "Last command failed ($status)."
-
- if ! [ "$KDUMP_CONTINUE_ON_ERROR" = "true" -o \
- "$KDUMP_CONTINUE_ON_ERROR" = "TRUE" ] ; then
- handle_exit
- fi
-} # }}}
-
-#
-# Mounts the root partition in /root/boot.
-# Parameters: no
-# Return value: no
-function mount_boot() # {{{
-{
- echo "Mounting boot partition"
-} # }}}
-
-#
-# sanity check
-if ! grep elfcorehdr /proc/cmdline &>/dev/null ; then
- echo "Kdump initrd booted in non-kdump kernel"
- return 1
-fi
-
-. /etc/sysconfig/kdump
-
-ROOTDIR=/root
-
-#
-# start LED blinking in background
-kdumptool ledblink --background
-
-#
-# create mountpoint for NFS/CIFS
-mkdir /mnt
-
-if [ -n "$KDUMP_TRANSFER" ] ; then
- echo "Running $KDUMP_TRANSFER"
- eval "$KDUMP_TRANSFER"
-else
-
- # get the target
- target=$(kdumptool print_target)
- protocol=$(echo "$target" | grep '^Protocol' | awk '{ print $2 }')
- path=$(echo "$target" | grep '^Path' | awk '{ print $2 }')
-
- # mount all partitions in fstab
- mount -a
-
- #
- # prescript
- if [ -n "$KDUMP_PRESCRIPT" ] ; then
- echo "Running $KDUMP_PRESCRIPT"
- eval "$KDUMP_PRESCRIPT"
- continue_error $?
- fi
-
- #
- # mount boot partition if we try to save the kernel
- if [ "$KDUMP_COPY_KERNEL" = "true" ] ; then
- mount_boot
- fi
-
- #
- # delete old dumps
- kdumptool delete_dumps $KDUMPTOOL_OPTIONS
- continue_error $?
-
- #
- # save the dump (HOME=/ to find the public/private key)
- read hostname < /etc/hostname.kdump
- HOME=/ kdumptool save_dump --root=$ROOTDIR \
- --fqdn=$hostname $KDUMPTOOL_OPTIONS
-
- #
- # postscript
- if [ -n "$KDUMP_POSTSCRIPT" ] ; then
- echo "Running $KDUMP_POSTSCRIPT"
- eval "$KDUMP_POSTSCRIPT"
- continue_error $?
- fi
-fi
-
-handle_exit
-
-# vim: set sw=4 ts=4 fdm=marker et:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/init/kdump new/kdump-0.5.5/init/kdump
--- old/kdump-0.5.2/init/kdump 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/init/kdump 2008-08-01 13:45:09.000000000 +0200
@@ -299,8 +299,11 @@
echo -n "Not unloading kdump during runlevel changes"
rc_status -s
else
- echo -n "Unloading kdump"
- $KEXEC -p -u
+ kdump_kernel_loaded
+ if [ $? -ne 1 ] ; then
+ echo -n "Unloading kdump"
+ $KEXEC -p -u
+ fi
rc_status -v
fi
;;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/init/mkdumprd new/kdump-0.5.5/init/mkdumprd
--- old/kdump-0.5.2/init/mkdumprd 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/init/mkdumprd 2008-08-01 13:45:09.000000000 +0200
@@ -146,7 +146,15 @@
fi
fi
-MKINITRD_ARGS="-k $KERNEL -i $INITRD -f '$FEATURE_LIST' -s ''"
+MKINITRD_ARGS="-k $KERNEL -i $INITRD -f '$FEATURE_LIST'"
+
+#
+# the -s parameter is only available when the bootsplash package and its
+# mkinitrd script is installed ... so check that first
+if [ -f "/lib/mkinitrd/scripts/setup-splash.sh" ] ; then
+ MKINITRD_ARGS="$MKINITRD_ARGS -s ''"
+fi
+
MKINITRD_ARGS="$MKINITRD_ARGS $MKINITRD_EXTRA_PARAMS $NETARGS"
status_message "Calling mkinitrd $MKINITRD_ARGS"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/init/setup-kdump.sh new/kdump-0.5.5/init/setup-kdump.sh
--- old/kdump-0.5.2/init/setup-kdump.sh 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/init/setup-kdump.sh 2008-08-01 13:45:09.000000000 +0200
@@ -15,10 +15,54 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
-#%stage: crypto
+#%stage: boot
#%provides: kdump
#
+# Returns the UUID for a given disk
+# Parameters: 1) partition device (e.g. /dev/sda5)
+# Returns: The UUID
+function get_uuid_for_disk() # {{{
+{
+ local uuid=
+ local device=$1
+
+ local output=$(/sbin/blkid ${device})
+ local uuid=$(echo "$output" | sed -e 's/.*UUID="\([-a-fA-F0-9]*\)".*/\1/')
+ echo "$uuid"
+} # }}}
+
+#
+# Adds an entry to a kdump fstab.
+# Parameters: 1) fsname: file system name
+# 2) mntdir: mount directory
+# 3) fstype: file system type
+# 4) opts: mount options
+# 5) freq: dump frequency
+# 6) passno: pass number on parallel fsck
+function add_fstab() # {{{
+{
+ local fsname=$1
+ local mntdir=$2
+ local fstype=$3
+ local opts=$4
+ local freq=$5
+ local passno=$6
+
+ # translate block devices into UUID
+ if [ -b "$fsname" ] ; then
+ local uuid=$(get_uuid_for_disk "$fsname")
+ if [ -n "$uuid" ] && [ -b "/dev/disk/by-uuid/$uuid" ] ; then
+ fsname="/dev/disk/by-uuid/$uuid"
+ fi
+ fi
+
+ echo "$fsname $mntdir $fstype $opts $freq $passno" \
+ >> ${tmp_mnt}/etc/fstab.kdump
+} # }}}
+
+
+#
# check if we are called with the -f kdump parameter
#
use_kdump=
@@ -26,7 +70,7 @@
use_kdump=1
fi
-if (( ! $use_kdump )) ; then
+if ! (( $use_kdump )) ; then
return 0
fi
@@ -61,7 +105,7 @@
#
# copy required programs
#
-for program in "$KDUMP_REQUIRED_PROGRAMS" ; do
+for program in $KDUMP_REQUIRED_PROGRAMS ; do
if [ ! -f "$program" ] ; then
echo >&2 ">>> $program does not exist. Skipping!"
continue
@@ -88,6 +132,7 @@
# add mount points (below /root)
#
+touch ${tmp_mnt}/etc/fstab.kdump
while read line ; do
device=$(echo "$line" | awk '{ print $1 }')
mountpoint=$(echo "$line" | awk '{ print $2 }')
@@ -96,16 +141,14 @@
# add the boot partition
if [ "$mountpoint" = "/boot" ] ; then
- echo "$device /root$mountpoint $filesystem $opts 0 0" \
- >> ${tmp_mnt}/etc/fstab.kdump
+ add_fstab "$device" "/root$mountpoint" "$filesystem" "$opts" 0 0
fi
# add the target file system
if [ "$protocol" = "file" ] &&
[ "$mountpoint" != "/" ] &&
echo "$path" | grep "$mountpoint" &> /dev/null ; then
- echo "$device /root$mountpoint $filesystem $opts 0 0" \
- >> ${tmp_mnt}/etc/fstab.kdump
+ add_fstab "$device" "/root$mountpoint" "$filesystem" "$opts" 0 0
fi
done < /etc/mtab
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/kdumptool/debuglink.cc new/kdump-0.5.5/kdumptool/debuglink.cc
--- old/kdump-0.5.2/kdumptool/debuglink.cc 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/kdumptool/debuglink.cc 2008-08-01 13:45:09.000000000 +0200
@@ -191,7 +191,7 @@
return path;
} catch (const KError &err) {}
- throw KError("Unable to get debuginfo file.");
+ throw KError("Unable to find debuginfo file.");
}
// -----------------------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/kdumptool/global.cc new/kdump-0.5.5/kdumptool/global.cc
--- old/kdump-0.5.2/kdumptool/global.cc 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/kdumptool/global.cc 2008-08-01 13:45:09.000000000 +0200
@@ -22,12 +22,14 @@
#include
#include
-#include
-#include
-#include
-
#include "global.h"
+#if HAVE_LIBSSH2
+# include
+# include
+#endif
+#include
+
#define MAXERROR 4096
using std::strerror;
@@ -69,6 +71,7 @@
//}}}
//{{{ KSFTPError ---------------------------------------------------------------
+#if HAVE_LIBSSH2
/* -------------------------------------------------------------------------- */
const char *KSFTPError::what() const
throw ()
@@ -164,6 +167,7 @@
return string(msg);
}
+#endif // HAVE_LIBSSH2
//}}}
//{{{ KELFError ----------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/kdumptool/global.h new/kdump-0.5.5/kdumptool/global.h
--- old/kdump-0.5.2/kdumptool/global.h 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/kdumptool/global.h 2008-08-01 13:45:09.000000000 +0200
@@ -25,6 +25,7 @@
#include <vector>
#include <map>
+#include "config.h"
//{{{ Constants ----------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/kdumptool/kdumptool.cc new/kdump-0.5.5/kdumptool/kdumptool.cc
--- old/kdump-0.5.2/kdumptool/kdumptool.cc 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/kdumptool/kdumptool.cc 2008-08-01 13:45:09.000000000 +0200
@@ -29,6 +29,7 @@
#include "debug.h"
#include "util.h"
#include "configuration.h"
+#include "config.h"
using std::list;
using std::cerr;
@@ -102,7 +103,7 @@
m_optionParser.printHelp(cerr, PROGRAM_VERSION_STRING);
exit(EXIT_SUCCESS);
} else if (m_optionParser.getValue("version").getFlag()) {
- cerr << PROGRAM_VERSION_STRING << endl;
+ printVersion();
exit(EXIT_SUCCESS);
}
@@ -164,6 +165,23 @@
}
// -----------------------------------------------------------------------------
+void KdumpTool::printVersion()
+{
+ cerr << PROGRAM_VERSION_STRING << endl;
+ cerr << "Features: ";
+
+ // SFTP
+ cerr << "SFTP: ";
+#if HAVE_LIBSSH2
+ cerr << "enabled";
+#else // HAVE_LIBSSH2
+ cerr << "disabled";
+#endif
+
+ cerr << endl;
+}
+
+// -----------------------------------------------------------------------------
int KdumpTool::getErrorCode() const
throw ()
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/kdumptool/kdumptool.h new/kdump-0.5.5/kdumptool/kdumptool.h
--- old/kdump-0.5.2/kdumptool/kdumptool.h 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/kdumptool/kdumptool.h 2008-08-01 13:45:09.000000000 +0200
@@ -77,6 +77,9 @@
int getErrorCode() const
throw ();
+ protected:
+ void printVersion();
+
private:
OptionParser m_optionParser;
Subcommand *m_subcommand;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/kdumptool/savedump.cc new/kdump-0.5.5/kdumptool/savedump.cc
--- old/kdump-0.5.2/kdumptool/savedump.cc 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/kdumptool/savedump.cc 2008-08-01 13:45:09.000000000 +0200
@@ -18,7 +18,8 @@
*/
#include <iostream>
#include <string>
-#include
+#include
+#include <cerrno>
#include <memory>
#include <sstream>
@@ -131,7 +132,7 @@
// root dir support
m_urlParser.parseURL(savedir.c_str());
- if (m_rootdir.size() != 0 &&
+ if (m_rootdir.size() != 0 &&
m_urlParser.getProtocol() == URLParser::PROT_FILE) {
Debug::debug()->dbg("Using root dir support for Transfer (%s)",
m_rootdir.c_str());
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/kdumptool/transfer.cc new/kdump-0.5.5/kdumptool/transfer.cc
--- old/kdump-0.5.2/kdumptool/transfer.cc 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/kdumptool/transfer.cc 2008-08-01 13:45:09.000000000 +0200
@@ -25,8 +25,10 @@
#include <cstring>
#include
-#include
-#include
+#if HAVE_LIBSSH2
+# include
+# include
+#endif
#include "dataprovider.h"
#include "global.h"
@@ -83,9 +85,11 @@
Debug::debug()->dbg("Returning FTPTransfer");
return new FTPTransfer(url);
+#if HAVE_LIBSSH2
case URLParser::PROT_SFTP:
Debug::debug()->dbg("Returning SFTPTransfer");
return new SFTPTransfer(url);
+#endif // HAVE_LIBSSH2
case URLParser::PROT_NFS:
Debug::debug()->dbg("Returning NFSTransfer");
@@ -433,6 +437,8 @@
//}}}
//{{{ SFTPTransfer -------------------------------------------------------------
+#if HAVE_LIBSSH2
+
/* -------------------------------------------------------------------------- */
SFTPTransfer::SFTPTransfer(const char *target_url)
throw (KError)
@@ -653,6 +659,8 @@
m_socket = NULL;
}
+#endif // HAVE_LIBSSH2
+
//}}}
//{{{ NFSTransfer --------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/kdumptool/transfer.h new/kdump-0.5.5/kdumptool/transfer.h
--- old/kdump-0.5.2/kdumptool/transfer.h 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/kdumptool/transfer.h 2008-08-01 13:45:09.000000000 +0200
@@ -23,8 +23,10 @@
#include <cstdarg>
#include
-#include
-#include
+#if HAVE_LIBSSH2
+# include
+# include
+#endif
#include "global.h"
#include "urlparser.h"
@@ -228,6 +230,8 @@
//}}}
//{{{ SFTPTransfer -------------------------------------------------------------
+#if HAVE_LIBSSH2
+
/**
* Transfers a file to SFTP (upload).
*/
@@ -277,6 +281,8 @@
};
+#endif // HAVE_LIBSSH2
+
//}}}
//{{{ NFSTransfer -------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/kdumptool/vmcoreinfo.cc new/kdump-0.5.5/kdumptool/vmcoreinfo.cc
--- old/kdump-0.5.2/kdumptool/vmcoreinfo.cc 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/kdumptool/vmcoreinfo.cc 2008-08-01 13:45:09.000000000 +0200
@@ -23,6 +23,7 @@
#include
#include <cerrno>
#include
+#include <cstring>
#include
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/kdump-0.5.2/NEWS new/kdump-0.5.5/NEWS
--- old/kdump-0.5.2/NEWS 2008-07-28 11:45:36.000000000 +0200
+++ new/kdump-0.5.5/NEWS 2008-08-01 13:45:09.000000000 +0200
@@ -1,7 +1,31 @@
+0.5.5
+-----
+ * make dependency to libssh2 optional
+
+0.5.4
+-----
+ * always create empty ${tmp_mnt}/etc/fstab.kdump
+ * change execution state to 'boot'
+ * use UUID for fstab.kdump
+ * open a shell if something fails and KDUMP_CONTINUE_ON_ERROR is true
+ * don't include JFS to initrd
+ * don't add -s '' parameter to mkinitrd call if the boot splash script
+ is not available
+ * handle more programs in $KDUMP_REQUIRED_PROGRAMS correct
+ * move original /etc/fstab back
+
+0.5.3
+-----
+ * don't exit with error code when the dump directory does not yet exist in the
+ 'delete_dumps' command
+ * fix syntax error in init/boot-kdump.sh
+
0.5.2
-----
* copy required programs (KDUMP_REQUIRED_PROGRAMS) in initrd
* mount dump partition and boot partition in initrd
+ * don't exit with error code when the dump directory does not yet exist in the
+ 'delete_dumps' command
0.5.1
-----
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org