diff --git a/.edac-utils.metadata b/.edac-utils.metadata new file mode 100644 index 0000000..1a5044e --- /dev/null +++ b/.edac-utils.metadata @@ -0,0 +1 @@ +4bf73132f8d69b50b5900f92c30770203bba2978 SOURCES/edac-utils-0.16.tar.bz2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d086d40 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/edac-utils-0.16.tar.bz2 diff --git a/SOURCES/884477.patch b/SOURCES/884477.patch new file mode 100644 index 0000000..877d37b --- /dev/null +++ b/SOURCES/884477.patch @@ -0,0 +1,31 @@ +------------------------------------------------------------------------ +r111 | grondo | 2009-01-30 18:23:15 -0500 (Fri, 30 Jan 2009) | 11 lines + +Fix libedac.so library version in 0.16 release + +The libtool AGE of libedac.so was incremented for the 0.16 +release of edac-utils without a corresponding increase in +CURRENT, which caused the libedac.so libtool version to +decrement from 1.0.0 to 0.1.0. + +Instead, increment both AGE and CURRENT, since an interface +was changed, but with backwards compatibility, and +prepare to tag a 0.16.1. + +------------------------------------------------------------------------ +--- + META | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- edac-utils-0.16.orig/META 2008-12-31 13:53:43.000000000 -0500 ++++ edac-utils-0.16/META 2013-07-01 14:47:36.824949675 -0400 +@@ -1,7 +1,7 @@ + Author: Mark Grondona +- Date: 2008-12-31 ++ Date: 2009-01-30 + Lt_age: 1 +- Lt_current: 1 ++ Lt_current: 2 + Lt_revision: 0 + Name: edac-utils + Release: 1 diff --git a/SOURCES/c29b14d0d07184bd2d250bf355a1dee6faa47572.patch b/SOURCES/c29b14d0d07184bd2d250bf355a1dee6faa47572.patch new file mode 100644 index 0000000..a1b5b26 --- /dev/null +++ b/SOURCES/c29b14d0d07184bd2d250bf355a1dee6faa47572.patch @@ -0,0 +1,17 @@ +commit c29b14d0d07184bd2d250bf355a1dee6faa47572 +Author: Mark A. Grondona +Date: Wed Nov 9 22:15:23 2011 +0000 + + edac-util: do not print "no errors" if --quiet + +--- a/src/util/edac-util.c ++++ b/src/util/edac-util.c +@@ -472,7 +472,7 @@ static void default_report (struct prog_ctx *ctx) + } + } + +- if (!count && !ctx->verbose) ++ if (!count && !ctx->quiet) + fprintf (stdout, "edac-util: No errors to report.\n"); + + edac_handle_reset (ctx->edac); diff --git a/SOURCES/edac-ctl-man-missing-options.patch b/SOURCES/edac-ctl-man-missing-options.patch new file mode 100644 index 0000000..a094030 --- /dev/null +++ b/SOURCES/edac-ctl-man-missing-options.patch @@ -0,0 +1,38 @@ +From 271ce86b92b8f518fdfb4abb4f46d0c69e703c3a Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka +Date: Wed, 20 Aug 2014 15:20:00 +0200 +Subject: [PATCH] edac-ctl missing options + +--- + src/util/edac-ctl.8.in | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/util/edac-ctl.8.in b/src/util/edac-ctl.8.in +index 7f9ca5e..c6143ef 100644 +--- a/src/util/edac-ctl.8.in ++++ b/src/util/edac-ctl.8.in +@@ -43,6 +43,9 @@ drivers. + .BI "--help" + Display a brief usage message. + .TP ++.BI "--quiet" ++Quiet operation. ++.TP + .BI "--mainboard" + Print mainboard vendor and model for this hardware, if available. + This option requires that the \fBdmidecode\fR(8) utility be installed, +@@ -61,7 +64,10 @@ exist in the labels database for this option to do anything. + .TP + .BI "--print-labels" + Display the configured labels for the current hardware, as +-well as the current labels registered with EDAC. ++well as the current labels registered with EDAC. ++.TP ++.BI "--delay=N" ++Delay N seconds before writing DIMM labels. + .TP + .BI "--labeldb="DB + Specify an alternate location for the labels database. +-- +1.9.3 + diff --git a/SOURCES/edac.service b/SOURCES/edac.service new file mode 100644 index 0000000..b94a4b6 --- /dev/null +++ b/SOURCES/edac.service @@ -0,0 +1,11 @@ +[Unit] +Description=Initialize EDAC Drivers For Machine Hardware + +[Service] +Type=oneshot +ExecStart=/usr/sbin/edac-ctl --register-labels +ExecStop=/usr/sbin/edac-ctl --unload +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/SOURCES/edac_utils-do_not_exit_if_dmidecode_isnt_found.patch b/SOURCES/edac_utils-do_not_exit_if_dmidecode_isnt_found.patch new file mode 100644 index 0000000..0ad3105 --- /dev/null +++ b/SOURCES/edac_utils-do_not_exit_if_dmidecode_isnt_found.patch @@ -0,0 +1,28 @@ +commit 7629ebb853687afe144987d301d77a4ff99c65b5 +Author: Mark A. Grondona +Date: Mon Sep 28 17:49:15 2009 +0000 + + Don't make missing dmidecode a fatal error. + +diff --git a/src/util/edac-ctl.in b/src/util/edac-ctl.in +index 5bab397..e0c169e 100755 +--- a/src/util/edac-ctl.in ++++ b/src/util/edac-ctl.in +@@ -30,7 +30,7 @@ use Getopt::Long; + + my $prefix = "@prefix@"; + my $sysconfdir = "@sysconfdir@"; +-my $dmidecode = find_prog ("dmidecode") or exit (1); ++my $dmidecode = find_prog ("dmidecode"); + my $modprobe = find_prog ("modprobe") or exit (1); + + my %conf = (); +@@ -392,7 +392,7 @@ sub find_prog + for my $dir ("/sbin", "/usr/sbin", split ':', $ENV{PATH}) { + return "$dir/$file" if -x "$dir/$file"; + } +- log_error ("Failed to find $file in PATH\n"); ++ # log_error ("Failed to find $file in PATH\n"); + return ""; + } + diff --git a/SOURCES/edac_utils-dont_try_to_use_dmidecode_if_not_installed.patch b/SOURCES/edac_utils-dont_try_to_use_dmidecode_if_not_installed.patch new file mode 100644 index 0000000..5878438 --- /dev/null +++ b/SOURCES/edac_utils-dont_try_to_use_dmidecode_if_not_installed.patch @@ -0,0 +1,15 @@ +--- + src/util/edac-ctl.in | 2 ++ + 1 file changed, 2 insertions(+) + +--- edac-utils-0.16.orig/src/util/edac-ctl.in 2015-10-05 09:50:44.216884955 -0400 ++++ edac-utils-0.16/src/util/edac-ctl.in 2015-10-05 11:11:41.451961491 -0400 +@@ -166,6 +166,8 @@ sub guess_vendor_model_dmidecode { + my ($vendor, $model); + my $line = 0; + ++ return ('Unknown', 'Unknown') unless $dmidecode; ++ + $< == 0 || die "Must be root to run dmidecode\n"; + + open (DMI, "$dmidecode |") or die "failed to run $dmidecode: $!\n"; diff --git a/SPECS/edac-utils.spec b/SPECS/edac-utils.spec new file mode 100644 index 0000000..dd53a12 --- /dev/null +++ b/SPECS/edac-utils.spec @@ -0,0 +1,225 @@ +Name: edac-utils +Version: 0.16 +Release: 16%{?dist} +Summary: Userspace helper for kernel EDAC drivers + +Group: System Environment/Base +License: GPLv2+ +URL: http://sourceforge.net/projects/edac-utils/ + +ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 %{power64} +Source0: http://dl.sourceforge.net/sourceforge/edac-utils/%{name}-%{version}.tar.bz2 +Source1: edac.service +Patch: 884477.patch +Patch2: edac_utils-do_not_exit_if_dmidecode_isnt_found.patch +Patch3: edac_utils-dont_try_to_use_dmidecode_if_not_installed.patch +Patch4: edac-ctl-man-missing-options.patch +Patch5: c29b14d0d07184bd2d250bf355a1dee6faa47572.patch + +%ifarch %{ix86} x86_64 +Requires: dmidecode +%endif +Requires: hwdata +Requires: sysfsutils +BuildRequires: libsysfs-devel, systemd-devel +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units + +%description +EDAC is the current set of drivers in the Linux kernel that handle +detection of ECC errors from memory controllers for most chipsets +on i386 and x86_64 architectures. This userspace component consists +of an init script which makes sure EDAC drivers and DIMM labels +are loaded at system startup, as well as a library and utility +for reporting current error counts from the EDAC sysfs files. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the development headers and libraries +for %{name}. + +%prep +%setup -q +%patch -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + +%build +%configure --disable-static +make %{?_smp_mflags} + +%install +make install-exec install-data DESTDIR="$RPM_BUILD_ROOT" +# Remove libtool archive +rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la + +install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/edac.service +rm -f $RPM_BUILD_ROOT%{_sysconfdir}/init.d/edac + +%post +/sbin/ldconfig +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi + +%preun +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable edac.service > /dev/null 2>&1 || : + /bin/systemctl stop edac.service > /dev/null 2>&1 || : +fi + +%postun +/sbin/ldconfig +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart edac.service >/dev/null 2>&1 || : +fi + +%triggerun -- edac-utils < 0.9-14 +# Save the current service runlevel info +# User must manually run systemd-sysv-convert --apply edac +# to migrate them to systemd targets +/usr/bin/systemd-sysv-convert --save edac >/dev/null 2>&1 ||: + +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del edac >/dev/null 2>&1 || : +/bin/systemctl try-restart edac.service >/dev/null 2>&1 || : + +%files +%defattr(-,root,root,-) +%doc COPYING README NEWS ChangeLog DISCLAIMER +%{_sbindir}/edac-ctl +%{_bindir}/edac-util +%{_libdir}/*.so.* +%{_mandir}/*/* +%dir %attr(0755,root,root) %{_sysconfdir}/edac +%config(noreplace) %{_sysconfdir}/edac/* +%{_unitdir}/edac.service + +%files devel +%defattr(-,root,root,-) +%{_libdir}/*.so +%{_includedir}/edac.h + +%changelog +* Tue Jan 08 2019 Aristeu Rozanski - 0.16-16 +- Don't print "no errors" if --quiet is used [1662858] + +* Fri Nov 13 2015 Aristeu Rozanski - 0.16-15 +- Add missing manual entries for two edac-ctl options [1147564] + +* Mon Oct 05 2015 Aristeu Rozanski - 0.16-14 +- Don't try to use dmidecode if not installed [1125491] + +* Mon Oct 05 2015 Aristeu Rozanski - 0.16-13 +- Do not exit if dmidecode isn't found [1125491] + +* Tue May 05 2015 Aristeu Rozanski - 0.16-12 +- Rebuilt for 7.2 [1184674] + +* Fri Aug 22 2014 Aristeu Rozanski - 0.16-11 +- Enable in all powerpc64 arches instead [1125491] + +* Fri Aug 08 2014 Aristeu Rozanski - 0.16-10 +- Enable ppc64le arch build [1125491] + +* Tue Jun 03 2014 Aristeu Rozanski - 0.16-9 +- Enable builds on aarch64 [967931] + +* Fri Dec 27 2013 Daniel Mach - 0.16-8 +- Mass rebuild 2013-12-27 + +* Mon Jul 01 2013 Aristeu Rozanski - 0.16-7 +- including missing file + +* Mon Jul 01 2013 Aristeu Rozanski - 0.16-6 +- build bump + +* Mon Jul 01 2013 Aristeu Rozanski - 0.16-5 +- fixed bogus dates in old changelog entries +- backported patch to fix library version mismatch [884477] +- included systemd-devel as BuildRequires for _unitdir rpm definition + +* Wed Feb 13 2013 Fedora Release Engineering - 0.16-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Oct 11 2012 Peter Robinson 0.16-3 +- ARM has support for EDAC so enable the utils + +* Wed Jul 18 2012 Fedora Release Engineering - 0.16-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed May 02 2012 Aristeu Rozanski - 0.16-1 +- New upstream release 0.16 + +* Wed Mar 14 2012 Jon Ciesla - 0.9-14 +- Migrate to systemd, BZ 767784. + +* Fri Jan 13 2012 Fedora Release Engineering - 0.9-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 0.9-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jul 24 2009 Fedora Release Engineering - 0.9-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 0.9-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed May 21 2008 Tom "spot" Callaway - 0.9-9 +- fix license tag + +* Mon Feb 18 2008 Fedora Release Engineering - 0.9-8 +- Autorebuild for GCC 4.3 + +* Wed Jul 18 2007 Aristeu Rozanski 0.9-7 +- including missing .patch file + +* Tue Jul 17 2007 Aristeu Rozanski 0.9-6 +- building FC7 package + +* Mon Jul 09 2007 Aristeu Rozanski 0.9-5 +- Fixed start/stop message, missing echo +- Fixed status command to use edac-util + +* Fri Jun 15 2007 Aristeu Rozanski 0.9-4 +- Removed debug code left by mistake on initrd file +- Fixed model comparing in edac-ctl script + +* Wed Jun 13 2007 Aristeu Rozanski 0.9-3 +- Adding COPYING to documents +- Fixing Requires to use a single equal sign, instead of two + +* Wed Jun 13 2007 Aristeu Rozanski 0.9-2 +- Multiple updates in spec file to conform to the standards pointed by + Jarod Wilson + +* Wed Jun 06 2007 Aristeu Rozanski 0.9-1 +- Updated version to 0.9, separate project now +- Updated spec file based on upstream edac-utils spec file +- Removed driver loading portion in a separate patch, it'll be removed from + upstream too +- Fixed init script to use functions and daemon function + +* Thu Apr 19 2007 Aristeu Rozanski 20061222-3 +- Updated initrd script to start after syslogd, otherwise if the board isn't + supported, the user will never know. + +* Thu Apr 19 2007 Aristeu Rozanski 20061222-2 +- Changing this package to noarch and preventing the build on ia64, ppc64, + s390 and s390x + +* Mon Mar 12 2007 Aristeu Rozanski 20061222-1 +- Package created +