3 %bcond_without xen # Xen support
4 %bcond_with booke # [PPC] build for BookE
5 %bcond_with gamecube # [PPC] build for GameCube
8 # Xen not (yet?) available
11 Summary: Tool for starting new kernel without reboot
12 Summary(pl.UTF-8): Narzędzie pozwalające załadować nowe jądro bez konieczności restartu
17 Group: Applications/System
18 Source0: https://www.kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
19 # Source0-md5: d399dc099fac5f384b429f09d79b2608
21 Source2: kexec.sysconfig
22 Patch0: %{name}-xen.patch
23 # from http://patchwork.openembedded.org/patch/90971/raw/
24 Patch1: %{name}-x32.patch
25 URL: https://www.kernel.org/pub/linux/utils/kernel/kexec/
26 BuildRequires: autoconf >= 2.50
27 BuildRequires: rpmbuild(macros) >= 1.228
28 BuildRequires: tar >= 1:1.22
29 %{?with_xen:BuildRequires: xen-devel >= 4.4}
31 BuildRequires: xz-devel
32 BuildRequires: zlib-devel
33 Requires(post,preun): /sbin/chkconfig
34 Requires: rc-scripts >= 0.4.0.9
35 ExclusiveArch: %{ix86} %{x8664} x32 alpha %{arm} aarch64 cris ia64 m68k mips ppc ppc64 s390 s390x sh
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define _sbindir /sbin
41 kexec is a set of system calls that allows you to load another kernel
42 from the currently executing Linux kernel. The current implementation
43 has only been tested, and had the kinks worked out on x86, but the
44 generic code should work on any architecture.
46 %description -l pl.UTF-8
47 kexec to zestaw wywołań systemowych pozwalających załadować następne
48 jądro z poziomu aktualnie działającego jądra Linuksa. Aktualna
49 implementacja była testowana tylko na x86, ale ogólny kod powinien
50 działać na każdej architekturze.
60 %{?with_booke:--with-booke} \
61 %{?with_gamecube:--with-gamecube} \
62 %{!?with_xen:--without-xen}
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
70 DESTDIR=$RPM_BUILD_ROOT
72 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/kexec
73 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/kexec
76 rm -rf $RPM_BUILD_ROOT
79 /sbin/chkconfig --add kexec
80 %service kexec restart
83 if [ "$1" = "0" ]; then
84 %service -q kexec stop
85 /sbin/chkconfig --del kexec
89 %defattr(644,root,root,755)
90 %doc AUTHORS News TODO
91 %attr(754,root,root) /etc/rc.d/init.d/kexec
92 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/kexec
93 %attr(755,root,root) %{_sbindir}/kexec
94 %attr(755,root,root) %{_sbindir}/vmcore-dmesg
95 %{_mandir}/man8/kexec.8*
96 %{_mandir}/man8/vmcore-dmesg.8*
98 %dir %{_libdir}/kexec-tools
99 # what is this anyway, is it needed on other arches?
100 %attr(755,root,root) %{_libdir}/kexec-tools/kexec_test