Accepting request 446773 from home:scarabeus_iv:branches:Base:System

- Version update to 1.48:
  * Various cpu support for new machines
- Refresh patches:
  * add-f10h-support.patch
  * email.patch
- Force build with pic
- Use normal webpage as Url and do not point to git
- Fix build with --as-needed expanded Makefile patch for email.patch

OBS-URL: https://build.opensuse.org/request/show/446773
OBS-URL: https://build.opensuse.org/package/show/Base:System/mcelog?expand=0&rev=57
This commit is contained in:
Marcus Meissner 2016-12-17 13:05:01 +00:00 committed by Git OBS Bridge
parent f0c14548c0
commit 27b5d8a738
6 changed files with 84 additions and 74 deletions

View File

@ -1,10 +1,10 @@
Add F10h decoding support
Signed-off-by: Borislav Petkov <bp@suse.de>
Index: mcelog-1.36/amd.c
Index: mcelog-1.46/amd.c
===================================================================
--- mcelog-1.36.orig/amd.c 2016-05-03 17:45:20.771106536 +0200
+++ mcelog-1.36/amd.c 2016-05-03 17:45:35.943971068 +0200
--- mcelog-1.46.orig/amd.c
+++ mcelog-1.46/amd.c
@@ -14,7 +14,7 @@
#include "mcelog.h"
#include "amd.h"
@ -554,10 +554,10 @@ Index: mcelog-1.36/amd.c
+ }
+ return 1;
}
Index: mcelog-1.36/amd.h
Index: mcelog-1.46/amd.h
===================================================================
--- mcelog-1.36.orig/amd.h 2016-05-03 17:45:20.791107676 +0200
+++ mcelog-1.36/amd.h 2016-05-03 17:45:35.943971068 +0200
--- mcelog-1.46.orig/amd.h
+++ mcelog-1.46/amd.h
@@ -1,6 +1,25 @@
+#include <stdbool.h>
+
@ -632,10 +632,10 @@ Index: mcelog-1.36/amd.h
+#define CASE_AMD_CPUS \
+ case CPU_K8: \
+ case CPU_F10H
Index: mcelog-1.36/mcelog.h
Index: mcelog-1.46/mcelog.h
===================================================================
--- mcelog-1.36.orig/mcelog.h 2016-05-03 17:45:20.727104029 +0200
+++ mcelog-1.36/mcelog.h 2016-05-03 17:45:35.943971068 +0200
--- mcelog-1.46.orig/mcelog.h
+++ mcelog-1.46/mcelog.h
@@ -111,6 +111,7 @@ enum cputype {
CPU_P6OLD,
CPU_CORE2, /* 65nm and 45nm */
@ -644,11 +644,11 @@ Index: mcelog-1.36/mcelog.h
CPU_P4,
CPU_NEHALEM,
CPU_DUNNINGTON,
Index: mcelog-1.36/mcelog.c
Index: mcelog-1.46/mcelog.c
===================================================================
--- mcelog-1.36.orig/mcelog.c 2016-05-03 17:45:20.771106536 +0200
+++ mcelog-1.36/mcelog.c 2016-05-03 17:45:35.943971068 +0200
@@ -145,19 +145,20 @@ static void resolveaddr(unsigned long lo
--- mcelog-1.46.orig/mcelog.c
+++ mcelog-1.46/mcelog.c
@@ -144,19 +144,20 @@ static void resolveaddr(unsigned long lo
static int mce_filter(struct mce *m, unsigned recordlen)
{
@ -673,7 +673,7 @@ Index: mcelog-1.36/mcelog.c
}
static void print_tsc(int cpunum, __u64 tsc, unsigned long time)
@@ -224,6 +225,7 @@ static char *cputype_name[] = {
@@ -223,6 +224,7 @@ static char *cputype_name[] = {
[CPU_P6OLD] = "Intel PPro/P2/P3/old Xeon",
[CPU_CORE2] = "Intel Core", /* 65nm and 45nm */
[CPU_K8] = "AMD K8 and derivates",
@ -681,7 +681,7 @@ Index: mcelog-1.36/mcelog.c
[CPU_P4] = "Intel P4",
[CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")",
[CPU_DUNNINGTON] = "Intel Xeon 7400 series",
@@ -250,6 +252,7 @@ static struct config_choice cpu_choices[
@@ -252,6 +254,7 @@ static struct config_choice cpu_choices[
{ "p6old", CPU_P6OLD },
{ "core2", CPU_CORE2 },
{ "k8", CPU_K8 },
@ -689,12 +689,7 @@ Index: mcelog-1.36/mcelog.c
{ "p4", CPU_P4 },
{ "dunnington", CPU_DUNNINGTON },
{ "xeon74xx", CPU_DUNNINGTON },
@@ -354,15 +357,13 @@ static enum cputype setup_cpuid(u32 cpuv
parse_cpuid(cpuid, &family, &model);
- switch (cpuvendor) {
+ switch (cpuvendor) {
@@ -363,9 +366,7 @@ static enum cputype setup_cpuid(u32 cpuv
case X86_VENDOR_INTEL:
return select_intel_cputype(family, model);
case X86_VENDOR_AMD:
@ -703,12 +698,9 @@ Index: mcelog-1.36/mcelog.c
- /* FALL THROUGH */
+ return select_amd_cputype(family);
default:
- Eprintf("Unknown CPU type vendor %u family %x model %x",
+ Eprintf("Unknown CPU type vendor %u family %x model %x",
Eprintf("Unknown CPU type vendor %u family %u model %u",
cpuvendor, family, model);
return CPU_GENERIC;
}
@@ -539,14 +540,9 @@ int is_cpu_supported(void)
@@ -542,14 +543,9 @@ int is_cpu_supported(void)
}
if (seen == ALL) {

View File

@ -7,43 +7,53 @@
msg.c | 8 ++
6 files changed, 343 insertions(+), 2 deletions(-)
Index: mcelog-1.36/Makefile
Index: mcelog-1.46/Makefile
===================================================================
--- mcelog-1.36.orig/Makefile 2016-04-15 22:19:32.000000000 +0200
+++ mcelog-1.36/Makefile 2016-05-03 17:43:23.544426782 +0200
--- mcelog-1.46.orig/Makefile
+++ mcelog-1.46/Makefile
@@ -1,3 +1,4 @@
+CONFIG_EMAIL := 1
CFLAGS := -g -Os
prefix := /usr
etcprefix :=
@@ -40,8 +41,9 @@ OBJ := p4.o k8.o mcelog.o dmi.o tsc.o co
@@ -35,15 +36,23 @@ OBJ := p4.o k8.o mcelog.o dmi.o tsc.o co
broadwell_de.o broadwell_epex.o skylake_xeon.o \
denverton.o \
msr.o bus.o unknown.o
DISKDB_OBJ := diskdb.o dimm.o db.o
+EMAIL_OBJ := email.o
CLEAN := mcelog dmi tsc dbquery .depend .depend.X dbquery.o ${DISKDB_OBJ} \
CLEAN := mcelog dmi tsc dbquery .depend .depend.X dbquery.o \
- version.o version.c version.tmp
+ ${EMAIL_OBJ} version.o version.c version.tmp
+ ${EMAIL_OBJ} version.o version.c version.tmp
DOC := mce.pdf
ADD_DEFINES :=
@@ -53,6 +55,12 @@ OBJ += ${DISKDB_OBJ}
all: dbquery
endif
+ifdef CONFIG_EMAIL
+ADD_DEFINES := -DCONFIG_EMAIL=1
+LDFLAGS := -lesmtp
+LIBS := -lesmtp
+OBJ += ${EMAIL_OBJ}
+endif
+
SRC := $(OBJ:.o=.c)
mcelog: ${OBJ} version.o
Index: mcelog-1.36/email.c
+ $(CC) $(LDFLAGS) $^ ${LIBS} -o $@
# dbquery intentionally not installed by default
install: mcelog mcelog.conf mcelog.conf.5 mcelog.triggers.5
@@ -78,7 +87,7 @@ dbquery: db.o dbquery.o memutil.o
depend: .depend
%.o: %.c
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(WARNINGS) $(ADD_DEFINES) -o $@ $<
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(WARNINGS) $(ADD_DEFINES) $< -o $@
version.tmp: FORCE
( echo -n "char version[] = \"" ; \
Index: mcelog-1.46/email.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ mcelog-1.36/email.c 2016-05-03 17:43:23.548427010 +0200
--- /dev/null
+++ mcelog-1.46/email.c
@@ -0,0 +1,200 @@
+#include <unistd.h>
+#include <signal.h>
@ -245,10 +255,10 @@ Index: mcelog-1.36/email.c
+ smtp_destroy_session (session);
+ return 0;
+}
Index: mcelog-1.36/email.h
Index: mcelog-1.46/email.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ mcelog-1.36/email.h 2016-05-03 17:43:23.548427010 +0200
--- /dev/null
+++ mcelog-1.46/email.h
@@ -0,0 +1,34 @@
+#ifndef _MCELOG_EMAIL_H_
+#define _MCELOG_EMAIL_H_
@ -284,10 +294,10 @@ Index: mcelog-1.36/email.h
+#endif
+
+#endif
Index: mcelog-1.36/mcelog.c
Index: mcelog-1.46/mcelog.c
===================================================================
--- mcelog-1.36.orig/mcelog.c 2016-04-15 22:19:32.000000000 +0200
+++ mcelog-1.36/mcelog.c 2016-05-03 17:43:23.548427010 +0200
--- mcelog-1.46.orig/mcelog.c
+++ mcelog-1.46/mcelog.c
@@ -37,6 +37,7 @@
#include <assert.h>
#include <signal.h>
@ -296,7 +306,7 @@ Index: mcelog-1.36/mcelog.c
#include <fnmatch.h>
#include "mcelog.h"
#include "paths.h"
@@ -61,6 +62,9 @@
@@ -60,6 +61,9 @@
#include "bus.h"
#include "unknown.h"
@ -306,7 +316,7 @@ Index: mcelog-1.36/mcelog.c
enum cputype cputype = CPU_GENERIC;
char *logfn = LOG_DEV_FILENAME;
@@ -72,7 +76,7 @@ static double cpumhz;
@@ -71,7 +75,7 @@ static double cpumhz;
static int cpumhz_forced;
int ascii_mode;
int dump_raw_ascii;
@ -315,18 +325,18 @@ Index: mcelog-1.36/mcelog.c
static char *inputfile;
char *processor_flags;
static int foreground;
@@ -976,6 +980,7 @@ void usage(void)
@@ -980,6 +984,7 @@ void usage(void)
"--no-imc-log Disable extended iMC logging\n"
"--is-cpu-supported Exit with return code indicating whether the CPU is supported\n"
);
+ email_usage();
diskdb_usage();
printf("\n");
print_cputypes();
@@ -1046,6 +1051,7 @@ static struct option options[] = {
exit(1);
@@ -1048,6 +1053,7 @@ static struct option options[] = {
{ "debug-numerrors", 0, NULL, O_DEBUG_NUMERRORS }, /* undocumented: for testing */
{ "no-imc-log", 0, NULL, O_NO_IMC_LOG },
{ "is-cpu-supported", 0, NULL, O_IS_CPU_SUPPORTED },
DISKDB_OPTIONS
+ EMAIL_OPTIONS
{}
};
@ -435,16 +445,16 @@ Index: mcelog-1.36/mcelog.c
flushlog();
}
@@ -1373,6 +1458,8 @@ int main(int ac, char **av)
exit(0);
} else if (diskdb_cmd(opt, ac, av)) {
@@ -1371,6 +1456,8 @@ int main(int ac, char **av)
noargs(ac, av);
fprintf(stderr, "mcelog %s\n", MCELOG_VERSION);
exit(0);
+ } else if (email_cmd(opt, ac, av)) {
+ email_mode = 1;
} else if (opt == 0)
break;
}
@@ -1405,6 +1492,10 @@ int main(int ac, char **av)
@@ -1403,6 +1490,10 @@ int main(int ac, char **av)
logfn = av[optind++];
if (av[optind])
usage();
@ -455,11 +465,11 @@ Index: mcelog-1.36/mcelog.c
checkdmi();
general_setup();
Index: mcelog-1.36/mcelog.h
Index: mcelog-1.46/mcelog.h
===================================================================
--- mcelog-1.36.orig/mcelog.h 2016-04-15 22:19:32.000000000 +0200
+++ mcelog-1.36/mcelog.h 2016-05-03 17:43:23.548427010 +0200
@@ -135,6 +135,7 @@ enum cputype {
--- mcelog-1.46.orig/mcelog.h
+++ mcelog-1.46/mcelog.h
@@ -138,6 +138,7 @@ enum cputype {
enum option_ranges {
O_COMMON = 500,
O_DISKDB = 1000,
@ -467,10 +477,10 @@ Index: mcelog-1.36/mcelog.h
};
enum syslog_opt {
Index: mcelog-1.36/msg.c
Index: mcelog-1.46/msg.c
===================================================================
--- mcelog-1.36.orig/msg.c 2016-04-15 22:19:32.000000000 +0200
+++ mcelog-1.36/msg.c 2016-05-03 17:43:23.548427010 +0200
--- mcelog-1.46.orig/msg.c
+++ mcelog-1.46/msg.c
@@ -8,10 +8,13 @@
#include "mcelog.h"
#include "msg.h"

View File

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

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

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

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Sat Dec 17 00:02:34 UTC 2016 - tchvatal@suse.com
- Version update to 1.48:
* Various cpu support for new machines
- Refresh patches:
* add-f10h-support.patch
* email.patch
- Force build with pic
- Use normal webpage as Url and do not point to git
- Fix build with --as-needed expanded Makefile patch for email.patch
-------------------------------------------------------------------
Fri May 6 16:08:48 UTC 2016 - trenn@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package mcelog
#
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,12 +17,12 @@
Name: mcelog
Version: 1.36
Version: 1.46
Release: 0
Summary: Log Machine Check Events
License: GPL-2.0
Group: System/Monitoring
Url: https://git.kernel.org/cgit/utils/cpu/mce/mcelog.git
Url: http://www.mcelog.org/
Source: mcelog-%{version}.tar.bz2
Source2: mcelog.sysconfig
Source3: mcelog.systemd
@ -44,8 +44,6 @@ BuildRequires: libesmtp-devel
BuildRequires: pkgconfig(systemd)
Requires: logrotate
Requires(pre): %fillup_prereq
# Previously version was wrong, mainline decided to go for 1.0.1. not 1.1
Obsoletes: mcelog = 1.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64
%{?systemd_requires}
@ -55,7 +53,6 @@ mcelog retrieves machine check events from an x86-64 kernel in a cron
job, decodes them, and logs them to %{_localstatedir}/log/mcelog.
A machine check event is a hardware error detected by the CPU.
It should run on any x86-64 system.
In addition, it allows decoding machine check kernel panic messages.
@ -76,8 +73,7 @@ In addition, it allows decoding machine check kernel panic messages.
%patch12 -p1
%build
export SUSE_ASNEEDED=0
make %{?_smp_mflags} CFLAGS="%{optflags}"
make %{?_smp_mflags} CFLAGS="%{optflags} -fpie -pie"
%install
export prefix=%{buildroot}%{_prefix}