]> git.pld-linux.org Git - packages/mcelog.git/blob - mcelog.spec
- bump rel
[packages/mcelog.git] / mcelog.spec
1 # TODO
2 # - sync pl
3 %define         snap    20130601
4 %define         rel     1
5 Summary:        x86-64/x86 Machine Check Exceptions collector and decoder
6 Summary(pl.UTF-8):      Narzędzie do zbierania i dekodowania wyjątków MCE na platformie x86-64/x86
7 Name:           mcelog
8 Version:        1.0
9 Release:        1.%{snap}.%{rel}
10 License:        GPL v2
11 Group:          Applications/System
12 Source0:        https://github.com/andikleen/mcelog/archive/master.zip
13 # Source0-md5:  81f744e778cd170f68d03764633c4a31
14 Source1:        %{name}.logrotate
15 Source2:        %{name}.cron
16 Source3:        %{name}.init
17 Source4:        %{name}.sysconfig
18 Patch1:         %{name}-FHS.patch
19 Patch2:         bashism.patch
20 URL:            https://github.com/andikleen/mcelog.git
21 BuildRequires:  rpmbuild(macros) >= 1.228
22 BuildRequires:  unzip
23 Requires(post,preun):   /sbin/chkconfig
24 Requires:       rc-scripts
25 Suggests:       crondaemon
26 ExclusiveArch:  %{ix86} %{x8664}
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         statdir         /var/lib/misc
30
31 %description
32 mcelog is the user space backend for logging machine check errors
33 reported by the hardware to the kernel. The kernel does the immediate
34 actions (like killing processes etc.) and mcelog decodes the logs the
35 errors.
36
37 Starting with version 2.6.4 for x86-64 and 2.6.32 for x86, the Linux
38 kernel no longer decodes and logs recoverable Machine Check Exception
39 events to the kernel log on its own. It is recommended that mcelog
40 runs on all those machines.
41
42 Instead, the MCE data is kept in a buffer which can be read from
43 userpace via the /dev/mcelog device node. You need this tool to
44 collect and decode those events; it will log the decoded MCE events
45 into /var/log/mcelog.
46
47 %description -l pl.UTF-8
48 mcelog to program do logowania błędów sprzętowych Machine Check
49 Exception zgłaszanych przez sprzęt (x86 i x86-64) do jądra. Jądro
50 podejmuje natychmiastowe akcje (takie jak odłączanie procesorów), a
51 mcelog dekoduje logi tych błędów.
52
53 Począwszy od wersji 2.6.4 dla x86-64 i 2.6.32 dla x86 jądro Linuksa
54 już samodzielnie nie dekoduje ani nie loguje niekrytycznych zdarzeń
55 MCE - zaleca się uruchamianie mceloga na tych wszystkich maszynach.
56
57 Zamiast logowania przez jądro, dane MCE są przechowywane w buforze,
58 który może być czytany z przestrzeni użytkownika poprzez urządzenie
59 /dev/mcelog. To narzędzie jest potrzebne do zbierania i dekodowania
60 tych zdarzeń; loguje ono zdekodowane zdarzenia MCE do /var/log/mcelog.
61
62 %prep
63 %setup -q -n %{name}-master
64 %patch1 -p1
65 %patch2 -p1
66
67 %build
68 %{__make} \
69         CC="%{__cc}" \
70         CFLAGS="%{rpmcflags}"
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,sysconfig,{cron,logrotate}.d},/var/log,%{statdir}}
75
76 %{__make} install \
77         prefix=$RPM_BUILD_ROOT%{_prefix} \
78         etcprefix=$RPM_BUILD_ROOT
79
80 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/%{name}
81 cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
82 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
83 cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
84
85 :> $RPM_BUILD_ROOT%{statdir}/memory-errors
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %post
91 /sbin/chkconfig --add %{name}
92 %service %{name} restart
93
94 %preun
95 if [ "$1" = "0" ]; then
96         %service -q %{name} stop
97         /sbin/chkconfig --del %{name}
98 fi
99
100 %files
101 %defattr(644,root,root,755)
102 %doc CHANGES README TODO TODO-diskdb mce.pdf
103 %attr(755,root,root) %{_sbindir}/mcelog
104 %attr(640,root,root) /etc/cron.d/mcelog
105 %attr(754,root,root) /etc/rc.d/init.d/%{name}
106 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
107 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mcelog
108 %dir %{_sysconfdir}/%{name}
109 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf
110 # do replace on upgrade, in fact, these should be moved to /lib/mcelog as they
111 # all support foo.local invocation at the end
112 %attr(755,root,root) %config %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*-trigger
113 %attr(640,root,root) %ghost %{statdir}/memory-errors
114 %{_mandir}/man8/mcelog.8*
This page took 0.062122 seconds and 3 git commands to generate.