]>
Commit | Line | Data |
---|---|---|
7bed061b JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without xen # Xen support | |
4 | %bcond_with booke # [PPC] build for BookE | |
5 | %bcond_with gamecube # [PPC] build for GameCube | |
14b4ad98 | 6 | |
ce7373cd JB |
7 | %ifarch x32 |
8 | # Xen not (yet?) available | |
9 | %undefine with_xen | |
10 | %endif | |
c7aaca66 | 11 | Summary: Tool for starting new kernel without reboot |
f7a90ea7 | 12 | Summary(pl.UTF-8): Narzędzie pozwalające załadować nowe jądro bez konieczności restartu |
83378ddf | 13 | Name: kexec-tools |
d5e928e9 | 14 | Version: 2.0.28 |
1b814f35 | 15 | Release: 4 |
63ec433a | 16 | License: GPL v2 |
83378ddf | 17 | Group: Applications/System |
da5ba346 | 18 | Source0: https://www.kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz |
d5e928e9 | 19 | # Source0-md5: c775dfc1c5f1397f390b5478845185be |
27c9cb5d ER |
20 | Source1: kexec.init |
21 | Source2: kexec.sysconfig | |
f124e8db | 22 | # from http://patchwork.openembedded.org/patch/90971/raw/ (stripped to remaining syscall part) |
9a29d6a7 | 23 | Patch0: %{name}-x32.patch |
186a316b | 24 | Patch1: %{name}-git.patch |
da5ba346 | 25 | URL: https://www.kernel.org/pub/linux/utils/kernel/kexec/ |
7bed061b | 26 | BuildRequires: autoconf >= 2.50 |
27c9cb5d | 27 | BuildRequires: rpmbuild(macros) >= 1.228 |
c8949128 | 28 | BuildRequires: tar >= 1:1.22 |
423cbcda | 29 | %{?with_xen:BuildRequires: xen-devel >= 4.4} |
c8949128 | 30 | BuildRequires: xz |
aedec1f2 | 31 | BuildRequires: xz-devel |
0bc7fbdb | 32 | BuildRequires: zlib-devel |
27c9cb5d | 33 | Requires(post,preun): /sbin/chkconfig |
fa53ca76 | 34 | Requires: rc-scripts >= 0.4.0.9 |
9de86797 | 35 | ExclusiveArch: %{ix86} %{x8664} x32 alpha %{arm} aarch64 cris ia64 m68k mips ppc ppc64 s390 s390x sh |
83378ddf RJ |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
22fc615a AM |
38 | %define _sbindir /sbin |
39 | ||
83378ddf | 40 | %description |
c7aaca66 JB |
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. | |
83378ddf | 45 | |
6f4306fd JR |
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. | |
83378ddf RJ |
51 | |
52 | %prep | |
24f59696 | 53 | %setup -q |
da5ba346 | 54 | %patch0 -p1 |
186a316b | 55 | %patch1 -p1 |
83378ddf RJ |
56 | |
57 | %build | |
1b2823ad | 58 | %{__autoconf} |
7bed061b JB |
59 | %configure \ |
60 | %{?with_booke:--with-booke} \ | |
61 | %{?with_gamecube:--with-gamecube} \ | |
62 | %{!?with_xen:--without-xen} | |
1b2823ad | 63 | %{__make} |
83378ddf RJ |
64 | |
65 | %install | |
66 | rm -rf $RPM_BUILD_ROOT | |
27c9cb5d | 67 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} |
22fc615a AM |
68 | |
69 | %{__make} install \ | |
70 | DESTDIR=$RPM_BUILD_ROOT | |
71 | ||
27c9cb5d ER |
72 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/kexec |
73 | cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/kexec | |
74 | ||
83378ddf RJ |
75 | %clean |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
27c9cb5d ER |
78 | %post |
79 | /sbin/chkconfig --add kexec | |
80 | %service kexec restart | |
81 | ||
82 | %preun | |
83 | if [ "$1" = "0" ]; then | |
84 | %service -q kexec stop | |
85 | /sbin/chkconfig --del kexec | |
86 | fi | |
87 | ||
83378ddf RJ |
88 | %files |
89 | %defattr(644,root,root,755) | |
24f59696 | 90 | %doc AUTHORS News TODO |
27c9cb5d ER |
91 | %attr(754,root,root) /etc/rc.d/init.d/kexec |
92 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/kexec | |
24f59696 | 93 | %attr(755,root,root) %{_sbindir}/kexec |
c8949128 | 94 | %attr(755,root,root) %{_sbindir}/vmcore-dmesg |
c8949128 JB |
95 | %{_mandir}/man8/kexec.8* |
96 | %{_mandir}/man8/vmcore-dmesg.8* | |
ce7373cd | 97 | %ifarch %{ix86} x32 |
24f59696 | 98 | %dir %{_libdir}/kexec-tools |
5360ef18 | 99 | # what is this anyway, is it needed on other arches? |
24f59696 | 100 | %attr(755,root,root) %{_libdir}/kexec-tools/kexec_test |
5360ef18 | 101 | %endif |