Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > 10f8ac1fa473786deb12c6eef592de30 > files > 5

microcode_ctl-1.17-1.52.el5.src.rpm

Summary:        Tool to update x86/x86-64 CPU microcode.
Name:           microcode_ctl
Version:        1.17
Release: 	%(R="$Revision: 1.52 $"; RR="${R##: }"; echo ${RR%%?})%{?dist}
Epoch:		1
Group:          System Environment/Base
License:        GPL
URL:            http://www.urbanmyth.org/microcode/
Source0:        http://www.urbanmyth.org/microcode/microcode_ctl-%{version}.tar.gz
Source1:	microcode_ctl.init
# Microcode now distributed directly by Intel, at
# http://downloadcenter.intel.com/default.aspx
Source2:        microcode-20101123.dat
Buildroot:      %{_tmppath}/%{name}-%{version}-root
Prereq:		/sbin/chkconfig /sbin/service
Prereq:		grep gawk coreutils
Obsoletes:	kernel-utils
ExclusiveArch:	i386 x86_64

Patch1: microcode_ctl.patch

%description
microcode_ctl - updates the microcode on Intel x86/x86-64 CPU's

%prep
%setup -q
%patch1 -p1

%build
make CFLAGS="$RPM_OPT_FLAGS"

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}/usr/share/man/man{1,8}
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig

make DESTDIR=%{buildroot} PREFIX=%{_prefix} \
     INSDIR=/sbin MANDIR=%{_mandir}/man8 RCDIR=%{_sysconfdir} MICDIR=%{_sysconfdir}/firmware install clean

install %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/microcode_ctl
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/firmware/microcode.dat

chmod -R a-s %{buildroot}

%clean
[ "%{buildroot}" != "/" ] && [ -d %{buildroot} ] && rm -rf %{buildroot};

%files
%defattr(-,root,root)
%{_sysconfdir}/init.d/microcode_ctl
%{_sysconfdir}/firmware/*
/sbin/microcode_ctl
%attr(0644,root,root) %{_mandir}/*/*



%preun
if [ "$1" = "0" ] ; then
	/sbin/chkconfig --del microcode_ctl
fi

%post
# Only enable on Intel 686's and above.
vendor=`cat /proc/cpuinfo | grep "^vendor_id" | sort -u | awk -F ": " '{ print $2 }'`
[ "$vendor" != "GenuineIntel" ] && exit 0
family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print $2 }'`
[ $family -lt 6 ] && exit 0
/sbin/chkconfig --add microcode_ctl

%triggerpostun -- kernel-utils
# Only enable on Intel 686's and above.
vendor=`cat /proc/cpuinfo | grep "^vendor_id" | sort -u | awk -F ": " '{ print $2 }'`
[ "$vendor" != "GenuineIntel" ] && exit 0
family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print $2 }'`
[ $family -lt 6 ] && exit 0
/sbin/chkconfig --add microcode_ctl
exit 0

%changelog
* Tue Nov 23 2010 Anton Arapov <anton@redhat.com>
- Update microcode data file to 20101123 revision.
- Resolves: #627798.

* Wed Feb 24 2010 Jon Masters <jcm@redhat.com>
- Update microcode data file to 20100209 revision.
- Related: #526802.

* Mon Dec 14 2009 Jon Masters <jcm@redhat.com>
- Update microcode data file to 20090927 revision.
- Resolves: #526802.

* Tue May 12 2009 Jon Masters <jcm@redhat.com>
- Update microcode data file to 20090330 revision.
- Resolves: #463445.

* Wed Apr  2 2008 Jon Masters <jcm@redhat.com>
- Update microcode data file to 20080401 revision.
- Related: #431566.

* Wed Feb 13 2008 Jarod Wilson <jwilson@redhat.com>
- Fix permissions on microcode.dat

* Wed Feb 06 2008 Jarod Wilson <jwilson@redhat.com>
- Spec cleanup and macro standardization.
- Update microcode data file to 20080131 revision.
- Resolves: #431566.

* Wed Dec  5 2007 Jon Masters <jcm@redhat.com>
- Update microcode data file to 20070907 revision.
- Resolves: #252984.

* Fri May 25 2007 Jon Masters <jcm@redhat.com>
- Update to microcode 1.17 and respun package.
- Resolves: #224432.

* Mon Dec  4 2006 Jon Masters <jcm@redhat.com>
- Update to microcode 1.15 for real this time (now kernel patch is in and we
  - both RH and Intel - think this should be ok to go now).
- Resolves: #214807, #209455.

* Wed Nov 08 2006 Jon Masters <jcm@redhat.com>
- BZ209455 fixes (part 2) - update microcode.

* Fri Oct 13 2006 Jon Masters <jcm@redhat.com>
- BZ209455 fixes.

* Mon Jul 17 2006 Jesse Keating <jkeating@redhat.com>
- rebuild

* Fri Jun 16 2006 Bill Nottingham <notting@redhat.com>
- remove kudzu requirement
- add prereq for coreutils, awk, grep

* Thu Feb 09 2006 Dave Jones <davej@redhat.com>
- rebuild.

* Fri Jan 27 2006 Dave Jones <davej@redhat.com>
- Update to upstream 1.13

* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt for new gcj

* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt

* Mon Nov 14 2005 Dave Jones <davej@redhat.com>
- initscript tweaks.

* Tue Sep 13 2005 Dave Jones <davej@redhat.com>
- Update to upstream 1.12

* Wed Aug 17 2005 Dave Jones <davej@redhat.com>
- Check for device node *after* loading the module. (#157672)

* Tue Mar  1 2005 Dave Jones <davej@redhat.com>
- Rebuild for gcc4

* Thu Feb 17 2005 Dave Jones <davej@redhat.com>
- s/Serial/Epoch/

* Tue Jan 25 2005 Dave Jones <davej@redhat.com>
- Drop the node creation/deletion change from previous release.
  It'll cause grief with selinux, and was a hack to get around
  a udev shortcoming that should be fixed properly.

* Fri Jan 21 2005 Dave Jones <davej@redhat.com>
- Create/remove the /dev/cpu/microcode dev node as needed.
- Use correct path again for the microcode.dat.
- Remove some no longer needed tests in the init script.

* Fri Jan 14 2005 Dave Jones <davej@redhat.com>
- Only enable microcode_ctl service if the CPU is capable.
- Prevent microcode_ctl getting restarted multiple times on initlevel change (#141581)
- Make restart/reload work properly
- Do nothing if not started by root.

* Wed Jan 12 2005 Dave Jones <davej@redhat.com>
- Adjust dev node location. (#144963)

* Tue Jan 11 2005 Dave Jones <davej@redhat.com>
- Load/Remove microcode module in initscript.

* Mon Jan 10 2005 Dave Jones <davej@redhat.com>
- Update to upstream 1.11 release.

* Sat Dec 18 2004 Dave Jones <davej@redhat.com>
- Initial packaging, based upon kernel-utils.