diff --git a/rasdaemon-0.8.0.tar.bz2 b/rasdaemon-0.8.0.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..8837c6ab83ad422135d477bf4e3d36d88a8eb1ce Binary files /dev/null and b/rasdaemon-0.8.0.tar.bz2 differ diff --git a/rasdaemon.spec b/rasdaemon.spec new file mode 100644 index 0000000000000000000000000000000000000000..0a0057f8f1529cb4507fd777673eec54de1495e7 --- /dev/null +++ b/rasdaemon.spec @@ -0,0 +1,81 @@ +%define anolis_release 1 + +Name: rasdaemon +Version: 0.8.0 +Release: %{anolis_release}%{?dist} +Summary: Utility to receive RAS error tracings +Group: Applications/System +License: GPLv2 +URL: http://git.infradead.org/users/mchehab/rasdaemon.git +Source0: http://www.infradead.org/~mchehab/rasdaemon/%{name}-%{version}.tar.bz2 + +BuildRequires: make gcc autoconf automake libtool perl-generators +BuildRequires: gettext-devel sqlite-devel libtraceevent-devel systemd-rpm-macros +Provides: bundled(kernel-event-lib) +Requires: hwdata perl-DBD-SQLite libtraceevent +%ifarch x86_64 +Requires: dmidecode +%endif + +%description +%{name} is a RAS (Reliability, Availability and Serviceability) logging tool. +It currently records memory errors, using the EDAC tracing events. +EDAC is drivers in the Linux kernel that handle detection of ECC errors +from memory controllers for most chipsets on i386 and x86_64 architectures. +EDAC drivers for other architectures like arm also exists. +This userspace component consists of an init script which makes sure +EDAC drivers and DIMM labels are loaded at system startup, as well as +an utility for reporting current error counts from the EDAC sysfs files. + +%package doc +Summary: Doc files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +Doc files for %{name} + +%prep +%setup -q +autoreconf -vfi + +%build +%ifarch aarch64 +%configure --enable-sqlite3 --enable-aer --enable-non-standard --enable-arm \ + --enable-mce --enable-extlog --enable-devlink --enable-diskerror \ + --enable-memory-failure --enable-abrt-report --enable-hisi-ns-decode \ + --enable-memory-ce-pfa --enable-amp-ns-decode --enable-cpu-fault-isolation \ + --with-sysconfdefdir=%{_sysconfdir}/sysconfig +%else +%configure --enable-sqlite3 --enable-aer \ + --enable-mce --enable-extlog --enable-devlink --enable-diskerror \ + --enable-memory-failure --enable-abrt-report --enable-cpu-fault-isolation \ + --with-sysconfdefdir=%{_sysconfdir}/sysconfig +%endif +%make_build + +%install +make install DESTDIR=%{buildroot} +install -D -p -m 0644 misc/rasdaemon.service %{buildroot}%{_unitdir}/rasdaemon.service +install -D -p -m 0644 misc/ras-mc-ctl.service %{buildroot}%{_unitdir}/ras-mc-ctl.service +install -D -p -m 0655 misc/rasdaemon.env %{buildroot}%{_sysconfdir}/sysconfig/%{name} +rm %{buildroot}/usr/include/*.h +%generate_compatibility_deps + +%files +%license COPYING +%{_sbindir}/rasdaemon +%{_sbindir}/ras-mc-ctl +%{_mandir}/*/* +%{_unitdir}/*.service +%{_sysconfdir}/ras/dimm_labels.d +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} +%dir %{abidir} +%{abidir}/rasdaemon-option.list + +%files doc +%doc AUTHORS ChangeLog README.md TODO INSTALL + +%changelog +* Fri Apr 07 2023 Chunmei Xu - 0.8.0-1 +- init from upstream