Accepting request 357396 from home:trenn:branches:Base:System

- Update to latest version 1.29.
  Mostly little bug fixes.

- Update to version v124. Adds skylake CPU support and some bug fixes.

OBS-URL: https://build.opensuse.org/request/show/357396
OBS-URL: https://build.opensuse.org/package/show/Base:System/mcelog?expand=0&rev=53
This commit is contained in:
Thomas Renninger 2016-02-02 17:14:08 +00:00 committed by Git OBS Bridge
parent 49d6db02db
commit 0959987313
8 changed files with 111 additions and 108 deletions

View File

@ -16,22 +16,22 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
rename k8.c => amd.c (97%) rename k8.c => amd.c (97%)
rename k8.h => amd.h (79%) rename k8.h => amd.h (79%)
Index: mcelog-1.20/Makefile Index: mcelog-1.29/Makefile
=================================================================== ===================================================================
--- mcelog-1.20.orig/Makefile 2015-06-15 15:15:14.281052761 +0200 --- mcelog-1.29.orig/Makefile 2016-01-28 15:33:45.402475555 +0100
+++ mcelog-1.20/Makefile 2015-06-15 15:15:52.523239254 +0200 +++ mcelog-1.29/Makefile 2016-01-28 15:33:51.646831409 +0100
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@ all: mcelog
.PHONY: install clean depend .PHONY: install clean depend FORCE
-OBJ := p4.o k8.o mcelog.o dmi.o tsc.o core2.o bitfield.o intel.o \ -OBJ := p4.o k8.o mcelog.o dmi.o tsc.o core2.o bitfield.o intel.o \
+OBJ := p4.o amd.o mcelog.o dmi.o tsc.o core2.o bitfield.o intel.o \ +OBJ := p4.o amd.o mcelog.o dmi.o tsc.o core2.o bitfield.o intel.o \
nehalem.o dunnington.o tulsa.o config.o memutil.o msg.o \ nehalem.o dunnington.o tulsa.o config.o memutil.o msg.o \
eventloop.o leaky-bucket.o memdb.o server.o trigger.o \ eventloop.o leaky-bucket.o memdb.o server.o trigger.o \
client.o cache.o sysfs.o yellow.o page.o rbtree.o \ client.o cache.o sysfs.o yellow.o page.o rbtree.o \
Index: mcelog-1.20/k8.c Index: mcelog-1.29/k8.c
=================================================================== ===================================================================
--- mcelog-1.20.orig/k8.c 2015-06-15 14:25:23.000000000 +0200 --- mcelog-1.29.orig/k8.c 2016-01-20 18:33:20.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,281 +0,0 @@ @@ -1,281 +0,0 @@
-/* Based on K8 decoding code written for the 2.4 kernel by Andi Kleen and -/* Based on K8 decoding code written for the 2.4 kernel by Andi Kleen and
@ -315,10 +315,10 @@ Index: mcelog-1.20/k8.c
- } - }
- return 1; - return 1;
-} -}
Index: mcelog-1.20/amd.c Index: mcelog-1.29/amd.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ mcelog-1.20/amd.c 2015-06-15 15:15:52.531239713 +0200 +++ mcelog-1.29/amd.c 2016-01-28 15:33:51.646831409 +0100
@@ -0,0 +1,282 @@ @@ -0,0 +1,282 @@
+/* Based on K8 decoding code written for the 2.4 kernel by Andi Kleen and +/* Based on K8 decoding code written for the 2.4 kernel by Andi Kleen and
+ * Eric Morton. Hacked and extended for mcelog by AK. + * Eric Morton. Hacked and extended for mcelog by AK.
@ -602,9 +602,9 @@ Index: mcelog-1.20/amd.c
+ } + }
+ return 1; + return 1;
+} +}
Index: mcelog-1.20/k8.h Index: mcelog-1.29/k8.h
=================================================================== ===================================================================
--- mcelog-1.20.orig/k8.h 2015-06-15 14:25:23.000000000 +0200 --- mcelog-1.29.orig/k8.h 2016-01-20 18:33:20.000000000 +0100
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@ @@ -1,11 +0,0 @@
-char *k8_bank_name(unsigned num); -char *k8_bank_name(unsigned num);
@ -618,10 +618,10 @@ Index: mcelog-1.20/k8.h
-#define K8_MCELOG_THRESHOLD_LINK (4 * 9 + 1) -#define K8_MCELOG_THRESHOLD_LINK (4 * 9 + 1)
-#define K8_MCELOG_THRESHOLD_L3_CACHE (4 * 9 + 2) -#define K8_MCELOG_THRESHOLD_L3_CACHE (4 * 9 + 2)
-#define K8_MCELOG_THRESHOLD_FBDIMM (4 * 9 + 3) -#define K8_MCELOG_THRESHOLD_FBDIMM (4 * 9 + 3)
Index: mcelog-1.20/amd.h Index: mcelog-1.29/amd.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ mcelog-1.20/amd.h 2015-06-15 15:15:52.539240159 +0200 +++ mcelog-1.29/amd.h 2016-01-28 15:33:51.650831636 +0100
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
+char *k8_bank_name(unsigned num); +char *k8_bank_name(unsigned num);
+void decode_amd_mc(enum cputype, struct mce *mce, int *ismemerr); +void decode_amd_mc(enum cputype, struct mce *mce, int *ismemerr);
@ -637,10 +637,10 @@ Index: mcelog-1.20/amd.h
+ +
+#define CASE_AMD_CPUS \ +#define CASE_AMD_CPUS \
+ case CPU_K8 + case CPU_K8
Index: mcelog-1.20/mcelog.c Index: mcelog-1.29/mcelog.c
=================================================================== ===================================================================
--- mcelog-1.20.orig/mcelog.c 2015-06-15 15:15:14.293053554 +0200 --- mcelog-1.29.orig/mcelog.c 2016-01-28 15:33:45.406475783 +0100
+++ mcelog-1.20/mcelog.c 2015-06-15 15:15:52.543240384 +0200 +++ mcelog-1.29/mcelog.c 2016-01-28 15:33:51.650831636 +0100
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
#include <fnmatch.h> #include <fnmatch.h>
#include "mcelog.h" #include "mcelog.h"
@ -650,7 +650,7 @@ Index: mcelog-1.20/mcelog.c
#include "intel.h" #include "intel.h"
#include "p4.h" #include "p4.h"
#include "dmi.h" #include "dmi.h"
@@ -410,9 +410,9 @@ @@ -419,9 +419,9 @@ static void dump_mce(struct mce *m, unsi
time_t t = m->time; time_t t = m->time;
Wprintf("TIME %llu %s", m->time, ctime(&t)); Wprintf("TIME %llu %s", m->time, ctime(&t));
} }

View File

@ -7,26 +7,27 @@
msg.c | 8 ++ msg.c | 8 ++
6 files changed, 343 insertions(+), 2 deletions(-) 6 files changed, 343 insertions(+), 2 deletions(-)
Index: mcelog-1.20/Makefile Index: mcelog-1.29/Makefile
=================================================================== ===================================================================
--- mcelog-1.20.orig/Makefile 2015-06-15 14:25:23.000000000 +0200 --- mcelog-1.29.orig/Makefile 2016-01-20 18:33:20.000000000 +0100
+++ mcelog-1.20/Makefile 2015-06-15 15:15:14.281052761 +0200 +++ mcelog-1.29/Makefile 2016-02-01 17:35:54.959649090 +0100
@@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
+CONFIG_EMAIL := 1 +CONFIG_EMAIL := 1
CFLAGS := -g -Os CFLAGS := -g -Os
prefix := /usr prefix := /usr
etcprefix := etcprefix :=
@@ -38,7 +39,8 @@ @@ -40,8 +41,9 @@ OBJ := p4.o k8.o mcelog.o dmi.o tsc.o co
client.o cache.o sysfs.o yellow.o page.o rbtree.o \ broadwell_de.o broadwell_epex.o msr.o bus.o \
xeon75xx.o sandy-bridge.o ivy-bridge.o haswell.o msr.o bus.o unknown.o unknown.o
DISKDB_OBJ := diskdb.o dimm.o db.o DISKDB_OBJ := diskdb.o dimm.o db.o
-CLEAN := mcelog dmi tsc dbquery .depend .depend.X dbquery.o ${DISKDB_OBJ}
+EMAIL_OBJ := email.o +EMAIL_OBJ := email.o
+CLEAN := mcelog dmi tsc dbquery .depend .depend.X dbquery.o ${DISKDB_OBJ} ${EMAIL_OBJ} CLEAN := mcelog dmi tsc dbquery .depend .depend.X dbquery.o ${DISKDB_OBJ} \
- version.o version.c version.tmp
+ ${EMAIL_OBJ} version.o version.c version.tmp
DOC := mce.pdf DOC := mce.pdf
ADD_DEFINES := ADD_DEFINES :=
@@ -50,6 +52,12 @@ @@ -53,6 +55,12 @@ OBJ += ${DISKDB_OBJ}
all: dbquery all: dbquery
endif endif
@ -38,12 +39,12 @@ Index: mcelog-1.20/Makefile
+ +
SRC := $(OBJ:.o=.c) SRC := $(OBJ:.o=.c)
mcelog: ${OBJ} mcelog: ${OBJ} version.o
Index: mcelog-1.20/email.c Index: mcelog-1.29/email.c
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ mcelog-1.20/email.c 2015-06-15 15:15:14.285053019 +0200 +++ mcelog-1.29/email.c 2016-02-01 17:33:02.709891934 +0100
@@ -0,0 +1,199 @@ @@ -0,0 +1,200 @@
+#include <unistd.h> +#include <unistd.h>
+#include <signal.h> +#include <signal.h>
+#include <ctype.h> +#include <ctype.h>
@ -107,7 +108,8 @@ Index: mcelog-1.20/email.c
+ debug=0; + debug=0;
+ +
+ email_env = getenv("MCELOG_ADMIN_EMAIL"); + email_env = getenv("MCELOG_ADMIN_EMAIL");
+ if (email_env) { + /* No email validation, but at least check for not being empty... */
+ if (email_env && strlen(email_env) > 1) {
+ strncpy(c_recipient, email_env, MAX_STRING_LEN - 1); + strncpy(c_recipient, email_env, MAX_STRING_LEN - 1);
+ return 1; + return 1;
+ } + }
@ -243,10 +245,10 @@ Index: mcelog-1.20/email.c
+ smtp_destroy_session (session); + smtp_destroy_session (session);
+ return 0; + return 0;
+} +}
Index: mcelog-1.20/email.h Index: mcelog-1.29/email.h
=================================================================== ===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ mcelog-1.20/email.h 2015-06-15 15:15:14.289053315 +0200 +++ mcelog-1.29/email.h 2016-02-01 17:33:02.709891934 +0100
@@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
+#ifndef _MCELOG_EMAIL_H_ +#ifndef _MCELOG_EMAIL_H_
+#define _MCELOG_EMAIL_H_ +#define _MCELOG_EMAIL_H_
@ -282,10 +284,10 @@ Index: mcelog-1.20/email.h
+#endif +#endif
+ +
+#endif +#endif
Index: mcelog-1.20/mcelog.c Index: mcelog-1.29/mcelog.c
=================================================================== ===================================================================
--- mcelog-1.20.orig/mcelog.c 2015-06-15 14:25:23.000000000 +0200 --- mcelog-1.29.orig/mcelog.c 2016-01-20 18:33:20.000000000 +0100
+++ mcelog-1.20/mcelog.c 2015-06-15 15:15:14.293053554 +0200 +++ mcelog-1.29/mcelog.c 2016-02-01 17:35:10.417125475 +0100
@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
#include <assert.h> #include <assert.h>
#include <signal.h> #include <signal.h>
@ -304,7 +306,7 @@ Index: mcelog-1.20/mcelog.c
enum cputype cputype = CPU_GENERIC; enum cputype cputype = CPU_GENERIC;
char *logfn = LOG_DEV_FILENAME; char *logfn = LOG_DEV_FILENAME;
@@ -72,7 +76,7 @@ @@ -72,7 +76,7 @@ static double cpumhz;
static int cpumhz_forced; static int cpumhz_forced;
int ascii_mode; int ascii_mode;
int dump_raw_ascii; int dump_raw_ascii;
@ -313,23 +315,23 @@ Index: mcelog-1.20/mcelog.c
static char *inputfile; static char *inputfile;
char *processor_flags; char *processor_flags;
static int foreground; static int foreground;
@@ -949,6 +953,7 @@ @@ -973,6 +977,7 @@ void usage(void)
"--pidfile file Write pid of daemon into file\n"
"--no-imc-log Disable extended iMC logging\n" "--no-imc-log Disable extended iMC logging\n"
"--is-cpu-supported Exit with return code indicating whether the CPU is supported\n"
); );
+ email_usage(); + email_usage();
diskdb_usage(); diskdb_usage();
printf("\n");
print_cputypes(); print_cputypes();
exit(1); @@ -1043,6 +1048,7 @@ static struct option options[] = {
@@ -1016,6 +1021,7 @@
{ "debug-numerrors", 0, NULL, O_DEBUG_NUMERRORS }, /* undocumented: for testing */
{ "no-imc-log", 0, NULL, O_NO_IMC_LOG }, { "no-imc-log", 0, NULL, O_NO_IMC_LOG },
{ "is-cpu-supported", 0, NULL, O_IS_CPU_SUPPORTED },
DISKDB_OPTIONS DISKDB_OPTIONS
+ EMAIL_OPTIONS + EMAIL_OPTIONS
{} {}
}; };
@@ -1193,11 +1199,86 @@ @@ -1223,11 +1229,86 @@ static void drop_cred(void)
} }
} }
@ -416,7 +418,7 @@ Index: mcelog-1.20/mcelog.c
if (recordlen == 0) { if (recordlen == 0) {
Wprintf("no data in mce record\n"); Wprintf("no data in mce record\n");
@@ -1224,12 +1305,16 @@ @@ -1254,12 +1335,16 @@ static void process(int fd, unsigned rec
finish = 1; finish = 1;
if (!mce_filter(mce, recordlen)) if (!mce_filter(mce, recordlen))
continue; continue;
@ -433,7 +435,7 @@ Index: mcelog-1.20/mcelog.c
flushlog(); flushlog();
} }
@@ -1340,6 +1425,8 @@ @@ -1370,6 +1455,8 @@ int main(int ac, char **av)
exit(0); exit(0);
} else if (diskdb_cmd(opt, ac, av)) { } else if (diskdb_cmd(opt, ac, av)) {
exit(0); exit(0);
@ -442,7 +444,7 @@ Index: mcelog-1.20/mcelog.c
} else if (opt == 0) } else if (opt == 0)
break; break;
} }
@@ -1368,6 +1455,10 @@ @@ -1402,6 +1489,10 @@ int main(int ac, char **av)
logfn = av[optind++]; logfn = av[optind++];
if (av[optind]) if (av[optind])
usage(); usage();
@ -453,11 +455,11 @@ Index: mcelog-1.20/mcelog.c
checkdmi(); checkdmi();
general_setup(); general_setup();
Index: mcelog-1.20/mcelog.h Index: mcelog-1.29/mcelog.h
=================================================================== ===================================================================
--- mcelog-1.20.orig/mcelog.h 2015-06-15 14:25:23.000000000 +0200 --- mcelog-1.29.orig/mcelog.h 2016-01-20 18:33:20.000000000 +0100
+++ mcelog-1.20/mcelog.h 2015-06-15 15:15:14.297053784 +0200 +++ mcelog-1.29/mcelog.h 2016-02-01 17:35:07.072936045 +0100
@@ -131,6 +131,7 @@ @@ -134,6 +134,7 @@ enum cputype {
enum option_ranges { enum option_ranges {
O_COMMON = 500, O_COMMON = 500,
O_DISKDB = 1000, O_DISKDB = 1000,
@ -465,10 +467,10 @@ Index: mcelog-1.20/mcelog.h
}; };
enum syslog_opt { enum syslog_opt {
Index: mcelog-1.20/msg.c Index: mcelog-1.29/msg.c
=================================================================== ===================================================================
--- mcelog-1.20.orig/msg.c 2015-06-15 14:25:23.000000000 +0200 --- mcelog-1.29.orig/msg.c 2016-01-20 18:33:20.000000000 +0100
+++ mcelog-1.20/msg.c 2015-06-15 15:15:14.301053996 +0200 +++ mcelog-1.29/msg.c 2016-02-01 17:33:02.713892160 +0100
@@ -8,10 +8,13 @@ @@ -8,10 +8,13 @@
#include "mcelog.h" #include "mcelog.h"
#include "msg.h" #include "msg.h"
@ -483,7 +485,7 @@ Index: mcelog-1.20/msg.c
static char *output_fn; static char *output_fn;
int need_stdout(void) int need_stdout(void)
@@ -135,6 +138,11 @@ @@ -135,6 +138,11 @@ int Wprintf(char *fmt, ...)
n = vfprintf(output_fh ? output_fh : stdout, fmt, ap); n = vfprintf(output_fh ? output_fh : stdout, fmt, ap);
va_end(ap); va_end(ap);
} }

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1dc7df5d971acab054646289cf2c42d220b890f07f428bb09ad814e86cd688d8
size 281226

3
mcelog-1.29.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b4eca584cecb1a54f49cc9accf7f8ca98716a953a3025884171b591284e9126c
size 282689

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Jan 28 14:25:26 UTC 2016 - trenn@suse.de
- Update to latest version 1.29.
Mostly little bug fixes.
-------------------------------------------------------------------
Mon Sep 28 13:26:21 UTC 2015 - trenn@suse.de
- Update to version v124. Adds skylake CPU support and some bug fixes.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jun 15 16:18:55 UTC 2015 - trenn@suse.de Mon Jun 15 16:18:55 UTC 2015 - trenn@suse.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package mcelog # spec file for package mcelog
# #
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,16 +17,12 @@
Name: mcelog Name: mcelog
Version: 1.29
Release: 0
Summary: Log Machine Check Events Summary: Log Machine Check Events
License: GPL-2.0 License: GPL-2.0
Group: System/Monitoring Group: System/Monitoring
Version: 1.20 Url: https://git.kernel.org/cgit/utils/cpu/mce/mcelog.git
Release: 0
ExclusiveArch: %{ix86} x86_64
BuildRequires: libesmtp-devel
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(udev)
Requires: logrotate
Source: mcelog-%{version}.tar.bz2 Source: mcelog-%{version}.tar.bz2
Source2: mcelog.sysconfig Source2: mcelog.sysconfig
Source3: mcelog.systemd Source3: mcelog.systemd
@ -45,17 +41,20 @@ Patch9: patches/add-f15h-support.patch
Patch10: patches/add-f16h-support.patch Patch10: patches/add-f16h-support.patch
Patch11: mcelog-socket-path.patch Patch11: mcelog-socket-path.patch
Patch12: fix_setgroups_missing_call.patch Patch12: fix_setgroups_missing_call.patch
BuildRequires: libesmtp-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: pkgconfig(systemd)
PreReq: %fillup_prereq BuildRequires: pkgconfig(udev)
Url: https://git.kernel.org/cgit/utils/cpu/mce/mcelog.git Requires: logrotate
Requires(pre): %fillup_prereq
# Previously version was wrong, mainline decided to go for 1.0.1. not 1.1 # Previously version was wrong, mainline decided to go for 1.0.1. not 1.1
Obsoletes: mcelog = 1.1 Obsoletes: mcelog = 1.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64
%{?systemd_requires} %{?systemd_requires}
%description %description
mcelog retrieves machine check events from an x86-64 kernel in a cron mcelog retrieves machine check events from an x86-64 kernel in a cron
job, decodes them, and logs them to /var/log/mcelog. job, decodes them, and logs them to %{_localstatedir}/log/mcelog.
A machine check event is a hardware error detected by the CPU. A machine check event is a hardware error detected by the CPU.
@ -63,12 +62,6 @@ It should run on any x86-64 system.
In addition, it allows decoding machine check kernel panic messages. In addition, it allows decoding machine check kernel panic messages.
Authors:
--------
Andi Kleen <andi@firstfloor.org>
%prep %prep
%setup -q %setup -q
%patch1 -p1 %patch1 -p1
@ -86,38 +79,34 @@ Authors:
%build %build
export SUSE_ASNEEDED=0 export SUSE_ASNEEDED=0
make CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} CFLAGS="%{optflags}"
%install %install
export prefix=$RPM_BUILD_ROOT/usr export prefix=%{buildroot}%{_prefix}
export etcprefix=$RPM_BUILD_ROOT export etcprefix=%{buildroot}
make -e install make -e install
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/ mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d/
install -m644 mcelog.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/mcelog install -m644 mcelog.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/mcelog
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
install -m 644 %SOURCE2 $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.mcelog install -m 644 %{SOURCE2} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.mcelog
mkdir -p $RPM_BUILD_ROOT/%_docdir/%name mkdir -p %{buildroot}/%{_docdir}/%{name}
install -m 644 %SOURCE6 $RPM_BUILD_ROOT/%_docdir/%name/README.email_setup install -m 644 %{SOURCE6} %{buildroot}/%{_docdir}/%{name}/README.email_setup
install -m 644 lk10-mcelog.pdf $RPM_BUILD_ROOT/%_docdir/%name/lk10-mcelog.pdf install -m 644 lk10-mcelog.pdf %{buildroot}/%{_docdir}/%{name}/lk10-mcelog.pdf
install -D -m 0644 %SOURCE3 %{buildroot}%{_unitdir}/mcelog.service install -D -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/mcelog.service
install -D -m 0644 %SOURCE4 %{buildroot}%{_udevrulesdir}/90-mcelog.rules install -D -m 0644 %{SOURCE4} %{buildroot}%{_udevrulesdir}/90-mcelog.rules
install -D -m 0644 %SOURCE5 %{buildroot}%{_tmpfilesdir}/mcelog.conf install -D -m 0644 %{SOURCE5} %{buildroot}%{_tmpfilesdir}/mcelog.conf
ln -sf %_sbindir/service ${RPM_BUILD_ROOT}%_sbindir/rcmcelog ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcmcelog
%clean
rm -rf $RPM_BUILD_ROOT
%pre %pre
%service_add_pre %{name}.service %service_add_pre %{name}.service
%post %post
%fillup_only %fillup_only
%{?tmpfiles_create:%tmpfiles_create %{_tmpfilesdir}/mcelog.conf}
%udev_rules_update %udev_rules_update
%service_add_post %{name}.service %service_add_post %{name}.service
%{?tmpfiles_create:%tmpfiles_create %{_tmpfilesdir}/mcelog.conf}
%preun %preun
%service_del_preun %{name}.service %service_del_preun %{name}.service
@ -129,17 +118,17 @@ rm -rf $RPM_BUILD_ROOT
%defattr (-,root,root,755) %defattr (-,root,root,755)
%{_mandir}/man8/* %{_mandir}/man8/*
%{_mandir}/man5/* %{_mandir}/man5/*
/usr/sbin/mcelog %{_sbindir}/mcelog
%config /etc/logrotate.d/mcelog %config %{_sysconfdir}/logrotate.d/mcelog
%dir /etc/mcelog %dir %{_sysconfdir}/mcelog
%config /etc/mcelog/mcelog.conf %config %{_sysconfdir}/mcelog/mcelog.conf
/var/adm/fillup-templates/sysconfig.mcelog %{_localstatedir}/adm/fillup-templates/sysconfig.mcelog
/etc/mcelog/*trigger %{_sysconfdir}/mcelog/*trigger
%{_unitdir}/mcelog.service %{_unitdir}/mcelog.service
%{_udevrulesdir}/90-mcelog.rules %{_udevrulesdir}/90-mcelog.rules
%{_tmpfilesdir}/mcelog.conf %{_tmpfilesdir}/mcelog.conf
%_docdir/%name %{_docdir}/%{name}
%_sbindir/rcmcelog %{_sbindir}/rcmcelog
%ghost /run/mcelog %ghost /run/mcelog
%changelog %changelog

View File

@ -4,6 +4,7 @@ ConditionVirtualization=false
[Service] [Service]
EnvironmentFile=-/etc/sysconfig/mcelog EnvironmentFile=-/etc/sysconfig/mcelog
ExecStartPre=/sbin/modprobe msr
ExecStart=/usr/sbin/mcelog --ignorenodev --daemon --foreground ExecStart=/usr/sbin/mcelog --ignorenodev --daemon --foreground
StandardOutput=syslog StandardOutput=syslog

View File

@ -2,11 +2,11 @@
memdb.c | 10 +++++----- memdb.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-) 1 file changed, 5 insertions(+), 5 deletions(-)
Index: mcelog-1.20/memdb.c Index: mcelog-1.29/memdb.c
=================================================================== ===================================================================
--- mcelog-1.20.orig/memdb.c 2015-06-15 14:25:23.000000000 +0200 --- mcelog-1.29.orig/memdb.c 2016-01-20 18:33:20.000000000 +0100
+++ mcelog-1.20/memdb.c 2015-06-15 15:15:25.925718586 +0200 +++ mcelog-1.29/memdb.c 2016-01-28 15:33:46.958564233 +0100
@@ -422,11 +422,11 @@ @@ -430,11 +430,11 @@ void prefill_memdb(int do_dmi)
md->location = xstrdup(bl); md->location = xstrdup(bl);
md->name = xstrdup(dmi_getstring(&d->header, d->device_locator)); md->name = xstrdup(dmi_getstring(&d->header, d->device_locator));
} }