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