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
|
|
|
#
|
2018-09-24 15:47:13 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX 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/
|
|
|
|
#
|
|
|
|
|
2008-09-29 18:00:24 +02:00
|
|
|
|
2017-11-24 10:57:35 +01:00
|
|
|
#Compat macro for new _fillupdir macro introduced in Nov 2017
|
|
|
|
%if ! %{defined _fillupdir}
|
|
|
|
%define _fillupdir /var/adm/fillup-templates
|
|
|
|
%endif
|
|
|
|
|
2007-01-16 00:24:56 +01:00
|
|
|
Name: mcelog
|
2018-09-24 15:47:13 +02:00
|
|
|
Version: 1.60
|
2016-02-02 18:14:08 +01:00
|
|
|
Release: 0
|
2007-01-16 00:24:56 +01:00
|
|
|
Summary: Log Machine Check Events
|
2014-07-18 07:32:44 +02:00
|
|
|
License: GPL-2.0
|
2012-07-18 14:50:39 +02:00
|
|
|
Group: System/Monitoring
|
2016-12-17 14:05:01 +01:00
|
|
|
Url: http://www.mcelog.org/
|
2017-07-24 16:23:43 +02:00
|
|
|
Source: %{name}-%{version}.tar.xz
|
2010-10-25 15:51:14 +02:00
|
|
|
Source2: mcelog.sysconfig
|
2011-11-24 17:57:46 +01:00
|
|
|
Source3: mcelog.systemd
|
2014-09-22 10:53:25 +02:00
|
|
|
Source5: mcelog.tmpfiles
|
2010-10-25 15:51:14 +02:00
|
|
|
Source6: README.email_setup
|
|
|
|
Patch1: email.patch
|
2011-08-18 17:12:58 +02:00
|
|
|
Patch2: mcelog_invert_prefill_db_warning.patch
|
2014-05-16 17:58:42 +02:00
|
|
|
Patch3: Start-consolidating-AMD-specific-stuff.patch
|
|
|
|
Patch4: patches/add-defines.patch
|
|
|
|
Patch5: patches/add-f10h-support.patch
|
|
|
|
Patch6: patches/add-f11h-support.patch
|
|
|
|
Patch7: patches/add-f12h-support.patch
|
|
|
|
Patch8: patches/add-f14h-support.patch
|
|
|
|
Patch9: patches/add-f15h-support.patch
|
|
|
|
Patch10: patches/add-f16h-support.patch
|
2015-01-23 13:50:02 +01:00
|
|
|
Patch11: mcelog-socket-path.patch
|
|
|
|
Patch12: fix_setgroups_missing_call.patch
|
2016-02-02 18:14:08 +01:00
|
|
|
BuildRequires: libesmtp-devel
|
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
Requires: logrotate
|
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
ExclusiveArch: %ix86 x86_64
|
2013-11-27 09:05:19 +01:00
|
|
|
%{?systemd_requires}
|
2013-02-23 08:36:00 +01:00
|
|
|
|
2007-01-16 00:24:56 +01:00
|
|
|
%description
|
|
|
|
mcelog retrieves machine check events from an x86-64 kernel in a cron
|
2016-02-02 18:14:08 +01:00
|
|
|
job, decodes them, and logs them to %{_localstatedir}/log/mcelog.
|
2007-01-16 00:24:56 +01:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
%prep
|
2017-07-24 16:23:43 +02:00
|
|
|
%setup -q
|
2010-09-16 12:23:45 +02:00
|
|
|
%patch1 -p1
|
2011-08-18 17:12:58 +02:00
|
|
|
%patch2 -p1
|
2014-05-16 17:58:42 +02:00
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7 -p1
|
|
|
|
%patch8 -p1
|
|
|
|
%patch9 -p1
|
|
|
|
%patch10 -p1
|
2014-07-04 16:20:51 +02:00
|
|
|
%patch11 -p1
|
2014-09-22 10:53:25 +02:00
|
|
|
%patch12 -p1
|
2015-06-15 18:24:28 +02:00
|
|
|
|
2007-01-16 00:24:56 +01:00
|
|
|
%build
|
2016-12-17 14:05:01 +01:00
|
|
|
make %{?_smp_mflags} CFLAGS="%{optflags} -fpie -pie"
|
2007-01-16 00:24:56 +01:00
|
|
|
|
2016-02-02 18:14:08 +01:00
|
|
|
%install
|
|
|
|
export prefix=%{buildroot}%{_prefix}
|
|
|
|
export etcprefix=%{buildroot}
|
2010-09-16 12:23:45 +02:00
|
|
|
make -e install
|
2016-02-02 18:14:08 +01:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/
|
|
|
|
install -m644 mcelog.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/mcelog
|
2010-10-25 15:51:14 +02:00
|
|
|
|
2017-11-24 10:57:35 +01:00
|
|
|
mkdir -p %{buildroot}%{_fillupdir}
|
|
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_fillupdir}/sysconfig.mcelog
|
2010-10-25 15:51:14 +02:00
|
|
|
|
2016-02-02 18:14:08 +01:00
|
|
|
mkdir -p %{buildroot}/%{_docdir}/%{name}
|
|
|
|
install -m 644 %{SOURCE6} %{buildroot}/%{_docdir}/%{name}/README.email_setup
|
|
|
|
install -m 644 lk10-mcelog.pdf %{buildroot}/%{_docdir}/%{name}/lk10-mcelog.pdf
|
|
|
|
install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/mcelog.service
|
|
|
|
install -D -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/mcelog.conf
|
|
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcmcelog
|
2007-01-16 00:24:56 +01:00
|
|
|
|
2013-11-27 09:05:19 +01:00
|
|
|
%pre
|
|
|
|
%service_add_pre %{name}.service
|
|
|
|
|
2010-01-12 16:13:00 +01:00
|
|
|
%post
|
2013-11-27 09:05:19 +01:00
|
|
|
%fillup_only
|
|
|
|
%service_add_post %{name}.service
|
2016-02-02 18:14:08 +01:00
|
|
|
%{?tmpfiles_create:%tmpfiles_create %{_tmpfilesdir}/mcelog.conf}
|
2010-01-12 16:13:00 +01:00
|
|
|
|
|
|
|
%preun
|
2013-11-27 09:05:19 +01:00
|
|
|
%service_del_preun %{name}.service
|
2010-01-12 16:13:00 +01:00
|
|
|
|
|
|
|
%postun
|
2013-11-27 09:05:19 +01:00
|
|
|
%service_del_postun %{name}.service
|
2010-01-12 16:13:00 +01:00
|
|
|
|
2007-01-16 00:24:56 +01:00
|
|
|
%files
|
|
|
|
%defattr (-,root,root,755)
|
|
|
|
%{_mandir}/man8/*
|
2015-06-15 18:24:28 +02:00
|
|
|
%{_mandir}/man5/*
|
2016-02-02 18:14:08 +01:00
|
|
|
%{_sbindir}/mcelog
|
|
|
|
%config %{_sysconfdir}/logrotate.d/mcelog
|
|
|
|
%dir %{_sysconfdir}/mcelog
|
|
|
|
%config %{_sysconfdir}/mcelog/mcelog.conf
|
2017-11-24 10:57:35 +01:00
|
|
|
%{_fillupdir}/sysconfig.mcelog
|
2016-02-02 18:14:08 +01:00
|
|
|
%{_sysconfdir}/mcelog/*trigger
|
2013-11-27 09:05:19 +01:00
|
|
|
%{_unitdir}/mcelog.service
|
2014-09-22 10:53:25 +02:00
|
|
|
%{_tmpfilesdir}/mcelog.conf
|
2016-02-02 18:14:08 +01:00
|
|
|
%{_docdir}/%{name}
|
|
|
|
%{_sbindir}/rcmcelog
|
2015-06-15 18:24:28 +02:00
|
|
|
%ghost /run/mcelog
|
2007-01-16 00:24:56 +01:00
|
|
|
|
2008-09-29 18:00:24 +02:00
|
|
|
%changelog
|