Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 667ab6a7e95c26210050fc053654c898 > files > 4

microcode_ctl-1.17-11mdv2010.1.src.rpm

Summary:   Intel P6 / AMD CPU Microcode Utility
Name:      microcode_ctl
Version:   1.17
Release:   %mkrel 11
Group:     System/Kernel and hardware
License:   GPLv2
Url:       http://www.urbanmyth.org/microcode/
Source0:   http://www.urbanmyth.org/microcode/%name-%version.tar.bz2
Source1:   microcode_ctl
# Intel firmware downloader (Debian)
Source2:   update-intel-microcode
Source3:   update-intel-microcode.8
# AMDl firmware downloader
Source4:   update-amd-microcode
Source5:   update-amd-microcode.8
# monthly cron
Source6:   update-microcode
# needed by firmware downloaders
Suggests:  curl
# (fc) 1.17-8mdv fix paths (Fedora)
Patch0:    microcode_ctl.patch
Requires(post): rpm-helper
Requires(preun): rpm-helper
Buildroot: %_tmppath/%name-%version-buildroot
ExclusiveArch: %ix86 x86_64

%description
Since PentiumPro, Intel CPU are made of a RISC chip and of a microcode whose
purpose is to decompose "old" ia32 instruction into new risc ones.
P6 familly is concerned: PPro, PII, Celeron, PIII, Celeron2.
Recent kernels have the ability to update this microcode.

The microcode update is volatile and needs to be uploaded on each system
boot. I.e. it doesn't reflash your cpu permanently.
Reboot and it reverts back to the old microcode.

This package also support updating latest AMD CPU microcode.

%prep
%setup -q
%patch0 -p1 -b .fixpath

%build
make CFLAGS="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT 

%makeinstall_std INSDIR=%{_sbindir} MANDIR=%{_mandir}/man8
# replace upstream initscript with our own
rm -rf %buildroot%_sysconfdir/init.d
mkdir -p $RPM_BUILD_ROOT/%_initrddir
install -m 755 %SOURCE1 $RPM_BUILD_ROOT/%_initrddir
# do not ship non-free firmware in this package
rm -rf %buildroot/lib/firmware
# install intel firmware downloader 
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sbindir}
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/man8
# install AMD firmware downloader 
install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man8
# install monthly cron
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.monthly
install -m755 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/cron.monthly
#
mkdir -p $RPM_BUILD_ROOT/lib/firmware/amd-ucode 

%clean
rm -r $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%_sbindir/*
%_mandir/man8/*
%_initrddir/%name
%_sysconfdir/cron.monthly/update-microcode
/lib/firmware/amd-ucode

%post
# Only enable on Intel 686's and above or AMD family 0x10 and above
vendor=`cat /proc/cpuinfo | grep "^vendor_id" | sort -u | awk -F ": " '{ print $2 }'`
family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print $2 }'`
if [ "$vendor" = "GenuineIntel" ]; then
 [ $family -lt 6 ] && exit 0
elif [ "$vendor" = "AuthenticAMD" ]; then
 [ $family -lt 16 ] && exit 0
else
 exit 0
fi
%_post_service %{name}

%preun
%_preun_service %{name}



%changelog
* Fri Feb 05 2010 Thomas Backlund <tmb@mandriva.org> 1.17-11mdv2010.1
+ Revision: 501008
- add missing fi in microcode_ctl initscript (#57421)

* Thu Feb 04 2010 Frederic Crozat <fcrozat@mandriva.com> 1.17-10mdv2010.1
+ Revision: 500855
- Fix update-intel-microcode in download-only mode

* Thu Feb 04 2010 Frederic Crozat <fcrozat@mandriva.com> 1.17-9mdv2010.1
+ Revision: 500844
- improve description
- improve scripts to support --download-only option
- do not try to load amd microcode for kernel < 2.6.29

* Wed Feb 03 2010 Frederic Crozat <fcrozat@mandriva.com> 1.17-8mdv2010.1
+ Revision: 500138
- Remove non-free microcode from Intel
- Add support for AMD microcode (Fedora)
- Add script from debian to download Intel microcode
- Create script to download AMD microcode
- add monthly cron to update microcode, if needed

* Mon Sep 14 2009 Thierry Vignaud <tvignaud@mandriva.com> 1.17-7mdv2010.0
+ Revision: 439801
- rebuild

* Mon Jan 19 2009 Thierry Vignaud <tvignaud@mandriva.com> 1.17-6mdv2009.1
+ Revision: 331275
- Updated microcodes are avaible on http://downloadcenter.intel.com/default.aspx

* Tue Jul 29 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.17-5mdv2009.0
+ Revision: 252418
- rebuild

* Wed Mar 12 2008 Götz Waschk <waschk@mandriva.org> 1.17-3mdv2008.1
+ Revision: 187077
- build on x86_64 as well (bug #38821)
- fix buildrequires

* Wed Mar 12 2008 Götz Waschk <waschk@mandriva.org> 1.17-2mdv2008.1
+ Revision: 187056
- update to the latest microcode release from intel

* Fri Dec 21 2007 Olivier Blin <oblin@mandriva.com> 1.17-1mdv2008.1
+ Revision: 136579
- restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Fri Jun 29 2007 Götz Waschk <waschk@mandriva.org> 1.17-1mdv2008.0
+ Revision: 45858
- new version

  + Thierry Vignaud <tvignaud@mandriva.com>
    - Import microcode_ctl



* Fri Jun 30 2006 Götz Waschk <waschk@mandriva.org> 1.14-1mdk
- New release 1.14

* Thu Mar 02 2006 Götz Waschk <waschk@mandriva.org> 1.13-1mdk
- New release 1.13

* Mon Jan  9 2006 Olivier Blin <oblin@mandriva.com> 1.12-4mdk
- convert parallel init to LSB

* Sat Dec 31 2005 Götz Waschk <waschk@mandriva.org> 1.12-3mdk
- fix error on preun

* Sat Dec 31 2005 Götz Waschk <waschk@mandriva.org> 1.12-2mdk
- first try of parallel init

* Tue Sep 13 2005 Götz Waschk <waschk@mandriva.org> 1.12-1mdk
- new version

* Thu Aug 11 2005 Thierry Vignaud <tvignaud@mandriva.com> 1.11-3mdk
- drop devfs support
- drop udev rule, udev is already aware of it

* Thu Nov 18 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.11-2mdk
- source 1: fix init script (Eric Pielbug, #12286)

* Wed Nov 03 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.11-1mdk
- new release

* Tue Oct 26 2004 Goetz Waschk <waschk@linux-mandrake.com> 1.10-1mdk
- New release 1.10

* Fri Sep 10 2004 Goetz Waschk <waschk@linux-mandrake.com> 1.09-1mdk
- New release 1.09

* Mon Sep  6 2004 Götz Waschk <waschk@linux-mandrake.com> 1.08-2mdk
- add udev support, fixes bug #11204

* Thu Aug 12 2004 Goetz Waschk <waschk@linux-mandrake.com> 1.08-1mdk
- New release 1.08

* Tue Jun 08 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.06-10mdk
- fix typo in description (Eskild Hustvedt)

* Tue Jun 08 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.06-9mdk
- fix microcode update on 2.6.x with devfs (anthill #897)

* Thu Oct  9 2003 Götz Waschk <waschk@linux-mandrake.com> 1.06-8mdk
- spec fixes
- it's x86-only

* Fri Apr 25 2003 Götz Waschk <waschk@linux-mandrake.com> 1.06-7mdk
- fix buildrequires (thanks to the bot from Stefan van der Eijk)

* Tue Mar 11 2003 Götz Waschk <waschk@linux-mandrake.com> 1.06-6mdk
- fix build

* Fri Mar 22 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.06-5mdk
- more macros use
- simplify %%preun

* Mon Feb 25 2002 Götz Waschk <waschk@linux-mandrake.com> 1.06-4mdk
- fix init script, thanks to DUCLOS Andre <shirka@wanadoo.fr>

* Mon Feb 18 2002 Götz Waschk <waschk@linux-mandrake.com> 1.06-3mdk
- update init script, load microcode module for devfs users

* Fri Oct 12 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.06-2mdk
- happy birthday, mister rpmlint

* Tue Aug 21 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.06-1mdk
- updated to 1.06

* Thu Mar 22 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.04-1mdk
- new version

* Wed Feb 28 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.03-1mdk
- Initial RPM