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
|
|
|
#
|
2023-05-29 22:13:58 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
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.
|
|
|
|
|
2019-03-25 14:22:39 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:24:56 +01:00
|
|
|
#
|
|
|
|
|
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}
|
2020-08-16 21:10:07 +02:00
|
|
|
%define _fillupdir %{_localstatedir}/adm/fillup-templates
|
2017-11-24 10:57:35 +01:00
|
|
|
%endif
|
2007-01-16 00:24:56 +01:00
|
|
|
Name: mcelog
|
2023-05-29 22:13:58 +02:00
|
|
|
Version: 194
|
2016-02-02 18:14:08 +01:00
|
|
|
Release: 0
|
2007-01-16 00:24:56 +01:00
|
|
|
Summary: Log Machine Check Events
|
2019-03-25 14:22:39 +01:00
|
|
|
License: GPL-2.0-only
|
2012-07-18 14:50:39 +02:00
|
|
|
Group: System/Monitoring
|
2020-08-16 21:10:07 +02:00
|
|
|
URL: https://mcelog.org/
|
2021-07-13 08:00:42 +02:00
|
|
|
Source: mcelog-%{version}.tar.gz
|
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
|
2022-05-03 16:52:12 +02:00
|
|
|
Patch13: python3_shebang
|
|
|
|
BuildRequires: %{pythons}
|
2016-02-02 18:14:08 +01:00
|
|
|
BuildRequires: libesmtp-devel
|
2020-08-16 21:10:07 +02:00
|
|
|
BuildRequires: pkgconfig
|
2016-02-02 18:14:08 +01:00
|
|
|
BuildRequires: pkgconfig(systemd)
|
|
|
|
Requires: logrotate
|
|
|
|
Requires(pre): %fillup_prereq
|
2020-08-16 21:10:07 +02:00
|
|
|
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
|
2019-03-25 14:22:39 +01:00
|
|
|
%autosetup
|
2015-06-15 18:24:28 +02:00
|
|
|
|
2007-01-16 00:24:56 +01:00
|
|
|
%build
|
2020-08-16 21:10:07 +02:00
|
|
|
echo "%{version}" > .os_version
|
|
|
|
%make_build 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
|