openSUSE Commits
Threads by month
- ----- 2024 -----
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
October 2010
- 1 participants
- 869 discussions
Hello community,
here is the log from the commit of package krb5 for openSUSE:Factory
checked in at Thu Oct 28 15:41:58 CEST 2010.
--------
--- krb5/krb5-mini.changes 2010-10-22 16:29:48.000000000 +0200
+++ krb5/krb5-mini.changes 2010-10-28 15:41:09.192907000 +0200
@@ -1,0 +2,5 @@
+Thu Oct 28 12:53:13 CEST 2010 - mc(a)suse.de
+
+- fix csh profile (bnc#649856)
+
+-------------------------------------------------------------------
krb5.changes: same change
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ krb5-doc.spec ++++++
--- /var/tmp/diff_new_pack.RcU62O/_old 2010-10-28 15:41:29.000000000 +0200
+++ /var/tmp/diff_new_pack.RcU62O/_new 2010-10-28 15:41:29.000000000 +0200
@@ -21,7 +21,7 @@
Name: krb5-doc
BuildRequires: ghostscript-library latex2html texlive
Version: 1.8.3
-Release: 1
+Release: 2
%define srcRoot krb5-1.8.3
Summary: MIT Kerberos5 Implementation--Documentation
License: MIT License (or similar)
++++++ krb5-mini.spec ++++++
--- /var/tmp/diff_new_pack.RcU62O/_old 2010-10-28 15:41:29.000000000 +0200
+++ /var/tmp/diff_new_pack.RcU62O/_new 2010-10-28 15:41:29.000000000 +0200
@@ -28,7 +28,7 @@
BuildRequires: bison libcom_err-devel ncurses-devel
BuildRequires: keyutils keyutils-devel
Version: 1.8.3
-Release: 1
+Release: 2
%if ! 0%{?build_mini}
BuildRequires: libopenssl-devel openldap2-devel
# bug437293
krb5.spec: same change
++++++ vendor-files.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor-files/krb5.csh.profile new/vendor-files/krb5.csh.profile
--- old/vendor-files/krb5.csh.profile 2010-10-22 10:48:26.000000000 +0200
+++ new/vendor-files/krb5.csh.profile 2010-10-28 12:52:40.000000000 +0200
@@ -3,13 +3,13 @@
if ( -d /usr/lib/mit/bin ) then
set COUNT=`ls -1 /usr/lib/mit/bin/ | wc -l`
if ( $COUNT > 0 ) then
- setenv PATH="${PATH}:/usr/lib/mit/bin"
+ setenv PATH "${PATH}:/usr/lib/mit/bin"
endif
endif
if ( -d /usr/lib/mit/sbin ) then
set COUNT=`ls -1 /usr/lib/mit/sbin/ | wc -l`
if ( $COUNT > 0 ) then
- setenv PATH="${PATH}:/usr/lib/mit/sbin"
+ setenv PATH "${PATH}:/usr/lib/mit/sbin"
endif
endif
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package rpm for openSUSE:Factory
checked in at Thu Oct 28 15:39:49 CEST 2010.
--------
--- rpm/rpm-python.changes 2009-02-16 14:06:39.000000000 +0100
+++ rpm/rpm-python.changes 2010-10-22 17:53:06.000000000 +0200
@@ -1,0 +2,10 @@
+Fri Oct 22 15:52:32 UTC 2010 - coolo(a)novell.com
+
+- adapt second spec file to changes done to rpm.spec
+
+-------------------------------------------------------------------
+Mon Oct 18 11:03:53 CEST 2010 - dmueller(a)suse.de
+
+- adapt buildrequires
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rpm-python.spec ++++++
--- /var/tmp/diff_new_pack.XoQOy5/_old 2010-10-28 15:39:27.000000000 +0200
+++ /var/tmp/diff_new_pack.XoQOy5/_new 2010-10-28 15:39:27.000000000 +0200
@@ -19,13 +19,14 @@
Name: rpm-python
-BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel popt-devel python-devel xz-devel zlib-devel
+BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel lua-devel ncurses-devel popt-devel
+BuildRequires: libacl-devel libcap-devel python-devel xz-devel zlib-devel
#!BuildIgnore: rpmlint-Factory
License: GPLv2+
Group: System/Packages
Summary: Python Bindings for Manipulating RPM Packages
Version: 4.8.0
-Release: 10
+Release: 11
Requires: rpm = %{version}
%py_requires
Source99: rpm.spec
++++++ rpm.spec ++++++
--- /var/tmp/diff_new_pack.XoQOy5/_old 2010-10-28 15:39:27.000000000 +0200
+++ /var/tmp/diff_new_pack.XoQOy5/_new 2010-10-28 15:39:27.000000000 +0200
@@ -29,7 +29,7 @@
AutoReqProv: on
Summary: The RPM Package Manager
Version: 4.8.0
-Release: 10
+Release: 11
Source: rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package mcelog for openSUSE:Factory
checked in at Thu Oct 28 15:37:57 CEST 2010.
--------
--- mcelog/mcelog.changes 2010-02-19 00:48:59.000000000 +0100
+++ mcelog/mcelog.changes 2010-10-25 15:51:12.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Oct 25 15:48:57 CEST 2010 - trenn(a)suse.de
+
+- Add Sandybridge/Westmere decode support
+- Fix domainname for email notification
+- Update to latest git version
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
fix_cache_trigger.patch
mcelog-1.0pre3.tar.bz2
New:
----
README.email_setup
email.patch
mcelog-1.0pre3.6363f5b719e9.tar.bz2
mcelog.sysconfig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mcelog.spec ++++++
--- /var/tmp/diff_new_pack.IqJrIB/_old 2010-10-28 15:37:35.000000000 +0200
+++ /var/tmp/diff_new_pack.IqJrIB/_new 2010-10-28 15:37:35.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package mcelog (Version 1.0pre3)
+# spec file for package mcelog (Version 1.0pre3.6363f5b719e9)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -21,14 +21,18 @@
Name: mcelog
License: GPLv2+
Summary: Log Machine Check Events
-Version: 1.0pre3
+Version: 1.0pre3.6363f5b719e9
Release: 1
AutoReqProv: on
ExclusiveArch: x86_64
-PreReq: %insserv_prereq
+BuildRequires: libesmtp-devel
+Requires: logrotate
+PreReq: %insserv_prereq %fillup_prereq
Source: mcelog-%{version}.tar.bz2
Source1: mcelog.service
-Patch1: fix_cache_trigger.patch
+Source2: mcelog.sysconfig
+Source6: README.email_setup
+Patch1: email.patch
Group: System/Monitoring
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -53,6 +57,7 @@
%patch1 -p1
%build
+export SUSE_ASNEEDED=0
make CFLAGS="$RPM_OPT_FLAGS"
%install
@@ -65,12 +70,19 @@
ln -s /etc/init.d/mcelog $RPM_BUILD_ROOT/usr/sbin/rcmcelog
install -m644 mcelog.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/mcelog
+mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
+install -m 644 %SOURCE2 $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.mcelog
+
+mkdir -p $RPM_BUILD_ROOT/%_docdir/%name
+install -m 644 %SOURCE6 $RPM_BUILD_ROOT/%_docdir/%name/README.email_setup
+install -m 644 lk10-mcelog.pdf $RPM_BUILD_ROOT/%_docdir/%name/lk10-mcelog.pdf
+
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ -c /dev/mcelog ];then
- %{insserv_force_if_yast mcelog}
+ %{fillup_and_insserv -y mcelog}
fi
%preun
@@ -88,7 +100,9 @@
/etc/init.d/mcelog
%dir /etc/mcelog
%config /etc/mcelog/mcelog.conf
+/var/adm/fillup-templates/sysconfig.mcelog
/etc/mcelog/*trigger
/usr/sbin/rcmcelog
+%_docdir/%name
%changelog
++++++ README.email_setup ++++++
MACHINE CHECK EXCPETION NOTIFICATION VIA EMAIL
==============================================
(C)opyright by Thomas Renninger <trenn(a)suse.de> Novell Inc. 2010
The setup to send Machine Check Exceptions (MCEs) via email relies on a
working smtp server listening on localhost on port 25.
How this can easily be configured is can be read up here:
http://en.opensuse.org/Mail_server_HOWTO
in the "Outgoing" section.
Test your setup by trying to send test mails via the "mail" shell command,
included in the mailx package.
Specify the email address where the MCEs should get mailed to here:
/etc/sysconfig/mcelog
You can filter MCE mails by matching against these mail headers.
Either one of these headers are set:
- X-Mcelog-Uncorrectable
- X-Mcelog-Correctable
and one of these are set:
- X-Mcelog-Memory
- X-Mcelog-CPU
- X-Mcelog-Misc
NOTE: If broken HW results in an MCE storm of dozens and hundreds of MCEs,
mcelog will not sending them all to not overload the machine and network
traffic. If in doubt, check the local mcelog log files.
Autoyast
--------
For people making use of autoyast to spread similar installations on multiple
machines, here are some hints how to set up the email notification through
autoyast. Please read the autoyast documentation first if you are not familiar
with how to create an autoyast.xml file.
This simply sets the email address, notifications should get send to:
<sysconfig config:type="list">
<sysconfig_entry>
<sysconfig_key>MCELOG_ADMIN_EMAIL</sysconfig_key>
<sysconfig_path>/etc/sysconfig/mcelog</sysconfig_path>
<sysconfig_value>trenn(a)suse.de</sysconfig_value>
</sysconfig_entry>
</sysconfig>
This is an example of how to set up postfix to listen on localhost and
sending/forwarding all mails coming in there through the smtp server
relay.suse.de.
The alias at the beginning forwards local machine notifications sent to root,
to trenn(a)suse.de. Like that mails interesting for the administrator can easily
be collected and sent to one email address. But this is just one possible mail
set up example.
<mail>
<aliases config:type="list">
<alias>
<alias>root</alias>
<destinations>trenn(a)suse.de</destinations>
</alias>
</aliases>
<connection_type config:type="symbol">permanent</connection_type>
<listen_remote config:type="boolean">false</listen_remote>
<masquerade_other_domains config:type="list">
<domain>suse.de</domain>
</masquerade_other_domains>
<mta config:type="symbol">postfix</mta>
<outgoing_mail_server>relay.suse.de</outgoing_mail_server>
<postfix_mda config:type="symbol">local</postfix_mda>
<use_amavis config:type="boolean">false</use_amavis>
</mail>
++++++ email.patch ++++++
---
Makefile | 10 +++
email.c | 184 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
email.h | 32 ++++++++++
mcelog.c | 93 +++++++++++++++++++++++++++++++
mcelog.h | 1
msg.c | 8 ++
6 files changed, 325 insertions(+), 3 deletions(-)
Index: mcelog-1.0pre3.6363f5b719e9/Makefile
===================================================================
--- mcelog-1.0pre3.6363f5b719e9.orig/Makefile
+++ mcelog-1.0pre3.6363f5b719e9/Makefile
@@ -1,3 +1,4 @@
+CONFIG_EMAIL := 1
CFLAGS := -g -Os
prefix := /usr
etcprefix :=
@@ -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
-CLEAN := mcelog dmi tsc dbquery .depend .depend.X dbquery.o ${DISKDB_OBJ}
+EMAIL_OBJ := email.o
+CLEAN := mcelog dmi tsc dbquery .depend .depend.X dbquery.o ${DISKDB_OBJ} ${EMAIL_OBJ}
DOC := mce.pdf
ADD_DEFINES :=
@@ -46,6 +48,12 @@ OBJ += ${DISKDB_OBJ}
all: dbquery
endif
+ifdef CONFIG_EMAIL
+ADD_DEFINES := -DCONFIG_EMAIL=1
+LDFLAGS := -lesmtp
+OBJ += ${EMAIL_OBJ}
+endif
+
SRC := $(OBJ:.o=.c)
mcelog: ${OBJ}
Index: mcelog-1.0pre3.6363f5b719e9/email.c
===================================================================
--- /dev/null
+++ mcelog-1.0pre3.6363f5b719e9/email.c
@@ -0,0 +1,184 @@
+#include <unistd.h>
+#include <signal.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define __USE_GNU
+/* To fetch the dnsname */
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+
+#include <libesmtp.h>
+#include "mcelog.h"
+#include "email.h"
+
+#define MAX_STRING_LEN 512
+char c_recipient[MAX_STRING_LEN] = "";
+static int debug;
+static char dnsname[MAX_STRING_LEN];
+
+static char buf[128];
+#define ERROR() { fprintf (stderr, "SMTP problem [%d] %s\n", __LINE__, \
+ smtp_strerror (smtp_errno (), buf, sizeof buf)); \
+ return -1; }
+
+
+void email_usage(void) {
+ fprintf(stderr,
+ "--email address Requires daemon mode\n");
+}
+
+int email_cmd(int opt, int ac, char **av)
+{
+ char *arg = optarg;
+
+ switch (opt) {
+ case O_EMAIL_ADDRESS:
+ if (arg) {
+ if (strlen(arg) >= MAX_STRING_LEN) {
+ Eprintf("email address too long"
+ " [max:%d]\n", MAX_STRING_LEN);
+ return 0;
+ }
+ strcpy(c_recipient, arg);
+ return 1;
+ }
+ case O_EMAIL_DEBUG:
+ debug = 1;
+ return 0;
+ }
+ return 0;
+}
+
+/* Callback to prnt the recipient status */
+static void
+print_recipient_status (smtp_recipient_t recipient,
+ const char *mailbox, void *arg)
+{
+ const smtp_status_t *status;
+
+ status = smtp_recipient_status (recipient);
+ if (debug)
+ printf ("%s: %d %s", mailbox, status->code, status->text);
+}
+
+void setup_mail_header(FILE *fp, struct mce *m)
+{
+ char host[MAX_STRING_LEN];
+ struct addrinfo hints;
+ struct addrinfo *res=NULL;
+ int ret, retry=3;
+
+ /* Taken from net-tools hostname.c showhname() */
+ memset(&hints, 0, sizeof(struct addrinfo));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_flags = AI_CANONNAME | AI_CANONIDN;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_protocol = 0;
+
+ if (gethostname(host, MAX_STRING_LEN)) {
+ fprintf(stderr, "Cannot get host name\n");
+ return;
+ }
+
+ do {
+ ret = getaddrinfo(host, NULL, &hints, &res);
+ } while(ret == EAI_AGAIN && retry-- > 0
+ && usleep(50000) == 0);
+
+ if (ret != 0 || res == NULL) {
+ fprintf(stderr, "Could not retrieve hostname\n");
+ return;
+ }
+
+ memset(dnsname, '\0', MAX_STRING_LEN);
+ strncpy(dnsname, res->ai_canonname, MAX_STRING_LEN - 1);
+
+ fprintf(fp, "Return-Path: <dummy(a)will_get_overridden.net>\r\n"
+ "Subject: Machine Check Exception on %s detected\r\n"
+ "MIME-Version: 1.0\r\n"
+ "Content-Type: text/plain;\r\n"
+ " charset=iso-8859-1\r\n"
+ "Content-Transfer-Encoding: 7bit\r\n\r\n", dnsname);
+ freeaddrinfo(res);
+}
+
+
+int send_mail(FILE *fp)
+{
+ char smtp_host[MAX_STRING_LEN] = "localhost:25";
+ char from[MAX_STRING_LEN];
+
+ const smtp_status_t *status;
+ smtp_session_t session;
+ smtp_message_t message;
+ smtp_recipient_t recipient;
+ struct sigaction sa;
+
+ session = smtp_create_session ();
+ message = smtp_add_message (session);
+
+ snprintf(from, MAX_STRING_LEN, "root@%s", dnsname);
+
+ /* NB. libESMTP sets timeouts as it progresses through the protocol.
+ In addition the remote server might close its socket on a timeout.
+ Consequently libESMTP may sometimes try to write to a socket with
+ no reader. Ignore SIGPIPE, then the program doesn't get killed
+ if/when this happens. */
+ sa.sa_handler = SIG_IGN;
+ sigemptyset (&sa.sa_mask);
+ sa.sa_flags = 0;
+ sigaction (SIGPIPE, &sa, NULL);
+
+ /* Set the host running the SMTP server. LibESMTP has a default port
+ number of 587, however this is not widely deployed so the port
+ is specified as 25 along with the default MTA host. */
+ if (!smtp_set_server (session, smtp_host))
+ ERROR();
+
+ smtp_set_reverse_path (message, from);
+
+ /* RFC 2822 doesn't require recipient headers but a To: header would
+ be nice to have if not present. */
+ smtp_set_header (message, "To", NULL, NULL);
+
+ /* RFC 2822 doesn't require recipient headers but a To: header would
+ be nice to have if not present. */
+ if (!smtp_set_header (message, "From", "mcelog", from))
+ ERROR();
+
+ smtp_set_message_fp (message, fp);
+
+ recipient = smtp_add_recipient (message, c_recipient);
+ if (!recipient)
+ ERROR();
+ if (!smtp_dsn_set_notify (recipient, Notify_NEVER))
+ ERROR();
+
+ /* Initiate a connection to the SMTP server and transfer the
+ message. */
+ if (!smtp_start_session (session))
+ Eprintf("SMTP server problem %s\n",
+ smtp_strerror (smtp_errno (), buf, sizeof buf));
+ else {
+ /* Report on the success or otherwise of the mail transfer.
+ */
+ if (debug) {
+ status = smtp_message_transfer_status (message);
+ printf ("%d %s", status->code,
+ (status->text != NULL) ? status->text : "\n");
+ }
+ smtp_enumerate_recipients (message, print_recipient_status, NULL);
+ }
+
+ if (debug)
+ fprintf(stderr, "Email sent successfully!\n");
+
+ /* Free resources consumed by the program.
+ */
+ smtp_destroy_session (session);
+ return 0;
+}
Index: mcelog-1.0pre3.6363f5b719e9/email.h
===================================================================
--- /dev/null
+++ mcelog-1.0pre3.6363f5b719e9/email.h
@@ -0,0 +1,32 @@
+#ifndef _MCELOG_EMAIL_H_
+#define _MCELOG_EMAIL_H_
+
+extern FILE *email_fd;
+extern int email_mode;
+
+#ifdef CONFIG_EMAIL
+extern int send_mail(FILE *email_fd);
+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);
+
+#define EMAIL_OPTIONS \
+ { "email", 1, NULL, O_EMAIL_ADDRESS }, \
+ { "email-debug", 0, NULL, O_EMAIL_DEBUG },
+
+enum email_options {
+ O_EMAIL_ADDRESS = O_EMAIL,
+ O_EMAIL_DEBUG,
+};
+
+#else
+/*
+static int send_mail(FILE *email_fd) { return 0; }
+static void setup_mail_header(FILE *email_fd) { return; };
+*/
+static void email_usage(void) { return; }
+static int email_cmd(int opt, int ac, char **av) { return 0; }
+#define EMAIL_OPTIONS
+#endif
+
+#endif
Index: mcelog-1.0pre3.6363f5b719e9/mcelog.c
===================================================================
--- mcelog-1.0pre3.6363f5b719e9.orig/mcelog.c
+++ mcelog-1.0pre3.6363f5b719e9/mcelog.c
@@ -37,6 +37,7 @@
#include <assert.h>
#include <signal.h>
#include <pwd.h>
+#include <sys/wait.h>
#include "mcelog.h"
#include "paths.h"
#include "k8.h"
@@ -58,6 +59,9 @@
#include "yellow.h"
#include "page.h"
+#include "email.h"
+int email_mode;
+
enum cputype cputype = CPU_GENERIC;
char *logfn = LOG_DEV_FILENAME;
@@ -69,7 +73,7 @@ static double cpumhz;
static int cpumhz_forced;
int ascii_mode;
int dump_raw_ascii;
-int daemon_mode;
+int daemon_mode = 0;
static char *inputfile;
char *processor_flags;
static int foreground;
@@ -792,6 +796,7 @@ void usage(void)
"--num-errors N Only process N errors (for testing)\n"
"--pidfile file Write pid of daemon into file\n"
);
+ email_usage();
diskdb_usage();
print_cputypes();
exit(1);
@@ -855,6 +860,7 @@ static struct option options[] = {
{ "num-errors", 1, NULL, O_NUMERRORS },
{ "pidfile", 1, NULL, O_PIDFILE },
DISKDB_OPTIONS
+ EMAIL_OPTIONS
{}
};
@@ -1026,11 +1032,86 @@ static void drop_cred(void)
}
}
+#ifdef CONFIG_EMAIL
+pid_t c_pid;
+
+/* Not more than 12 mails in 5 mins... */
+#define LAST_LIMIT_COUNT (60 * 5)
+#define LIMIT_COUNT 12
+static time_t last_limit_count;
+static int limit_count;
+static const char *mail_thread = "mcelog_mail_thread";
+
+
+static int setup_email(struct mce *m) {
+ int pdes[2];
+ static int suppressed;
+ int ret;
+
+ if (time(NULL) - last_limit_count < LAST_LIMIT_COUNT) {
+ if (limit_count >= LIMIT_COUNT && !suppressed) {
+ Eprintf("email rate limit [%d mails per %d mins]"
+ " reached, mails supressed\n",
+ LIMIT_COUNT, LAST_LIMIT_COUNT / 60);
+ suppressed = 1;
+ }
+ if (suppressed)
+ return -1;
+ } else {
+ suppressed = 0;
+ limit_count = 0;
+ last_limit_count = time(NULL);
+ }
+
+ limit_count++;
+
+ ret = pipe(pdes);
+ if (ret)
+ return ret;
+
+ c_pid = mcelog_fork(mail_thread);
+ if ( c_pid == 0 ) { /* child */
+ FILE *x = fdopen(pdes[0], "r");
+ close(pdes[1]);
+ send_mail(x);
+ exit(0);
+ } else {
+ close(pdes[0]);
+ /* something went wrong, better close... */
+ if (email_fd)
+ fclose(email_fd);
+ /* Wprintf will now also write into this pipe */
+ email_fd = fdopen(pdes[1], "w");
+ setup_mail_header(email_fd, m);
+ }
+ return 0;
+}
+
+static int finish_email(void) {
+ int status;
+
+ fclose(email_fd);
+ fprintf(stderr, "Email set up for sending\n");
+ /* Anything else we can make sure we do not get orphaned threads? */
+ waitpid (c_pid, &status, WUNTRACED);
+ if (WIFSTOPPED(status)){
+ kill(c_pid, 9);
+ SYSERRprintf("Killed stopped email thread %d\n",
+ c_pid);
+ return -1;
+ }
+ email_fd = NULL;
+ return 0;
+}
+
+#endif
+
static void process(int fd, unsigned recordlen, unsigned loglen, char *buf)
{
int i;
int len;
int finish = 0;
+ int mail_setup;
if (recordlen == 0) {
Wprintf("no data in mce record\n");
@@ -1041,19 +1122,23 @@ static void process(int fd, unsigned rec
if (len < 0)
err("read");
- for (i = 0; (i < len / (int)recordlen) && !finish; i++) {
+ for (i = 0; (i < len / (int)recordlen) && !finish; i++) {
struct mce *mce = (struct mce *)(buf + i*recordlen);
mce_prepare(mce);
if (numerrors > 0 && --numerrors == 0)
finish = 1;
if (!mce_filter(mce, recordlen))
continue;
+ if (email_mode)
+ mail_setup = setup_email(mce);
if (!dump_raw_ascii) {
disclaimer();
Wprintf("MCE %d\n", i);
dump_mce(mce, recordlen);
} else
dump_mce_raw_ascii(mce, recordlen);
+ if (email_mode && !mail_setup)
+ finish_email();
flushlog();
}
@@ -1161,6 +1246,8 @@ int main(int ac, char **av)
exit(0);
} else if (diskdb_cmd(opt, ac, av)) {
exit(0);
+ } else if (email_cmd(opt, ac, av)) {
+ email_mode = 1;
} else if (opt == 0)
break;
}
@@ -1169,6 +1256,8 @@ int main(int ac, char **av)
logfn = av[optind++];
if (av[optind])
usage();
+ /* email sending only in daemon mode */
+ email_mode &= daemon_mode;
checkdmi();
general_setup();
Index: mcelog-1.0pre3.6363f5b719e9/msg.c
===================================================================
--- mcelog-1.0pre3.6363f5b719e9.orig/msg.c
+++ mcelog-1.0pre3.6363f5b719e9/msg.c
@@ -8,10 +8,13 @@
#include "mcelog.h"
#include "msg.h"
#include "memutil.h"
+#include "email.h"
+
enum syslog_opt syslog_opt = SYSLOG_REMARK;
int syslog_level = LOG_WARNING;
static FILE *output_fh;
+ FILE *email_fd;
static char *output_fn;
int need_stdout(void)
@@ -135,6 +138,11 @@ int Wprintf(char *fmt, ...)
n = vfprintf(output_fh ? output_fh : stdout, fmt, ap);
va_end(ap);
}
+ if (email_fd) {
+ va_start(ap,fmt);
+ n = vfprintf(email_fd, fmt, ap);
+ va_end(ap);
+ }
return n;
}
Index: mcelog-1.0pre3.6363f5b719e9/mcelog.h
===================================================================
--- mcelog-1.0pre3.6363f5b719e9.orig/mcelog.h
+++ mcelog-1.0pre3.6363f5b719e9/mcelog.h
@@ -122,6 +122,7 @@ enum cputype {
enum option_ranges {
O_COMMON = 500,
O_DISKDB = 1000,
+ O_EMAIL = 1500,
};
enum syslog_opt {
++++++ mcelog.service ++++++
--- /var/tmp/diff_new_pack.IqJrIB/_old 2010-10-28 15:37:35.000000000 +0200
+++ /var/tmp/diff_new_pack.IqJrIB/_new 2010-10-28 15:37:35.000000000 +0200
@@ -31,7 +31,7 @@
### END INIT INFO
. /etc/rc.status
-#. /etc/sysconfig/mcelog
+[ -r /etc/sysconfig/mcelog ] && . /etc/sysconfig/mcelog
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
@@ -48,6 +48,9 @@
mcelog="/usr/sbin/mcelog"
mcelog_pid="/var/run/mcelog.pid"
mcelog_params=" --daemon --pidfile ${mcelog_pid}"
+if [ "${MCELOG_ADMIN_EMAIL}x" != "x" ];then
+ mcelog_params="$mcelog_params --email $MCELOG_ADMIN_EMAIL"
+fi
mcedev=/dev/mcelog
check="checkproc ${mcelog}"
++++++ mcelog.sysconfig ++++++
## Path: Hardware/machine_check
## Description: email address machine check exceptions are sent to
## Type: string
## Default: ""
#
# Machine check exceptions like memory (correctable or uncorrectable
# ECC errors), processor or other HW are sent with a detailed description
# to this address. Also read README.email_setup for further details.
#
MCELOG_ADMIN_EMAIL="trenn(a)suse.de"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package arpwatch-ethercodes for openSUSE:Factory
checked in at Thu Oct 28 15:34:28 CEST 2010.
--------
--- AUTO/all/arpwatch-ethercodes/arpwatch-ethercodes.changes 2010-10-24 10:49:13.000000000 +0200
+++ arpwatch-ethercodes/arpwatch-ethercodes.changes 2010-10-28 06:40:10.000000000 +0200
@@ -2 +2 @@
-Sun Oct 24 10:49:15 CEST 2010 - autobuild(a)suse.de
+Thu Oct 28 06:40:10 CEST 2010 - autobuild(a)suse.de
@@ -4 +4 @@
-- automated update on 2010-10-24
+- automated update on 2010-10-28
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ arpwatch-ethercodes.spec ++++++
--- /var/tmp/diff_new_pack.LNcDKS/_old 2010-10-28 15:32:58.000000000 +0200
+++ /var/tmp/diff_new_pack.LNcDKS/_new 2010-10-28 15:32:58.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package arpwatch-ethercodes (Version 2010.10.23)
+# spec file for package arpwatch-ethercodes (Version 2010.10.28)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -25,8 +25,8 @@
Group: Productivity/Networking/Diagnostic
AutoReqProv: on
Summary: Ethercodes Data for arpwatch
-Version: 2010.10.23
-Release: 2
+Version: 2010.10.28
+Release: 1
Source: http://standards.ieee.org/regauth/oui/oui.txt.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
++++++ oui.txt.bz2 ++++++
--- /var/tmp/diff_new_pack.LNcDKS/_old 2010-10-28 15:32:58.000000000 +0200
+++ /var/tmp/diff_new_pack.LNcDKS/_new 2010-10-28 15:32:58.000000000 +0200
@@ -42954,8 +42954,8 @@
Greenville SC 29607
UNITED STATES
-00-1A-7C (hex) Hirschmann Automation and Control B.V.
-001A7C (base 16) Hirschmann Automation and Control B.V.
+00-1A-7C (hex) Hirschmann Multimedia B.V.
+001A7C (base 16) Hirschmann Multimedia B.V.
Pampuslaan 170
Weesp Noord-Holland 1382 JS
NETHERLANDS
@@ -56007,8 +56007,8 @@
00-22-87 (hex) Titan Wireless LLC
002287 (base 16) Titan Wireless LLC
- 1700 Bryant Dr
- Suite 204
+ 3914 Gattis School Rd
+ Suite 102
Round Rock Texas 78664
UNITED STATES
@@ -69811,9 +69811,8 @@
00-60-EF (hex) FLYTECH TECHNOLOGY CO., LTD.
0060EF (base 16) FLYTECH TECHNOLOGY CO., LTD.
- 2FL. NO. 8, LANE 50, SEC.3
- NAN KANG ROAD
- TAIPEI
+ No.168 Sing-ai Rd., Neihu District
+ TAIPEI CITY 114
TAIWAN, REPUBLIC OF CHINA
00-60-F0 (hex) JOHNSON & JOHNSON MEDICAL, INC
@@ -81643,6 +81642,12 @@
San Jose CA 95131
UNITED STATES
+0C-F0-B4 (hex) Globalsat International Technology Ltd
+0CF0B4 (base 16) Globalsat International Technology Ltd
+ 17th floor,China Youse Building,No.6013 Shennan Avenue,Futian District,
+ Shenzhen Guangdong 518040
+ CHINA
+
10-00-00 (hex) PRIVATE
100000 (base 16)
@@ -81817,6 +81822,12 @@
MARSEILLE CEDEX 11 13368
FRANCE
+10-E2-D5 (hex) Qi Hardware Inc.
+10E2D5 (base 16) Qi Hardware Inc.
+ 555 4TH STREET #403
+ San Francisco CA 94107
+ UNITED STATES
+
10-E6-AE (hex) Source Technologies, LLC
10E6AE (base 16) Source Technologies, LLC
2910 Whitehall Park Drive
@@ -82618,6 +82629,12 @@
Aachen NRW 52076
GERMANY
+30-17-C8 (hex) Sony Ericsson Mobile Communications AB
+3017C8 (base 16) Sony Ericsson Mobile Communications AB
+ Nya Vattentornet
+ Lund SE 221 88
+ SWEDEN
+
30-18-CF (hex) DEOS control systems GmbH
3018CF (base 16) DEOS control systems GmbH
Birkenallee 113
@@ -82644,6 +82661,12 @@
Oulu Ou 90590
FINLAND
+30-39-F2 (hex) PIRELLI BROADBAND SOLUTIONS
+3039F2 (base 16) PIRELLI BROADBAND SOLUTIONS
+ VIALE SARCA 222
+ MILANO 20126
+ ITALY
+
30-41-74 (hex) ALTEC LANSING LLC
304174 (base 16) ALTEC LANSING LLC
535 ROUTES 6 & 209
@@ -83458,6 +83481,12 @@
HOSPITALET DE LLOBREGAT BARCELONA 08907
SPAIN
+44-A7-CF (hex) Murata Manufacturing Co., Ltd.
+44A7CF (base 16) Murata Manufacturing Co., Ltd.
+ 10-1, Higashikotari 1
+ Nagaokakyo-shi Kyoto 617-8555
+ JAPAN
+
44-A8-C2 (hex) SEWOO TECH CO., LTD
44A8C2 (base 16) SEWOO TECH CO., LTD
689-20 GEUMJUNG-DONG
@@ -84152,6 +84181,12 @@
Louisville Kentucky 40223
UNITED STATES
+5C-4C-A9 (hex) Huawei Device Co., Ltd
+5C4CA9 (base 16) Huawei Device Co., Ltd
+ Building 17,Nangang Industrial Park, Tangtou 3nd Industrial Estate,Shiyan Baoan District,
+ Shenzhen Guangdong 510108
+ CHINA
+
5C-57-C8 (hex) Nokia Corporation
5C57C8 (base 16) Nokia Corporation
Elektroniikkatie 10
@@ -84356,6 +84391,13 @@
Carasco Ge 16042
ITALY
+60-C9-80 (hex) Trymus
+60C980 (base 16) Trymus
+ Bucheon Techno Park 303-902
+ Ojeong-gu Samjung-dong
+ Bucheon-si 421-741 Gyunggi-do
+ KOREA, REPUBLIC OF
+
60-D0-A9 (hex) Samsung Electronics Co.,Ltd
60D0A9 (base 16) Samsung Electronics Co.,Ltd
#94-1, Imsoo-Dong
@@ -85628,6 +85670,12 @@
Shanghai 200063
CHINA
+7C-DA-84 (hex) Dongnian Networks Inc.
+7CDA84 (base 16) Dongnian Networks Inc.
+ 90 Wensan Road, Building 8-A303
+ Hangzhou Zhejiang 310012
+ CHINA
+
7C-DD-90 (hex) Shenzhen Ogemray Technology Co., Ltd.
7CDD90 (base 16) Shenzhen Ogemray Technology Co., Ltd.
3 Floor, 9 Building, Minxing Industrial Zone,
@@ -86413,6 +86461,12 @@
Zhonghe City Taipei County 23511
TAIWAN, REPUBLIC OF CHINA
+94-CD-AC (hex) Creowave Oy
+94CDAC (base 16) Creowave Oy
+ Lentokatu 2
+ Oulunsalo FIN-90460
+ FINLAND
+
94-D0-19 (hex) Cydle Corp.
94D019 (base 16) Cydle Corp.
1203, KofomoTower, 16-3 , Sunae-Dong, Bundang-Gu
@@ -86702,6 +86756,12 @@
Shenzhen Guangdong 518110
CHINA
+A0-21-B7 (hex) NETGEAR
+A021B7 (base 16) NETGEAR
+ 350 EAST PLUMERIA DRIVE
+ SAN JOSE CA 95134
+ UNITED STATES
+
A0-23-1B (hex) TeleComp R&D Corp.
A0231B (base 16) TeleComp R&D Corp.
102 SW Orange Blossom
@@ -86714,6 +86774,13 @@
Taipei Hsien 23144
TAIWAN, REPUBLIC OF CHINA
+A0-36-FA (hex) Ettus Research LLC
+A036FA (base 16) Ettus Research LLC
+ 1043 N Shoreline Blvd
+ Suite 100
+ Mountain View CA 94043
+ UNITED STATES
+
A0-3A-75 (hex) PSS Belgium N.V.
A03A75 (base 16) PSS Belgium N.V.
Hoogveld 50
@@ -86883,6 +86950,12 @@
Zapopan Jalisco 44130
MEXICO
+A4-24-B3 (hex) FlatFrog Laboratories AB
+A424B3 (base 16) FlatFrog Laboratories AB
+ Magistratsv�gen 10
+ Lund Skane 22643
+ SWEDEN
+
A4-38-FC (hex) Plastic Logic
A438FC (base 16) Plastic Logic
650 Castro St., Suite 500
@@ -89262,6 +89335,12 @@
SANNOIS 95112
FRANCE
+E4-41-E6 (hex) Ottec Technology GmbH
+E441E6 (base 16) Ottec Technology GmbH
+ Planetenring 12
+ Ronnenberg Lower Saxony 30952
+ GERMANY
+
E4-46-BD (hex) C&C TECHNIC TAIWAN CO., LTD.
E446BD (base 16) C&C TECHNIC TAIWAN CO., LTD.
ROOM6 13F, NO.2,Jian 8th ROAD
@@ -89274,6 +89353,12 @@
Waldb�ttelbrunn Bavaria 97297
GERMANY
+E4-6C-21 (hex) messMa GmbH
+E46C21 (base 16) messMa GmbH
+ Am Stadtfeld 8
+ Ixleben Sachsen-Anhalt 39167
+ GERMANY
+
E4-75-1E (hex) Getinge Sterilization AB
E4751E (base 16) Getinge Sterilization AB
Box 69
@@ -89559,6 +89644,13 @@
Beijing 100125
CHINA
+EC-83-6C (hex) RM Tech Co., Ltd.
+EC836C (base 16) RM Tech Co., Ltd.
+ C-801, Bupyeong Woolim Lions Valley
+ Cheongcheon 2-dong, Bupyeong-gu
+ Incheon City 403-911
+ KOREA, REPUBLIC OF
+
EC-8E-AD (hex) DLX
EC8EAD (base 16) DLX
#401, Seoil B/D,1359-45 Seocho2-dong
@@ -89963,6 +90055,12 @@
San Jose CA 95134
UNITED STATES
+F4-C7-14 (hex) Huawei Device Co., Ltd
+F4C714 (base 16) Huawei Device Co., Ltd
+ Building 17,Nangang Industrial Park, Tangtou 3nd Industrial Estate,Shiyan Baoan District,
+ Shenzhen Guangdong 510108
+ CHINA
+
F4-C7-95 (hex) WEY Elektronik AG
F4C795 (base 16) WEY Elektronik AG
Dorfstrasse 57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package bootchart for openSUSE:Factory
checked in at Thu Oct 28 15:32:45 CEST 2010.
--------
--- bootchart/bootchart.changes 2010-07-15 13:34:16.000000000 +0200
+++ bootchart/bootchart.changes 2010-10-27 10:53:56.000000000 +0200
@@ -1,0 +2,19 @@
+Wed Oct 27 08:52:23 UTC 2010 - aj(a)suse.de
+
+- Use RPM_OPT_FLAGS for building.
+
+-------------------------------------------------------------------
+Wed Oct 27 08:49:41 UTC 2010 - aj(a)suse.de
+
+- Update to bootchart2 0.12.4:
+ o various bugfixes
+ o display memory usage
+ o includes pthread patch.
+
+-------------------------------------------------------------------
+Wed Oct 27 08:44:17 UTC 2010 - aj(a)suse.de
+
+- Disable initrd support for now as the system will not boot with
+ it (bnc#649512).
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
bootchart-pthread.patch
bootchart2-0.12.1.tar.bz2
New:
----
bootchart2-0.12.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bootchart.spec ++++++
--- /var/tmp/diff_new_pack.5Ph6GV/_old 2010-10-28 15:31:00.000000000 +0200
+++ /var/tmp/diff_new_pack.5Ph6GV/_new 2010-10-28 15:31:00.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package bootchart (Version 2.0.12.1)
+# spec file for package bootchart (Version 2.0.12.4)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -17,7 +17,7 @@
# norootforbuild
-%define real_bootchart2_version 0.12.1
+%define real_bootchart2_version 0.12.4
%if 0%{?suse_version}
%define system_requires lsb-release python-cairo python-gtk
%else
@@ -39,7 +39,6 @@
Source: bootchart2-%{real_bootchart2_version}.tar.bz2
Source3: mkinitrd-boot.sh
Source4: mkinitrd-setup.sh
-Patch0: bootchart-pthread.patch
AutoReqProv: on
Requires: %system_requires
Requires(post): mkinitrd
@@ -50,43 +49,43 @@
%prep
%setup -q -n bootchart2-%{real_bootchart2_version}
-%patch0 -p1
%build
export PY_LIBDIR=%py_libdir
export PY_SITEDIR=%py_sitedir
-make
+make CFLAGS="$RPM_OPT_FLAGS"
%install
export PY_LIBDIR=%py_libdir
export PY_SITEDIR=%py_sitedir
make install DESTDIR=$RPM_BUILD_ROOT
# SUSE specific bits.
-install -m 755 -D %SOURCE3 $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-bootchart.sh
-install -m 755 -D %SOURCE4 $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-bootchart.sh
+## Remove for now since they are broken, see bnc#
+#install -m 755 -D %SOURCE3 $RPM_BUILD_ROOT/lib/mkinitrd/scripts/boot-bootchart.sh
+#install -m 755 -D %SOURCE4 $RPM_BUILD_ROOT/lib/mkinitrd/scripts/setup-bootchart.sh
%fdupes %{buildroot}/%{_datadir}
-%post
-[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
-if [ "$YAST_IS_RUNNING" != "instsys" -a \
- ! -e /.buildenv -a \
- -x /sbin/update-bootloader -a \
- -x /sbin/mkinitrd ]; then
- /sbin/mkinitrd
- /sbin/update-bootloader --refresh
-fi
-exit 0
-
-%postun
-[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
-if [ "$YAST_IS_RUNNING" != "instsys" -a \
- ! -e /.buildenv -a \
- -x /sbin/update-bootloader -a \
- -x /sbin/mkinitrd ]; then
- /sbin/mkinitrd
- /sbin/update-bootloader --refresh
-fi
-exit 0
+#%post
+#[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
+#if [ "$YAST_IS_RUNNING" != "instsys" -a \
+# ! -e /.buildenv -a \
+# -x /sbin/update-bootloader -a \
+# -x /sbin/mkinitrd ]; then
+# /sbin/mkinitrd
+# /sbin/update-bootloader --refresh
+#fi
+#exit 0
+
+#%postun
+#[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
+#if [ "$YAST_IS_RUNNING" != "instsys" -a \
+# ! -e /.buildenv -a \
+# -x /sbin/update-bootloader -a \
+# -x /sbin/mkinitrd ]; then
+# /sbin/mkinitrd
+# /sbin/update-bootloader --refresh
+#fi
+#exit 0
%clean
rm -rf $RPM_BUILD_ROOT
@@ -100,7 +99,7 @@
/sbin/*
/usr/bin/*
%config(noreplace) /etc/bootchartd.conf
-/lib/mkinitrd
+#/lib/mkinitrd
%py_sitedir/pybootchartgui
%changelog
++++++ bootchart2-0.12.1.tar.bz2 -> bootchart2-0.12.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/AUTHORS new/bootchart2-0.12.4/AUTHORS
--- old/bootchart2-0.12.1/AUTHORS 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/AUTHORS 2010-10-24 16:26:26.000000000 +0200
@@ -1,9 +1,10 @@
-Anders Norgaard <anders.norgaard(a)gmail.com>
Michael Meeks <michael.meeks(a)novell.com>
+Anders Norgaard <anders.norgaard(a)gmail.com>
Scott James Remnant <scott(a)ubuntu.com>
Henning Niss <henningniss(a)gmail.com>
Contributors:
+ Riccardo Magliocchetti <riccardo.magliocchetti(a)gmail.com>
Brian Ewins
Based on work by:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/Makefile new/bootchart2-0.12.4/Makefile
--- old/bootchart2-0.12.1/Makefile 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/Makefile 2010-10-24 16:26:26.000000000 +0200
@@ -1,9 +1,9 @@
-VER=0.12.1
+VER=0.12.4
PKG_NAME=bootchart2
PKG_TARBALL=$(PKG_NAME)-$(VER).tar.bz2
-CC = gcc
-CFLAGS = -g -Wall -O0
+CC ?= gcc
+CFLAGS ?= -g -Wall -O0
BINDIR ?= /usr/bin
PY_LIBDIR ?= /usr/lib/python2.6
@@ -17,15 +17,18 @@
collector/tasks-netlink.o \
collector/dump.o
-all: bootchart-collector
+all: bootchart-collector pybootchartgui/main.py
%.o:%.c
- $(CC) $(CFLAGS) -DVERSION=\"$(VER)\" -c $^ -o $@
+ $(CC) $(CFLAGS) -pthread -DVERSION=\"$(VER)\" -c $^ -o $@
bootchart-collector: $(COLLECTOR)
- $(CC) -lpthread -Icollector -o $@ $^
+ $(CC) -pthread -Icollector -o $@ $^
-py-install-compile:
+pybootchartgui/main.py: pybootchartgui/main.py.in
+ sed -s "s/@VER@/$(VER)/g" $^ > $@
+
+py-install-compile: pybootchartgui/main.py
install -d $(DESTDIR)$(PY_SITEDIR)/pybootchartgui
cp pybootchartgui/*.py $(DESTDIR)$(PY_SITEDIR)/pybootchartgui
install -D -m 755 pybootchartgui.py $(DESTDIR)$(BINDIR)/pybootchartgui
@@ -42,10 +45,10 @@
install -m 755 -D bootchart-collector $(DESTDIR)/lib/bootchart/bootchart-collector
install: all py-install-compile install-collector
- mkdir -p $RPM_BUILD_ROOT/lib/bootchart/mnt
clean:
- -rm -f bootchart-collector bootchart-collector-dynamic collector/*.o
+ -rm -f bootchart-collector bootchart-collector-dynamic \
+ collector/*.o pybootchartgui/main.py
dist:
COMMIT_HASH=`git show-ref -s -h | head -n 1` ; \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/NEWS new/bootchart2-0.12.4/NEWS
--- old/bootchart2-0.12.1/NEWS 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/NEWS 2010-10-24 16:26:26.000000000 +0200
@@ -1,3 +1,36 @@
+bootchart2 0.12.4:
+ + bootchartd
+ + reduce overhead caused by pidof (Riccardo Magliocchetti)
+ + collector
+ + attempt to retry ptrace to avoid bogus ENOSYS (Michael)
+ + add meminfo polling (Dave Martin)
+ + pybootchartgui
+ + handle dmesg timestamps with big delta (Riccardo)
+ + avoid divide by zero when rendering I/O utilization (Riccardo)
+ + add process grouping in the cumulative chart (Riccardo)
+ + fix cpu time calculation in cumulative chart (Riccardo)
+ + get i/o statistics for flash based devices (Riccardo)
+ + prettier coloring for the cumulative graphs (Michael)
+ + fix interactive CPU rendering (Michael)
+ + render memory usage graph (Dave Martin)
+
+bootchart2 0.12.3
+ + collector
+ + pclose after popen (Riccardo Magliocchetti (xrmx))
+ + fix buffer overflow (xrmx)
+ + count 'processor:' in /proc/cpuinfo for ARM (Michael)
+ + get model name from that line too for ARM (xrmx)
+ + store /proc/cpuinfo in the boot-chart archive (xrmx)
+ + try harder to detect missing TASKSTATS (Michael)
+ + sanity-check invalid domain names (Michael)
+ + detect missing PROC_EVENTS more reliably (Michael)
+ + README fixes (xrmx, Michael)
+ + pybootchartgui
+ + make num_cpu parsing robust (Michael)
+
+bootchart2 0.12.2
+ + fix pthread compile / linking bug
+
bootchart2 0.12.1
+ pybootchartgui
+ pylint cleanup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/README new/bootchart2-0.12.4/README
--- old/bootchart2-0.12.1/README 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/README 2010-10-24 16:26:26.000000000 +0200
@@ -30,6 +30,10 @@
chart rendering tool. If you want to chart the initrd, add
rdinitrd=/sbin/bootchartd to the kernel command-line.
+ To make bootchart2 work best, please ensure your kernel is
+configured with CONFIG_PROC_EVENTS=y and CONFIG_TASKSTATS=y, without
+these we are slower, less accurate, and produce an uglier task
+hierarchy.
Why bootchart2 ?
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/TODO new/bootchart2-0.12.4/TODO
--- old/bootchart2-0.12.1/TODO 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/TODO 2010-10-24 16:26:26.000000000 +0200
@@ -3,6 +3,10 @@
* FIXME: are we merging / glupping threads properly ?
+ how can sreadahead apparently be doing no I/O ? :-)
+ + extend rectangles in rendered output to note when
+ processes truly exit to improve duration rendering.
+ + expand the tasks API for this.
+
* Tracing metrics:
+ traced %d processes of $$ (!) :-)
+ consumed %d seconds of CPU [ render these ... ]
@@ -18,10 +22,6 @@
+ fix cumulative graphing - and boundary box bits
- + fix for profiling a running system ... [ get the origin right ! ]
- + the renderer (or collector ?) should subtract the initial
- times of each process for the cumulative graph ...
-
+ re-write ever more of bootchartd from shell into C ...
+ make the --dump thing return a success status,
+ poll the remote process (with ptrace ? - hmm ...)
@@ -30,11 +30,11 @@
+ hmm.
+ have a 20 second delay before starting to poll it ?
- + extend logs to to note when processes truly exit to improve
- duration rendering.
-
** Features:
+Add some tabs to the interactive renderer to show the raw files:
+kernel dmesg, header, and perhaps the full (processed) cmdline2 log
+
Use the same stats that Intel's tracer uses of I/O / scheduling foo ...
+ use them to avoid taskstats polling if there has been
no scheduled timeslice (?)
@@ -73,3 +73,9 @@
Notes:
+ SUSE initrd debugging; use "'shell=1'" - is dead good ...
+
+
+
+#18a303 - Tango / Green
+
+#2da31b - to same saturation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/bootchartd new/bootchart2-0.12.4/bootchartd
--- old/bootchart2-0.12.1/bootchartd 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/bootchartd 2010-10-24 16:26:26.000000000 +0200
@@ -80,9 +80,6 @@
# The processes we have to wait for
local exit_proc="kdm_greet xterm konsole gnome-terminal metacity mutter compiz ldm icewm-session"
- # Don't exit until *all* the mandatory procs are running. Only used if exit_proc
- # is unset.
- local mandatory_procs="nautilus mutter"
# Wait for /proc first - without it we have issues
while [ ! -e /proc/cmdline ]; do
@@ -105,7 +102,7 @@
stop
return
fi
- $USLEEP 200000
+ $USLEEP 1000000
done;
}
@@ -151,7 +148,7 @@
echo "Starting bootchart logging"
# Are we running in the initrd ?
- if [ ! -e /dev/random ]; then
+ if [ -x /init -o -x /linuxrc ]; then
IN_INITRD="yes"
start &
else # running inside the main system
@@ -200,7 +197,7 @@
stop
;;
*)
- echo $"Usage: $0 {init|start|stop}"
+ echo "Usage: $0 {init|start|stop}"
;;
esac
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/collector/collector.c new/bootchart2-0.12.4/collector/collector.c
--- old/bootchart2-0.12.1/collector/collector.c 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/collector/collector.c 2010-10-24 16:26:26.000000000 +0200
@@ -454,7 +454,7 @@
rep_len = recv(sd, &ans, sizeof(ans), 0);
if (ans.n.nlmsg_type == NLMSG_ERROR ||
(rep_len < 0) || !NLMSG_OK((&ans.n), rep_len))
- return 0;
+ return -1;
na = (struct nlattr *) GENLMSG_DATA(&ans);
na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len));
@@ -481,7 +481,7 @@
netlink_taskstats_id = get_family_id (netlink_socket);
- return 1;
+ return netlink_taskstats_id > 0;
error:
if (netlink_socket >= 0)
close (netlink_socket);
@@ -778,13 +778,13 @@
Arguments args;
int i, use_taskstat;
int in_initrd, clean_environment = 1;
- int stat_fd, disk_fd, uptime_fd, pid, ret = 1;
+ int stat_fd, disk_fd, uptime_fd, meminfo_fd, pid, ret = 1;
PidScanner *scanner = NULL;
unsigned long reltime = 0;
- BufferFile *stat_file, *disk_file, *per_pid_file;
+ BufferFile *stat_file, *disk_file, *per_pid_file, *meminfo_file;
PidEventClosure pid_ev_cl;
- int *fds[] = { &stat_fd, &disk_fd, &uptime_fd, NULL };
- const char *fd_names[] = { "/stat", "/diskstats", "/uptime", NULL };
+ int *fds[] = { &stat_fd, &disk_fd, &uptime_fd, &meminfo_fd, NULL };
+ const char *fd_names[] = { "/stat", "/diskstats", "/uptime", "/meminfo", NULL };
StackMap map = STACK_MAP_INIT; /* make me findable */
arguments_set_defaults (&args);
@@ -859,10 +859,11 @@
per_pid_file = buffer_file_new (&map, "taskstats.log");
else
per_pid_file = buffer_file_new (&map, "proc_ps.log");
+ meminfo_file = buffer_file_new (&map, "proc_meminfo.log");
pid_ev_cl.cmdline_file = buffer_file_new (&map, "cmdline2.log");
pid_ev_cl.paternity_file = buffer_file_new (&map, "paternity.log");
- if (!stat_file || !disk_file || !per_pid_file ||
+ if (!stat_file || !disk_file || !per_pid_file || !meminfo_file ||
!pid_ev_cl.cmdline_file || !pid_ev_cl.paternity_file) {
fprintf (stderr, "Error allocating output buffers\n");
return 1;
@@ -904,6 +905,7 @@
buffer_file_dump_frame_with_timestamp (stat_file, stat_fd, uptime, uptimelen);
buffer_file_dump_frame_with_timestamp (disk_file, disk_fd, uptime, uptimelen);
+ buffer_file_dump_frame_with_timestamp (meminfo_file, meminfo_fd, uptime, uptimelen);
/* output data for each pid */
buffer_file_append (per_pid_file, uptime, uptimelen);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/collector/dump.c new/bootchart2-0.12.4/collector/dump.c
--- old/bootchart2-0.12.1/collector/dump.c 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/collector/dump.c 2010-10-24 16:26:26.000000000 +0200
@@ -38,7 +38,7 @@
snprintf (buffer, 1024, "/proc/%d/maps", s->pid);
maps = fopen (buffer, "r");
- while (!result && fgets (buffer, 4096, maps)) {
+ while (!result && fgets (buffer, 1024, maps)) {
char *p, *copy;
size_t start, end, toread, read_bytes;
@@ -120,10 +120,10 @@
* wait a while hoping it exits (so we can
* cleanup after it).
*/
-static void
-close_wait_pid (DumpState *s, int avoid_kill)
+static int
+close_pid (DumpState *s, int avoid_kill)
{
- int i;
+ int pid;
if (!avoid_kill && ptrace (PTRACE_KILL, s->pid, 0, 0))
fprintf (stderr, "failed to ptrace_kill pid %d: %s\n",
@@ -133,17 +133,28 @@
ptrace (PTRACE_DETACH, s->pid, 0, 0);
close (s->mem);
+ pid = s->pid;
+ free (s);
+
+ return pid;
+}
+
+static void
+close_wait_pid (DumpState *s, int avoid_kill)
+{
+ int i, pid;
+ pid = close_pid (s, avoid_kill);
+ /* 's' invalid */
+
/* wait at most second max */
for (i = 0; i < 100; i++) {
char buffer[1024];
- sprintf (buffer, PROC_PATH "/%d/cmdline", s->pid);
+ sprintf (buffer, PROC_PATH "/%d/cmdline", pid);
if (access (buffer, R_OK))
break;
usleep (10 * 1000);
}
-
- free (s);
}
static void dump_buffers (DumpState *s)
@@ -181,7 +192,7 @@
int
buffers_extract_and_dump (const char *output_path, Arguments *remote_args)
{
- int pid, ret = 0;
+ int i, pid, ret = 0;
DumpState *state;
chdir (output_path);
@@ -193,16 +204,24 @@
}
fprintf (stderr, "Extracting profile data from pid %d\n", pid);
- if (!(state = open_pid (pid)))
- return 1;
-
- if (find_chunks (state)) {
- fprintf (stderr, "Couldn't find state structures on pid %d's stack\n", pid);
- ret = 1;
- } else
- dump_buffers (state);
-
- close_wait_pid (state, ret);
+ /* the kernel for reasons of it's own really likes to return
+ ESRCH - No such process from pread randomly, so retry a bit */
+ for (i = 0; i < 8; i++) {
+ if (!(state = open_pid (pid)))
+ return 1;
+
+ if (find_chunks (state)) {
+ ret = 1;
+ fprintf (stderr, "Couldn't find state structures on pid %d's stack%s\n",
+ pid, i < 7 ? ", retrying" : " aborting");
+ close_pid (state, 1);
+ } else {
+ ret = 0;
+ dump_buffers (state);
+ close_wait_pid (state, 0);
+ break;
+ }
+ }
return ret;
}
@@ -342,6 +361,17 @@
return 0;
}
+/* sane ASCII chars only please */
+static void
+rewrite_ascii (char *string)
+{
+ char *p;
+ for (p = string; *p; p++) {
+ if (!isgraph (*p) && !isblank (*p))
+ *p = '.';
+ }
+}
+
int
dump_header (const char *output_path)
{
@@ -361,8 +391,8 @@
{
time_t now;
- char host_buf[4096];
- char domain_buf[2048];
+ char host_buf[4096] = { '\0' };
+ char domain_buf[2048] = { '\0' };
char time_buf[128];
if (!gethostname (host_buf, 2047) &&
@@ -374,6 +404,8 @@
} else
strcpy (host_buf, "unknown");
+ rewrite_ascii (host_buf);
+
now = time (NULL);
ctime_r (&now, time_buf);
if (strrchr (time_buf, '\n'))
@@ -402,26 +434,43 @@
release[0] = '\0';
fprintf (header, "system.release = %s\n", release);
if (lsb)
- fclose (lsb);
+ pclose (lsb);
}
{
FILE *cpuinfo = fopen ("/proc/cpuinfo", "r");
+ FILE *cpuinfo_dump;
+ char fname[4096];
char line[4096];
- char cpu_model[4096] = "";
+ char cpu_model[4096] = {'\0'};
+ char cpu_model_alt[4096] = {'\0'};
+ char *cpu_m = cpu_model;
int cpus = 0;
+ sprintf (fname, "%s/proc_cpuinfo.log", output_path);
+ cpuinfo_dump = fopen(fname, "w");
+
+ /* Dump /proc/cpuinfo for easier debugging with unexpected formats */
while (cpuinfo && fgets (line, 4096, cpuinfo)) {
- if (!strncmp (line, "model name", 10) && strchr (line, ':')) {
+ if (!strncmp (line, "model name", 10) && strchr (line, ':'))
strcpy (cpu_model, strstr (line, ": ") + 2);
+ /* ARM platforms save cpu model on Processor field so try to get it */
+ if (!strncasecmp (line, "processor", 9)) {
cpus++;
+ strcpy (cpu_model_alt, strstr (line, ": ") + 2);
}
+ if (cpuinfo_dump)
+ fprintf(cpuinfo_dump, "%s", line);
}
if (cpuinfo)
fclose (cpuinfo);
- if (strrchr (cpu_model, '\n'))
- *strrchr (cpu_model, '\n') = '\0';
- fprintf (header, "system.cpu = %s %d\n", cpu_model, cpus);
+ if (cpuinfo_dump)
+ fclose(cpuinfo_dump);
+ if (!cpu_model[0])
+ cpu_m = cpu_model_alt;
+ if (strrchr (cpu_m, '\n'))
+ *strrchr (cpu_m, '\n') = '\0';
+ fprintf (header, "system.cpu = %s %d\n", cpu_m, cpus);
fprintf (header, "system.cpu.num = %d\n", cpus);
}
{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/collector/tasks-netlink.c new/bootchart2-0.12.4/collector/tasks-netlink.c
--- old/bootchart2-0.12.1/collector/tasks-netlink.c 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/collector/tasks-netlink.c 2010-10-24 16:26:26.000000000 +0200
@@ -38,6 +38,7 @@
#include <linux/connector.h>
#include <linux/netlink.h>
#include "linux/cn_proc.h"
+#include <poll.h>
#define SEND_MESSAGE_LEN (NLMSG_LENGTH(sizeof(struct cn_msg) + \
sizeof(enum proc_cn_mcast_op)))
@@ -355,6 +356,23 @@
}
}
+static size_t
+netlink_recvfrom (NetLinkPidScanner *nls, char *buffer)
+{
+ socklen_t from_nla_len;
+ struct sockaddr_nl from_nla;
+
+ ZERO_ARRAY (buffer);
+
+ ZERO (from_nla);
+ from_nla.nl_family = AF_NETLINK;
+ from_nla.nl_groups = CN_IDX_PROC;
+ from_nla.nl_pid = 1;
+
+ return recvfrom (nls->socket, buffer, BUFF_SIZE, 0,
+ (struct sockaddr*)&from_nla, &from_nla_len);
+}
+
static void *
netlink_listen_thread (void *user_data)
{
@@ -362,27 +380,14 @@
struct cn_msg *cn_hdr;
- struct sockaddr_nl kern_nla, from_nla;
- socklen_t from_nla_len;
char buff[BUFF_SIZE];
size_t recv_len = 0;
- ZERO (kern_nla);
- kern_nla.nl_family = AF_NETLINK;
- kern_nla.nl_groups = CN_IDX_PROC;
- kern_nla.nl_pid = 1;
-
for (;;) {
struct nlmsghdr *nlh = (struct nlmsghdr*)buff;
- ZERO_ARRAY (buff);
- from_nla_len = sizeof (from_nla);
-
- memcpy (&from_nla, &kern_nla, sizeof (from_nla));
-
/* block here mostly waiting for news ... */
- recv_len = recvfrom (nls->socket, buff, BUFF_SIZE, 0,
- (struct sockaddr*)&from_nla, &from_nla_len);
+ recv_len = netlink_recvfrom (nls, buff);
if (recv_len < 1)
continue;
@@ -439,7 +444,7 @@
*/
nls->socket = socket (PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);
if (nls->socket == -1) {
- fprintf (stderr, "netlink socket error");
+ fprintf (stderr, "netlink socket error\n");
return NULL;
}
my_nla.nl_family = AF_NETLINK;
@@ -447,7 +452,7 @@
my_nla.nl_pid = getpid();
if (bind (nls->socket, (struct sockaddr *)&my_nla, sizeof(my_nla))) {
- fprintf (stderr, "binding nls->socket error");
+ fprintf (stderr, "binding nls->socket error\n");
goto close_and_exit;
}
nl_hdr = (struct nlmsghdr *)buff;
@@ -468,7 +473,39 @@
if (send (nls->socket, nl_hdr, nl_hdr->nlmsg_len, 0) != nl_hdr->nlmsg_len) {
fprintf(stderr, "failed to send proc connector mcast ctl op!\n");
goto close_and_exit;
- }
+ } else {
+ size_t recv_len;
+ struct nlmsghdr *nlh = (struct nlmsghdr*)buff;
+ struct pollfd pr = { 0, };
+
+ pr.fd = nls->socket;
+ pr.events = POLLIN;
+ if (poll (&pr, 1, 50 /* ms */) || !(pr.revents & POLLIN)) {
+ fprintf (stderr, "No PROC_EVENTs present\n");
+ goto close_and_exit;
+ }
+
+ recv_len = netlink_recvfrom (nls, buff);
+ if (recv_len < 1 || !NLMSG_OK (nlh, recv_len) ||
+ nlh->nlmsg_type != NLMSG_DONE) {
+ fprintf (stderr, "Failed to connect to PROC_EVENT via netlink\n");
+ goto close_and_exit;
+ } else {
+ struct proc_event *ev;
+ struct cn_msg *cn_hdr;
+
+ cn_hdr = NLMSG_DATA (nlh);
+ ev = (struct proc_event*)cn_hdr->data;
+
+ if (ev->what != PROC_EVENT_NONE || ev->event_data.ack.err) {
+ fprintf (stderr, "error: expecting an EVENT_NONE in response "
+ "to PROC_EVENT connect (err 0x%x)\n",
+ ev->event_data.ack.err);
+ goto close_and_exit;
+ }
+ /* we made it ... */
+ }
+ }
pthread_mutex_init (&nls->lock, NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/pybootchartgui/draw.py new/bootchart2-0.12.4/pybootchartgui/draw.py
--- old/bootchart2-0.12.1/pybootchartgui/draw.py 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/pybootchartgui/draw.py 2010-10-24 16:26:26.000000000 +0200
@@ -57,6 +57,14 @@
DISK_TPUT_COLOR = (0.20, 0.71, 0.20, 1.0)
# CPU load chart color.
FILE_OPEN_COLOR = (0.20, 0.71, 0.71, 1.0)
+# Mem cached color
+MEM_CACHED_COLOR = CPU_COLOR
+# Mem used color
+MEM_USED_COLOR = IO_COLOR
+# Buffers color
+MEM_BUFFERS_COLOR = (0.4, 0.4, 0.4, 0.3)
+# Swap color
+MEM_SWAP_COLOR = DISK_TPUT_COLOR
# Process border color.
PROC_BORDER_COLOR = (0.71, 0.71, 0.71, 1.0)
@@ -95,6 +103,10 @@
# Process description date format.
DESC_TIME_FORMAT = "mm:ss.SSS"
+# Cumulative coloring bits
+HSV_MAX_MOD = 31
+HSV_STEP = 7
+
# Process states
STATE_UNDEFINED = 0
STATE_RUNNING = 1
@@ -193,42 +205,56 @@
ctx.set_line_cap(cairo.LINE_CAP_BUTT)
ctx.set_dash([])
-def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree):
+def draw_chart(ctx, color, fill, chart_bounds, data, proc_tree, data_range):
ctx.set_line_width(0.5)
x_shift = proc_tree.start_time
def transform_point_coords(point, x_base, y_base, \
xscale, yscale, x_trans, y_trans):
x = (point[0] - x_base) * xscale + x_trans
- y = (point[1] - y_base) * -yscale + y_trans + bar_h
+ y = (point[1] - y_base) * -yscale + y_trans + chart_bounds[3]
return x, y
- xscale = float (chart_bounds[2]) / max (x for (x, y) in data)
- yscale = float (chart_bounds[3]) / max (y for (x, y) in data)
-
- first = transform_point_coords (data[0], x_shift, 0, xscale, yscale, \
+ max_x = max (x for (x, y) in data)
+ max_y = max (y for (x, y) in data)
+ # avoid divide by zero
+ if max_y == 0:
+ max_y = 1.0
+ xscale = float (chart_bounds[2]) / max_x
+ # If data_range is given, scale the chart so that the value range in
+ # data_range matches the chart bounds exactly.
+ # Otherwise, scale so that the actual data matches the chart bounds.
+ if data_range:
+ yscale = float(chart_bounds[3]) / (data_range[1] - data_range[0])
+ ybase = data_range[0]
+ else:
+ yscale = float(chart_bounds[3]) / max_y
+ ybase = 0
+
+ first = transform_point_coords (data[0], x_shift, ybase, xscale, yscale, \
chart_bounds[0], chart_bounds[1])
- last = transform_point_coords (data[-1], x_shift, 0, xscale, yscale, \
+ last = transform_point_coords (data[-1], x_shift, ybase, xscale, yscale, \
chart_bounds[0], chart_bounds[1])
ctx.set_source_rgba(*color)
ctx.move_to(*first)
for point in data:
- x, y = transform_point_coords (point, x_shift, 0, xscale, yscale, \
+ x, y = transform_point_coords (point, x_shift, ybase, xscale, yscale, \
chart_bounds[0], chart_bounds[1])
ctx.line_to(x, y)
if fill:
ctx.stroke_preserve()
- ctx.line_to(last[0], chart_bounds[1]+bar_h)
- ctx.line_to(first[0], chart_bounds[1]+bar_h)
+ ctx.line_to(last[0], chart_bounds[1]+chart_bounds[3])
+ ctx.line_to(first[0], chart_bounds[1]+chart_bounds[3])
ctx.line_to(first[0], first[1])
ctx.fill()
else:
ctx.stroke()
ctx.set_line_width(1.0)
-header_h = 280
bar_h = 55
+meminfo_bar_h = 2 * bar_h
+header_h = 110 + 2 * (30 + bar_h) + 1 * (30 + meminfo_bar_h)
# offsets
off_x, off_y = 10, 10
sec_w_base = 50 # the width of a second
@@ -238,8 +264,7 @@
CUML_HEIGHT = 1000
OPTIONS = None
-
-def extents(xscale, headers, cpu_stats, disk_stats, proc_tree, times, filename):
+def extents(xscale, headers, cpu_stats, disk_stats, mem_stats, proc_tree, times, filename):
w = int (proc_tree.duration * sec_w_base * xscale / 100) + 2*off_x
h = proc_h * proc_tree.num_proc + header_h + 2 * off_y
if proc_tree.taskstats and WITH_CUMULATIVE_CHART:
@@ -256,9 +281,9 @@
# Render the chart.
#
def render(ctx, options, xscale, headers, cpu_stats, \
- disk_stats, proc_tree, times, filename):
+ disk_stats, mem_stats, proc_tree, times, filename):
(w, h) = extents (xscale, headers, cpu_stats, \
- disk_stats, proc_tree, times, filename)
+ disk_stats, mem_stats, proc_tree, times, filename)
global OPTIONS
OPTIONS = options
@@ -291,11 +316,11 @@
draw_annotations (ctx, proc_tree, times, chart_rect)
draw_chart (ctx, IO_COLOR, True, chart_rect, \
[(sample.time, sample.user + sample.sys + sample.io) for sample in cpu_stats], \
- proc_tree)
+ proc_tree, None)
# render CPU load
draw_chart (ctx, CPU_COLOR, True, chart_rect, \
[(sample.time, sample.user + sample.sys) for sample in cpu_stats], \
- proc_tree)
+ proc_tree, None)
curr_y = curr_y + 30 + bar_h
@@ -310,14 +335,14 @@
draw_annotations (ctx, proc_tree, times, chart_rect)
draw_chart (ctx, IO_COLOR, True, chart_rect, \
[(sample.time, sample.util) for sample in disk_stats], \
- proc_tree)
+ proc_tree, None)
# render disk throughput
max_sample = max (disk_stats, key = lambda s: s.tput)
if clip_visible (clip, chart_rect):
draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect, \
[(sample.time, sample.tput) for sample in disk_stats], \
- proc_tree)
+ proc_tree, None)
pos_x = off_x + ((max_sample.time - proc_tree.start_time) * w / proc_tree.duration)
@@ -328,12 +353,40 @@
label = "%dMB/s" % round ((max_sample.tput) / 1024.0)
draw_text (ctx, label, DISK_TPUT_COLOR, pos_x + shift_x, curr_y + shift_y)
+ curr_y = curr_y + 30 + bar_h
+
+ # render mem usage
+ chart_rect = (off_x, curr_y+30, w, meminfo_bar_h)
+ if mem_stats and clip_visible (clip, chart_rect):
+ mem_scale = max(sample.records['MemTotal'] - sample.records['MemFree'] for sample in mem_stats)
+ draw_legend_box(ctx, "Mem cached (scale: %u MiB)" % (float(mem_scale) / 1024), MEM_CACHED_COLOR, off_x, curr_y+20, leg_s)
+ draw_legend_box(ctx, "Used", MEM_USED_COLOR, off_x + 240, curr_y+20, leg_s)
+ draw_legend_box(ctx, "Buffers", MEM_BUFFERS_COLOR, off_x + 360, curr_y+20, leg_s)
+ draw_legend_line(ctx, "Swap (scale: %u MiB)" % max([(sample.records['SwapTotal'] - sample.records['SwapFree'])/1024 for sample in mem_stats]), \
+ MEM_SWAP_COLOR, off_x + 480, curr_y+20, leg_s)
+ draw_box_ticks(ctx, chart_rect, sec_w)
+ draw_annotations(ctx, proc_tree, times, chart_rect)
+ draw_chart(ctx, MEM_BUFFERS_COLOR, True, chart_rect, \
+ [(sample.time, sample.records['MemTotal'] - sample.records['MemFree']) for sample in mem_stats], \
+ proc_tree, [0, mem_scale])
+ draw_chart(ctx, MEM_USED_COLOR, True, chart_rect, \
+ [(sample.time, sample.records['MemTotal'] - sample.records['MemFree'] - sample.records['Buffers']) for sample in mem_stats], \
+ proc_tree, [0, mem_scale])
+ draw_chart(ctx, MEM_CACHED_COLOR, True, chart_rect, \
+ [(sample.time, sample.records['Cached']) for sample in mem_stats], \
+ proc_tree, [0, mem_scale])
+ draw_chart(ctx, MEM_SWAP_COLOR, False, chart_rect, \
+ [(sample.time, float(sample.records['SwapTotal'] - sample.records['SwapFree'])) for sample in mem_stats], \
+ proc_tree, None)
+
+ curr_y = curr_y + meminfo_bar_h
+
# draw process boxes
proc_height = h
if proc_tree.taskstats and WITH_CUMULATIVE_CHART:
proc_height -= CUML_HEIGHT
- draw_process_bar_chart(ctx, clip, proc_tree, times, curr_y + bar_h, w, proc_height, sec_w)
+ draw_process_bar_chart(ctx, clip, proc_tree, times, curr_y, w, proc_height, sec_w)
curr_y = proc_height
ctx.set_font_size(SIG_FONT_SIZE)
@@ -487,38 +540,58 @@
def elide_bootchart(proc):
return proc.cmd == 'bootchartd' or proc.cmd == 'bootchart-colle'
-def accumulate_time(times, proc):
-
- if elide_bootchart(proc):
- return 0.0
-
- time_so_far = 0.0
- for sample in proc.samples:
- time_so_far += sample.cpu_sample.user + sample.cpu_sample.sys
- if not sample.time in times:
- times[sample.time] = 1
-
-
- for c in proc.child_list:
- time_so_far += accumulate_time (times, c)
-
- return time_so_far
-
-
-def make_color():
- h = random.random()
- s = 0.5
- v = 1.0
- c = colorsys.hsv_to_rgb (h, s, v)
- return (c[0], c[1], c[2], 1.0)
+class CumlSample:
+ def __init__(self, proc):
+ self.cmd = proc.cmd
+ self.samples = []
+ self.merge_samples (proc)
+ self.color = None
+
+ def merge_samples(self, proc):
+ self.samples.extend (proc.samples)
+ self.samples.sort (key = lambda p: p.time)
+
+ def next(self):
+ global palette_idx
+ palette_idx += HSV_STEP
+ return palette_idx
+
+ def get_color(self):
+ if self.color is None:
+ i = self.next() % HSV_MAX_MOD
+ h = 0.0
+ if i is not 0:
+ h = (1.0 * i) / HSV_MAX_MOD
+ s = 0.5
+ v = 1.0
+ c = colorsys.hsv_to_rgb (h, s, v)
+ self.color = (c[0], c[1], c[2], 1.0)
+ return self.color
def draw_cuml_graph(ctx, proc_tree, chart_bounds, duration, sec_w):
- time_hash = {}
+ global palette_idx
+ palette_idx = 0
+ time_hash = {}
total_time = 0.0
- for root in proc_tree.process_tree:
- total_time += accumulate_time (time_hash, root)
+ m_proc_list = {}
+
+ for proc in proc_tree.process_list:
+ if elide_bootchart(proc):
+ continue
+
+ for sample in proc.samples:
+ total_time += sample.cpu_sample.user + sample.cpu_sample.sys
+ if not sample.time in time_hash:
+ time_hash[sample.time] = 1
+
+ # merge pids with the same cmd
+ if not proc.cmd in m_proc_list:
+ m_proc_list[proc.cmd] = CumlSample (proc)
+ continue
+ s = m_proc_list[proc.cmd]
+ s.merge_samples (proc)
# all the sample times
times = time_hash.keys()
@@ -530,9 +603,7 @@
pix_per_ns = chart_bounds[3] / total_time
# print "total time: %g pix-per-ns %g" % (total_time, pix_per_ns)
- # FIXME: we really need to aggregate by process name
# FIXME: we have duplicates in the process list too [!] - why !?
- # FIXME: rendering a legend would be nice too ...
# Render bottom up, left to right
below = {}
@@ -546,18 +617,14 @@
legends = []
labels = []
- pid_to_color = {}
# render each pid in order
- for proc in proc_tree.process_list:
+ for cs in m_proc_list.values():
row = {}
cuml = 0.0
- if elide_bootchart(proc):
- continue
-
-# print "pid : %s -> %g samples %d" % (proc.cmd, cuml, len (proc.samples))
- for sample in proc.samples:
+# print "pid : %s -> %g samples %d" % (proc.cmd, cuml, len (cs.samples))
+ for sample in cs.samples:
cuml += sample.cpu_sample.user + sample.cpu_sample.sys
row[sample.time] = cuml
process_total_time = cuml
@@ -570,14 +637,7 @@
y = last_below = below[last_time]
last_cuml = cuml = 0.0
- # make and store color
- color = make_color ()
- pid_to_color[proc.pid] = color
- ctx.set_source_rgba(*color)
-
-# if proc.cmd == 'modprobe':
-# ctx.set_source_rgba(0,0,0,1)
-
+ ctx.set_source_rgba(*cs.get_color())
for time in times:
render_seg = False
@@ -620,7 +680,7 @@
# render legend if it will fit
if cuml > 8:
- label = proc.cmd
+ label = cs.cmd
extnts = ctx.text_extents(label)
label_w = extnts[2]
label_h = extnts[3]
@@ -628,10 +688,10 @@
labels.append((label,
chart_bounds[0] + chart_bounds[2] - label_w - off_x * 2,
y + (cuml + label_h) / 2))
- if proc in legends:
+ if cs in legends:
print "ARGH - duplicate process in list !"
- legends.append ((proc, process_total_time))
+ legends.append ((cs, process_total_time))
below = row
@@ -662,12 +722,12 @@
legends.sort(lambda a, b: cmp (b[1], a[1]))
ctx.set_font_size(TEXT_FONT_SIZE)
for t in legends:
- proc = t[0]
+ cs = t[0]
time = t[1]
x = chart_bounds[0] + off_x + int (i/LEGENDS_PER_COL) * label_width
y = chart_bounds[1] + font_height * ((i % LEGENDS_PER_COL) + 2)
- str = "%s - %.0f(ms) (%2.2f%%)" % (proc.cmd, time/1000000, (time/total_time) * 100.0)
- draw_legend_box(ctx, str, pid_to_color [proc.pid], x, y, leg_s)
+ str = "%s - %.0f(ms) (%2.2f%%)" % (cs.cmd, time/1000000, (time/total_time) * 100.0)
+ draw_legend_box(ctx, str, cs.color, x, y, leg_s)
i = i + 1
if i >= LEGENDS_TOTAL:
break
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/pybootchartgui/gui.py new/bootchart2-0.12.4/pybootchartgui/gui.py
--- old/bootchart2-0.12.1/pybootchartgui/gui.py 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/pybootchartgui/gui.py 2010-10-24 16:26:26.000000000 +0200
@@ -158,13 +158,14 @@
return False
def on_area_scroll_event(self, area, event):
- if event.direction == gtk.gdk.SCROLL_UP:
- self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT)
- return True
- if event.direction == gtk.gdk.SCROLL_DOWN:
- self.zoom_image(self.zoom_ratio / self.ZOOM_INCREMENT)
- return True
- return False
+ if event.state & gtk.gdk.CONTROL_MASK:
+ if event.direction == gtk.gdk.SCROLL_UP:
+ self.zoom_image(self.zoom_ratio * self.ZOOM_INCREMENT)
+ return True
+ if event.direction == gtk.gdk.SCROLL_DOWN:
+ self.zoom_image(self.zoom_ratio / self.ZOOM_INCREMENT)
+ return True
+ return False
def on_area_motion_notify(self, area, event):
state = event.state
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/pybootchartgui/main.py new/bootchart2-0.12.4/pybootchartgui/main.py
--- old/bootchart2-0.12.1/pybootchartgui/main.py 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/pybootchartgui/main.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,161 +0,0 @@
-# This file is part of pybootchartgui.
-
-# pybootchartgui is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# pybootchartgui is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>.
-
-import sys
-import os
-import optparse
-
-import parsing
-import gui
-import batch
-
-def _mk_options_parser():
- """Make an options parser."""
- usage = "%prog [options] PATH, ..., PATH"
- version = "%prog v0.0.0"
- parser = optparse.OptionParser(usage, version=version)
- parser.add_option("-i", "--interactive", action="store_true", dest="interactive", default=False,
- help="start in active mode")
- parser.add_option("-f", "--format", dest="format", default = None,
- help="image format (...); default format ...")
- parser.add_option("-o", "--output", dest="output", metavar="PATH", default="bootchart.png",
- help="output path (file or directory) where charts are stored")
- parser.add_option("-n", "--no-prune", action="store_false", dest="prune", default=True,
- help="do not prune the process tree")
- parser.add_option("-q", "--quiet", action="store_true", dest="quiet", default=False,
- help="suppress informational messages")
- parser.add_option("-t", "--boot-time", action="store_true", dest="boottime", default=False,
- help="only display the boot time of the boot in text format (stdout)")
- parser.add_option("--very-quiet", action="store_true", dest="veryquiet", default=False,
- help="suppress all messages except errors")
- parser.add_option("--verbose", action="store_true", dest="verbose", default=False,
- help="print all messages")
- parser.add_option("--profile", action="store_true", dest="profile", default=False,
- help="profile rendering of chart (only useful when in batch mode indicated by -f)")
- parser.add_option("--show-pid", action="store_true", dest="show_pid", default=False,
- help="show process ids in the bootchart as 'processname [pid]'")
- parser.add_option("--show-all", action="store_true", dest="show_all", default=False,
- help="show all process information in the bootchart as '/process/path/exe [pid] [args]'")
- parser.add_option("--crop-after", dest="crop_after", metavar="PROCESS", default=None,
- help="crop chart when idle after PROCESS is started")
- parser.add_option("--annotate", action="append", dest="annotate", metavar="PROCESS", default=None,
- help="annotate position where PROCESS is started; can be specified multiple times. " +
- "To create a single annotation when any one of a set of processes is started, use commas to separate the names")
- parser.add_option("--annotate-file", dest="annotate_file", metavar="FILENAME", default=None,
- help="filename to write annotation points to")
- return parser
-
-class Writer:
- def __init__(self, write, options):
- self.write = write
- self.options = options
-
- def error(self, msg):
- self.write(msg)
-
- def warn(self, msg):
- if not self.options.quiet:
- self.write(msg)
-
- def info(self, msg):
- if self.options.verbose:
- self.write(msg)
-
- def status(self, msg):
- if not self.options.quiet:
- self.write(msg)
-
-def _mk_writer(options):
- def write(s):
- print s
- return Writer(write, options)
-
-def _get_filename(paths, options):
- """Construct a usable filename for outputs based on the paths and options given on the commandline."""
- dname = ""
- fname = "bootchart"
- if options.output and not(os.path.isdir(options.output)):
- return options.output
- if options.output:
- dname = options.output
- if len (paths) == 1:
- path = paths[0]
- if os.path.isdir(path):
- fname = os.path.split(path)[-1]
- elif os.path.splitext(path)[1] in [".tar", ".tgz", ".tar.gz"]:
- fname = os.path.splitext(path)[0]
- return os.path.join (dname, fname + "." + options.format)
-
-def main(argv=None):
- try:
- if argv is None:
- argv = sys.argv[1:]
-
- parser = _mk_options_parser()
- options, args = parser.parse_args(argv)
- writer = _mk_writer(options)
-
- if len(args) == 0:
- print "No path given, trying /var/log/bootchart.tgz"
- args = [ "/var/log/bootchart.tgz" ]
-
-
- res = parsing.parse(writer, args, options.prune,
- options.crop_after, options.annotate)
-
- if options.interactive or options.output == None:
- gui.show(res, options)
- elif options.boottime:
- import math
- proc_tree = res[3]
- if proc_tree.idle:
- duration = proc_tree.idle
- else:
- duration = proc_tree.duration
- dur = duration / 100.0
- print '%02d:%05.2f' % (math.floor(dur/60), dur - 60 * math.floor(dur/60))
- else:
- if options.annotate_file:
- f = open (options.annotate_file, "w")
- try:
- for time in res[4]:
- if time is not None:
- # output as ms
- print >> f, time * 10
- else:
- print >> f
- finally:
- f.close()
- filename = _get_filename(args, options)
- def render():
- batch.render(writer, res, options, filename)
- if options.profile:
- import cProfile
- import pstats
- profile = '%s.prof' % os.path.splitext(filename)[0]
- cProfile.runctx('render()', globals(), locals(), profile)
- p = pstats.Stats(profile)
- p.strip_dirs().sort_stats('time').print_stats(20)
- else:
- render()
-
- return 0
- except parsing.ParseError, ex:
- print("Parse error: %s" % ex)
- return 2
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/pybootchartgui/main.py.in new/bootchart2-0.12.4/pybootchartgui/main.py.in
--- old/bootchart2-0.12.1/pybootchartgui/main.py.in 1970-01-01 01:00:00.000000000 +0100
+++ new/bootchart2-0.12.4/pybootchartgui/main.py.in 2010-10-24 16:26:26.000000000 +0200
@@ -0,0 +1,164 @@
+#
+# ***********************************************************************
+# Warning: This file is auto-generated from main.py.in - edit it there.
+# ***********************************************************************
+#
+# pybootchartgui is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# pybootchartgui is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with pybootchartgui. If not, see <http://www.gnu.org/licenses/>.
+
+import sys
+import os
+import optparse
+
+import parsing
+import gui
+import batch
+
+def _mk_options_parser():
+ """Make an options parser."""
+ usage = "%prog [options] PATH, ..., PATH"
+ version = "%prog v@VER@"
+ parser = optparse.OptionParser(usage, version=version)
+ parser.add_option("-i", "--interactive", action="store_true", dest="interactive", default=False,
+ help="start in active mode")
+ parser.add_option("-f", "--format", dest="format", default = None,
+ help="image format (...); default format ...")
+ parser.add_option("-o", "--output", dest="output", metavar="PATH", default="bootchart.png",
+ help="output path (file or directory) where charts are stored")
+ parser.add_option("-n", "--no-prune", action="store_false", dest="prune", default=True,
+ help="do not prune the process tree")
+ parser.add_option("-q", "--quiet", action="store_true", dest="quiet", default=False,
+ help="suppress informational messages")
+ parser.add_option("-t", "--boot-time", action="store_true", dest="boottime", default=False,
+ help="only display the boot time of the boot in text format (stdout)")
+ parser.add_option("--very-quiet", action="store_true", dest="veryquiet", default=False,
+ help="suppress all messages except errors")
+ parser.add_option("--verbose", action="store_true", dest="verbose", default=False,
+ help="print all messages")
+ parser.add_option("--profile", action="store_true", dest="profile", default=False,
+ help="profile rendering of chart (only useful when in batch mode indicated by -f)")
+ parser.add_option("--show-pid", action="store_true", dest="show_pid", default=False,
+ help="show process ids in the bootchart as 'processname [pid]'")
+ parser.add_option("--show-all", action="store_true", dest="show_all", default=False,
+ help="show all process information in the bootchart as '/process/path/exe [pid] [args]'")
+ parser.add_option("--crop-after", dest="crop_after", metavar="PROCESS", default=None,
+ help="crop chart when idle after PROCESS is started")
+ parser.add_option("--annotate", action="append", dest="annotate", metavar="PROCESS", default=None,
+ help="annotate position where PROCESS is started; can be specified multiple times. " +
+ "To create a single annotation when any one of a set of processes is started, use commas to separate the names")
+ parser.add_option("--annotate-file", dest="annotate_file", metavar="FILENAME", default=None,
+ help="filename to write annotation points to")
+ return parser
+
+class Writer:
+ def __init__(self, write, options):
+ self.write = write
+ self.options = options
+
+ def error(self, msg):
+ self.write(msg)
+
+ def warn(self, msg):
+ if not self.options.quiet:
+ self.write(msg)
+
+ def info(self, msg):
+ if self.options.verbose:
+ self.write(msg)
+
+ def status(self, msg):
+ if not self.options.quiet:
+ self.write(msg)
+
+def _mk_writer(options):
+ def write(s):
+ print s
+ return Writer(write, options)
+
+def _get_filename(paths, options):
+ """Construct a usable filename for outputs based on the paths and options given on the commandline."""
+ dname = ""
+ fname = "bootchart"
+ if options.output and not(os.path.isdir(options.output)):
+ return options.output
+ if options.output:
+ dname = options.output
+ if len (paths) == 1:
+ path = paths[0]
+ if os.path.isdir(path):
+ fname = os.path.split(path)[-1]
+ elif os.path.splitext(path)[1] in [".tar", ".tgz", ".tar.gz"]:
+ fname = os.path.splitext(path)[0]
+ return os.path.join (dname, fname + "." + options.format)
+
+def main(argv=None):
+ try:
+ if argv is None:
+ argv = sys.argv[1:]
+
+ parser = _mk_options_parser()
+ options, args = parser.parse_args(argv)
+ writer = _mk_writer(options)
+
+ if len(args) == 0:
+ print "No path given, trying /var/log/bootchart.tgz"
+ args = [ "/var/log/bootchart.tgz" ]
+
+
+ res = parsing.parse(writer, args, options.prune,
+ options.crop_after, options.annotate)
+
+ if options.interactive or options.output == None:
+ gui.show(res, options)
+ elif options.boottime:
+ import math
+ proc_tree = res[3]
+ if proc_tree.idle:
+ duration = proc_tree.idle
+ else:
+ duration = proc_tree.duration
+ dur = duration / 100.0
+ print '%02d:%05.2f' % (math.floor(dur/60), dur - 60 * math.floor(dur/60))
+ else:
+ if options.annotate_file:
+ f = open (options.annotate_file, "w")
+ try:
+ for time in res[4]:
+ if time is not None:
+ # output as ms
+ print >> f, time * 10
+ else:
+ print >> f
+ finally:
+ f.close()
+ filename = _get_filename(args, options)
+ def render():
+ batch.render(writer, res, options, filename)
+ if options.profile:
+ import cProfile
+ import pstats
+ profile = '%s.prof' % os.path.splitext(filename)[0]
+ cProfile.runctx('render()', globals(), locals(), profile)
+ p = pstats.Stats(profile)
+ p.strip_dirs().sort_stats('time').print_stats(20)
+ else:
+ render()
+
+ return 0
+ except parsing.ParseError, ex:
+ print("Parse error: %s" % ex)
+ return 2
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/pybootchartgui/parsing.py new/bootchart2-0.12.4/pybootchartgui/parsing.py
--- old/bootchart2-0.12.1/pybootchartgui/parsing.py 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/pybootchartgui/parsing.py 2010-10-24 16:26:26.000000000 +0200
@@ -212,21 +212,17 @@
def _parse_proc_disk_stat_log(file, numCpu):
"""
- Parse file for disk stats, but only look at the whole disks, eg. sda,
+ Parse file for disk stats, but only look at the whole device, eg. sda,
not sda1, sda2 etc. The format of relevant lines should be:
{major minor name rio rmerge rsect ruse wio wmerge wsect wuse running use aveq}
"""
- disk_regex_re = re.compile ('^[hsv]d.$')
-
+ disk_regex_re = re.compile ('^([hsv]d.|mtdblock\d|mmcblk\d)$')
+
# this gets called an awful lot.
def is_relevant_line(linetokens):
if len(linetokens) != 14:
return False
disk = linetokens[2]
- if len (disk) != 3:
- return False
- if disk == 'sda':
- return True
return disk_regex_re.match(disk)
disk_stat_samples = []
@@ -253,6 +249,28 @@
return disk_stats
+def _parse_proc_meminfo_log(file):
+ """
+ Parse file for global memory statistics.
+ The format of relevant lines should be: ^key: value( unit)?
+ """
+
+ mem_stats = []
+
+ for time, lines in _parse_timed_blocks(file):
+ sample = MemSample(time)
+
+ for line in lines:
+ match = re.match('([^ \t:]+):\s*(\d+).*', line)
+ if match:
+ sample.add_value(match.group(1), int(match.group(2)))
+ else:
+ raise ParseError("Invalid meminfo line \"%s\"" % match.groups(0))
+
+ mem_stats.append(sample)
+
+ return mem_stats
+
# if we boot the kernel with: initcall_debug printk.time=1 we can
# get all manner of interesting data from the dmesg output
# We turn this into a pseudo-process tree: each event is
@@ -273,6 +291,8 @@
inc = 1.0 / 1000000
kernel = Process(writer, idx, "k-boot", 0, 0.1)
processMap['k-boot'] = kernel
+ base_ts = False
+ max_ts = 0
for line in file.read().split('\n'):
t = timestamp_re.match (line)
if t is None:
@@ -280,6 +300,19 @@
continue
time_ms = float (t.group(1)) * 1000
+ # looks like we may have a huge diff after the clock
+ # has been set up. This could lead to huge graph:
+ # so huge we will be killed by the OOM.
+ # So instead of using the plain timestamp we will
+ # use a delta to first one and skip the first one
+ # for convenience
+ if max_ts == 0 and not base_ts and time_ms > 1000:
+ base_ts = time_ms
+ continue
+ max_ts = max(time_ms, max_ts)
+ if base_ts:
+# print "fscked clock: used %f instead of %f" % (time_ms - base_ts, time_ms)
+ time_ms -= base_ts
m = split_re.match (t.group(2))
if m is None:
@@ -379,14 +412,14 @@
if headers is None:
return 1
if headers.get("system.cpu.num"):
- return int (headers.get("system.cpu.num"))
+ return max (int (headers.get("system.cpu.num")), 1)
cpu_model = headers.get("system.cpu")
if cpu_model is None:
return 1
mat = re.match(".*\\((\\d+)\\)", cpu_model)
if mat is None:
return 1
- return int(mat.group(1))
+ return max (int(mat.group(1)), 1)
class ParserState:
def __init__(self):
@@ -399,6 +432,7 @@
self.kernel = None
self.filename = None
self.parent_map = None
+ self.mem_stats = None
def valid(self):
return self.headers != None and self.disk_stats != None and \
@@ -465,6 +499,8 @@
state.taskstats = True
elif name == "proc_stat.log":
state.cpu_stats = _parse_proc_stat_log(file)
+ elif name == "proc_meminfo.log":
+ state.mem_stats = _parse_proc_meminfo_log(file)
elif name == "dmesg":
state.kernel = _parse_dmesg(writer, file)
elif name == "cmdline2.log":
@@ -616,4 +652,4 @@
monitored_app = state.headers.get("profile.process")
proc_tree = ProcessTree(writer, state.kernel, state.ps_stats, monitored_app, prune, idle, state.taskstats)
- return (state.headers, state.cpu_stats, state.disk_stats, proc_tree, times, state.filename)
+ return (state.headers, state.cpu_stats, state.disk_stats, state.mem_stats, proc_tree, times, state.filename)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/pybootchartgui/process_tree.py new/bootchart2-0.12.4/pybootchartgui/process_tree.py
--- old/bootchart2-0.12.1/pybootchartgui/process_tree.py 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/pybootchartgui/process_tree.py 2010-10-24 16:26:26.000000000 +0200
@@ -211,7 +211,7 @@
if is_app_tree:
for child in p.child_list:
- self.__merge_processes(p, child)
+ self.merge_processes(p, child)
num_removed += 1
p.child_list = []
else:
@@ -228,7 +228,7 @@
if processes in processes and len(p.child_list) > 0:
subtreemap = self.getProcessMap(p.child_list)
for child in subtreemap.values():
- self.__merge_processes(p, child)
+ self.merge_processes(p, child)
num_removed += len(subtreemap)
p.child_list = []
p.cmd += " (+)"
@@ -251,7 +251,7 @@
idx -= 1
num_removed += 1
p.child_list.extend(nextp.child_list)
- self.__merge_processes(p, nextp)
+ self.merge_processes(p, nextp)
num_removed += self.merge_siblings(p.child_list)
idx += 1
if len(process_subtree) > 0:
@@ -271,14 +271,14 @@
if len(p.child_list) == 1 and p.child_list[0].cmd == p.cmd:
child = p.child_list[0]
p.child_list = list(child.child_list)
- self.__merge_processes(p, child)
+ self.merge_processes(p, child)
num_removed += 1
continue
num_removed += self.merge_runs(p.child_list)
idx += 1
return num_removed
- def __merge_processes(self, p1, p2):
+ def merge_processes(self, p1, p2):
"""Merges two process' samples."""
p1.samples.extend(p2.samples)
p1.samples.sort( key = lambda p: p.time )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/pybootchartgui/samples.py new/bootchart2-0.12.4/pybootchartgui/samples.py
--- old/bootchart2-0.12.1/pybootchartgui/samples.py 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/pybootchartgui/samples.py 2010-10-24 16:26:26.000000000 +0200
@@ -32,7 +32,15 @@
def __str__(self):
return str(self.time) + "\t" + str(self.user) + "\t" + \
str(self.sys) + "\t" + str(self.io) + "\t" + str (self.swap)
-
+
+class MemSample:
+ def __init__(self, time):
+ self.time = time
+ self.records = {}
+
+ def add_value(self, name, value):
+ self.records[name] = value
+
class ProcessSample:
def __init__(self, time, state, cpu_sample):
self.time = time
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/pybootchartgui/tests/parser_test.py new/bootchart2-0.12.4/pybootchartgui/tests/parser_test.py
--- old/bootchart2-0.12.1/pybootchartgui/tests/parser_test.py 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/pybootchartgui/tests/parser_test.py 2010-10-24 16:26:26.000000000 +0200
@@ -89,8 +89,8 @@
self.assert_(floatEq(float(tokens[3]), sample.io))
def testParseLogDir(self):
- res = parsing.parse(writer, [self.rootdir], False)
- self.assertEqual(4, len(res))
+ res = parsing.parse(writer, [self.rootdir], False, None, None)
+ self.assertEqual(6, len(res))
if __name__ == '__main__':
unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bootchart2-0.12.1/setup.py new/bootchart2-0.12.4/setup.py
--- old/bootchart2-0.12.1/setup.py 2010-07-15 12:02:18.000000000 +0200
+++ new/bootchart2-0.12.4/setup.py 2010-10-24 16:26:26.000000000 +0200
@@ -1,7 +1,19 @@
from distutils.core import setup
+from os import environ
+
+if 'PKG_VER' in environ:
+ VERSION = environ['PKG_VER']
+else:
+ VERSION = ''
+
setup(name = 'pybootchartgui',
+ version = VERSION,
description = 'Python bootchart graph utility',
+ url = 'http://github.com/mmeeks/bootchart/',
+
+ maintainer = 'Michael Meeks',
+ maintainer_email = 'michael.meeks(a)novell.com',
packages = ['pybootchartgui'],
package_dir = {'pybootchartgui': 'pybootchartgui'},
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package build for openSUSE:Factory
checked in at Thu Oct 28 15:30:44 CEST 2010.
--------
--- build/build.changes 2010-10-15 12:39:46.000000000 +0200
+++ build/build.changes 2010-10-27 15:50:43.000000000 +0200
@@ -1,0 +2,14 @@
+Wed Oct 27 13:38:48 UTC 2010 - lnussel(a)suse.de
+
+- use '.drpm' suffix instead of '.delta.rpm' for delta rpms
+- makedeltarpms -> mkdrpms and also rename subpackage to match
+ script name
+- since mkdrpms needs Build.pm make perl-TimeDate dependency of
+ build optional
+
+-------------------------------------------------------------------
+Mon Oct 18 14:38:16 UTC 2010 - lnussel(a)suse.de
+
+- add missing optional perl dependencies
+
+-------------------------------------------------------------------
@@ -15,0 +30,5 @@
+
+-------------------------------------------------------------------
+Mon Sep 20 12:25:56 UTC 2010 - lnussel(a)suse.de
+
+- package mkdrpms script in separate package
calling whatdependson for head-i586
Old:
----
build-2010.10.12.tar.gz
New:
----
_service
_service:recompress:tar_scm:build-2010.10.27.tar.gz
_service:set_version:build.dsc
_service:set_version:build.spec
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _service:set_version:build.spec ++++++
#
# spec file for package build (Version 2010.10.27)
#
# Copyright (c) 2010 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: build
License: GPLv2+
Group: Development/Tools/Building
AutoReqProv: on
Summary: A Script to Build SUSE Linux RPMs
Version: 2010.10.27
Release: 1
#!BuildIgnore: build-mkbaselibs
Source: build-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
# Manual requires to avoid hard require to bash-static
AutoReqProv: off
# Keep the following dependencies in sync with obs-worker package
Requires: bash
Requires: perl
Requires: binutils
Requires: tar
# None of them are actually required for core features.
# Perl helper scripts use them.
%if 0%{?suse_version}
Recommends: perl(Date::Language)
Recommends: perl(Date::Parse)
Recommends: perl(LWP::UserAgent)
Recommends: perl(Pod::Usage)
Recommends: perl(Time::Zone)
Recommends: perl(URI)
Recommends: perl(XML::Parser)
%endif
%description
This package provides a script for building RPMs for SUSE Linux in a
chroot environment.
%if 0%{?suse_version} > 1120 || ! 0%{?suse_version}
Requires: build-mkbaselibs
Recommends: build-mkdrpms
%package mkbaselibs
License: GPLv2+
Group: Development/Tools/Building
Summary: Tools to generate base lib packages
# NOTE: this package must not have dependencies which may break boot strapping (eg. perl modules)
%description mkbaselibs
This package contains the parts which may be installed in the inner build system
for generating base lib packages.
%package mkdrpms
License: GPLv2+
Group: Development/Tools/Building
Summary: Tools to generate delta rpms
Requires: deltarpm
# XXX: we wanted to avoid that but mkdrpms needs Build::Rpm::rpmq
Requires: build
%description mkdrpms
This package contains the parts which may be installed in the inner build system
for generating delta rpm packages.
%endif
%prep
%setup -q
%build
%install
make DESTDIR=$RPM_BUILD_ROOT install
cd $RPM_BUILD_ROOT/usr/lib/build/configs/
%if 0%{?sles_version}
ln -s sles%{sles_version}.conf default.conf
%else
%if 0%{?suse_version}
V=%suse_version
ln -s sl${V:0:2}.${V:2:1}.conf default.conf
%endif
%endif
%files
%defattr(-,root,root)
%doc README
/usr/bin/build
/usr/bin/buildvc
/usr/bin/unrpm
/usr/lib/build
%{_mandir}/man1/build.1*
%if 0%{?suse_version} > 1120 || ! 0%{?suse_version}
%exclude /usr/lib/build/mkbaselibs
%exclude /usr/lib/build/baselibs*
%exclude /usr/lib/build/mkdrpms
%files mkbaselibs
%defattr(-,root,root)
%dir /usr/lib/build
/usr/lib/build/mkbaselibs
/usr/lib/build/baselibs*
%files mkdrpms
%defattr(-,root,root)
%dir /usr/lib/build
/usr/lib/build/mkdrpms
%endif
%changelog
++++++ build.spec ++++++
--- /var/tmp/diff_new_pack.L8FeDR/_old 2010-10-28 15:27:06.000000000 +0200
+++ /var/tmp/diff_new_pack.L8FeDR/_new 2010-10-28 15:27:06.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package build (Version 2010.10.12)
+# spec file for package build (Version 2010.10.27)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -23,21 +23,8 @@
Group: Development/Tools/Building
AutoReqProv: on
Summary: A Script to Build SUSE Linux RPMs
-Version: 2010.10.12
+Version: 2010.10.27
Release: 1
-# osc rm build-*tar.bz2
-# REVISION=$(svn info https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/build | sed -ne "/Revision: /s///p")
-# VERSION="$(date +"%Y.%m.%d").r$REVISION"
-# svn export -r$REVISION https://forgesvn1.novell.com/svn/opensuse/trunk/buildservice/src/build build-$VERSION
-# tar cjvf build-$VERSION.tar.bz2 build-$VERSION
-# rm -rf build-$VERSION
-# osc add build-$VERSION.tar.bz2
-# # There's several occurences of "Version: something" in this file,
-# # two of them valid, so we need to be picky in the match.
-# sed --in-place build.spec -e"/\(Version:\?[[:space:]]\+\)\([0-9]\{4\}\.[0-9][0-9]\.[0-9][0-9]\.r[0-9]\+\)/s,,\1$VERSION,"
-# osc build build.spec
-# osc ci
-# osc submitreq create -m"current svn snapshot." openSUSE:Tools build openSUSE:Factory
#!BuildIgnore: build-mkbaselibs
Source: build-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -47,9 +34,19 @@
# Keep the following dependencies in sync with obs-worker package
Requires: bash
Requires: perl
-Requires: perl-TimeDate
Requires: binutils
Requires: tar
+# None of them are actually required for core features.
+# Perl helper scripts use them.
+%if 0%{?suse_version}
+Recommends: perl(Date::Language)
+Recommends: perl(Date::Parse)
+Recommends: perl(LWP::UserAgent)
+Recommends: perl(Pod::Usage)
+Recommends: perl(Time::Zone)
+Recommends: perl(URI)
+Recommends: perl(XML::Parser)
+%endif
%description
This package provides a script for building RPMs for SUSE Linux in a
@@ -58,6 +55,7 @@
%if 0%{?suse_version} > 1120 || ! 0%{?suse_version}
Requires: build-mkbaselibs
+Recommends: build-mkdrpms
%package mkbaselibs
License: GPLv2+
@@ -68,6 +66,19 @@
%description mkbaselibs
This package contains the parts which may be installed in the inner build system
for generating base lib packages.
+
+%package mkdrpms
+License: GPLv2+
+Group: Development/Tools/Building
+Summary: Tools to generate delta rpms
+Requires: deltarpm
+# XXX: we wanted to avoid that but mkdrpms needs Build::Rpm::rpmq
+Requires: build
+
+%description mkdrpms
+This package contains the parts which may be installed in the inner build system
+for generating delta rpm packages.
+
%endif
%prep
@@ -99,12 +110,18 @@
%if 0%{?suse_version} > 1120 || ! 0%{?suse_version}
%exclude /usr/lib/build/mkbaselibs
%exclude /usr/lib/build/baselibs*
+%exclude /usr/lib/build/mkdrpms
%files mkbaselibs
%defattr(-,root,root)
%dir /usr/lib/build
/usr/lib/build/mkbaselibs
/usr/lib/build/baselibs*
+
+%files mkdrpms
+%defattr(-,root,root)
+%dir /usr/lib/build
+/usr/lib/build/mkdrpms
%endif
%changelog
++++++ _service ++++++
<services>
<service name="tar_scm"><param name="version">2010.10.27</param><param name="url">git://gitorious.org/opensuse/build.git</param><param name="scm">git</param></service>
<service name="recompress"><param name="compression">gz</param><param name="file">*.tar</param></service>
<service name="set_version"/>
</services>
++++++ _service:set_version:build.dsc ++++++
Format: 1.0
Source: build
Version: 2010.10.27
Binary: build
Maintainer: Adrian Schroeter <adrian(a)suse.de>
Architecture: all
Standards-Version: 3.7.2
Build-Depends: debhelper (>= 4)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package build-compare for openSUSE:Factory
checked in at Thu Oct 28 15:24:49 CEST 2010.
--------
--- build-compare/build-compare.changes 2010-10-24 13:52:30.000000000 +0200
+++ build-compare/build-compare.changes 2010-10-28 11:49:54.000000000 +0200
@@ -1,0 +2,20 @@
+Thu Oct 28 09:49:14 UTC 2010 - aj(a)suse.de
+
+- If source file is different, do not compare binaries with check-all.
+
+-------------------------------------------------------------------
+Wed Oct 27 11:59:15 UTC 2010 - aj(a)suse.de
+
+- Handle /usr/lib/texmf/doc/man as well
+
+-------------------------------------------------------------------
+Tue Oct 26 19:43:39 UTC 2010 - aj(a)suse.de
+
+- Ignore metafont formats.
+
+-------------------------------------------------------------------
+Tue Oct 26 08:37:35 UTC 2010 - aj(a)suse.de
+
+- Enable check-all to check for all differences in all packages.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ build-compare.spec ++++++
--- /var/tmp/diff_new_pack.mqbKBn/_old 2010-10-28 15:17:56.000000000 +0200
+++ /var/tmp/diff_new_pack.mqbKBn/_new 2010-10-28 15:17:56.000000000 +0200
@@ -24,7 +24,7 @@
AutoReqProv: on
Summary: Build Result Compare Script
Version: 2009.10.14
-Release: 25
+Release: 26
Source1: COPYING
Source2: same-build-result.sh
Source3: rpm-check.sh
++++++ rpm-check.sh ++++++
--- /var/tmp/diff_new_pack.mqbKBn/_old 2010-10-28 15:17:56.000000000 +0200
+++ /var/tmp/diff_new_pack.mqbKBn/_new 2010-10-28 15:17:56.000000000 +0200
@@ -103,6 +103,7 @@
exit 0
;;
1)
+ echo "RPM meta information is different"
exit 1
;;
2)
@@ -307,7 +308,7 @@
sed -i -e 's| 3 "20..-..-.." "perl v5....." "User Contributed Perl Documentation"$| 3 "2009-01-01" "perl v5.10.0" "User Contributed Perl Documentation"|' $f
done
;;
- /usr/share/man/man*/*)
+ /usr/share/man/man*/*|/usr/lib/texmf/doc/man/*/*)
# Handles lines like:
# .TH debhelper 7 "2010-02-27" "7.4.15" "Debhelper"
# .TH DIRMNGR-CLIENT 1 2010-02-27 "Dirmngr 1.0.3" "GNU Privacy Guard"
@@ -337,8 +338,10 @@
sed -i -e 's|Compiled by abuild@.* on ... ... .. ..:..:.. 20..$|compiled by abuild@buildhost on Wed Jul 01 00:00:00 2009|' $f
done
;;
- /var/lib/texmf/web2c/*/*fmt)
- # binary dump of latex formats, we can ignore them for good
+ /var/lib/texmf/web2c/*/*fmt |\
+ /var/lib/texmf/web2c/metafont/*.base|\
+ /var/lib/texmf/web2c/metapost/*.mem)
+ # binary dump of TeX and Metafont formats, we can ignore them for good
echo "difference in $file ignored."
return 0
;;
++++++ same-build-result.sh ++++++
--- /var/tmp/diff_new_pack.mqbKBn/_old 2010-10-28 15:17:56.000000000 +0200
+++ /var/tmp/diff_new_pack.mqbKBn/_new 2010-10-28 15:17:56.000000000 +0200
@@ -1,9 +1,10 @@
#!/bin/bash
#
-# Copyright (c) 2009, 2010 SUSE Linux Product Gmbh, Germany.
+# Copyright (c) 2009, 2010 SUSE Linux Product GmbH, Germany.
# Licensed under GPL v2, see COPYING file for details.
#
# Written by Adrian Schroeter <adrian(a)suse.de>
+# Enhanced by Andreas Jaeger <aj(a)suse.de>
#
# The script decides if the new build differes from the former one,
# using rpm-check.sh.
@@ -13,6 +14,7 @@
CMPSCRIPT=${0%/*}/rpm-check.sh
SCMPSCRIPT=${0%/*}/srpm-check.sh
+check_all=1
OLDDIR="$1"
shift
NEWDIRS="$*"
@@ -60,6 +62,7 @@
OLDRPMS=($(find "$OLDDIR" -name \*rpm -a ! -name \*src.rpm -a ! -name \*.delta.rpm|sort|grep -v -- -32bit-|grep -v -- -64bit-|grep -v -- '-x86-.*\.ia64\.rpm'))
NEWRPMS=($(find $NEWDIRS -name \*rpm -a ! -name \*src.rpm -a ! -name \*.delta.rpm|sort --field-separator=/ --key=7|grep -v -- -32bit-|grep -v -- -64bit-|grep -v -- '-x86-.*\.ia64\.rpm'))
+SUCCESS=1
rpmqp='rpm -qp --qf %{NAME} --nodigest --nosignature '
for opac in ${OLDRPMS[*]}; do
npac=${NEWRPMS[0]}
@@ -71,7 +74,10 @@
echo "names differ: $oname $nname"
exit 1
fi
- bash $CMPSCRIPT "$opac" "$npac" || exit 1
+ bash $CMPSCRIPT "$opac" "$npac" || SUCCESS=0
+ if test $SUCCESS -eq 0 -a -z "$check_all"; then
+ exit 1
+ fi
done
if [ -n "${NEWRPMS[0]}" ]; then
@@ -79,5 +85,8 @@
exit 1
fi
-echo compare validated built as identical !
+if test $SUCCESS -eq 0; then
+ exit 1
+fi
+echo 'compare validated built as identical !'
exit 0
++++++ srpm-check.sh ++++++
--- /var/tmp/diff_new_pack.mqbKBn/_old 2010-10-28 15:17:56.000000000 +0200
+++ /var/tmp/diff_new_pack.mqbKBn/_new 2010-10-28 15:17:56.000000000 +0200
@@ -66,7 +66,7 @@
sed -i -e "s,Release:.*$release2,Release: @RELEASE@," new/$file
if ! cmp -s old/$file new/$file; then
echo "$file differs (spec file)"
- diff -u old/$file new/$file | head -n 200
+ diff -u old/$file new/$file | head -n 20
return 1
fi
return 0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package digikam for openSUSE:Factory
checked in at Thu Oct 28 15:17:39 CEST 2010.
--------
--- KDE/digikam/digikam.changes 2010-08-31 12:05:01.000000000 +0200
+++ digikam/digikam.changes 2010-10-11 14:19:44.000000000 +0200
@@ -1,0 +2,19 @@
+Mon Oct 11 11:55:06 UTC 2010 - tittiatcoke(a)gmail.com
+
+- Update to version 1.5.0
+ * Bugfixes
+ * New Features:
+ General : Fix compilation under windows with TDM-GCC and
+ MSVC compilers.
+ General : Including LensFun library source code as 3rd-party
+ component, especially for windows target where
+ this library is not available.
+ Image Editor : Improvement of algorithm to convert 8 bits
+ image to 16 and limit histogram holes during
+ conversion.
+ Batch Queue Manager : Add new tool to remove metadata from
+ images.
+ Batch Queue Manager : Add new tool to apply Lens corrections
+ using LensFun library.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
_service:download_url:digikam-1.4.0.tar.bz2
New:
----
_service:download_url:digikam-1.5.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ digikam.spec ++++++
--- /var/tmp/diff_new_pack.goEkjS/_old 2010-10-28 15:16:47.000000000 +0200
+++ /var/tmp/diff_new_pack.goEkjS/_new 2010-10-28 15:16:47.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package digikam (Version 1.4.0)
+# spec file for package digikam (Version 1.5.0)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -26,9 +26,9 @@
License: GPLv2+
Group: Productivity/Graphics/Viewers
Summary: A KDE Photo Manager
-Version: 1.4.0
-Release: 2
-%define tar_version 1.4.0
+Version: 1.5.0
+Release: 1
+%define tar_version 1.5.0
Source0: %name-%{tar_version}.tar.bz2
Source1: %{name}-docs.tar.bz2
Patch1: %{name}-buildtime.patch
++++++ _service ++++++
--- /var/tmp/diff_new_pack.goEkjS/_old 2010-10-28 15:16:47.000000000 +0200
+++ /var/tmp/diff_new_pack.goEkjS/_new 2010-10-28 15:16:47.000000000 +0200
@@ -3,11 +3,11 @@
<service name="download_url">
<param name="protocol">http</param>
<param name="host">downloads.sourceforge.net</param>
- <param name="path">/project/digikam/digikam/1.4.0/digikam-1.4.0.tar.bz2</param>
+ <param name="path">/project/digikam/digikam/1.5.0/digikam-1.5.0.tar.bz2</param>
</service>
<service name="verify_file">
- <param name="file">_service:download_url:digikam-1.4.0.tar.bz2</param>
+ <param name="file">_service:download_url:digikam-1.5.0.tar.bz2</param>
<param name="verifier">sha256</param>
- <param name="checksum">d37afaad8808f78ecda93d7498c64b72eee3bb61911fbeff87d3a528a7247eba</param>
+ <param name="checksum">5f6d2df1fc22c45c065754e43c03286fcf94145683fdb0c50f4c702546e07fef</param>
</service>
</services>
++++++ _service:download_url:digikam-1.4.0.tar.bz2 -> _service:download_url:digikam-1.5.0.tar.bz2 ++++++
KDE/digikam/_service:download_url:digikam-1.4.0.tar.bz2 digikam/_service:download_url:digikam-1.5.0.tar.bz2 differ: char 11, line 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package grub2 for openSUSE:Factory
checked in at Thu Oct 28 15:16:28 CEST 2010.
--------
--- grub2/grub2.changes 2010-10-25 14:39:27.000000000 +0200
+++ grub2/grub2.changes 2010-10-27 16:59:34.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Oct 27 16:57:13 CEST 2010 - jslaby(a)suse.de
+
+- fix vanishing of /boot/grub2/* if /boot/grub/device.map
+ doesn't exist
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ grub2.spec ++++++
--- /var/tmp/diff_new_pack.vrQ1zS/_old 2010-10-28 15:16:07.000000000 +0200
+++ /var/tmp/diff_new_pack.vrQ1zS/_new 2010-10-28 15:16:07.000000000 +0200
@@ -34,7 +34,7 @@
%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu}
%endif
Version: 1.98
-Release: 8
+Release: 9
Summary: Bootloader with support for Linux, Multiboot and more
Group: System/Boot
License: GPLv3+
@@ -111,20 +111,23 @@
%find_lang grub
%post
-exec >/dev/null 2>&1
+mkdir -p /boot/%{name}/ 2>/dev/null || true
# Create device.map or reuse one from GRUB Legacy
-if [ -e /boot/grub/device.map ] ; then
+if [ ! -e /boot/%{name}/device.map ] ; then
cp -u /boot/grub/device.map /boot/%{name}/device.map 2>/dev/null ||
%{name}-mkdevicemap
+fi
+if [ -e /boot/%{name}/device.map ]; then
# Determine the partition with /boot
BOOT_PARTITION=$(df -h /boot |(read; awk '{print $1; exit}'))
# Generate core.img, but don't let it be installed in boot sector
- %{name}-install --grub-setup=/bin/true $BOOT_PARTITION
+ %{name}-install --grub-setup=/bin/true $BOOT_PARTITION || true
+ exec >/dev/null 2>&1
# Remove stale menu.lst entries
- /sbin/update-bootloader --remove --image /boot/%{name}/core.img --name="GNU GRUB 2"
+ /sbin/update-bootloader --remove --image /boot/%{name}/core.img --name="GNU GRUB 2" || true
# Add core.img as multiboot kernel to GRUB Legacy menu
- /sbin/update-bootloader --add --image /boot/%{name}/core.img --name="GNU GRUB 2"
- /sbin/update-bootloader --refresh
+ /sbin/update-bootloader --add --image /boot/%{name}/core.img --name="GNU GRUB 2" || true
+ /sbin/update-bootloader --refresh || true
fi
%preun
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package gtk2-branding-openSUSE for openSUSE:Factory
checked in at Thu Oct 28 15:15:47 CEST 2010.
--------
--- GNOME/gtk2-branding-openSUSE/gtk2-branding-SLED.changes 2010-08-10 03:24:18.000000000 +0200
+++ gtk2-branding-openSUSE/gtk2-branding-SLED.changes 2010-10-28 15:15:31.024781000 +0200
@@ -1,0 +2,5 @@
+Fri Oct 8 11:49:41 CEST 2010 - vuntz(a)opensuse.org
+
+- Bump version to 11.4.
+
+-------------------------------------------------------------------
gtk2-branding-openSUSE.changes: same change
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gtk2-branding-SLED.spec ++++++
--- /var/tmp/diff_new_pack.AeG9Tb/_old 2010-10-28 15:15:35.000000000 +0200
+++ /var/tmp/diff_new_pack.AeG9Tb/_new 2010-10-28 15:15:35.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package gtk2-branding-SLED (Version 11.3)
+# spec file for package gtk2-branding-SLED (Version 11.4)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -24,8 +24,8 @@
# Do not edit this auto generated file! Edit gtk2-branding.spec.in.
Name: gtk2-branding-SLED
-Version: 11.3
-Release: 6
+Version: 11.4
+Release: 1
Group: System/Libraries
License: BSD3c
Summary: SLED theme configuration
gtk2-branding-openSUSE.spec: same change
++++++ gtk2-branding.changes.in ++++++
--- /var/tmp/diff_new_pack.AeG9Tb/_old 2010-10-28 15:15:35.000000000 +0200
+++ /var/tmp/diff_new_pack.AeG9Tb/_new 2010-10-28 15:15:35.000000000 +0200
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Fri Oct 8 11:49:41 CEST 2010 - vuntz(a)opensuse.org
+
+- Bump version to 11.4.
+
+-------------------------------------------------------------------
Sun Aug 8 00:56:42 CEST 2010 - vuntz(a)opensuse.org
- Use Sonar icon theme by default instead of Gilouche. Change
++++++ gtk2-branding.spec.in ++++++
--- /var/tmp/diff_new_pack.AeG9Tb/_old 2010-10-28 15:15:35.000000000 +0200
+++ /var/tmp/diff_new_pack.AeG9Tb/_new 2010-10-28 15:15:35.000000000 +0200
@@ -15,16 +15,17 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
%define build_openSUSE 0
%define build_SLED 0
Url: http://www.gtk.org/
Name: gtk2-branding-%{branding_name}
-Version: 11.3
+Version: 11.4
Release: 1
Group: System/Libraries
-License: BSD 3-Clause
+License: BSD3c
Summary: %{branding_name} theme configuration
Source: gtk2-branding-gtkrc
Source1: gtk2-branding-COPYING
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0