rpms/edac-utils/FC-6 edac-utils.spec, NONE, 1.1 edac_ctl-fix_model_parsing.patch, NONE, 1.1 edac_ctl-remove_driver_loading.patch, NONE, 1.1 edac_init-fix_messages.patch, NONE, 1.1 sources, 1.1, 1.2
Aristeu Sergio Rozanski Filho (arozansk)
fedora-extras-commits at redhat.com
Tue Jul 17 18:52:46 UTC 2007
Author: arozansk
Update of /cvs/pkgs/rpms/edac-utils/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10774
Modified Files:
sources
Added Files:
edac-utils.spec edac_ctl-fix_model_parsing.patch
edac_ctl-remove_driver_loading.patch
edac_init-fix_messages.patch
Log Message:
* importing RHEL-5 version of the package
--- NEW FILE edac-utils.spec ---
Name: edac-utils
Version: 0.9
Release: 5%{?dist}
Summary: Userspace helper for kernel EDAC drivers
Group: System Environment/Base
License: GPL
URL: http://sourceforge.net/projects/edac-utils/
Source0: http://dl.sourceforge.net/sourceforge/edac-utils/%{name}-%{version}.tar.bz2
Patch0: edac_ctl-remove_driver_loading.patch
Patch1: edac_init-fix_messages.patch
Patch2: edac_ctl-fix_model_parsing.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
Requires: hwdata, dmidecode, sysfsutils
BuildRequires: libsysfs-devel
ExclusiveArch: %{ix86} x86_64
%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
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure --disable-static
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install-exec install-data DESTDIR="$RPM_BUILD_ROOT"
# Remove libtool archive
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
%clean
rm -rf $RPM_BUILD_ROOT
%post
/sbin/ldconfig
if [ $1 = 1 ]; then
/sbin/chkconfig --add edac
fi
%preun
if [ $1 = 0 ]; then
/sbin/service edac stop >/dev/null 2>&1 || :
/sbin/chkconfig --del edac
fi
%postun -p /sbin/ldconfig
%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/*
%{_sysconfdir}/init.d/edac
%files devel
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_includedir}/edac.h
%changelog
* Thu Jul 09 2007 Aristeu Rozanski <arozansk at redhat.com> 0.9-5
- Fixed start/stop message, missing echo
- Fixed status command to use edac-util
* Thu Jun 15 2007 Aristeu Rozanski <arozansk at redhat.com> 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 <arozansk at redhat.com> 0.9-3
- Adding COPYING to documents
- Fixing Requires to use a single equal sign, instead of two
* Wed Jun 13 2007 Aristeu Rozanski <arozansk at redhat.com> 0.9-2
- Multiple updates in spec file to conform to the standards pointed by
Jarod Wilson
* Wed Jun 06 2007 Aristeu Rozanski <arozansk at redhat.com> 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 <arozansk at redhat.com> 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 <arozansk at redhat.com> 20061222-2
- Changing this package to noarch and preventing the build on ia64, ppc64,
s390 and s390x
* Thu Mar 12 2007 Aristeu Rozanski <arozansk at redhat.com> 20061222-1
- Package created
edac_ctl-fix_model_parsing.patch:
--- NEW FILE edac_ctl-fix_model_parsing.patch ---
Index: edac-utils-0.9/src/util/edac-ctl
===================================================================
--- edac-utils-0.9.orig/src/util/edac-ctl
+++ edac-utils-0.9/src/util/edac-ctl
@@ -271,7 +271,7 @@ sub parse_dimm_labels
}
if (/(model|board)\s*:\s*(.*)$/i) {
!$vendor && die "$file: line $line: MB model without vendor\n";
- @models = split(/[, ]+/, $2);
+ @models = split(/,[\ ]*/, lc $2);
next;
}
edac_ctl-remove_driver_loading.patch:
--- NEW FILE edac_ctl-remove_driver_loading.patch ---
Index: edac-utils-0.9/src/util/edac-ctl
===================================================================
--- edac-utils-0.9.orig/src/util/edac-ctl
+++ edac-utils-0.9/src/util/edac-ctl
@@ -78,27 +78,6 @@ if ( $conf{opt}{mainboard} || $conf{opt
}
-if ( $conf{opt}{load} || $conf{opt}{unload} || $conf{opt}{status}
- || $conf{opt}{driver} ) {
- if (!($conf{driver} = find_edac_driver ())) {
- print STDERR "No EDAC support for this hardware.\n";
- }
-
- $conf{opt}{driver} && print "$conf{driver}_edac\n";
- $conf{opt}{status} && ($status = print_status ());
-
- if ($conf{opt}{load}) {
- run_cmd ("$modprobe -a $conf{driver}_edac");
- my $rc = ($? >> 8); exit ($rc);
- } elsif ($conf{opt}{unload}) {
- run_cmd ("$modprobe -r $conf{driver}_edac");
- exit ($? >> 8);
- } elsif ($conf{opt}{status}) {
- exit ($status ? 0 : 1);
- }
-}
-
-
exit (0);
sub parse_cmdline
edac_init-fix_messages.patch:
--- NEW FILE edac_init-fix_messages.patch ---
Index: edac-utils-0.9/src/etc/edac.init
===================================================================
--- edac-utils-0.9.orig/src/etc/edac.init
+++ edac-utils-0.9/src/etc/edac.init
@@ -7,21 +7,31 @@
# Written by Mark Grondona <mgrondona at llnl.gov>
# UCRL-CODE-230739.
###############################################################################
-# chkconfig: 345 40 60
+# chkconfig: - 40 60
###############################################################################
### BEGIN INIT INFO
# Provides: edac
# Required-Start: $named $time
-# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Initialize EDAC drivers for machine hardware
+# Short-Description: Initialize EDAC drivers for machine hardware
### END INIT INFO
###############################################################################
-SERVICE="edac"
+if [ -f /etc/init.d/functions ] ; then
+ . /etc/init.d/functions
+elif [ -f /etc/rc.d/init.d/functions ] ; then
+ . /etc/rc.d/init.d/functions
+else
+ exit 0;
+fi
+SERVICE="edac"
PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin
EDAC=/usr/sbin/edac-ctl
+EDAC_UTIL=/usr/bin/edac-util
+LOGGER="logger -t $SERVICE -p info"
+SUBSYS=/var/lock/subsys/edac
###############################################################################
@@ -30,25 +40,26 @@ service_start ()
# Start the service. Required by LSB.
#
echo -n "Starting ${SERVICE}: "
- $EDAC --quiet --load
- rc=$?
- $EDAC --register-labels
- case $rc in
- 0) echo success ;;
- 5) echo No EDAC support for this hardware. ;;
- *) echo failure ;;
- esac
-
+ $EDAC --register-labels 2>&1 | $LOGGER;
+ rc=$?;
+ if [ $rc -eq 0 ]; then
+ daemon true;
+ touch $SUBSYS;
+ else
+ daemon false;
+ fi
+ echo;
}
###############################################################################
service_stop ()
{
- echo -n "Disabling ${SERVICE}: "
- $EDAC --unload
+ echo -n "Stopping ${SERVICE}: "
+ daemon $EDAC --unload;
rc=$?
- [ $rc -eq 0 ] && echo success || echo failure
+ rm -f $SUBSYS;
+ echo;
}
###############################################################################
@@ -57,7 +68,7 @@ service_status ()
{
# Print the current status of the service. Required by LSB.
#
- $EDAC --status
+ $EDAC_UTIL --status
rc=0
}
@@ -75,9 +86,15 @@ case "$1" in
status)
service_status
;;
+ restart|reload)
+ service_stop
+ service_start
+ ;;
*)
- COMMANDS="start|stop|status"
+ COMMANDS="start|stop|status|restart|reload"
echo "Usage: $0 {${COMMANDS}}"
exit 1
;;
esac
+exit $rc;
+
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/edac-utils/FC-6/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jun 2007 19:54:45 -0000 1.1
+++ sources 17 Jul 2007 18:52:13 -0000 1.2
@@ -0,0 +1 @@
+dcad7276c84f9d10b4fb5e036001a75a edac-utils-0.9.tar.bz2
More information about the scm-commits
mailing list