make it work
authorArjan van de Ven <arjan@linux.intel.com>
Wed, 21 Jan 2009 15:39:41 +0000 (07:39 -0800)
committerArjan van de Ven <arjan@linux.intel.com>
Wed, 21 Jan 2009 15:39:41 +0000 (07:39 -0800)
Makefile
coredump.c
corewatcher-applet.c
corewatcher-applet.desktop [new file with mode: 0644]
corewatcher.conf
corewatcher.init [new file with mode: 0755]
icon.png [new file with mode: 0644]
submit.c

index c38205d..0694f3e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -48,10 +48,12 @@ dist: clean
 
 install-system: corewatcher.8.gz
        -mkdir -p $(DESTDIR)$(MANDIR)
+       -mkdir -p $(DESTDIR)/var/lib/corewatcher
        -mkdir -p $(DESTDIR)/etc/dbus-1/system.d/
        install -m 0644 corewatcher.conf $(DESTDIR)/etc/corewatcher.conf
        install -m 0644 corewatcher.dbus $(DESTDIR)/etc/dbus-1/system.d/
        install -m 0644 corewatcher.8.gz $(DESTDIR)$(MANDIR)/
+       install -m 0644 gdb.command  $(DESTDIR)/var/lib/corewatcher/
        @(cd po/ && env LOCALESDIR=$(LOCALESDIR) DESTDIR=$(DESTDIR) $(MAKE) install)
 
 install-corewatcher: corewatcher
index 1aecb9a..fb394ee 100644 (file)
@@ -53,7 +53,7 @@ char *extract_core(char *corefile)
        if (asprintf(&c1, "Program: %s\n", appfile) < 0)
                return NULL;
 
-       if (asprintf(&command, "LANG=C gdb --batch -f %s %s -x gdb.command 2> /dev/null", appfile, corefile) < 0)
+       if (asprintf(&command, "LANG=C gdb --batch -f %s %s -x /var/lib/corewatcher/gdb.command 2> /dev/null", appfile, corefile) < 0)
                return NULL;
                
        file = popen(command, "r");
index 349cdf3..782fceb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * Kerneloops UI applet.
+ * Corewatcher UI applet.
  *
  * Copyright (C) 2007 Intel Corporation
  *
@@ -184,7 +184,7 @@ static void detail_action(NotifyNotification __unused *notify,
        detail_data[statb.st_size] = '\0';
 
        dialog = gtk_dialog_new();
-       gtk_window_set_title(GTK_WINDOW(dialog), _("Kernel failure details"));
+       gtk_window_set_title(GTK_WINDOW(dialog), _("Application failure details"));
        gtk_widget_set_size_request(dialog, 600, 400);
        scrollwindow = gtk_scrolled_window_new(NULL, NULL);
        gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (scrollwindow),
@@ -279,7 +279,7 @@ char url_to_oops[4095];
  */
 static void sent_an_oops(void)
 {
-       char *summary = _("Kernel bug diagnostic information sent");
+       char *summary = _("Application bug diagnostic information sent");
        char *message = NULL;
        char *message_1 =
                _("Diagnostic information from your application has been "
diff --git a/corewatcher-applet.desktop b/corewatcher-applet.desktop
new file mode 100644 (file)
index 0000000..b31558a
--- /dev/null
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=corewatcher applet
+Comment=corewatcher.org privacy question applet
+Icon=stock_alarm
+Exec=corewatcher-applet
+Terminal=false
+Type=Application
+Categories=
+X-GNOME-Autostart-enabled=true
index 8de9906..12fae29 100644 (file)
@@ -4,7 +4,7 @@
 
 #
 # Set the following variable to "yes" if you want to automatically
-# submit your oopses to the database for use by your distribution or the
+# submit your bactraces to the database for use by your distribution or the
 # Moblin developers
 #
 #
 # Enabling this option will cause your system to submit certain application
 # output to the corewatcher.org website, where it will be available via
 # this website to developers and everyone else.
-# The submitted info are so-called "oopses", application crash signature.
-# However, due to the nature of oopses, it may happen that a few 
-# surrounding lines of the oops in the "dmesg" are being sent together
-# with the oops.
+# The submitted info are so-called "backtraces", application crash signature.
+# However, due to the nature of backtraces, it may happen that a few 
+# user inputs are being sent together
+# with the backtrace.
 #
 # Default is "ask" which uses a UI application t ask the user for permission
 #
@@ -23,13 +23,13 @@ allow-submit = ask
 
 #
 # Set the following variable to "yes" if you want to allow your 
-# Linux distribution vendor to pass the oops on to the central corewatcher.org
+# Linux distribution vendor to pass the backtraces on to the central corewatcher.org
 # database as used by the Moblin developers
 #
 allow-pass-on = yes
 
 #
-# URL for submitting the oopses
+# URL for submitting the backtraces
 #
 
-submit-url = http://submit.corewatcher.org/submitoops.php
+submit-url = http://submit.corewatcher.org/submit.php
diff --git a/corewatcher.init b/corewatcher.init
new file mode 100755 (executable)
index 0000000..2308b8f
--- /dev/null
@@ -0,0 +1,90 @@
+#!/bin/bash
+#
+# corewatcher
+#
+# chkconfig:   345 90 88
+# description: A tool that collects and submits crash \
+# signatures to the corewatcher.org website for use by the Moblin \
+# developers.
+# processname: corewatcher
+# config:      /etc/corewatcher.conf
+#
+### BEGIN INIT INFO
+# Provides: corewatcher
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
+# Required-Start: $local_fs $remote_fs $named $network $time $syslog
+# Required-Stop: $local_fs $remote_fs $syslog
+# Short-Description: Tool to automatically collect and submit crash signatures
+# Description: A tool that collects and submits k crash
+#   signatures to the corewatcher.org website for use by the
+#   Moblin developers.
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+
+exec="/usr/sbin/corewatcher"
+prog=$(basename $exec)
+sconf="/etc/corewatcher.conf"
+lockfile=/var/lock/subsys/$prog
+
+[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+
+start() {
+       echo -n $"Starting $prog:"
+       mkdir /var/cores &> /dev/null
+       echo /var/cores > /proc/sys/kernel/core_pattern
+       daemon $prog  $OPTS
+       retval=$?
+       echo
+       [ $retval -eq 0 ] && touch $lockfile
+       return $retval
+}
+
+stop() {
+       echo -n $"Stopping $prog: "
+       killproc $prog
+       retval=$?
+       echo
+       [ $retval -eq 0 ] && rm -f $lockfile
+       return $retval
+}
+
+restart() {
+       stop
+       start
+}
+
+reload() {
+       restart
+}
+
+force_reload() {
+       restart
+}
+
+fdr_status() {
+       status $prog
+}
+
+
+case "$1" in
+       start|stop|restart|reload)
+               $1
+               ;;
+       force-reload)
+               force_reload
+               ;;
+       status)
+               fdr_status
+               ;;
+       condrestart|try-restart)
+               [ -f $lockfile ] || restart
+               ;;
+       *)
+               echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
+               exit 1
+esac
+
diff --git a/icon.png b/icon.png
new file mode 100644 (file)
index 0000000..b9cdcdd
Binary files /dev/null and b/icon.png differ
index a6dcb82..67066c6 100644 (file)
--- a/submit.c
+++ b/submit.c
@@ -232,7 +232,7 @@ void submit_queue(void)
 
                /* set up the POST data */
                curl_formadd(&post, &last,
-                       CURLFORM_COPYNAME, "oopsdata",
+                       CURLFORM_COPYNAME, "backtracedata",
                        CURLFORM_COPYCONTENTS, oops->text, CURLFORM_END);
 
                if (allow_distro_to_pass_on) {