Blame SPECS/microcode_ctl.spec

5db210
%define upstream_version 2.1-12
ea6c69
ea6c69
Summary:        Tool to transform and deploy CPU microcode update for x86.
ea6c69
Name:           microcode_ctl
ea6c69
Version:        2.1
5db210
Release:        22.5%{?dist}
ea6c69
Epoch:          2
ea6c69
Group:          System Environment/Base
ea6c69
License:        GPLv2+ and Redistributable, no modification permitted
ea6c69
URL:            http://fedorahosted.org/microcode_ctl
ea6c69
Source0:        http://fedorahosted.org/released/microcode_ctl/%{name}-%{upstream_version}.tar.xz
e4b344
Source1:        microcode.service
e4b344
Source2:        01-microcode.conf
5db210
Source3:        disclaimer
ea6c69
Buildroot:      %{_tmppath}/%{name}-%{version}-root
ea6c69
ExclusiveArch:  %{ix86} x86_64
e4b344
BuildRequires:  systemd-units
e4b344
Requires(post): systemd
e4b344
Requires(preun): systemd
e4b344
Requires(postun): systemd
8c144b
Requires(posttrans): kernel
ea6c69
ea6c69
%description
ea6c69
The microcode_ctl utility is a companion to the microcode driver written
ea6c69
by Tigran Aivazian <tigran@aivazian.fsnet.co.uk>.
ea6c69
ea6c69
The microcode update is volatile and needs to be uploaded on each system
ea6c69
boot i.e. it doesn't reflash your cpu permanently, reboot and it reverts
ea6c69
back to the old microcode.
ea6c69
ea6c69
%prep
ea6c69
%setup -q -n %{name}-%{upstream_version}
ea6c69
ea6c69
%build
ea6c69
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
ea6c69
ea6c69
%install
ea6c69
rm -rf %{buildroot}
ea6c69
make DESTDIR=%{buildroot} PREFIX=%{_prefix} INSDIR=/usr/sbin install clean
ea6c69
e4b344
mkdir -p %{buildroot}/usr/lib/dracut/dracut.conf.d
e4b344
mkdir -p %{buildroot}%{_unitdir}
e4b344
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
e4b344
install -m 644 %{SOURCE2} %{buildroot}/usr/lib/dracut/dracut.conf.d
5db210
install -m 644 %{SOURCE3} %{buildroot}/usr/share/doc/microcode_ctl/disclaimer
e4b344
e4b344
%post
e4b344
%systemd_post microcode.service
e4b344
# "reload" file is not presented on a certain virtualized hw
5db210
if [ -w /sys/devices/system/cpu/microcode/reload ] ; then
d60a12
	grep -l GenuineIntel /proc/cpuinfo | xargs grep -l -E "model[[:space:]]*: 79$" > /dev/null || \
e4b344
	echo 1 > /sys/devices/system/cpu/microcode/reload
e4b344
fi
5db210
# send the message to syslog, so it gets recorded on /var/log
5db210
if [ -e /usr/bin/logger ]; then
5db210
	/usr/bin/logger -p syslog.notice -t DISCLAIMER -f /usr/share/doc/microcode_ctl/disclaimer
5db210
fi
5db210
# also paste it over dmesg (some customers drop dmesg messages while
5db210
# others keep them into /var/log for the later case, we'll have the
5db210
# disclaimer recorded twice into system logs.
5db210
cat /usr/share/doc/microcode_ctl/disclaimer > /dev/kmsg
8c144b
8c144b
%posttrans
5db210
# We only want to regenerate the initramfs for a fully booted
5db210
# system; if this package happened to e.g. be pulled in as a build
5db210
# dependency, it is pointless at best to regenerate the initramfs,
5db210
# and also does not work with rpm-ostree:
5db210
# https://bugzilla.redhat.com/show_bug.cgi?id=1199582
5db210
if [ -d /run/systemd/system ]; then
5db210
	dracut -f
5db210
fi
e4b344
e4b344
%preun
e4b344
%systemd_preun microcode.service
e4b344
e4b344
%postun
e4b344
%systemd_postun microcode.service
e4b344
ea6c69
%clean
ea6c69
rm -rf %{buildroot}
ea6c69
ea6c69
%files
ea6c69
/usr/sbin/intel-microcode2ucode
ea6c69
/lib/firmware/*
e4b344
%config(noreplace) /usr/lib/dracut/dracut.conf.d/01-microcode.conf
e4b344
%{_unitdir}/microcode.service
ea6c69
%doc /usr/share/doc/microcode_ctl/*
ea6c69
ea6c69
ea6c69
%changelog
5db210
* Mon Jan 15 2018 Petr Oros <poros@redhat.com> - 2.1-22.5
5db210
- Use right upstream source for revert
5db210
- Resolves: #1533971
5db210
5db210
* Fri Jan 12 2018 Petr Oros <poros@redhat.com> - 2.1-22.4
5db210
- Revert Microcode from Intel for Side Channel attack
5db210
- Resolves: #1533971
5db210
5db210
* Fri Jan 12 2018 Petr Oros <poros@redhat.com> - 2.1-22.3
5db210
- Don't run dracut if not on a live system
5db210
- Resolves: #1531453
5db210
8e8f98
* Fri Dec 15 2017 Petr Oros <poros@redhat.com> - 2.1-22.2
8e8f98
- Update Intel CPU microde for 06-3f-02, 06-4f-01, and 06-55-04
8e8f98
- Resolves: #1527358
8e8f98
8e8f98
* Tue Jul 25 2017 Petr Oros <poros@redhat.com> - 2.1-22.1
8e8f98
- Update to upstream 2.1-13. Intel CPU microcode update to 20170707.
8e8f98
- Resolves: #1474844
8e8f98
2a4399
* Wed May 24 2017 Petr Oros <poros@redhat.com> - 2.1-22
2a4399
- Update to upstream 2.1-12. Intel CPU microcode update to 20170511.
2a4399
- Resolves: #1384218
2a4399
2a4399
* Tue Mar 7 2017 Petr Oros <poros@redhat.com> - 2.1-21
2a4399
- Rpm scriptlets should only rebuild the current kernel's initrd.
2a4399
- Resolves: #1420180
2a4399
2a4399
* Wed Jan 18 2017 Petr Oros <poros@redhat.com> - 2.1-20
d60a12
- Fix issue with hot microcode cpu reload.
2a4399
- Resolves: #1411232
d60a12
2a4399
* Mon Jan 9 2017 Petr Oros <poros@redhat.com> - 2.1-19
d60a12
- Fix broken quoting in ExecStart line.
2a4399
- Resolves: #1411232
d60a12
2a4399
* Fri Dec 16 2016 Petr Oros <poros@redhat.com> - 2.1-18
8c144b
- Fix issue with hot microcode cpu reload.
2a4399
- Resolves: #1398698
2a4399
2a4399
* Wed Nov 30 2016 Petr Oros <poros@redhat.com> - 2.1-17
8c144b
- Move dracut call into posttrans phase.
2a4399
- Resolves: #1398698
8c144b
d29bfe
* Thu Jul 21 2016 Petr Oros <poros@redhat.com> - 2.1-16
d29bfe
- Update to upstream 2.1-10. Intel CPU microcode update to 20160714.
d29bfe
- Resolves: #1358047
d29bfe
d29bfe
* Wed Jun 29 2016 Petr Oros <poros@redhat.com> - 2.1-15
d29bfe
- Load CPU microcode update only on supproted systems.
d29bfe
- Resolves: #1307179
d29bfe
d29bfe
* Fri Jun 24 2016 Petr Oros <poros@redhat.com> - 2.1-14
d29bfe
- Update to upstream 2.1-9. Intel CPU microcode update to 20160607.
d29bfe
- Resolves: #1253106
d29bfe
d29bfe
* Thu May 19 2016 Petr Oros <poros@redhat.com> - 2.1-13
6bc9fc
- Run dracut -f for all kernels.
d29bfe
- Resolves: #1292158
6bc9fc
0cdd93
* Fri Jul 3 2015 Petr Oros <poros@redhat.com> - 2.1-12
0cdd93
- Update to upstream 2.1-7. Intel CPU microcode update to 20150121.
0cdd93
- Resolves: #1174983
0cdd93
0cdd93
* Fri Oct 10 2014 Petr Oros <poros@redhat.com> - 2.1-11
0cdd93
- Run dracut -f after install microcode for update initramfs.
0cdd93
- Resolves: #1151192
0cdd93
873caf
* Tue Sep 30 2014 Petr Oros <poros@redhat.com> - 2.1-10
873caf
- Update to upstream 2.1-6. Intel CPU microcode update to 20140913.
873caf
- Resolves: #1142302
873caf
873caf
* Tue Jul 15 2014 Petr Oros <poros@redhat.com> - 2.1-9
726ba7
- Update to upstream 2.1-5. Intel CPU microcode update to 20140624.
873caf
- Resolves: #1113396
873caf
873caf
* Tue Jun 3 2014 Petr Oros <poros@redhat.com> - 2.1-8
873caf
- Fix bogus time in changelog
873caf
- Resolves: #1085117
726ba7
873caf
* Tue Jun 3 2014 Petr Oros <poros@redhat.com> - 2.1-8
d25c9d
- Update to upstream 2.1-4. Intel CPU microcode update to 20140430.
873caf
- Resolves: #1085117
d25c9d
e4b344
* Wed Mar 12 2014 Anton Arapov <anton@redhat.com> - 2.1-7.1
e4b344
- Fix the microcode's behaviour in virtual environment.
e4b344
e4b344
* Fri Feb 28 2014 Anton Arapov <anton@redhat.com> - 2.1-7
e4b344
- Fix the microcode's dracut configuration file location. 
e4b344
e4b344
* Tue Feb 18 2014 Anton Arapov <anton@redhat.com> - 2.1-6
e4b344
- Enable early microcode capabilities. Systemd and Dracut support. (Jeff Bastian)
e4b344
e4b344
* Fri Jan 24 2014 Anton Arapov <anton@redhat.com> - 2.1-5
e4b344
- Update to upstream 2.1-3. Intel CPU microcode update to 20140122.
e4b344
e4b344
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2:2.1-4
e4b344
- Mass rebuild 2013-12-27
e4b344
ea6c69
* Mon Sep 09 2013 Anton Arapov <anton@redhat.com> 2.1-3
ea6c69
- Imported to RHEL tree
ea6c69
ea6c69
* Mon Sep 09 2013 Anton Arapov <anton@redhat.com> 2.1-2
ea6c69
- Update to upstream 2.1-2.
ea6c69
ea6c69
* Wed Aug 14 2013 Anton Arapov <anton@redhat.com> 2.1-1
ea6c69
- Update to upstream 2.1-1.
ea6c69
ea6c69
* Sat Jul 27 2013 Anton Arapov <anton@redhat.com> 2.1-0
ea6c69
- Update to upstream 2.1. AMD microcode has been removed, find it in linux-firmware.
ea6c69
ea6c69
* Wed Apr 03 2013 Anton Arapov <anton@redhat.com> 2.0-3.1
ea6c69
- Update to upstream 2.0-3
ea6c69
ea6c69
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2:2.0-3
ea6c69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ea6c69
ea6c69
* Wed Oct 17 2012 Anton Arapov <anton@redhat.com> 2.0-2
ea6c69
- Update to upstream 2.0-2
ea6c69
ea6c69
* Tue Oct 02 2012 Anton Arapov <anton@redhat.com> 2.0-1
ea6c69
- Update to upstream 2.0-1
ea6c69
ea6c69
* Mon Aug 06 2012 Anton Arapov <anton@redhat.com> 2.0
ea6c69
- Update to upstream 2.0
ea6c69
ea6c69
* Wed Jul 25 2012 Anton Arapov <anton@redhat.com> 1.18-1
ea6c69
- Update to upstream 1.18
ea6c69
ea6c69
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.17-26
ea6c69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
ea6c69
ea6c69
* Thu Jun 07 2012 Anton Arapov <anton@redhat.com> 1.17-25
ea6c69
- Update to microcode-20120606.dat
ea6c69
ea6c69
* Tue Feb 07 2012 Anton Arapov <anton@redhat.com> 1.17-24
ea6c69
- Update to amd-ucode-2012-01-17.tar
ea6c69
ea6c69
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.17-22
ea6c69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ea6c69
ea6c69
* Thu Dec 22 2011 Anton Arapov <anton@redhat.com> 1.17-21
ea6c69
- Fix a segfault that may be triggered by very long parameter [#768803]
ea6c69
ea6c69
* Tue Dec 13 2011 Anton Arapov <anton@redhat.com> 1.17-20
ea6c69
- Update to microcode-20111110.dat
ea6c69
ea6c69
* Tue Sep 27 2011 Anton Arapov <anton@redhat.com> 1.17-19
ea6c69
- Update to microcode-20110915.dat
ea6c69
ea6c69
* Thu Aug 04 2011 Anton Arapov <anton@redhat.com> 1.17-18
ea6c69
- Ship splitted microcode for Intel CPUs [#690930]
ea6c69
- Include tool for splitting microcode for Intl CPUs (Kay Sievers )
ea6c69
ea6c69
* Thu Jun 30 2011 Anton Arapov <anton@redhat.com> 1.17-17
ea6c69
- Fix udev rules (Dave Jones ) [#690930]
ea6c69
ea6c69
* Thu May 12 2011 Anton Arapov <anton@redhat.com> 1.17-14
ea6c69
- Update to microcode-20110428.dat
ea6c69
ea6c69
* Thu Mar 24 2011 Anton Arapov <anton@redhat.com> 1.17-13
ea6c69
- fix memory leak.
ea6c69
ea6c69
* Mon Mar 07 2011 Anton Arapov <anton@redhat.com> 1.17-12
ea6c69
- Update to amd-ucode-2011-01-11.tar
ea6c69
ea6c69
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.17-11
ea6c69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
ea6c69
ea6c69
* Wed Jan 19 2011 Anton Arapov <anton@redhat.com> 1.17-10
ea6c69
- manpage fix (John Bradshaw ) [#670879]
ea6c69
ea6c69
* Wed Jan 05 2011 Anton Arapov <anton@redhat.com> 1.17-9
ea6c69
- Update to microcode-20101123.dat
ea6c69
ea6c69
* Mon Nov 01 2010 Anton Arapov <anton@redhat.com> 1.17-8
ea6c69
- Update to microcode-20100914.dat
ea6c69
ea6c69
* Wed Sep 29 2010 jkeating - 1:1.17-7
ea6c69
- Rebuilt for gcc bug 634757
ea6c69
ea6c69
* Wed Sep 15 2010 Anton Arapov <anton@redhat.com> 1.17-6
ea6c69
- Update to microcode-20100826.dat
ea6c69
ea6c69
* Tue Sep 07 2010 Toshio Kuratomi <toshio@fedoraproject.org> 1.17-5
ea6c69
- Fix license tag: bz#450491
ea6c69
ea6c69
* Fri Aug 27 2010 Dave Jones <davej@redhat.com> 1.17-4
ea6c69
- Update to microcode-20100826.dat
ea6c69
ea6c69
* Tue Mar 23 2010 Anton Arapov <anton@redhat.com> 1.17-3
ea6c69
- Fix the udev rules (Harald Hoyer )
ea6c69
ea6c69
* Mon Mar 22 2010 Anton Arapov <anton@redhat.com> 1.17-2
ea6c69
- Make microcode_ctl event driven (Bill Nottingham ) [#479898]
ea6c69
ea6c69
* Thu Feb 11 2010 Dave Jones <davej@redhat.com> 1.17-1.58
ea6c69
- Update to microcode-20100209.dat
ea6c69
ea6c69
* Fri Dec 04 2009 Kyle McMartin <kyle@redhat.com> 1.17-1.57
ea6c69
- Fix duplicate message pointed out by Edward Sheldrake.
ea6c69
ea6c69
* Wed Dec 02 2009 Kyle McMartin <kyle@redhat.com> 1.17-1.56
ea6c69
- Add AMD x86/x86-64 microcode. (Dated: 2009-10-09)
ea6c69
  Doesn't need microcode_ctl modifications as it's loaded by
ea6c69
  request_firmware() like any other sensible driver.
ea6c69
- Eventually, this AMD firmware can probably live inside
ea6c69
  kernel-firmware once it is split out.
ea6c69
ea6c69
* Wed Sep 30 2009 Dave Jones <davej@redhat.com>
ea6c69
- Update to microcode-20090927.dat
ea6c69
ea6c69
* Fri Sep 11 2009 Dave Jones <davej@redhat.com>
ea6c69
- Remove some unnecessary code from the init script.
ea6c69
ea6c69
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.17-1.52.1
ea6c69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ea6c69
ea6c69
* Thu Jun 25 2009 Dave Jones <davej@redhat.com>
ea6c69
- Shorten sleep time during init.
ea6c69
  This really needs to be replaced with proper udev hooks, but this is
ea6c69
  a quick interim fix.
ea6c69
ea6c69
* Wed Jun 03 2009 Kyle McMartin <kyle@redhat.com> 1:1.17-1.50
ea6c69
- Change ExclusiveArch to i586 instead of i386. Resolves rhbz#497711.
ea6c69
ea6c69
* Wed May 13 2009 Dave Jones <davej@redhat.com>
ea6c69
- update to microcode 20090330
ea6c69
ea6c69
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.17-1.46.1
ea6c69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
ea6c69
ea6c69
* Fri Sep 12 2008 Dave Jones <davej@redhat.com>
ea6c69
- update to microcode 20080910
ea6c69
ea6c69
* Tue Apr 01 2008 Jarod Wilson <jwilson@redhat.com>
ea6c69
- Update to microcode 20080401
ea6c69
ea6c69
* Sat Mar 29 2008 Dave Jones <davej@redhat.com>
ea6c69
- Update to microcode 20080220
ea6c69
- Fix rpmlint warnings in specfile.
ea6c69
ea6c69
* Mon Mar 17 2008 Dave Jones <davej@redhat.com>
ea6c69
- specfile cleanups.
ea6c69
ea6c69
* Fri Feb 22 2008 Jarod Wilson <jwilson@redhat.com>
ea6c69
- Use /lib/firmware instead of /etc/firmware
ea6c69
ea6c69
* Wed Feb 13 2008 Jarod Wilson <jwilson@redhat.com>
ea6c69
- Fix permissions on microcode.dat
ea6c69
ea6c69
* Thu Feb 07 2008 Jarod Wilson <jwilson@redhat.com>
ea6c69
- Spec cleanup and macro standardization.
ea6c69
- Update license
ea6c69
- Update microcode data file to 20080131 revision.
ea6c69
ea6c69
* Mon Jul  2 2007 Dave Jones <davej@redhat.com>
ea6c69
- Update to upstream 1.17
ea6c69
ea6c69
* Thu Oct 12 2006 Jon Masters <jcm@redhat.com>
ea6c69
- BZ209455 fixes.
ea6c69
ea6c69
* Mon Jul 17 2006 Jesse Keating <jkeating@redhat.com>
ea6c69
- rebuild
ea6c69
ea6c69
* Fri Jun 16 2006 Bill Nottingham <notting@redhat.com>
ea6c69
- remove kudzu requirement
ea6c69
- add prereq for coreutils, awk, grep
ea6c69
ea6c69
* Thu Feb 09 2006 Dave Jones <davej@redhat.com>
ea6c69
- rebuild.
ea6c69
ea6c69
* Fri Jan 27 2006 Dave Jones <davej@redhat.com>
ea6c69
- Update to upstream 1.13
ea6c69
ea6c69
* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
ea6c69
- rebuilt for new gcj
ea6c69
ea6c69
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
ea6c69
- rebuilt
ea6c69
ea6c69
* Mon Nov 14 2005 Dave Jones <davej@redhat.com>
ea6c69
- initscript tweaks.
ea6c69
ea6c69
* Tue Sep 13 2005 Dave Jones <davej@redhat.com>
ea6c69
- Update to upstream 1.12
ea6c69
ea6c69
* Wed Aug 17 2005 Dave Jones <davej@redhat.com>
ea6c69
- Check for device node *after* loading the module. (#157672)
ea6c69
ea6c69
* Tue Mar  1 2005 Dave Jones <davej@redhat.com>
ea6c69
- Rebuild for gcc4
ea6c69
ea6c69
* Thu Feb 17 2005 Dave Jones <davej@redhat.com>
ea6c69
- s/Serial/Epoch/
ea6c69
ea6c69
* Tue Jan 25 2005 Dave Jones <davej@redhat.com>
ea6c69
- Drop the node creation/deletion change from previous release.
ea6c69
  It'll cause grief with selinux, and was a hack to get around
ea6c69
  a udev shortcoming that should be fixed properly.
ea6c69
ea6c69
* Fri Jan 21 2005 Dave Jones <davej@redhat.com>
ea6c69
- Create/remove the /dev/cpu/microcode dev node as needed.
ea6c69
- Use correct path again for the microcode.dat.
ea6c69
- Remove some no longer needed tests in the init script.
ea6c69
ea6c69
* Fri Jan 14 2005 Dave Jones <davej@redhat.com>
ea6c69
- Only enable microcode_ctl service if the CPU is capable.
ea6c69
- Prevent microcode_ctl getting restarted multiple times on initlevel change (#141581)
ea6c69
- Make restart/reload work properly
ea6c69
- Do nothing if not started by root.
ea6c69
ea6c69
* Wed Jan 12 2005 Dave Jones <davej@redhat.com>
ea6c69
- Adjust dev node location. (#144963)
ea6c69
ea6c69
* Tue Jan 11 2005 Dave Jones <davej@redhat.com>
ea6c69
- Load/Remove microcode module in initscript.
ea6c69
ea6c69
* Mon Jan 10 2005 Dave Jones <davej@redhat.com>
ea6c69
- Update to upstream 1.11 release.
ea6c69
ea6c69
* Sat Dec 18 2004 Dave Jones <davej@redhat.com>
ea6c69
- Initial packaging, based upon kernel-utils.
ea6c69