d9e469
%define _hardened_build 1
d9e469
d9e469
Name:			rasdaemon
d9e469
Version:		0.4.1
7b553f
Release:		33.1%{?dist}
d9e469
Summary:		Utility to receive RAS error tracings
d9e469
Group:			Applications/System
d9e469
License:		GPLv2
d9e469
URL:			https://pagure.io/rasdaemon
d9e469
Source0:		http://mchehab.fedorapeople.org/%{name}-%{version}.tar.bz2
d9e469
d9e469
ExclusiveArch:		%{ix86} x86_64 aarch64 %{power64}
d9e469
BuildRoot:		%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
d9e469
BuildRequires:		autoconf, automake, gettext-devel, libtool, sqlite-devel
d9e469
Requires:		hwdata, perl-DBD-SQLite
d9e469
%ifnarch %{arm}
d9e469
%ifnarch %{power64}
d9e469
Requires:		dmidecode
d9e469
%endif
d9e469
%endif
d9e469
d9e469
Requires(post):		systemd-units
d9e469
Requires(preun):	systemd-units
d9e469
Requires(postun):	systemd-units
d9e469
d9e469
Patch1: 0001-ras-mc-ctl-Improve-error-summary-to-show-label-and-m.patch
d9e469
Patch2: 0002-ras-record-make-the-code-more-generic.patch
d9e469
Patch3: 0003-ras-record-rename-stmt-to-stmt_mc_event.patch
d9e469
Patch4: 0004-ras-record-reorder-functions.patch
d9e469
Patch5: 0005-ras-record-Make-the-code-easier-to-add-support-for-o.patch
d9e469
Patch6: 0006-Add-support-to-record-AER-events.patch
d9e469
Patch7: 0007-Add-support-to-store-MCE-events-at-the-database.patch
d9e469
Patch8: 0008-ras-mc-ctl-add-summary-for-MCE-and-PCIe-AER-errors.patch
d9e469
Patch9: 0009-ras-mc-ctl-report-errors-also-for-PCIe-AER-and-MCE.patch
d9e469
Patch10: 0010-ras-mc-ctl-Fix-the-name-of-the-error-table-data.patch
d9e469
Patch11: 0013-ras-mc-ctl-Improve-parser.patch
d9e469
Patch12: 0014-ras-mc-ctl-Fix-label-register-with-2-layers.patch
d9e469
Patch13: 0015-Add-an-example-of-labels-file.patch
d9e469
Patch14: 0017-ras-mc-ctl-Fix-the-DIMM-layout-display.patch
d9e469
Patch15: 0019-ras-mc-ctl-remove-completely-use-of-modprobe.patch
d9e469
Patch16: 0022-mce-amd-k8.c-fix-a-warning.patch
d9e469
Patch17: 0023-add-abrt-suppport-for-rasdaemon.patch
d9e469
Patch18: 0026-rasdaemon-Add-record-option-to-rasdaemon-man-page.patch
d9e469
Patch19: 0027-ras-mc-ctl-Print-useful-message-when-run-without-ras.patch
d9e469
Patch20: 0028-Make-paths-in-the-systemd-services-configurable.patch
d9e469
Patch21: 0031-Correct-ABRT-report-data.patch
d9e469
Patch22: 0032-rasdaemon-handle-failures-of-snprintf.patch
d9e469
Patch23: 0033-rasdaemon-correct-range-while-parsing-top-middle-and.patch
d9e469
Patch24: 0034-rasdaemon-enable-recording-by-default.patch
d9e469
Patch25: 0035-eMCA-support.patch
d9e469
Patch26: 0036-rasdaemon-fix-some-errors-in-sqlite.patch
d9e469
Patch27: 0037-rasdaemon-sqlite-truncates-some-MCE-fields-to-32-bit.patch
d9e469
Patch28: 0038-rasdaemon-fix-mce-numfield-decoded-error.patch
d9e469
Patch29: 0039-rasdaemon-do-not-assume-dimmX-directories-will-be-pr.patch
d9e469
Patch30: 0040-rasdaemon-add-more-dell-labels.patch
d9e469
Patch31: 0041-rasdaemon-add-support-for-Haswell.patch
d9e469
Patch32: 0042-rasdaemon-decode-new-simple-error-code-number-6.patch
d9e469
Patch33: 0043-rasdaemon-Add-missing-entry-to-Ivy-Bridge-memory-con.patch
d9e469
Patch34: 0044-rasdaemon-Identify-Ivy-Bridge-properly.patch
d9e469
Patch35: 0045-rasdaemon-add-support-for-Broadwell.patch
d9e469
Patch36: 0046-rasdaemon-add-support-for-Knights-Landing.patch
d9e469
Patch37: 0047-rasdaemon-properly-pring-message-strings-in-decode_b.patch
d9e469
Patch38: 0048-rasdaemon-add-missing-semicolon-in-hsw_decode_model.patch
d9e469
Patch39: 0049-rasdaemon-enable-IMC-status-usage-for-Haswell-E.patch
d9e469
Patch40: 0050-rasdaemon-make-sure-the-error-is-valid-before-handli.patch
d9e469
Patch41: 0051-rasdaemon-add-support-to-match-the-machine-by-system.patch
d9e469
Patch42: 0052-rasdaemon-add-internal-errors-of-IA32_MC4_STATUS-for.patch
d9e469
Patch43: 0053-rasdaemon-remove-a-space-from-mcgstatus_msg.patch
d9e469
Patch44: 0054-rasdaemon-unnecessary-comma-for-empty-mc_location-st.patch
d9e469
Patch45: 0055-rasdaemon-use-MCA-error-msg-as-error_msg.patch
d9e469
Patch46: 0056-x86-rasdaemon-Add-support-to-log-Local-Machine-Check.patch
d9e469
Patch47: 0057-rasdaemon-add-support-for-haswell-ex.patch
d9e469
Patch48: 0058-rasdaemon-fix-typos-on-ras-mc-ctl-man-page.patch
d9e469
Patch49: 0059-rasdaemon-Add-support-for-Knights-Landing-processor.patch
d9e469
Patch50: 0060-mce-intel-knl-Fix-CodingStyle.patch
d9e469
Patch51: 0061-Add-Broadwell-DE-MSCOD-values.patch
d9e469
Patch52: 0062-Add-Broadwell-EP-EX-MSCOD-values.patch
d9e469
# Patch53 was submitted upstream but not merged yet
d9e469
Patch53: rasdaemon-dont_use_memerror_log_enable_on_knl.patch
d9e469
Patch54: 0063-add_support_for_knights_mill.patch
d9e469
Patch55: 0064-add_support_for_skylake.patch
d9e469
Patch56: 0065-rasdaemon-Update-DIMM-labels-for-Dell-Servers.patch
d9e469
Patch57: 0066-rasdaemon-Update-DIMM-labels-for-Intel-Skylake-serve.patch
d9e469
Patch58: 0067-rasdaemon-add-support-for-non-standard-CPER-section-.patch
d9e469
Patch59: 0068-rasdaemon-add-support-for-non-standard-error-decoder.patch
d9e469
Patch60: 0069-rasdaemon-add-support-for-ARM-events.patch
d9e469
Patch61: 0070-rasdaemon-ARM-fully-initialize-ras_arm_event.patch
d9e469
d9e469
%description
d9e469
%{name} is a RAS (Reliability, Availability and Serviceability) logging tool.
d9e469
It currently records memory errors, using the EDAC tracing events.
d9e469
EDAC is drivers in the Linux kernel that handle detection of ECC errors
d9e469
from memory controllers for most chipsets on i386 and x86_64 architectures.
d9e469
EDAC drivers for other architectures like arm also exists.
d9e469
This userspace component consists of an init script which makes sure
d9e469
EDAC drivers and DIMM labels are loaded at system startup, as well as
d9e469
an utility for reporting current error counts from the EDAC sysfs files.
d9e469
d9e469
%prep
d9e469
%setup -q
d9e469
%patch1 -p1
d9e469
%patch2 -p1
d9e469
%patch3 -p1
d9e469
%patch4 -p1
d9e469
%patch5 -p1
d9e469
%patch6 -p1
d9e469
%patch7 -p1
d9e469
%patch8 -p1
d9e469
%patch9 -p1
d9e469
%patch10 -p1
d9e469
%patch11 -p1
d9e469
%patch12 -p1
d9e469
%patch13 -p1
d9e469
%patch14 -p1
d9e469
%patch15 -p1
d9e469
%patch16 -p1
d9e469
%patch17 -p1
d9e469
%patch18 -p1
d9e469
%patch19 -p1
d9e469
%patch20 -p1
d9e469
%patch21 -p1
d9e469
%patch22 -p1
d9e469
%patch23 -p1
d9e469
%patch24 -p1
d9e469
%patch25 -p1
d9e469
%patch26 -p1
d9e469
%patch27 -p1
d9e469
%patch28 -p1
d9e469
%patch29 -p1
d9e469
%patch30 -p1
d9e469
%patch31 -p1
d9e469
%patch32 -p1
d9e469
%patch33 -p1
d9e469
%patch34 -p1
d9e469
%patch35 -p1
d9e469
%patch36 -p1
d9e469
%patch37 -p1
d9e469
%patch38 -p1
d9e469
%patch39 -p1
d9e469
%patch40 -p1
d9e469
%patch41 -p1
d9e469
%patch42 -p1
d9e469
%patch43 -p1
d9e469
%patch44 -p1
d9e469
%patch45 -p1
d9e469
%patch46 -p1
d9e469
%patch47 -p1
d9e469
%patch48 -p1
d9e469
%patch49 -p1
d9e469
%patch50 -p1
d9e469
%patch51 -p1
d9e469
%patch52 -p1
d9e469
%patch53 -p1
d9e469
%patch54 -p1
d9e469
%patch55 -p1
d9e469
%patch56 -p1
d9e469
%patch57 -p1
d9e469
%patch58 -p1
d9e469
%patch59 -p1
d9e469
%patch60 -p1
d9e469
%patch61 -p1
d9e469
d9e469
%build
d9e469
autoreconf -vfi
7b553f
%configure --enable-mce --enable-aer --enable-sqlite3 --enable-extlog \
7b553f
	--enable-arm --enable-non-standard
d9e469
make %{?_smp_mflags}
d9e469
d9e469
%install
d9e469
make install DESTDIR=%{buildroot}
d9e469
install -D -p -m 0644 misc/rasdaemon.service %{buildroot}/%{_unitdir}/rasdaemon.service
d9e469
install -D -p -m 0644 misc/ras-mc-ctl.service %{buildroot}%{_unitdir}/ras-mc-ctl.service
d9e469
install -D -p -m 0655 labels/* %{buildroot}%{_sysconfdir}/ras/dimm_labels.d
d9e469
rm INSTALL %{buildroot}/usr/include/*.h
d9e469
d9e469
%clean
d9e469
rm -rf %{buildroot}
d9e469
d9e469
%files
d9e469
%defattr(-,root,root) 
d9e469
%doc AUTHORS ChangeLog COPYING README TODO
d9e469
%{_sbindir}/rasdaemon
d9e469
%{_sbindir}/ras-mc-ctl
d9e469
%{_mandir}/*/*
d9e469
%{_unitdir}/*.service
d9e469
%{_sharedstatedir}/rasdaemon
d9e469
%{_sysconfdir}/ras/dimm_labels.d
d9e469
d9e469
%changelog
7b553f
* Thu Mar 29 2018 Aristeu Rozanski <aris@redhat.com> 0.4.1-33.1.el7
7b553f
- Refreshed build for zstream [1562017]
7b553f
7b553f
* Mon Mar 19 2018 Aristeu Rozanski <aris@redhat.com> 0.4.1-33.el7
7b553f
- Enabled not standard errors [1520602]
7b553f
d9e469
* Fri Feb 02 2018 Aristeu Rozanski <aris@redhat.com> 0.4.1-32.el7
d9e469
- Fixed covscan error [1520602]
d9e469
d9e469
* Wed Jan 24 2018 Aristeu Rozanski <aris@redhat.com> 0.4.1-31.el7
d9e469
- Added ARM support [1520602]
d9e469
d9e469
* Thu Oct 19 2017 Aristeu Rozanski <aris@redhat.com> 0.4.1-30.el7
d9e469
- Updated project url [1502400]
d9e469
d9e469
* Wed Aug 23 2017 Aristeu Rozanski <aris@redhat.com> 0.4.1-29.el7
d9e469
- Updating Dell labels [1458938]
d9e469
d9e469
* Tue May 30 2017 Aristeu Rozanski <aris@redhat.com> 0.4.1-28.el7
d9e469
- Bump release [1448113]
d9e469
d9e469
* Tue May 30 2017 Aristeu Rozanski <aris@redhat.com> 0.4.1-28.el7
d9e469
- Identify as Knights Mill systems as such [1448113]
d9e469
d9e469
* Mon May 8 2017 Aristeu Rozanski <aris@redhat.com> 0.4.1-27.el7
d9e469
- Fixed error found by covscan in the last patch [1377467]
d9e469
d9e469
* Tue Apr 11 2017 Aristeu Rozanski <aris@redhat.com> 0.4.1-26.el7
d9e469
- add support for Skylake client and server [1377467]
d9e469
d9e469
* Wed Mar 22 2017 Aristeu Rozanski <aris@redhat.com> 0.4.1-25.el7
d9e469
- add support for Knights Mill [1433862]
d9e469
d9e469
* Wed Aug 24 2016 Aristeu Rozanski <aris@redaht.com> 0.4.1-24.el7
d9e469
- don't use MemError Log Enable on Knights Landing [1273326]
d9e469
d9e469
* Fri Apr 15 2016 Aristeu Rozanski <aris@redhat.com> 0.4.1-23.el7
d9e469
- add Broadwell DE/EP/EX MSCOD values [1299512]
d9e469
d9e469
* Mon Feb 08 2016 Aristeu Rozanski <aris@redhat.com> 0.4.1-22.el7
d9e469
- add missing upstream patches for Knights Landing [1273326]
d9e469
- fix documentation typos [1247562]
d9e469
d9e469
* Thu Dec 03 2015 Aristeu Rozanski <aris@redhat.com> 0.4.1-21.el7
d9e469
- add support for Knights Landing [1273326]
d9e469
d9e469
* Wed Sep 30 2015 Aristeu Rozanski <aris@redhat.com> 0.4.1-20.el7
d9e469
- add support for Haswell EP/EX [1267137]
d9e469
d9e469
* Mon Jul 27 2015 Aristeu Rozanski <aris@redhat.com> 0.4.1-19.el7
d9e469
- pull latest fixes by Seiichi Ikarashi from upstream [1243941]
d9e469
d9e469
* Mon Jul 27 2015 Aristeu Rozanski <aris@redhat.com> 0.4.1-18.el7
d9e469
- don't depend on dmidecode on ppc64, fix typo [1244593]
d9e469
d9e469
* Wed Jul 22 2015 Aristeu Rozanski <aris@redhat.com> 0.4.1-17.el7
d9e469
- don't depend on dmidecode on ppc64 [1244593]
d9e469
d9e469
* Wed Jul 08 2015 Aristeu Rozanski <aris@redhat.com> 0.4.1-16.el7
d9e469
- allow label files to specify by system product name [1168340]
d9e469
d9e469
* Wed Jun 03 2015 Aristeu Rozanski <aris@redhat.com> 0.4.1-15.el7
d9e469
- add support to Haswell and newer processors [1221912]
d9e469
d9e469
* Tue Dec 16 2014 Aristeu Rozanski <aris@redhat.com> 0.4.1-14.el7
d9e469
- properly install the labels so it can be packaged [1073090]
d9e469
d9e469
* Tue Dec 02 2014 Aristeu Rozanski <aris@redhat.com> 0.4.1-13.el7
d9e469
- updated labels patch to the new version submitted upstream [1073090]
d9e469
d9e469
* Tue Nov 25 2014 Aristeu Rozanski <aris@redhat.com> 0.4.1-12.el7
d9e469
- fix on how sysfs tree is parsed for DIMMs [1073090]
d9e469
- include new Dell labels [1073090]
d9e469
d9e469
* Fri Oct 10 2014 Aristeu Rozanski <aris@redhat.com> 0.4.1-11.el7
d9e469
- don't require dmidecode for ppc64le [1151385]
d9e469
d9e469
* Fri Aug 22 2014 Aristeu Rozanski <aris@redhat.com> 0.4.1-10.el7
d9e469
- use power64 macro instead, we have a driver enabled on ppc64 [1125663]
d9e469
d9e469
* Mon Aug 18 2014 Aristeu Rozanski <aris@redhat.com> 0.4.1-9.el7
d9e469
- eMCA support [1085519]
d9e469
- enable ppc64le [1125663]
d9e469
d9e469
* Mon Jun 09 2014 Aristeu Rozanski <aris@redhat.com> 0.4.1-8.el7
d9e469
- Revert patch in 0.4.1-7.el7, replaced by a better patch
d9e469
- Fix sizeof() usage on pointer [1035742]
d9e469
- Added macro to build the package with stack protector [1092558]
d9e469
- Handle failures of snprintf() [1035741]
d9e469
- Fix range checking on signed char variables [1035746]
d9e469
- Added aarch64 as architecture [1070973]
d9e469
- Start recording by default [1117366] [1117367]
d9e469
d9e469
* Fri Jan 17 2014 Aristeu Rozanski <aris@redhat.com> 0.4.1-7.el7
d9e469
- Fixed rasdaemon.service executable path [1043478]
d9e469
 
d9e469
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.4.1-6
d9e469
- Mass rebuild 2013-12-27
d9e469
d9e469
* Tue Aug 20 2013 Aristeu Rozanski <aris@redhat.com> 0.4.1-5.el7
d9e469
- Applied Jarod Wilson fixes required to pass rpmlint tests
d9e469
d9e469
* Thu Aug 15 2013 Aristeu Rozanski <aris@redhat.com> 0.4.1-4.el7
d9e469
- Rebuild
d9e469
d9e469
* Sun Jun  2 2013 Peter Robinson <pbrobinson@fedoraproject.org> 0.4.1-3
d9e469
- ARM has EDMA drivers (currently supported in Calxeda highbank)
d9e469
d9e469
* Tue May 28 2013 Mauro Carvalho Chehab <mchehab@redhat.com> 0.4.1-2
d9e469
- Fix the name of perl-DBD-SQLite package
d9e469
d9e469
* Tue May 28 2013 Mauro Carvalho Chehab <mchehab@redhat.com> 0.4.1-1
d9e469
- Updated to version 0.4.1 with contains some bug fixes
d9e469
d9e469
* Mon May 27 2013 Mauro Carvalho Chehab <mchehab@redhat.com> 0.4.0-1
d9e469
- Updated to version 0.4.0 and added support for mce, aer and sqlite3 storage
d9e469
d9e469
* Mon May 20 2013 Mauro Carvalho Chehab <mchehab@redhat.com> 0.3.0-1
d9e469
- Package created
d9e469