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: f11248953c777427757b5ba5ddb1ce9b
21 Source2: kexec.sysconfig
22 # from http://patchwork.openembedded.org/patch/90971/raw/ (stripped to remaining syscall part)
23 Patch0: %{name}-x32.patch
24 URL: https://www.kernel.org/pub/linux/utils/kernel/kexec/
25 BuildRequires: autoconf >= 2.50
26 BuildRequires: rpmbuild(macros) >= 1.228
27 BuildRequires: tar >= 1:1.22
28 %{?with_xen:BuildRequires: xen-devel >= 4.4}
30 BuildRequires: xz-devel
31 BuildRequires: zlib-devel
32 Requires(post,preun): /sbin/chkconfig
33 Requires: rc-scripts >= 0.4.0.9
34 ExclusiveArch: %{ix86} %{x8664} x32 alpha %{arm} aarch64 cris ia64 m68k mips ppc ppc64 s390 s390x sh
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _sbindir /sbin
40 kexec is a set of system calls that allows you to load another kernel
41 from the currently executing Linux kernel. The current implementation
42 has only been tested, and had the kinks worked out on x86, but the
43 generic code should work on any architecture.
45 %description -l pl.UTF-8
46 kexec to zestaw wywołań systemowych pozwalających załadować następne
47 jądro z poziomu aktualnie działającego jądra Linuksa. Aktualna
48 implementacja była testowana tylko na x86, ale ogólny kod powinien
49 działać na każdej architekturze.
58 %{?with_booke:--with-booke} \
59 %{?with_gamecube:--with-gamecube} \
60 %{!?with_xen:--without-xen}
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
68 DESTDIR=$RPM_BUILD_ROOT
70 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/kexec
71 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/kexec
74 rm -rf $RPM_BUILD_ROOT
77 /sbin/chkconfig --add kexec
78 %service kexec restart
81 if [ "$1" = "0" ]; then
82 %service -q kexec stop
83 /sbin/chkconfig --del kexec
87 %defattr(644,root,root,755)
88 %doc AUTHORS News TODO
89 %attr(754,root,root) /etc/rc.d/init.d/kexec
90 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/kexec
91 %attr(755,root,root) %{_sbindir}/kexec
92 %attr(755,root,root) %{_sbindir}/vmcore-dmesg
93 %{_mandir}/man8/kexec.8*
94 %{_mandir}/man8/vmcore-dmesg.8*
96 %dir %{_libdir}/kexec-tools
97 # what is this anyway, is it needed on other arches?
98 %attr(755,root,root) %{_libdir}/kexec-tools/kexec_test