- Spec cleanup and macro standardization.
- Update license - Update microcode data file to 20080131 revision.
This commit is contained in:
parent
2331e22db2
commit
e2a1957964
@ -1,3 +1,4 @@
|
|||||||
clog
|
clog
|
||||||
microcode_ctl-1.17
|
microcode_ctl-1.17
|
||||||
microcode_ctl-1.17.tar.gz
|
microcode_ctl-1.17.tar.gz
|
||||||
|
microcode-20080131.dat
|
||||||
|
@ -1,29 +1,41 @@
|
|||||||
--- microcode_ctl-1.17/Makefile~ Mon Jun 11 16:57:42 2001
|
diff -Naurp microcode_ctl-1.17.orig/Makefile microcode_ctl-1.17/Makefile
|
||||||
+++ microcode_ctl-1.17/Makefile Tue Jan 8 20:20:58 2002
|
--- microcode_ctl-1.17.orig/Makefile 2007-04-26 06:59:44.000000000 -0400
|
||||||
@@ -20,7 +20,7 @@
|
+++ microcode_ctl-1.17/Makefile 2008-02-05 11:22:23.000000000 -0500
|
||||||
|
@@ -20,8 +20,8 @@ DESTDIR =
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
|
||||||
INSDIR = $(PREFIX)/sbin
|
INSDIR = $(PREFIX)/sbin
|
||||||
-MANDIR = $(PREFIX)/man/man8
|
-MANDIR = $(PREFIX)/man/man8
|
||||||
|
-MICDIR = /etc
|
||||||
+MANDIR = $(PREFIX)/share/man/man8
|
+MANDIR = $(PREFIX)/share/man/man8
|
||||||
MICDIR = /etc
|
+MICDIR = /etc/firmware
|
||||||
|
|
||||||
RCFILE = microcode_ctl.start
|
RCFILE = microcode_ctl.start
|
||||||
@@ -45,7 +45,7 @@
|
RCFILEFINAL = microcode_ctl
|
||||||
|
@@ -44,7 +44,7 @@ install:
|
||||||
|
$(DESTDIR)$(MANDIR) $(DESTDIR)$(RCFILETO) \
|
||||||
$(DESTDIR)$(RCLINKTO)
|
$(DESTDIR)$(RCLINKTO)
|
||||||
|
|
||||||
- $(INS) -s -m 755 $(PROGRAM) $(DESTDIR)$(INSDIR)
|
- $(INS) -s -m 755 $(PROGRAM) $(DESTDIR)$(INSDIR)
|
||||||
+ $(INS) -m 755 $(PROGRAM) $(DESTDIR)$(INSDIR)
|
+ $(INS) -m 755 $(PROGRAM) $(DESTDIR)$(INSDIR)
|
||||||
- $(INS) -m 644 $(MICROCODE) $(DESTDIR)$(MICDIR)/microcode.dat
|
$(INS) -m 644 $(MICROCODE) $(DESTDIR)$(MICDIR)/microcode.dat
|
||||||
+ $(INS) -m 644 $(MICROCODE) $(DESTDIR)/etc/firmware/microcode.dat
|
|
||||||
|
|
||||||
$(INS) -m 644 $(MANPAGE) $(DESTDIR)$(MANDIR)
|
$(INS) -m 644 $(MANPAGE) $(DESTDIR)$(MANDIR)
|
||||||
gzip -9f $(DESTDIR)$(MANDIR)/$(MANPAGE)
|
diff -Naurp microcode_ctl-1.17.orig/microcode_ctl.c microcode_ctl-1.17/microcode_ctl.c
|
||||||
--- microcode_ctl-1.17/microcode_ctl.c.org 2003-05-28 19:56:22.000000000 +0200
|
--- microcode_ctl-1.17.orig/microcode_ctl.c 2006-06-28 10:51:31.000000000 -0400
|
||||||
+++ microcode_ctl-1.17/microcode_ctl.c 2003-05-28 19:57:01.000000000 +0200
|
+++ microcode_ctl-1.17/microcode_ctl.c 2008-02-05 11:21:31.000000000 -0500
|
||||||
@@ -95,11 +95,13 @@
|
@@ -25,7 +25,7 @@ int print_error_messages=1;
|
||||||
|
#define MAX_MICROCODE 2000000
|
||||||
|
|
||||||
|
#define MICROCODE_DEVICE_DEFAULT "/dev/cpu/microcode"
|
||||||
|
-#define MICROCODE_FILE_DEFAULT "/etc/microcode.dat"
|
||||||
|
+#define MICROCODE_FILE_DEFAULT "/etc/firmware/microcode.dat"
|
||||||
|
|
||||||
|
static void usage(void)
|
||||||
{
|
{
|
||||||
FILE *fd;
|
@@ -52,11 +52,13 @@ static int do_update(char *device, char
|
||||||
|
{
|
||||||
|
FILE *fp;
|
||||||
char line_buffer[BUFFER_SIZE];
|
char line_buffer[BUFFER_SIZE];
|
||||||
- int microcode[MAX_MICROCODE];
|
- int microcode[MAX_MICROCODE];
|
||||||
+ int *microcode;
|
+ int *microcode;
|
||||||
@ -34,9 +46,9 @@
|
|||||||
+ microcode=malloc(sizeof(int)* MAX_MICROCODE);
|
+ microcode=malloc(sizeof(int)* MAX_MICROCODE);
|
||||||
+ if (!microcode) return ENOMEM;
|
+ if (!microcode) return ENOMEM;
|
||||||
|
|
||||||
if( (fd=fopen(filename, "r")) == NULL){
|
if( (fp=fopen(filename, "r")) == NULL){
|
||||||
if(print_error_messages)
|
if(print_error_messages)
|
||||||
@@ -146,7 +146,7 @@
|
@@ -101,7 +103,7 @@ static int do_update(char *device, char
|
||||||
return errno;
|
return errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,15 +57,3 @@
|
|||||||
if(print_error_messages)
|
if(print_error_messages)
|
||||||
fprintf(stderr, "%s: error writing to '%s' errno=%d (%s)\n"
|
fprintf(stderr, "%s: error writing to '%s' errno=%d (%s)\n"
|
||||||
"%s: there may be messages from the driver in your system log.\n",
|
"%s: there may be messages from the driver in your system log.\n",
|
||||||
|
|
||||||
--- microcode_ctl-1.17/microcode_ctl.c~ 2005-01-21 17:42:53.000000000 -0500
|
|
||||||
+++ microcode_ctl-1.17/microcode_ctl.c 2005-01-21 17:43:03.000000000 -0500
|
|
||||||
@@ -25,7 +25,7 @@ int print_error_messages=1;
|
|
||||||
#define MAX_MICROCODE 2000000
|
|
||||||
|
|
||||||
#define MICROCODE_DEVICE_DEFAULT "/dev/cpu/microcode"
|
|
||||||
-#define MICROCODE_FILE_DEFAULT "/etc/microcode.dat"
|
|
||||||
+#define MICROCODE_FILE_DEFAULT "/etc/firmware/microcode.dat"
|
|
||||||
|
|
||||||
static void usage(void)
|
|
||||||
{
|
|
||||||
|
@ -4,9 +4,13 @@ Version: 1.17
|
|||||||
Release: %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})%{?dist}
|
Release: %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?})%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
License: GPL
|
License: GPLv2+
|
||||||
Source0: microcode_ctl-%{version}.tar.gz
|
URL: http://www.urbanmyth.org/microcode/
|
||||||
|
Source0: http://www.urbanmyth.org/microcode/microcode_ctl-%{version}.tar.gz
|
||||||
Source1: microcode_ctl.init
|
Source1: microcode_ctl.init
|
||||||
|
# Microcode now distributed directly by Intel, at
|
||||||
|
# http://downloadcenter.intel.com/default.aspx (just search for microcode)
|
||||||
|
Source2: microcode-20080131.dat
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||||
Prereq: /sbin/chkconfig /sbin/service
|
Prereq: /sbin/chkconfig /sbin/service
|
||||||
Prereq: grep gawk coreutils
|
Prereq: grep gawk coreutils
|
||||||
@ -19,41 +23,33 @@ Patch1: microcode_ctl.patch
|
|||||||
microcode_ctl - updates the microcode on Intel x86/x86-64 CPU's
|
microcode_ctl - updates the microcode on Intel x86/x86-64 CPU's
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c
|
%setup -q
|
||||||
%patch1 -p0
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}/usr/sbin
|
|
||||||
mkdir -p %{buildroot}/usr/man
|
|
||||||
mkdir -p %{buildroot}/etc/rc.d/init.d
|
|
||||||
mkdir -p %{buildroot}/etc/sysconfig
|
|
||||||
|
|
||||||
cd microcode_ctl-%{version}
|
|
||||||
make CFLAGS="$RPM_OPT_FLAGS"
|
make CFLAGS="$RPM_OPT_FLAGS"
|
||||||
cd ..
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
mkdir -p %{buildroot}/usr/share/man/man{1,8}
|
mkdir -p %{buildroot}/usr/share/man/man{1,8}
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||||
|
|
||||||
cd microcode_ctl-%{version}
|
make DESTDIR=%{buildroot} PREFIX=%{_prefix} \
|
||||||
|
INSDIR=/sbin MANDIR=%{_mandir}/man8 RCDIR=%{_sysconfdir} MICDIR=%{_sysconfdir}/firmware install clean
|
||||||
|
|
||||||
make DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} \
|
install %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/microcode_ctl
|
||||||
INSDIR=/sbin MANDIR=%{_mandir}/man8 RCDIR=/etc MICDIR=/etc/firmware install clean
|
install %{SOURCE2} %{buildroot}%{_sysconfdir}/firmware/microcode.dat
|
||||||
|
|
||||||
install %{SOURCE1} %{buildroot}/etc/rc.d/init.d/microcode_ctl
|
|
||||||
rm %{buildroot}/etc/init.d/microcode_ctl
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
chmod -R a-s %{buildroot}
|
chmod -R a-s %{buildroot}
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
|
[ "%{buildroot}" != "/" ] && [ -d %{buildroot} ] && rm -rf %{buildroot};
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
/etc/rc.d/init.d/microcode_ctl
|
%{_sysconfdir}/init.d/microcode_ctl
|
||||||
/etc/firmware/*
|
%{_sysconfdir}/firmware/*
|
||||||
/sbin/microcode_ctl
|
/sbin/microcode_ctl
|
||||||
%attr(0644,root,root) %{_mandir}/*/*
|
%attr(0644,root,root) %{_mandir}/*/*
|
||||||
|
|
||||||
@ -82,6 +78,11 @@ family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 07 2008 Jarod Wilson <jwilson@redhat.com>
|
||||||
|
- Spec cleanup and macro standardization.
|
||||||
|
- Update license
|
||||||
|
- Update microcode data file to 20080131 revision.
|
||||||
|
|
||||||
* Mon Jul 2 2007 Dave Jones <davej@redhat.com>
|
* Mon Jul 2 2007 Dave Jones <davej@redhat.com>
|
||||||
- Update to upstream 1.17
|
- Update to upstream 1.17
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user