mcelog: revise package NVR for compliance with Fedora Packaging Guidelines

Revise the package for better packaging compliance (unfortunately does do
an epoch bump just to be sure, but should not need another one again). We
also switch to using the bzip2 versions of files (yes this might change
on kernel.org eventually) because these are signed and we can check
that against the kernel.org signing key later on. Finally, remove
an old patch that isn't needed any more. No code changes.

Signed-off-by: Jon Masters <jcm@jonmasters.org>
This commit is contained in:
Jon Masters 2010-11-09 20:53:25 -05:00 committed by Jon Masters
parent 41dd222844
commit 982761ae29
4 changed files with 13 additions and 99 deletions

4
.gitignore vendored
View File

@ -1,3 +1 @@
mcelog-0.9pre1.tar.gz
/mcelog-1.0pre2.tar.gz
/mcelog-1.0pre3.tar.gz
/mcelog-1.0pre3.tar.bz2

View File

@ -1,89 +0,0 @@
--- mcelog-0.9-pre1/mcelog.h.record-length 2009-02-20 15:56:08.000000000 -0700
+++ mcelog-0.9-pre1/mcelog.h 2009-10-05 09:01:24.308477671 -0600
@@ -11,26 +11,29 @@
/* kernel structure: */
-/* Fields are zero when not available */
struct mce {
- __u64 status;
- __u64 misc;
- __u64 addr;
- __u64 mcgstatus;
- __u64 rip;
- __u64 tsc; /* cpu time stamp counter */
- __u64 time; /* wall time_t when error was detected */
- __u8 cpuvendor; /* cpu vendor as encoded in system.h */
- __u8 pad1;
- __u16 pad2;
- __u32 cpuid; /* CPUID 1 EAX */
- __u8 cs; /* code segment */
- __u8 bank; /* machine check bank */
- __u8 cpu; /* cpu that raised the error */
- __u8 finished; /* entry is valid */
- __u32 extcpu; /* extended CPU number */
+ __u64 status;
+ __u64 misc;
+ __u64 addr;
+ __u64 mcgstatus;
+ __u64 ip;
+ __u64 tsc; /* cpu time stamp counter */
+ __u64 time; /* wall time_t when error was detected */
+ __u8 cpuvendor; /* cpu vendor as encoded in system.h */
+ __u8 pad1;
+ __u16 pad2;
+ __u32 cpuid; /* CPUID 1 EAX */
+ __u8 cs; /* code segment */
+ __u8 bank; /* machine check bank */
+ __u8 cpu; /* cpu number; obsolete; use extcpu now */
+ __u8 finished; /* entry is valid */
+ __u32 extcpu; /* linux cpu number that detected the error */
+ __u32 socketid; /* CPU socket ID */
+ __u32 apicid; /* CPU initial apic ID */
+ __u64 mcgcap; /* MCGCAP MSR: machine check capabilities of CPU */
};
+
#define X86_VENDOR_INTEL 0
#define X86_VENDOR_CYRIX 1
#define X86_VENDOR_AMD 2
--- mcelog-0.9-pre1/mcelog.c.record-length 2009-02-20 15:56:08.000000000 -0700
+++ mcelog-0.9-pre1/mcelog.c 2009-10-05 09:01:24.307479137 -0600
@@ -341,15 +341,15 @@
Wprintf(" (upper bound, found by polled driver)");
Wprintf("\n");
}
- if (m->rip)
- Wprintf("RIP%s %02x:%Lx ",
+ if (m->ip)
+ Wprintf("RIP%s %02x:%llx ",
!(m->mcgstatus & MCG_STATUS_EIPV) ? " !INEXACT!" : "",
- m->cs, m->rip);
+ m->cs, m->ip);
if (m->misc)
Wprintf("MISC %Lx ", m->misc);
if (m->addr)
Wprintf("ADDR %Lx ", m->addr);
- if (m->rip | m->misc | m->addr)
+ if (m->ip | m->misc | m->addr)
Wprintf("\n");
switch (cputype) {
case CPU_K8:
@@ -387,7 +387,7 @@
Wprintf("CPU %u\n", m->extcpu ? m->extcpu : m->cpu);
Wprintf("BANK %d\n", m->bank);
Wprintf("TSC 0x%Lx\n", m->tsc);
- Wprintf("RIP 0x%02x:0x%Lx\n", m->cs, m->rip);
+ Wprintf("RIP 0x%02x:0x%llx\n", m->cs, m->ip);
Wprintf("MISC 0x%Lx\n", m->misc);
Wprintf("ADDR 0x%Lx\n", m->addr);
Wprintf("STATUS 0x%Lx\n", m->status);
@@ -543,7 +543,7 @@
n = sscanf(s, "%02x:<%016Lx> {%100s}%n",
&cs,
- &m.rip,
+ &m.ip,
symbol, &next);
m.cs = cs;
if (n < 2)

View File

@ -1,12 +1,13 @@
%define pre_release pre3
Summary: Tool to translate x86-64 CPU Machine Check Exception data.
Name: mcelog
Version: 1.0pre3
Release: 0.1%{?dist}
Epoch: 1
Version: 1.0
Release: 0.1.%{pre_release}%{?dist}
Epoch: 2
Group: System Environment/Base
License: GPLv2
Source0: http://www.kernel.org/pub/linux/utils/cpu/mce/mcelog-%{version}.tar.gz
Patch0: mcelog-0.9-pre1-record-length.patch
Source0: http://www.kernel.org/pub/linux/utils/cpu/mce/mcelog-%{version}%{pre_release}.tar.bz2
URL: http://www.kernel.org/pub/linux/utils/cpu/mce/
Buildroot: %{_tmppath}/%{name}-%{version}-root
ExclusiveArch: x86_64
@ -16,7 +17,7 @@ mcelog is a daemon that collects and decodes Machine Check Exception data
on x86-64 machines.
%prep
%setup -q -n %{name}-1.0pre3
%setup -q -n %{name}-%{version}%{pre_release}
%build
rm -rf %{buildroot}
@ -46,6 +47,10 @@ rm -rf %{buildroot}
%attr(0644,root,root) %{_mandir}/*/*
%changelog
* Tue Nov 09 2010 Jon Masters <jcm@rehat.com> 2:1.0-0.1.pre3
- Bump epoch and use standard Fedora Packaging Guidelines for NVR.
- Switch to using signed bz2 source and remove dead patch.
* Fri Sep 17 2010 Dave Jones <davej@redhat.com> 1:1.0pre3-0.1
- Update to upstream mcelog-1.0pre3

View File

@ -1 +1 @@
b42f2214de6f4feb992556149edc67fa mcelog-1.0pre3.tar.gz
dbdf6507eb34ebc4ce7c583ef6c568c5 mcelog-1.0pre3.tar.bz2