forked from pool/mcelog
557d13323a
Fixed license to GPL-2.0 OBS-URL: https://build.opensuse.org/request/show/240308 OBS-URL: https://build.opensuse.org/package/show/Base:System/mcelog?expand=0&rev=39
136 lines
3.8 KiB
RPMSpec
136 lines
3.8 KiB
RPMSpec
#
|
|
# spec file for package mcelog
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: mcelog
|
|
Summary: Log Machine Check Events
|
|
License: GPL-2.0
|
|
Group: System/Monitoring
|
|
Version: 1.0.1
|
|
Release: 0
|
|
ExclusiveArch: ix86 x86_64
|
|
BuildRequires: libesmtp-devel
|
|
BuildRequires: pkgconfig(systemd)
|
|
BuildRequires: pkgconfig(udev)
|
|
Requires: logrotate
|
|
Source: mcelog-%{version}.tar.bz2
|
|
Source2: mcelog.sysconfig
|
|
Source3: mcelog.systemd
|
|
Source4: 90-mcelog.rules
|
|
Source6: README.email_setup
|
|
Patch1: email.patch
|
|
Patch2: mcelog_invert_prefill_db_warning.patch
|
|
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
|
|
Patch11: 0001-Continue-without-dmi-when-no-SMBIOS-or-SMBIOS-0x0-in.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
PreReq: %fillup_prereq
|
|
Url: https://git.kernel.org/cgit/utils/cpu/mce/mcelog.git
|
|
# Previously version was wrong, mainline decided to go for 1.0.1. not 1.1
|
|
Obsoletes: mcelog = 1.1
|
|
%{?systemd_requires}
|
|
|
|
%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:
|
|
--------
|
|
Andi Kleen <andi@firstfloor.org>
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
%patch4 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
%patch7 -p1
|
|
%patch8 -p1
|
|
%patch9 -p1
|
|
%patch10 -p1
|
|
%patch11 -p1
|
|
|
|
%build
|
|
export SUSE_ASNEEDED=0
|
|
make CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
%install
|
|
export prefix=$RPM_BUILD_ROOT/usr
|
|
export etcprefix=$RPM_BUILD_ROOT
|
|
make -e install
|
|
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/
|
|
install -m644 mcelog.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/mcelog
|
|
|
|
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
|
|
install -D -m 0644 %SOURCE3 %{buildroot}%{_unitdir}/mcelog.service
|
|
install -D -m 0644 %SOURCE4 %{buildroot}%{_udevrulesdir}/90-mcelog.rules
|
|
ln -sf %_sbindir/service ${RPM_BUILD_ROOT}%_sbindir/rcmcelog
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%pre
|
|
%service_add_pre %{name}.service
|
|
|
|
%post
|
|
%fillup_only
|
|
%udev_rules_update
|
|
%service_add_post %{name}.service
|
|
|
|
%preun
|
|
%service_del_preun %{name}.service
|
|
|
|
%postun
|
|
%service_del_postun %{name}.service
|
|
|
|
%files
|
|
%defattr (-,root,root,755)
|
|
%{_mandir}/man8/*
|
|
/usr/sbin/mcelog
|
|
%config /etc/logrotate.d/mcelog
|
|
%dir /etc/mcelog
|
|
%config /etc/mcelog/mcelog.conf
|
|
/var/adm/fillup-templates/sysconfig.mcelog
|
|
/etc/mcelog/*trigger
|
|
%{_unitdir}/mcelog.service
|
|
%{_udevrulesdir}/90-mcelog.rules
|
|
%_docdir/%name
|
|
%_sbindir/rcmcelog
|
|
|
|
%changelog
|