kexec-tools/kexec-tools.spec
Tony Jones cf62e2066a Accepting request 401235 from home:jones_tony:branches:Kernel:kdump
- Update to version 2.0.12 (FATE#320915, bsc#980545)
  Changelog: http://git.kernel.org/cgit/utils/kernel/kexec/kexec-tools.git/log/?id=refs/tags/v2.0.10..v2.0.12
  Drop following patches (upstream):
   kexec-tools-load-crash-kernel-high.patch
-  Fix pkg-config to check >= 4.7 rather than > 4.6 for xenlight
-  Specifically name Files in specfile rather than using glob.

OBS-URL: https://build.opensuse.org/request/show/401235
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kexec-tools?expand=0&rev=71
2016-06-10 20:07:09 +00:00

137 lines
3.7 KiB
RPMSpec

#
# spec file for package kexec-tools
#
# Copyright (c) 2016 SUSE LINUX 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/
#
Name: kexec-tools
%ifarch ppc
BuildRequires: gcc-64bit
BuildRequires: glibc-devel-64bit
%endif
Requires: perl-Bootloader
Requires(pre): %fillup_prereq
Requires(post): coreutils
Requires(postun): coreutils
Summary: Tools for fast kernel loading
License: GPL-2.0+
Group: System/Kernel
Version: 2.0.12
Release: 0
Source: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
Source1: kexec-bootloader
Source2: kexec-bootloader.8.txt
Source3: kexec-load.service
Source4: %{name}-rpmlintrc
Patch1: %{name}-xen-static.patch
Patch2: %{name}-xen-balloon-up.patch
Patch3: %{name}-disable-test.patch
Patch4: %{name}-enable-aarch64.patch
Patch5: %{name}-enable-aarch64-fixup.patch
Url: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#!BuildIgnore: fop
BuildRequires: asciidoc
BuildRequires: automake
BuildRequires: libxslt
BuildRequires: zlib-devel
%ifarch x86_64
BuildRequires: pkg-config
BuildRequires: xen-devel
%endif
ExclusiveArch: ppc64le aarch64 %ix86 x86_64 ia64 ppc ppc64 s390 s390x %arm sh mips mipsel m68k
%description
Kexec is a user space utility for loading another kernel and asking the
currently running kernel to do something with it. A currently running
kernel may be asked to start the loaded kernel on reboot, or to start
the loaded kernel after it panics.
%prep
%setup -q -n kexec-tools-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
# disable as-needed
export SUSE_ASNEEDED=0
%{?suse_update_config -f}
%ifarch ia64 ppc64le
RPM_OPT_FLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-fstack-protector//')
%endif
autoreconf -f
CFLAGS=$RPM_OPT_FLAGS BUILD_CFLAGS=$RPM_OPT_FLAGS \
%ifarch ppc
%configure --host=powerpc64-suse-linux --build=powerpc64-suse-linux
%else
%configure
%endif
make
a2x -D . -d manpage -f manpage %{S:2}
%install
%makeinstall
install -c -m 0644 kexec-bootloader.8 $RPM_BUILD_ROOT%{_mandir}/man8
rm -f $RPM_BUILD_ROOT%{_mandir}/man8/kdump.8
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
install -m 0755 %{S:1} $RPM_BUILD_ROOT%{_sbindir}
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
install -m644 %{S:3} $RPM_BUILD_ROOT%{_unitdir}
#UsrMerge
mkdir -p $RPM_BUILD_ROOT/sbin
ln -s %{_sbindir}/kdump $RPM_BUILD_ROOT/sbin
ln -s %{_sbindir}/kexec $RPM_BUILD_ROOT/sbin
#EndUsrMerge
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
%post
%service_add_post kexec-load.service
%{?regenerate_initrd_post}
%postun
%service_del_postun kexec-load.service
%{?regenerate_initrd_post}
%pre
%service_add_pre kexec-load.service
%preun
%service_del_preun kexec-load.service
%posttrans
%{?regenerate_initrd_posttrans}
%files
%defattr(-, root, root)
%doc AUTHORS COPYING News TODO doc
%doc %{_mandir}/man*/*
#UsrMerge
/sbin/kdump
/sbin/kexec
#EndUsrMerge
%{_sbindir}/kdump
%{_sbindir}/kexec
%{_sbindir}/kexec-bootloader
%{_sbindir}/vmcore-dmesg
%{_unitdir}/kexec-load.service
%changelog