update to version 2.0

Signed-off-by: Anton Arapov <anton@redhat.com>
This commit is contained in:
Anton Arapov 2012-08-06 16:23:55 +02:00
parent 1f1833d8cb
commit 5a25ac704c
3 changed files with 16 additions and 37 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ microcode-20100826.dat
/microcode-20120606.dat
/microcode_ctl-1.18.tar.xz
/microcode_ctl.rules
/microcode_ctl-2.0.tar.xz

View File

@ -1,65 +1,45 @@
Summary: Tool to update x86/x86-64 CPU microcode.
Summary: Tool to transform and deploy CPU microcode update for x86.
Name: microcode_ctl
Version: 1.18
Release: 1%{?dist}
Epoch: 1
Version: 2.0
Release: 1
Group: System Environment/Base
License: GPLv2+ and Redistributable, no modification permitted
URL: http://fedorahosted.org/microcode_ctl
Source0: http://fedorahosted.org/released/microcode_ctl/%{name}-%{version}.tar.xz
Source1: microcode_ctl.rules
Source2: intel-microcode2ucode.c
Buildroot: %{_tmppath}/%{name}-%{version}-root
Requires: udev
Requires(pre): /sbin/chkconfig /sbin/service
Requires(pre): grep gawk coreutils
ExclusiveArch: %{ix86} x86_64
%description
microcode_ctl - updates the microcode on Intel and AMD x86/x86-64 CPU's
The microcode_ctl utility is a companion to the microcode driver written
by Tigran Aivazian <tigran@aivazian.fsnet.co.uk>.
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.
%prep
%setup -q
%build
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
gcc -Wall -o intel-microcode2ucode %{SOURCE2}
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} PREFIX=%{_prefix} \
INSDIR=/usr/sbin MANDIR=%{_mandir}/man8 install clean
rm -rf %{buildroot}/etc/*
mkdir -p %{buildroot}/lib/udev/rules.d
install -m 644 %{SOURCE1} %{buildroot}/lib/udev/rules.d/89-microcode.rules
install -m 755 intel-microcode2ucode %{buildroot}/usr/sbin/
%{buildroot}/usr/sbin/intel-microcode2ucode %{buildroot}/lib/firmware/microcode.dat >/dev/null
chmod 0755 intel-ucode
mv intel-ucode %{buildroot}/lib/firmware
rm %{buildroot}/lib/firmware/microcode.dat
make DESTDIR=%{buildroot} PREFIX=%{_prefix} INSDIR=/usr/sbin install clean
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
/lib/firmware/*
/lib/udev/rules.d/*
/usr/sbin/microcode_ctl
/usr/sbin/intel-microcode2ucode
/lib/firmware/*
%doc /usr/share/doc/microcode_ctl/*
%attr(0644,root,root) %{_mandir}/*/*
%triggerun -- microcode_ctl < 1:1.17-2
/sbin/chkconfig --del microcode_ctl
exit 0
%changelog
* Mon Aug 06 2012 Anton Arapov <anton@redhat.com> 2.0-1
- Update to upstream 2.0
* Wed Jul 25 2012 Anton Arapov <anton@redhat.com> 1.18-1
- Update to upstream 1.18

View File

@ -1,3 +1 @@
e56c4ded4787fbccf5e503165f1559b8 microcode_ctl-1.18.tar.xz
0efc5f6c74a4d7e61ca22683c93c98cf intel-microcode2ucode.c
33aa5714e6b7df82a62700109cdf6ef9 microcode_ctl.rules
c527b631c1f54b660700038217da829f microcode_ctl-2.0.tar.xz