Hello community,

here is the log from the commit of package mcelog for openSUSE:Factory checked 
in at 2012-09-14 12:30:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mcelog (Old)
 and      /work/SRC/openSUSE:Factory/.mcelog.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mcelog", Maintainer is "tr...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mcelog/mcelog.changes    2012-05-03 
10:58:30.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mcelog.new/mcelog.changes       2012-09-14 
12:31:06.000000000 +0200
@@ -1,0 +2,11 @@
+Thu Aug 16 14:41:55 UTC 2012 - tr...@suse.de
+
+- bnc#774226 mcelog + systemd: won't start without MCELOG_ADMIN_EMAIL set
+- fix uninitialized variable mail_setup
+
+-------------------------------------------------------------------
+Wed Jul 18 12:49:43 UTC 2012 - tr...@suse.de
+
+- Also build mcelog packages for i386 (bnc#770726)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mcelog.spec ++++++
--- /var/tmp/diff_new_pack.UvjKUG/_old  2012-09-14 12:31:11.000000000 +0200
+++ /var/tmp/diff_new_pack.UvjKUG/_new  2012-09-14 12:31:11.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package mcelog
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,16 +15,15 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-# norootforbuild
 
 
 Name:           mcelog
-License:        GPL-2.0+
 Summary:        Log Machine Check Events
+License:        GPL-2.0+
+Group:          System/Monitoring
 Version:        1.0pre3.6e4e2a000124
-Release:        1
-AutoReqProv:    on
-ExclusiveArch:  x86_64
+Release:        0
+ExclusiveArch:  ix86 x86_64
 BuildRequires:  libesmtp-devel
 Requires:       logrotate
 PreReq:         %insserv_prereq %fillup_prereq
@@ -35,7 +34,6 @@
 Source6:        README.email_setup
 Patch1:         email.patch
 Patch2:         mcelog_invert_prefill_db_warning.patch
-Group:          System/Monitoring
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description

++++++ email.patch ++++++
--- /var/tmp/diff_new_pack.UvjKUG/_old  2012-09-14 12:31:11.000000000 +0200
+++ /var/tmp/diff_new_pack.UvjKUG/_new  2012-09-14 12:31:11.000000000 +0200
@@ -1,11 +1,22 @@
---- mcelog-1.0pre3.6e4e2a000124/Makefile
+---
+ Makefile |   10 ++-
+ email.c  |  199 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ email.h  |   34 ++++++++++
+ mcelog.c |   93 +++++++++++++++++++++++++++++
+ mcelog.h |    1 
+ msg.c    |    8 ++
+ 6 files changed, 343 insertions(+), 2 deletions(-)
+
+Index: mcelog-1.0pre3.6e4e2a000124/Makefile
+===================================================================
+--- mcelog-1.0pre3.6e4e2a000124.orig/Makefile
 +++ mcelog-1.0pre3.6e4e2a000124/Makefile
 @@ -1,3 +1,4 @@
 +CONFIG_EMAIL := 1
  CFLAGS := -g -Os
  prefix := /usr
  etcprefix :=
-@@ -34,7 +35,8 @@
+@@ -34,7 +35,8 @@ OBJ := p4.o k8.o mcelog.o dmi.o tsc.o co
         client.o cache.o sysfs.o yellow.o page.o rbtree.o       \
         xeon75xx.o sandy-bridge.o
  DISKDB_OBJ := diskdb.o dimm.o db.o
@@ -15,7 +26,7 @@
  DOC := mce.pdf
  
  ADD_DEFINES :=
-@@ -46,6 +48,12 @@
+@@ -46,6 +48,12 @@ OBJ += ${DISKDB_OBJ}
  all: dbquery
  endif
  
@@ -28,9 +39,11 @@
  SRC := $(OBJ:.o=.c)
  
  mcelog: ${OBJ}
---- mcelog-1.0pre3.6e4e2a000124/email.c
+Index: mcelog-1.0pre3.6e4e2a000124/email.c
+===================================================================
+--- /dev/null
 +++ mcelog-1.0pre3.6e4e2a000124/email.c
-@@ -0,0 +1,184 @@
+@@ -0,0 +1,199 @@
 +#include <unistd.h>
 +#include <signal.h>
 +#include <ctype.h>
@@ -86,6 +99,21 @@
 +      return 0;
 +}
 +
++int email_env(void)
++{
++      char *email_env = getenv("MCELOG_EMAIL_DEBUG");
++
++      if (email_env)
++              debug=0;
++
++      email_env = getenv("MCELOG_ADMIN_EMAIL");
++      if (email_env) {
++              strncpy(c_recipient, email_env, MAX_STRING_LEN - 1);
++              return 1;
++      }
++      return 0;       
++}
++
 +/* Callback to prnt the recipient status */
 +static void
 +print_recipient_status (smtp_recipient_t recipient,
@@ -215,9 +243,11 @@
 +      smtp_destroy_session (session);
 +      return 0;
 +}
---- mcelog-1.0pre3.6e4e2a000124/email.h
+Index: mcelog-1.0pre3.6e4e2a000124/email.h
+===================================================================
+--- /dev/null
 +++ mcelog-1.0pre3.6e4e2a000124/email.h
-@@ -0,0 +1,32 @@
+@@ -0,0 +1,34 @@
 +#ifndef _MCELOG_EMAIL_H_
 +#define _MCELOG_EMAIL_H_
 +
@@ -229,6 +259,7 @@
 +extern void setup_mail_header(FILE *email_fd, struct mce *m);
 +extern void email_usage(void);
 +extern int email_cmd(int opt, int ac, char **av);
++extern int email_env(void);
 +
 +#define EMAIL_OPTIONS                                 \
 +      { "email", 1, NULL, O_EMAIL_ADDRESS },          \
@@ -246,11 +277,14 @@
 +*/
 +static void email_usage(void) { return; }
 +static int email_cmd(int opt, int ac, char **av) { return 0; }
++static int email_env(void) { return 0; }
 +#define EMAIL_OPTIONS
 +#endif
 +
 +#endif
---- mcelog-1.0pre3.6e4e2a000124/mcelog.c
+Index: mcelog-1.0pre3.6e4e2a000124/mcelog.c
+===================================================================
+--- mcelog-1.0pre3.6e4e2a000124.orig/mcelog.c
 +++ mcelog-1.0pre3.6e4e2a000124/mcelog.c
 @@ -37,6 +37,7 @@
  #include <assert.h>
@@ -270,7 +304,7 @@
  enum cputype cputype = CPU_GENERIC;   
  
  char *logfn = LOG_DEV_FILENAME; 
-@@ -70,7 +74,7 @@
+@@ -70,7 +74,7 @@ static double cpumhz;
  static int cpumhz_forced;
  int ascii_mode;
  int dump_raw_ascii;
@@ -279,7 +313,7 @@
  static char *inputfile;
  char *processor_flags;
  static int foreground;
-@@ -914,6 +918,7 @@
+@@ -914,6 +918,7 @@ void usage(void)
  "--num-errors N      Only process N errors (for testing)\n"
  "--pidfile file            Write pid of daemon into file\n"
                );
@@ -287,7 +321,7 @@
        diskdb_usage();
        print_cputypes();
        exit(1);
-@@ -979,6 +984,7 @@
+@@ -979,6 +984,7 @@ static struct option options[] = {
        { "pidfile", 1, NULL, O_PIDFILE },
        { "debug-numerrors", 0, NULL, O_DEBUG_NUMERRORS }, /* undocumented: for 
testing */
        DISKDB_OPTIONS
@@ -295,7 +329,7 @@
        {}
  };
  
-@@ -1153,11 +1159,86 @@
+@@ -1153,11 +1159,86 @@ static void drop_cred(void)
        }
  }
  
@@ -378,11 +412,11 @@
        int i; 
        int len;
        int finish = 0;
-+      int mail_setup;
++      int mail_setup = 0;
  
        if (recordlen == 0) {
                Wprintf("no data in mce record\n");
-@@ -1177,12 +1258,16 @@
+@@ -1177,12 +1258,16 @@ static void process(int fd, unsigned rec
                        finish = 1;
                if (!mce_filter(mce, recordlen)) 
                        continue;
@@ -399,7 +433,7 @@
                flushlog();
        }
  
-@@ -1293,6 +1378,8 @@
+@@ -1293,6 +1378,8 @@ int main(int ac, char **av)
                        exit(0);
                } else if (diskdb_cmd(opt, ac, av)) {
                        exit(0);
@@ -408,18 +442,22 @@
                } else if (opt == 0)
                        break;              
        } 
-@@ -1301,6 +1388,8 @@
+@@ -1301,6 +1388,10 @@ int main(int ac, char **av)
                logfn = av[optind++];
        if (av[optind])
                usage();
++      if (email_mode == 0)
++              email_mode = email_env();
 +      /* email sending only in daemon mode */
 +      email_mode &= daemon_mode;
        checkdmi();
        general_setup();
                
---- mcelog-1.0pre3.6e4e2a000124/mcelog.h
+Index: mcelog-1.0pre3.6e4e2a000124/mcelog.h
+===================================================================
+--- mcelog-1.0pre3.6e4e2a000124.orig/mcelog.h
 +++ mcelog-1.0pre3.6e4e2a000124/mcelog.h
-@@ -120,6 +120,7 @@
+@@ -120,6 +120,7 @@ enum cputype {
  enum option_ranges {
        O_COMMON = 500,
        O_DISKDB = 1000,
@@ -427,7 +465,9 @@
  };
  
  enum syslog_opt { 
---- mcelog-1.0pre3.6e4e2a000124/msg.c
+Index: mcelog-1.0pre3.6e4e2a000124/msg.c
+===================================================================
+--- mcelog-1.0pre3.6e4e2a000124.orig/msg.c
 +++ mcelog-1.0pre3.6e4e2a000124/msg.c
 @@ -8,10 +8,13 @@
  #include "mcelog.h"
@@ -443,7 +483,7 @@
  static char *output_fn;
  
  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);
                va_end(ap);
        }

++++++ mcelog.systemd ++++++
--- /var/tmp/diff_new_pack.UvjKUG/_old  2012-09-14 12:31:11.000000000 +0200
+++ /var/tmp/diff_new_pack.UvjKUG/_new  2012-09-14 12:31:11.000000000 +0200
@@ -7,7 +7,7 @@
 [Service]
 EnvironmentFile=-/etc/sysconfig/mcelog
 #warning: if this fails is due to a known kernel bug, fix that instead !
-ExecStart=/usr/sbin/mcelog --ignorenodev --daemon --foreground --email 
$MCELOG_ADMIN_EMAIL
+ExecStart=/usr/sbin/mcelog --ignorenodev --daemon --foreground
 StandardOutput=syslog
 
 [Install]

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to