# # spec file for package kdump (Version 0.8.1) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Url: http://freehg.org/u/bwalle/kdump/ Name: kdump License: GPL v2 or later Version: 0.8.1 Release: 1 Requires: curl openssh makedumpfile Summary: Script for kdump Group: System/Kernel BuildRequires: libesmtp-devel BuildRequires: gcc-c++ libcurl-devel libelf0-devel zlib-devel BuildRequires: asciidoc cmake libxslt #!BuildIgnore: fop %if %suse_version > 1100 BuildRequires: libssh2-devel %endif PreReq: %insserv_prereq %fillup_prereq mkinitrd Source: %{name}-%{version}.tar.bz2 Source2: %{name}-%{version}-rpmlintrc Patch0: %{name}-fix-gcc46.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2) Provides: kdump-helpers = 0.2.4 Obsoletes: kdump-helpers <= 0.2.4 # update should detect the split-off from kexec-tools Provides: kexec-tools:/etc/init.d/kdump Requires: kexec-tools PreReq: coreutils sed ExcludeArch: s390 s390x ppc %description kdump is a package that includes several scripts for kdump, including the init script /etc/init.d/kdump and the configuration file for kdump. The kernel package and this package are all that are required for a crash dump to occur. However, if you wish to debug the crash dump yourself you will need several debugging packages installed for each kernel flavor and release you wish to debug. For example, if you are debugging kernel-default, you will need: - kernel-default-debuginfo - kernel-default-devel - kernel-default-devel-debuginfo These packages are not needed to create the dump and can be installed after a crash dump has occured. Authors: -------- Bernhard Walle %prep %setup %patch0 -p1 %build export CFLAGS="%optflags" export CXXFLAGS="%optflags" mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} .. make cd - %install cd build make DESTDIR=$RPM_BUILD_ROOT install cd - # symlink for init script mkdir -p $RPM_BUILD_ROOT/sbin ln -s /etc/init.d/boot.kdump $RPM_BUILD_ROOT/sbin/rckdump # empty directory mkdir $RPM_BUILD_ROOT/var/crash %post # change only permission if the file exists before /etc/sysconfig/kdump # has been created from /var/adm/fillup-templates/sysconfig.kdump change_permission=0 if [ ! -f /etc/sysconfig/kdump ] ; then change_permission=1 fi %{fillup_and_insserv -n kdump boot.kdump} if (( $change_permission )) ; then chmod 0600 /etc/sysconfig/kdump fi /sbin/mkinitrd_setup # if /var/log/dump is empty, make it a symlink to /var/crash if test -d /var/log/dump && rmdir /var/log/dump &>/dev/null || ! test -d /var/log/dump ; then ln -snf /var/crash /var/log/dump fi %preun echo "Stopping kdump ..." %stop_on_removal boot.kdump %postun # force regeneration of kdumprd touch /etc/sysconfig/kdump /sbin/mkinitrd_setup # delete symbolic link rm /var/log/dump &>/dev/null || true %restart_on_update boot.kdump %insserv_cleanup %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc ChangeLog COPYING README NEWS %{_sbindir}/kdumptool %{_sbindir}/mkdumprd %{_mandir}/man5/kdump.5.gz %{_mandir}/man7/kdump.7.gz %{_mandir}/man8/kdumptool.8.gz %{_mandir}/man8/mkdumprd.8.gz /sbin/rckdump %{_sysconfdir}/init.d/boot.kdump /var/adm/fillup-templates/sysconfig.kdump /lib/mkinitrd/scripts/*-kdump.sh %config %{_sysconfdir}/udev/rules.d/70-kdump.rules %changelog