2007-01-16 00:24:56 +01:00
|
|
|
#
|
2011-06-16 10:53:25 +02:00
|
|
|
# spec file for package mcelog
|
2007-01-16 00:24:56 +01:00
|
|
|
#
|
2011-06-16 10:53:25 +02:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:24:56 +01:00
|
|
|
#
|
2008-09-29 18:00:24 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:24:56 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2008-09-29 18:00:24 +02:00
|
|
|
|
2007-01-16 00:24:56 +01:00
|
|
|
Name: mcelog
|
2010-01-12 16:13:00 +01:00
|
|
|
License: GPLv2+
|
2007-01-16 00:24:56 +01:00
|
|
|
Summary: Log Machine Check Events
|
2010-10-25 15:51:14 +02:00
|
|
|
Version: 1.0pre3.6363f5b719e9
|
2011-06-16 10:53:25 +02:00
|
|
|
Release: 6
|
2008-09-29 18:00:24 +02:00
|
|
|
AutoReqProv: on
|
2009-01-10 04:39:56 +01:00
|
|
|
ExclusiveArch: x86_64
|
2010-10-25 15:51:14 +02:00
|
|
|
BuildRequires: libesmtp-devel
|
|
|
|
Requires: logrotate
|
|
|
|
PreReq: %insserv_prereq %fillup_prereq
|
2009-11-16 18:01:52 +01:00
|
|
|
Source: mcelog-%{version}.tar.bz2
|
2010-01-12 16:13:00 +01:00
|
|
|
Source1: mcelog.service
|
2010-10-25 15:51:14 +02:00
|
|
|
Source2: mcelog.sysconfig
|
|
|
|
Source6: README.email_setup
|
|
|
|
Patch1: email.patch
|
2007-01-16 00:24:56 +01:00
|
|
|
Group: System/Monitoring
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
mcelog retrieves machine check events from an x86-64 kernel in a cron
|
|
|
|
job, decodes them, and logs them to /var/log/mcelog.
|
|
|
|
|
|
|
|
A machine check event is a hardware error detected by the CPU.
|
|
|
|
|
|
|
|
It should run on any x86-64 system.
|
|
|
|
|
|
|
|
In addition, it allows decoding machine check kernel panic messages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
2008-09-29 18:00:24 +02:00
|
|
|
Andi Kleen <andi@firstfloor.org>
|
2007-01-16 00:24:56 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup
|
2010-09-16 12:23:45 +02:00
|
|
|
%patch1 -p1
|
2007-01-16 00:24:56 +01:00
|
|
|
|
|
|
|
%build
|
2010-10-25 15:51:14 +02:00
|
|
|
export SUSE_ASNEEDED=0
|
2007-01-16 00:24:56 +01:00
|
|
|
make CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
|
|
|
|
%install
|
2010-09-16 12:23:45 +02:00
|
|
|
export prefix=$RPM_BUILD_ROOT/usr
|
|
|
|
export etcprefix=$RPM_BUILD_ROOT
|
|
|
|
make -e install
|
2007-01-16 00:24:56 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/
|
2010-01-12 16:13:00 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
|
|
|
install -m755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/mcelog
|
|
|
|
ln -s /etc/init.d/mcelog $RPM_BUILD_ROOT/usr/sbin/rcmcelog
|
|
|
|
install -m644 mcelog.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/mcelog
|
2007-01-16 00:24:56 +01:00
|
|
|
|
2010-10-25 15:51:14 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
|
|
|
|
install -m 644 %SOURCE2 $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.mcelog
|
|
|
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%_docdir/%name
|
|
|
|
install -m 644 %SOURCE6 $RPM_BUILD_ROOT/%_docdir/%name/README.email_setup
|
|
|
|
install -m 644 lk10-mcelog.pdf $RPM_BUILD_ROOT/%_docdir/%name/lk10-mcelog.pdf
|
|
|
|
|
2007-01-16 00:24:56 +01:00
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2010-01-12 16:13:00 +01:00
|
|
|
%post
|
|
|
|
if [ -c /dev/mcelog ];then
|
2010-10-25 15:51:14 +02:00
|
|
|
%{fillup_and_insserv -y mcelog}
|
2010-01-12 16:13:00 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
%preun
|
2010-09-16 12:23:45 +02:00
|
|
|
%{stop_on_removal mcelog}
|
2010-01-12 16:13:00 +01:00
|
|
|
|
|
|
|
%postun
|
2010-09-16 12:23:45 +02:00
|
|
|
%{restart_on_update mcelog}
|
2010-01-12 16:13:00 +01:00
|
|
|
%insserv_cleanup
|
|
|
|
|
2007-01-16 00:24:56 +01:00
|
|
|
%files
|
|
|
|
%defattr (-,root,root,755)
|
|
|
|
%{_mandir}/man8/*
|
|
|
|
/usr/sbin/mcelog
|
2010-01-12 16:13:00 +01:00
|
|
|
%config /etc/logrotate.d/mcelog
|
|
|
|
/etc/init.d/mcelog
|
2010-09-16 12:23:45 +02:00
|
|
|
%dir /etc/mcelog
|
|
|
|
%config /etc/mcelog/mcelog.conf
|
2010-10-25 15:51:14 +02:00
|
|
|
/var/adm/fillup-templates/sysconfig.mcelog
|
2010-09-16 12:23:45 +02:00
|
|
|
/etc/mcelog/*trigger
|
2010-01-12 16:13:00 +01:00
|
|
|
/usr/sbin/rcmcelog
|
2010-10-25 15:51:14 +02:00
|
|
|
%_docdir/%name
|
2007-01-16 00:24:56 +01:00
|
|
|
|
2008-09-29 18:00:24 +02:00
|
|
|
%changelog
|