]> git.pld-linux.org Git - packages/mcelog.git/blob - mcelog.spec
- rel .1 alwas be quiet
[packages/mcelog.git] / mcelog.spec
1 %define         subver  pre3
2 Summary:        x86-64 Machine Check Exceptions collector and decoder
3 Summary(pl.UTF-8):      Narzędzie do zbierania i dekodowania wyjątków MCE na platformie x86-64
4 Name:           mcelog
5 Version:        1.0
6 Release:        0.%{subver}.1
7 License:        GPL v2
8 Group:          Applications/System
9 Source0:        http://www.kernel.org/pub/linux/utils/cpu/mce/%{name}-%{version}%{subver}.tar.gz
10 # Source0-md5:  b42f2214de6f4feb992556149edc67fa
11 Source1:        %{name}.logrotate
12 Patch1:         %{name}-FHS.patch
13 Requires:       crondaemon
14 Requires:       logrotate
15 ExclusiveArch:  %{ix86} %{x8664}
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         statdir         /var/lib/misc
19
20 %description
21 mcelog decodes machine check events (hardware errors) on x86-64
22 machines running a 64-bit Linux kernel.
23
24 Starting with version 2.6.4, the Linux kernel for x86-64 no longer
25 decodes and logs recoverable Machine Check Exception events to the
26 kernel log on its own.
27
28 Instead, the MCE data is kept in a buffer which can be read from
29 userpace via the /dev/mcelog device node. You need this tool to
30 collect and decode those events; it will log the decoded MCE events
31 into /var/log/mcelog. Currently, mcelog can decode MCE from AMD K8 and
32 Intel P4 (including Xeon) processors.
33
34 %description -l pl.UTF-8
35 mcelog dekoduje zdarzenia Machine Check Exception (błędy sprzętowe) na
36 maszynach x86-64 pracujących pod kontrolą 64-bitowego jądra Linuksa.
37
38 Począwszy od wersji 2.6.4 jądro Linuksa dla x86-64 już samodzielnie
39 nie dekoduje ani nie loguje niekrytycznych zdarzeń MCE.
40
41 Zamiast tego dane MCE są przechowywane w buforze, który może być
42 czytany z przestrzeni użytkownika poprzez urządzenie /dev/mcelog. To
43 narzędzie jest potrzebne do zbierania i dekodowania tych zdarzeń;
44 loguje ono zdekodowane zdarzenia MCE do /var/log/mcelog. Aktualnie
45 mcelog potrafi dekodować MCE z procesorów AMD K8 i Intel P4 (w tym
46 Xeon).
47
48 %prep
49 %setup -q -n %{name}-%{version}%{subver}
50 %patch1 -p1
51
52 %build
53 %{__make} \
54         CC="%{__cc}" \
55         CFLAGS="%{rpmcflags}"
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{/etc/{cron,logrotate}.d,/var/log,%{statdir}}
60
61 %{__make} install \
62         prefix=$RPM_BUILD_ROOT/%{_prefix} \
63         etcprefix=$RPM_BUILD_ROOT
64
65 cat <<'EOF' > $RPM_BUILD_ROOT/etc/cron.d/%{name}
66 0 * * * * root %{_sbindir}/mcelog --ignorenodev --filter >> /var/log/mcelog 2>&1
67 EOF
68
69 install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
70
71 :> $RPM_BUILD_ROOT%{statdir}/memory-errors
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %files
77 %defattr(644,root,root,755)
78 %doc CHANGES README TODO TODO-diskdb mce.pdf
79 %attr(755,root,root) %{_sbindir}/mcelog
80 %attr(640,root,root) /etc/cron.d/mcelog
81 %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mcelog
82 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}
83 %attr(640,root,root) %ghost %{statdir}/memory-errors
84 %{_mandir}/man8/mcelog.8*
This page took 0.071747 seconds and 3 git commands to generate.