Compare commits
21 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac0b82b71c | ||
|
|
2c0ac49ccc | ||
|
|
f00c7c9410 | ||
|
|
676fa8e740 | ||
|
|
cea4a8486c | ||
|
|
a64b229001 | ||
|
|
a5252c6499 | ||
|
|
65ce231304 | ||
|
|
e22db9a896 | ||
|
|
63df47a421 | ||
|
|
7b75c9be44 | ||
|
|
384effe0df | ||
|
|
36fa1d0a83 | ||
|
|
88ee3acc47 | ||
|
|
8f17954b1a | ||
|
|
13858c6d43 | ||
|
|
f893e2f57c | ||
|
|
b5d0d7c22c | ||
|
|
1b2e1682bd | ||
|
|
8c03ba1f2e | ||
|
|
c093412464 |
21 changed files with 913 additions and 1143 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -7,3 +7,5 @@ abrt-1.1.13.tar.gz
|
|||
/abrt-2.0.2.tar.gz
|
||||
/abrt-2.0.3.tar.gz
|
||||
/abrt-2.0.4.tar.gz
|
||||
/abrt-2.0.6.tar.gz
|
||||
/abrt-2.0.7.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
From 1f52667a18026dba4050368e5d2501ec6145e071 Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
Date: Thu, 21 Jul 2011 09:50:56 +0200
|
||||
Subject: [PATCH 1/4] abrt-gui: launch reporter children with LIBREPORT_GETPID
|
||||
|
||||
By using LIBREPORT_NOWAIT | LIBREPORT_GETPID in abt-gui,
|
||||
we make it so that reporter's SIGCHLD reaches abrt-gui
|
||||
and lets it refresh the list.
|
||||
|
||||
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
---
|
||||
src/gui-gtk/main.c | 5 ++---
|
||||
1 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/gui-gtk/main.c b/src/gui-gtk/main.c
|
||||
index b62e8c0..1409191 100644
|
||||
--- a/src/gui-gtk/main.c
|
||||
+++ b/src/gui-gtk/main.c
|
||||
@@ -204,7 +204,7 @@ static void on_row_activated_cb(GtkTreeView *treeview, GtkTreePath *path, GtkTre
|
||||
gtk_tree_model_get_value(store, &iter, COLUMN_DUMP_DIR, &d_dir);
|
||||
|
||||
const char *dirname = g_value_get_string(&d_dir);
|
||||
- report_problem_in_dir(dirname, LIBREPORT_ANALYZE | LIBREPORT_NOWAIT);
|
||||
+ report_problem_in_dir(dirname, LIBREPORT_ANALYZE | LIBREPORT_NOWAIT | LIBREPORT_GETPID);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,8 +293,7 @@ static void on_button_send_cb(GtkWidget *button, gpointer data)
|
||||
/* why it doesn't want to hide before report ends? */
|
||||
gtk_widget_destroy(s_report_window);
|
||||
|
||||
- int status = report_problem_in_memory(pd, LIBREPORT_NOWAIT);
|
||||
- VERB1 log("Reporting finished with status %i", status);
|
||||
+ report_problem_in_memory(pd, LIBREPORT_NOWAIT | LIBREPORT_GETPID);
|
||||
free_problem_data(pd);
|
||||
}
|
||||
|
||||
--
|
||||
1.7.6
|
||||
|
||||
70
0001-pyhook-add-timetout-to-sockets-rhbz-808562.patch
Normal file
70
0001-pyhook-add-timetout-to-sockets-rhbz-808562.patch
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
From f7d7f594dcd5439bc05187361d55be720f07959e Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f7d7f594dcd5439bc05187361d55be720f07959e.1334151133.git.jmoskovc@redhat.com>
|
||||
From: Jiri Moskovcak <jmoskovc@redhat.com>
|
||||
Date: Wed, 11 Apr 2012 15:31:34 +0200
|
||||
Subject: [PATCH] pyhook: add timetout to sockets rhbz#808562
|
||||
|
||||
---
|
||||
src/hooks/abrt_exception_handler.py.in | 46 ++++++++++++++++++--------------
|
||||
1 file changed, 26 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/hooks/abrt_exception_handler.py.in b/src/hooks/abrt_exception_handler.py.in
|
||||
index 9522a0f..cc00fc7 100644
|
||||
--- a/src/hooks/abrt_exception_handler.py.in
|
||||
+++ b/src/hooks/abrt_exception_handler.py.in
|
||||
@@ -37,26 +37,32 @@ def write_dump(tb):
|
||||
try:
|
||||
import socket
|
||||
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
- s.connect(@VAR_RUN@ + "/abrt/abrt.socket")
|
||||
- s.sendall("PUT / HTTP/1.1\r\n\r\n")
|
||||
- s.sendall("PID=%s\0" % os.getpid())
|
||||
- s.sendall("EXECUTABLE=%s\0" % executable)
|
||||
- s.sendall("ANALYZER=Python\0")
|
||||
- s.sendall("BASENAME=pyhook\0")
|
||||
- # This handler puts a short(er) crash descr in 1st line of the backtrace.
|
||||
- # Example:
|
||||
- # CCMainWindow.py:1:<module>:ZeroDivisionError: integer division or modulo by zero
|
||||
- s.sendall("REASON=%s\0" % tb.splitlines()[0])
|
||||
- s.sendall("BACKTRACE=%s\0" % tb)
|
||||
- s.shutdown(socket.SHUT_WR)
|
||||
-
|
||||
- # Read the response and log if there's anything wrong
|
||||
- response = ""
|
||||
- while True:
|
||||
- buf = s.recv(256)
|
||||
- if not buf:
|
||||
- break;
|
||||
- response += buf
|
||||
+ s.settimeout(5)
|
||||
+ try:
|
||||
+ s.connect(@VAR_RUN@ + "/abrt/abrt.socket")
|
||||
+ s.sendall("PUT / HTTP/1.1\r\n\r\n")
|
||||
+ s.sendall("PID=%s\0" % os.getpid())
|
||||
+ s.sendall("EXECUTABLE=%s\0" % executable)
|
||||
+ s.sendall("ANALYZER=Python\0")
|
||||
+ s.sendall("BASENAME=pyhook\0")
|
||||
+ # This handler puts a short(er) crash descr in 1st line of the backtrace.
|
||||
+ # Example:
|
||||
+ # CCMainWindow.py:1:<module>:ZeroDivisionError: integer division or modulo by zero
|
||||
+ s.sendall("REASON=%s\0" % tb.splitlines()[0])
|
||||
+ s.sendall("BACKTRACE=%s\0" % tb)
|
||||
+ s.shutdown(socket.SHUT_WR)
|
||||
+
|
||||
+
|
||||
+ # Read the response and log if there's anything wrong
|
||||
+ response = ""
|
||||
+ while True:
|
||||
+ buf = s.recv(256)
|
||||
+ if not buf:
|
||||
+ break
|
||||
+ response += buf
|
||||
+ except socket.timeout, ex:
|
||||
+ import syslog
|
||||
+ syslog.syslog("communication with ABRT daemon failed: %s" % str(ex))
|
||||
|
||||
s.close()
|
||||
parts = response.split()
|
||||
--
|
||||
1.7.10
|
||||
|
||||
27
0002-disabled-reporting-to-kerneloops.org.patch
Normal file
27
0002-disabled-reporting-to-kerneloops.org.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
From 3e39d5b9944536a6f4d4f266b3c4961ad8da443e Mon Sep 17 00:00:00 2001
|
||||
From: Jiri <moskovcak@gmail.com>
|
||||
Date: Wed, 7 Dec 2011 10:34:27 +0100
|
||||
Subject: [PATCH 2/5] disabled reporting to kerneloops.org
|
||||
|
||||
- we get lot of complains about dead kerneloops.org and since it's
|
||||
not wihtin our power to fix it -> disable it!
|
||||
---
|
||||
src/plugins/koops_event.conf | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/koops_event.conf b/src/plugins/koops_event.conf
|
||||
index 3b80a1b..2fdccda 100644
|
||||
--- a/src/plugins/koops_event.conf
|
||||
+++ b/src/plugins/koops_event.conf
|
||||
@@ -10,7 +10,7 @@ EVENT=post-create analyzer=Kerneloops
|
||||
reporter-kerneloops
|
||||
|
||||
# report
|
||||
-EVENT=report_Kerneloops analyzer=Kerneloops
|
||||
+#EVENT=report_Kerneloops analyzer=Kerneloops
|
||||
reporter-kerneloops
|
||||
|
||||
EVENT=report_Bugzilla analyzer=Kerneloops
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
|
@ -1,354 +0,0 @@
|
|||
From 3f3655980007d39e0377e76a49fd2937f43f0be7 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Moskovcak <jmoskovc@redhat.com>
|
||||
Date: Thu, 21 Jul 2011 11:02:11 +0200
|
||||
Subject: [PATCH 2/4] gui: split the main window in 2 panes -
|
||||
reported/not-reported
|
||||
|
||||
---
|
||||
src/gui-gtk/main.c | 215 ++++++++++++++++++++++++++++++++++++++++++++--------
|
||||
1 files changed, 182 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/src/gui-gtk/main.c b/src/gui-gtk/main.c
|
||||
index 1409191..776e85a 100644
|
||||
--- a/src/gui-gtk/main.c
|
||||
+++ b/src/gui-gtk/main.c
|
||||
@@ -32,7 +32,9 @@ static const char help_uri[] = "http://docs.fedoraproject.org/en-US/"
|
||||
"Fedora/14/html/Deployment_Guide/ch-abrt.html";
|
||||
|
||||
static GtkListStore *s_dumps_list_store;
|
||||
+static GtkListStore *s_reported_dumps_list_store;
|
||||
static GtkWidget *s_treeview;
|
||||
+static GtkWidget *s_reported_treeview;
|
||||
static GtkWidget *g_main_window;
|
||||
static GtkWidget *s_report_window;
|
||||
|
||||
@@ -40,13 +42,38 @@ enum
|
||||
{
|
||||
COLUMN_SOURCE,
|
||||
COLUMN_REASON,
|
||||
- COLUMN_DIRNAME,
|
||||
COLUMN_LATEST_CRASH_STR,
|
||||
COLUMN_LATEST_CRASH,
|
||||
COLUMN_DUMP_DIR,
|
||||
+ COLUMN_REPORTED_TO,
|
||||
NUM_COLUMNS
|
||||
};
|
||||
|
||||
+//FIXME: maybe we can use strrchr and make this faster...
|
||||
+static char *get_last_line(const char* msg)
|
||||
+{
|
||||
+ const char *curr_end = NULL;
|
||||
+ const char *start = msg;
|
||||
+ const char *end = msg;
|
||||
+
|
||||
+ while((curr_end = strchr(end, '\n')) != NULL)
|
||||
+ {
|
||||
+ end = curr_end;
|
||||
+ curr_end = strchr(end+1, '\n');
|
||||
+ if (curr_end == NULL || strchr(end+2, '\n') == NULL)
|
||||
+ break;
|
||||
+
|
||||
+ start = end+1;
|
||||
+ end = curr_end;
|
||||
+ }
|
||||
+
|
||||
+ //fix the case where reported_to has only 1 line without \n
|
||||
+ if (end == msg)
|
||||
+ end = end + strlen(msg);
|
||||
+
|
||||
+ return xstrndup(start, end - start);
|
||||
+}
|
||||
+
|
||||
static void add_directory_to_dirlist(const char *dirname)
|
||||
{
|
||||
/* Silently ignore *any* errors, not only EACCES.
|
||||
@@ -67,21 +94,11 @@ static void add_directory_to_dirlist(const char *dirname)
|
||||
{
|
||||
time_t t = strtol(time_str, NULL, 10); /* atoi won't work past 2038! */
|
||||
struct tm *ptm = localtime(&t);
|
||||
- size_t time_len = strftime(time_buf, sizeof(time_buf)-1, "%Y-%m-%m %H:%M", ptm);
|
||||
+ size_t time_len = strftime(time_buf, sizeof(time_buf)-1, "%Y-%m-%d %H:%M", ptm);
|
||||
time_buf[time_len] = '\0';
|
||||
}
|
||||
free(time_str);
|
||||
|
||||
- /*
|
||||
- char *msg = dd_load_text_ext(dd, FILENAME_REPORTED_TO, 0
|
||||
- | DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE
|
||||
- | DD_FAIL_QUIETLY_ENOENT
|
||||
- | DD_FAIL_QUIETLY_EACCES
|
||||
- );
|
||||
- const char *reported = (msg ? GTK_STOCK_YES : GTK_STOCK_NO);
|
||||
- free(msg);
|
||||
- */
|
||||
-
|
||||
char *reason = dd_load_text(dd, FILENAME_REASON);
|
||||
|
||||
/* the source of the problem:
|
||||
@@ -102,18 +119,38 @@ static void add_directory_to_dirlist(const char *dirname)
|
||||
);
|
||||
}
|
||||
|
||||
+ char *msg = dd_load_text_ext(dd, FILENAME_REPORTED_TO, 0
|
||||
+ | DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE
|
||||
+ | DD_FAIL_QUIETLY_ENOENT
|
||||
+ | DD_FAIL_QUIETLY_EACCES
|
||||
+ );
|
||||
+
|
||||
+
|
||||
+ GtkListStore *list_store;
|
||||
+
|
||||
+ char *subm_status = NULL;
|
||||
+ if (msg)
|
||||
+ {
|
||||
+ list_store = s_reported_dumps_list_store;
|
||||
+ subm_status = get_last_line(msg);
|
||||
+ }
|
||||
+ else
|
||||
+ list_store = s_dumps_list_store;
|
||||
|
||||
GtkTreeIter iter;
|
||||
- gtk_list_store_append(s_dumps_list_store, &iter);
|
||||
- gtk_list_store_set(s_dumps_list_store, &iter,
|
||||
+ gtk_list_store_append(list_store, &iter);
|
||||
+ gtk_list_store_set(list_store, &iter,
|
||||
COLUMN_SOURCE, source,
|
||||
COLUMN_REASON, reason,
|
||||
- COLUMN_DIRNAME, dd->dd_dirname,
|
||||
//OPTION: time format
|
||||
COLUMN_LATEST_CRASH_STR, time_buf,
|
||||
COLUMN_LATEST_CRASH, time,
|
||||
COLUMN_DUMP_DIR, dirname,
|
||||
+ COLUMN_REPORTED_TO, msg ? subm_status : NULL,
|
||||
-1);
|
||||
+ /* this is safe, subm_status is either null or malloced string from get_last_line */
|
||||
+ free(subm_status);
|
||||
+ free(msg);
|
||||
free(reason);
|
||||
|
||||
dd_close(dd);
|
||||
@@ -123,6 +160,7 @@ static void add_directory_to_dirlist(const char *dirname)
|
||||
static void rescan_dirs_and_add_to_dirlist(void)
|
||||
{
|
||||
gtk_list_store_clear(s_dumps_list_store);
|
||||
+ gtk_list_store_clear(s_reported_dumps_list_store);
|
||||
scan_dirs_and_add_to_dirlist();
|
||||
}
|
||||
|
||||
@@ -232,7 +270,7 @@ static void delete_report(GtkTreeView *treeview)
|
||||
VERB1 log("Deleting '%s'", dump_dir_name);
|
||||
if (delete_dump_dir_possibly_using_abrtd(dump_dir_name) == 0)
|
||||
{
|
||||
- gtk_list_store_remove(s_dumps_list_store, &iter);
|
||||
+ gtk_list_store_remove(GTK_LIST_STORE(store), &iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -262,7 +300,9 @@ static gint on_key_press_event_cb(GtkTreeView *treeview, GdkEventKey *key, gpoin
|
||||
|
||||
static void on_btn_delete_cb(GtkButton *button, gpointer unused)
|
||||
{
|
||||
+ /* delete from both treeviews */
|
||||
delete_report(GTK_TREE_VIEW(s_treeview));
|
||||
+ delete_report(GTK_TREE_VIEW(s_reported_treeview));
|
||||
}
|
||||
|
||||
static void on_menu_help_cb(GtkMenuItem *menuitem, gpointer unused)
|
||||
@@ -421,6 +461,50 @@ static void add_columns(GtkTreeView *treeview)
|
||||
gtk_tree_view_append_column(treeview, column);
|
||||
}
|
||||
|
||||
+static void add_columns_reported(GtkTreeView *treeview)
|
||||
+{
|
||||
+ GtkCellRenderer *renderer;
|
||||
+ GtkTreeViewColumn *column;
|
||||
+
|
||||
+ renderer = gtk_cell_renderer_text_new();
|
||||
+ column = gtk_tree_view_column_new_with_attributes(_("Source"),
|
||||
+ renderer,
|
||||
+ "text",
|
||||
+ COLUMN_SOURCE,
|
||||
+ NULL);
|
||||
+ gtk_tree_view_column_set_resizable(column, TRUE);
|
||||
+ gtk_tree_view_column_set_sort_column_id(column, COLUMN_SOURCE);
|
||||
+ gtk_tree_view_append_column(treeview, column);
|
||||
+
|
||||
+ renderer = gtk_cell_renderer_text_new();
|
||||
+ column = gtk_tree_view_column_new_with_attributes(_("Problem"),
|
||||
+ renderer,
|
||||
+ "text",
|
||||
+ COLUMN_REASON,
|
||||
+ NULL);
|
||||
+ gtk_tree_view_column_set_resizable(column, TRUE);
|
||||
+ gtk_tree_view_column_set_sort_column_id(column, COLUMN_REASON);
|
||||
+ gtk_tree_view_append_column(treeview, column);
|
||||
+
|
||||
+ renderer = gtk_cell_renderer_text_new();
|
||||
+ column = gtk_tree_view_column_new_with_attributes(_("Date Submitted"),
|
||||
+ renderer,
|
||||
+ "text",
|
||||
+ COLUMN_LATEST_CRASH_STR,
|
||||
+ NULL);
|
||||
+ gtk_tree_view_column_set_sort_column_id(column, COLUMN_LATEST_CRASH);
|
||||
+ gtk_tree_view_append_column(treeview, column);
|
||||
+
|
||||
+ renderer = gtk_cell_renderer_text_new();
|
||||
+ column = gtk_tree_view_column_new_with_attributes(_("Submision Result"),
|
||||
+ renderer,
|
||||
+ "text",
|
||||
+ COLUMN_REPORTED_TO,
|
||||
+ NULL);
|
||||
+ //gtk_tree_view_column_set_sort_column_id(column, COLUMN_LATEST_CRASH);
|
||||
+ gtk_tree_view_append_column(treeview, column);
|
||||
+}
|
||||
+
|
||||
static GtkWidget *create_menu(void)
|
||||
{
|
||||
/* main bar */
|
||||
@@ -476,40 +560,102 @@ static GtkWidget *create_main_window(void)
|
||||
gtk_window_set_default_icon_name("abrt");
|
||||
|
||||
GtkWidget *main_vbox = gtk_vbox_new(false, 0);
|
||||
+ /* add menu */
|
||||
+ gtk_box_pack_start(GTK_BOX(main_vbox), create_menu(), false, false, 0);
|
||||
|
||||
- /* Scrolled region inside main window */
|
||||
- GtkWidget *scroll_win = gtk_scrolled_window_new(NULL, NULL);
|
||||
- gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scroll_win),
|
||||
+ GtkWidget *not_subm_vbox = gtk_vbox_new(false, 0);
|
||||
+ gtk_container_set_border_width(GTK_CONTAINER(not_subm_vbox), 10);
|
||||
+ GtkWidget *subm_vbox = gtk_vbox_new(false, 0);
|
||||
+ gtk_container_set_border_width(GTK_CONTAINER(subm_vbox), 10);
|
||||
+
|
||||
+ /* Scrolled region for not reported problems inside main window*/
|
||||
+ GtkWidget *new_problems_scroll_win = gtk_scrolled_window_new(NULL, NULL);
|
||||
+ gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(new_problems_scroll_win),
|
||||
GTK_SHADOW_ETCHED_IN);
|
||||
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll_win),
|
||||
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(new_problems_scroll_win),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
|
||||
- gtk_box_pack_start(GTK_BOX(main_vbox), create_menu(), false, false, 0);
|
||||
- gtk_box_pack_start(GTK_BOX(main_vbox), scroll_win, true, true, 0);
|
||||
- gtk_container_add(GTK_CONTAINER(g_main_window), main_vbox);
|
||||
+ GtkWidget *not_subm_lbl = gtk_label_new(_("Not submitted reports"));
|
||||
+ gtk_misc_set_alignment(GTK_MISC(not_subm_lbl), 0, 0);
|
||||
+ gtk_label_set_markup(GTK_LABEL(not_subm_lbl), _("<b>Not submitted reports</b>"));
|
||||
+
|
||||
+ /* add label for not submitted tree view */
|
||||
+ gtk_box_pack_start(GTK_BOX(not_subm_vbox), not_subm_lbl, false, false, 0);
|
||||
+ gtk_box_pack_start(GTK_BOX(not_subm_vbox), new_problems_scroll_win, true, true, 0);
|
||||
+ gtk_box_pack_start(GTK_BOX(main_vbox), not_subm_vbox, true, true, 0);
|
||||
|
||||
/* Tree view inside scrolled region */
|
||||
s_treeview = gtk_tree_view_new();
|
||||
g_object_set(s_treeview, "rules-hint", 1, NULL); /* use alternating colors */
|
||||
add_columns(GTK_TREE_VIEW(s_treeview));
|
||||
- gtk_container_add(GTK_CONTAINER(scroll_win), s_treeview);
|
||||
+ gtk_container_add(GTK_CONTAINER(new_problems_scroll_win), s_treeview);
|
||||
|
||||
/* Create data store for the list and attach it */
|
||||
- s_dumps_list_store = gtk_list_store_new(NUM_COLUMNS, G_TYPE_STRING, /* source */
|
||||
+ s_dumps_list_store = gtk_list_store_new(NUM_COLUMNS,
|
||||
+ G_TYPE_STRING, /* source */
|
||||
+ G_TYPE_STRING, /* executable */
|
||||
+ G_TYPE_STRING, /* time */
|
||||
+ G_TYPE_INT, /* unix time - used for sort */
|
||||
+ G_TYPE_STRING, /* dump dir path */
|
||||
+ G_TYPE_STRING); /* reported_to */
|
||||
+
|
||||
+
|
||||
+ //FIXME: configurable!!
|
||||
+ gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(s_dumps_list_store),
|
||||
+ COLUMN_LATEST_CRASH,
|
||||
+ GTK_SORT_DESCENDING);
|
||||
+
|
||||
+ gtk_tree_view_set_model(GTK_TREE_VIEW(s_treeview), GTK_TREE_MODEL(s_dumps_list_store));
|
||||
+
|
||||
+ /* Double click/Enter handler */
|
||||
+ g_signal_connect(s_treeview, "row-activated", G_CALLBACK(on_row_activated_cb), NULL);
|
||||
+ /* Delete handler */
|
||||
+ g_signal_connect(s_treeview, "key-press-event", G_CALLBACK(on_key_press_event_cb), NULL);
|
||||
+
|
||||
+ /* scrolled region for reported problems */
|
||||
+ GtkWidget *reported_problems_scroll_win = gtk_scrolled_window_new(NULL, NULL);
|
||||
+ gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(reported_problems_scroll_win),
|
||||
+ GTK_SHADOW_ETCHED_IN);
|
||||
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(reported_problems_scroll_win),
|
||||
+ GTK_POLICY_AUTOMATIC,
|
||||
+ GTK_POLICY_AUTOMATIC);
|
||||
+
|
||||
+ GtkWidget *subm_lbl = gtk_label_new(_("Submitted reports"));
|
||||
+ /* align to left */
|
||||
+ gtk_misc_set_alignment(GTK_MISC(subm_lbl), 0, 0);
|
||||
+ gtk_label_set_markup(GTK_LABEL(subm_lbl), _("<b>Submitted reports</b>"));
|
||||
+
|
||||
+
|
||||
+ /* add label for submitted tree view */
|
||||
+ gtk_box_pack_start(GTK_BOX(subm_vbox), subm_lbl, false, false, 0);
|
||||
+ gtk_box_pack_start(GTK_BOX(subm_vbox), reported_problems_scroll_win, true, true, 0);
|
||||
+ gtk_box_pack_start(GTK_BOX(main_vbox), subm_vbox, true, true, 0);
|
||||
+
|
||||
+ /* Tree view inside scrolled region */
|
||||
+ s_reported_treeview = gtk_tree_view_new();
|
||||
+ g_object_set(s_reported_treeview, "rules-hint", 1, NULL); /* use alternating colors */
|
||||
+ add_columns_reported(GTK_TREE_VIEW(s_reported_treeview));
|
||||
+ gtk_container_add(GTK_CONTAINER(reported_problems_scroll_win), s_reported_treeview);
|
||||
+
|
||||
+ /* Create data store for the list and attach it */
|
||||
+ s_reported_dumps_list_store = gtk_list_store_new(NUM_COLUMNS,
|
||||
+ G_TYPE_STRING, /* source */
|
||||
G_TYPE_STRING, /* executable */
|
||||
- G_TYPE_STRING, /* hostname */
|
||||
G_TYPE_STRING, /* time */
|
||||
G_TYPE_INT, /* unix time - used for sort */
|
||||
G_TYPE_STRING, /* dump dir path */
|
||||
- G_TYPE_STRING);/* row background */
|
||||
+ G_TYPE_STRING); /* reported_to */
|
||||
+
|
||||
|
||||
//FIXME: configurable!!
|
||||
- gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(s_dumps_list_store),
|
||||
+ gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(s_reported_dumps_list_store),
|
||||
COLUMN_LATEST_CRASH,
|
||||
GTK_SORT_DESCENDING);
|
||||
|
||||
- gtk_tree_view_set_model(GTK_TREE_VIEW(s_treeview), GTK_TREE_MODEL(s_dumps_list_store));
|
||||
+
|
||||
+ gtk_tree_view_set_model(GTK_TREE_VIEW(s_reported_treeview), GTK_TREE_MODEL(s_reported_dumps_list_store));
|
||||
+
|
||||
|
||||
/* buttons are homogenous so set size only for one button and it will
|
||||
* work for the rest buttons in same gtk_hbox_new() */
|
||||
@@ -518,20 +664,23 @@ static GtkWidget *create_main_window(void)
|
||||
|
||||
GtkWidget *btn_delete = gtk_button_new_from_stock(GTK_STOCK_DELETE);
|
||||
|
||||
- GtkWidget *hbox_report_delete = gtk_hbox_new(true, 4);
|
||||
+ GtkWidget *hbox_report_delete = gtk_hbox_new(true, 0);
|
||||
gtk_box_pack_start(GTK_BOX(hbox_report_delete), btn_delete, true, true, 0);
|
||||
- gtk_box_pack_start(GTK_BOX(hbox_report_delete), btn_report, true, true, 0);
|
||||
+ gtk_box_pack_start(GTK_BOX(hbox_report_delete), btn_report, true, true, 10);
|
||||
|
||||
GtkWidget *halign = gtk_alignment_new(1, 0, 0, 0);
|
||||
gtk_container_add(GTK_CONTAINER(halign), hbox_report_delete);
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(main_vbox), halign, false, false, 10);
|
||||
|
||||
+ /* put the main_vbox to main window */
|
||||
+ gtk_container_add(GTK_CONTAINER(g_main_window), main_vbox);
|
||||
+
|
||||
/* Double click/Enter handler */
|
||||
- g_signal_connect(s_treeview, "row-activated", G_CALLBACK(on_row_activated_cb), NULL);
|
||||
+ g_signal_connect(s_reported_treeview, "row-activated", G_CALLBACK(on_row_activated_cb), NULL);
|
||||
g_signal_connect(btn_report, "clicked", G_CALLBACK(on_btn_report_cb), NULL);
|
||||
/* Delete handler */
|
||||
- g_signal_connect(s_treeview, "key-press-event", G_CALLBACK(on_key_press_event_cb), NULL);
|
||||
+ g_signal_connect(s_reported_treeview, "key-press-event", G_CALLBACK(on_key_press_event_cb), NULL);
|
||||
g_signal_connect(btn_delete, "clicked", G_CALLBACK(on_btn_delete_cb), NULL);
|
||||
/* Quit when user closes the main window */
|
||||
g_signal_connect(g_main_window, "destroy", gtk_main_quit, NULL);
|
||||
--
|
||||
1.7.6
|
||||
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
From c138894ba3f3e630d7e1af398fcd93ffa862659d Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 13:58:25 +0100
|
||||
Subject: [PATCH 3/5] abrtd: fix potential problem with exitcode check on
|
||||
"post-create"
|
||||
|
||||
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
---
|
||||
src/daemon/abrtd.c | 53 ++++++++++++++++++++++++++-------------------------
|
||||
1 files changed, 27 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
|
||||
index d3a759a..743e40f 100644
|
||||
--- a/src/daemon/abrtd.c
|
||||
+++ b/src/daemon/abrtd.c
|
||||
@@ -313,9 +313,10 @@ static mw_result_t run_post_create_and_load_data(const char *dump_dir_name, prob
|
||||
/* Prevent having zombie child process */
|
||||
int status;
|
||||
safe_waitpid(child, &status, 0);
|
||||
- status = WEXITSTATUS(status);
|
||||
+ /* status = WEXITSTATUS(status); - wrong, we need to check WIFEXITED too */
|
||||
|
||||
- /* exit 0 means, this is a good, non-dup dir */
|
||||
+ /* exit 0 means "this is a good, non-dup dir" */
|
||||
+ /* exit with 1 + "DUP_OF_DIR: dir" string => dup */
|
||||
if (status != 0)
|
||||
{
|
||||
if (!dup_of_dir)
|
||||
@@ -330,34 +331,34 @@ static mw_result_t run_post_create_and_load_data(const char *dump_dir_name, prob
|
||||
* else: MW_ERROR
|
||||
*/
|
||||
mw_result_t res = MW_ERROR;
|
||||
+ struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
|
||||
+ if (!dd)
|
||||
+ /* dd_opendir already emitted error msg */
|
||||
+ goto ret;
|
||||
+
|
||||
+ /* Reset mode/uig/gid to correct values for all files created by event run */
|
||||
+ dd_sanitize_mode_and_owner(dd);
|
||||
+
|
||||
+ /* Update count */
|
||||
+ char *count_str = dd_load_text_ext(dd, FILENAME_COUNT, DD_FAIL_QUIETLY_ENOENT);
|
||||
+ unsigned long count = strtoul(count_str, NULL, 10);
|
||||
+ count++;
|
||||
+ char new_count_str[sizeof(long)*3 + 2];
|
||||
+ sprintf(new_count_str, "%lu", count);
|
||||
+ dd_save_text(dd, FILENAME_COUNT, new_count_str);
|
||||
+ dd_close(dd);
|
||||
+
|
||||
+ *problem_data = load_problem_data(dump_dir_name);
|
||||
+ if (*problem_data != NULL)
|
||||
{
|
||||
- struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
|
||||
- if (!dd)
|
||||
- goto ret;
|
||||
-
|
||||
- /* Reset mode/uig/gid to correct values for all files created by event run */
|
||||
- dd_sanitize_mode_and_owner(dd);
|
||||
-
|
||||
- /* Update count */
|
||||
- char *count_str = dd_load_text_ext(dd, FILENAME_COUNT, DD_FAIL_QUIETLY_ENOENT);
|
||||
- unsigned long count = strtoul(count_str, NULL, 10);
|
||||
- count++;
|
||||
- char new_count_str[sizeof(long)*3 + 2];
|
||||
- sprintf(new_count_str, "%lu", count);
|
||||
- dd_save_text(dd, FILENAME_COUNT, new_count_str);
|
||||
- dd_close(dd);
|
||||
-
|
||||
- *problem_data = load_problem_data(dump_dir_name);
|
||||
- if (*problem_data != NULL)
|
||||
+ res = MW_OK;
|
||||
+ if (count > 1)
|
||||
{
|
||||
- res = MW_OK;
|
||||
- if (count > 1)
|
||||
- {
|
||||
- log("Problem directory is a duplicate of %s", dump_dir_name);
|
||||
- res = MW_OCCURRED;
|
||||
- }
|
||||
+ log("Problem directory is a duplicate of %s", dump_dir_name);
|
||||
+ res = MW_OCCURRED;
|
||||
}
|
||||
}
|
||||
+ /* else: load_problem_data already emitted error msg */
|
||||
|
||||
ret:
|
||||
free(dup_of_dir);
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
|
@ -1,268 +0,0 @@
|
|||
From 89de28a3510c6e7a30ca053caea35ccabfbde75a Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Thu, 21 Jul 2011 15:34:50 +0200
|
||||
Subject: [PATCH 3/4] remove forgotten abrt-action-kerneloops files
|
||||
|
||||
---
|
||||
src/plugins/abrt-action-kerneloops.c | 173 --------------------------------
|
||||
src/plugins/abrt-action-kerneloops.txt | 68 -------------
|
||||
2 files changed, 0 insertions(+), 241 deletions(-)
|
||||
delete mode 100644 src/plugins/abrt-action-kerneloops.c
|
||||
delete mode 100644 src/plugins/abrt-action-kerneloops.txt
|
||||
|
||||
diff --git a/src/plugins/abrt-action-kerneloops.c b/src/plugins/abrt-action-kerneloops.c
|
||||
deleted file mode 100644
|
||||
index a117266..0000000
|
||||
--- a/src/plugins/abrt-action-kerneloops.c
|
||||
+++ /dev/null
|
||||
@@ -1,173 +0,0 @@
|
||||
-/*
|
||||
- Copyright (C) 2010 ABRT team
|
||||
- Copyright (C) 2010 RedHat Inc
|
||||
-
|
||||
- This program 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 2 of the License, or
|
||||
- (at your option) any later version.
|
||||
-
|
||||
- This program 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.
|
||||
-
|
||||
- Authors:
|
||||
- Anton Arapov <anton@redhat.com>
|
||||
- Arjan van de Ven <arjan@linux.intel.com>
|
||||
- */
|
||||
-#include <curl/curl.h>
|
||||
-#include "abrtlib.h"
|
||||
-
|
||||
-/* helpers */
|
||||
-static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
-{
|
||||
- size *= nmemb;
|
||||
-/*
|
||||
- char *c, *c1, *c2;
|
||||
-
|
||||
- log("received: '%*.*s'", (int)size, (int)size, (char*)ptr);
|
||||
- c = (char*)xzalloc(size + 1);
|
||||
- memcpy(c, ptr, size);
|
||||
- c1 = strstr(c, "201 ");
|
||||
- if (c1)
|
||||
- {
|
||||
- c1 += 4;
|
||||
- c2 = strchr(c1, '\n');
|
||||
- if (c2)
|
||||
- *c2 = 0;
|
||||
- }
|
||||
- free(c);
|
||||
-*/
|
||||
-
|
||||
- return size;
|
||||
-}
|
||||
-
|
||||
-/* Send oops data to kerneloops.org-style site, using HTTP POST */
|
||||
-/* Returns 0 on success */
|
||||
-static CURLcode http_post_to_kerneloops_site(const char *url, const char *oopsdata)
|
||||
-{
|
||||
- CURLcode ret;
|
||||
- CURL *handle;
|
||||
- struct curl_httppost *post = NULL;
|
||||
- struct curl_httppost *last = NULL;
|
||||
-
|
||||
- handle = curl_easy_init();
|
||||
- if (!handle)
|
||||
- error_msg_and_die("Can't create curl handle");
|
||||
-
|
||||
- curl_easy_setopt(handle, CURLOPT_URL, url);
|
||||
-
|
||||
- curl_formadd(&post, &last,
|
||||
- CURLFORM_COPYNAME, "oopsdata",
|
||||
- CURLFORM_COPYCONTENTS, oopsdata,
|
||||
- CURLFORM_END);
|
||||
- curl_formadd(&post, &last,
|
||||
- CURLFORM_COPYNAME, "pass_on_allowed",
|
||||
- CURLFORM_COPYCONTENTS, "yes",
|
||||
- CURLFORM_END);
|
||||
-
|
||||
- curl_easy_setopt(handle, CURLOPT_HTTPPOST, post);
|
||||
- curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, writefunction);
|
||||
-
|
||||
- ret = curl_easy_perform(handle);
|
||||
-
|
||||
- curl_formfree(post);
|
||||
- curl_easy_cleanup(handle);
|
||||
-
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-static void report_to_kerneloops(
|
||||
- const char *dump_dir_name,
|
||||
- map_string_h *settings)
|
||||
-{
|
||||
- problem_data_t *problem_data = create_problem_data_for_reporting(dump_dir_name);
|
||||
- if (!problem_data)
|
||||
- xfunc_die(); /* create_problem_data_for_reporting already emitted error msg */
|
||||
-
|
||||
- const char *backtrace = get_problem_item_content_or_NULL(problem_data, FILENAME_BACKTRACE);
|
||||
- if (!backtrace)
|
||||
- error_msg_and_die("Error sending kernel oops due to missing backtrace");
|
||||
-
|
||||
- const char *env = getenv("KerneloopsReporter_SubmitURL");
|
||||
- const char *submitURL = (env ? env : get_map_string_item_or_empty(settings, "SubmitURL"));
|
||||
- if (!submitURL[0])
|
||||
- submitURL = "http://submit.kerneloops.org/submitoops.php";
|
||||
-
|
||||
- log(_("Submitting oops report to %s"), submitURL);
|
||||
-
|
||||
- CURLcode ret = http_post_to_kerneloops_site(submitURL, backtrace);
|
||||
- if (ret != CURLE_OK)
|
||||
- error_msg_and_die("Kernel oops has not been sent due to %s", curl_easy_strerror(ret));
|
||||
-
|
||||
- free_problem_data(problem_data);
|
||||
-
|
||||
- /* Server replies with:
|
||||
- * 200 thank you for submitting the kernel oops information
|
||||
- * RemoteIP: 34192fd15e34bf60fac6a5f01bba04ddbd3f0558
|
||||
- * - no URL or bug ID apparently...
|
||||
- */
|
||||
- struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
|
||||
- if (dd)
|
||||
- {
|
||||
- char *msg = xasprintf("kerneloops: URL=%s", submitURL);
|
||||
- add_reported_to(dd, msg);
|
||||
- free(msg);
|
||||
- dd_close(dd);
|
||||
- }
|
||||
-
|
||||
- log("Kernel oops report was uploaded");
|
||||
-}
|
||||
-
|
||||
-int main(int argc, char **argv)
|
||||
-{
|
||||
- abrt_init(argv);
|
||||
-
|
||||
- map_string_h *settings = new_map_string();
|
||||
- const char *dump_dir_name = ".";
|
||||
- GList *conf_file = NULL;
|
||||
-
|
||||
- /* Can't keep these strings/structs static: _() doesn't support that */
|
||||
- const char *program_usage_string = _(
|
||||
- "\b [-v] [-c CONFFILE]... -d DIR\n"
|
||||
- "\n"
|
||||
- "Reports kernel oops to kerneloops.org (or similar) site.\n"
|
||||
- "\n"
|
||||
- "Files with names listed in $EXCLUDE_FROM_REPORT are not included\n"
|
||||
- "into the tarball.\n"
|
||||
- "\n"
|
||||
- "CONFFILE lines should have 'PARAM = VALUE' format.\n"
|
||||
- "Recognized string parameter: SubmitURL.\n"
|
||||
- "Parameter can be overridden via $KerneloopsReporter_SubmitURL."
|
||||
- );
|
||||
- enum {
|
||||
- OPT_v = 1 << 0,
|
||||
- OPT_d = 1 << 1,
|
||||
- OPT_c = 1 << 2,
|
||||
- };
|
||||
- /* Keep enum above and order of options below in sync! */
|
||||
- struct options program_options[] = {
|
||||
- OPT__VERBOSE(&g_verbose),
|
||||
- OPT_STRING('d', NULL, &dump_dir_name, "DIR" , _("Dump directory")),
|
||||
- OPT_LIST( 'c', NULL, &conf_file , "FILE", _("Configuration file")),
|
||||
- OPT_END()
|
||||
- };
|
||||
- /*unsigned opts =*/ parse_opts(argc, argv, program_options, program_usage_string);
|
||||
-
|
||||
- export_abrt_envvars(0);
|
||||
-
|
||||
- while (conf_file)
|
||||
- {
|
||||
- char *fn = (char *)conf_file->data;
|
||||
- VERB1 log("Loading settings from '%s'", fn);
|
||||
- load_conf_file(fn, settings, /*skip key w/o values:*/ true);
|
||||
- VERB3 log("Loaded '%s'", fn);
|
||||
- conf_file = g_list_remove(conf_file, fn);
|
||||
- }
|
||||
-
|
||||
- report_to_kerneloops(dump_dir_name, settings);
|
||||
-
|
||||
- free_map_string(settings);
|
||||
- return 0;
|
||||
-}
|
||||
diff --git a/src/plugins/abrt-action-kerneloops.txt b/src/plugins/abrt-action-kerneloops.txt
|
||||
deleted file mode 100644
|
||||
index 468287f..0000000
|
||||
--- a/src/plugins/abrt-action-kerneloops.txt
|
||||
+++ /dev/null
|
||||
@@ -1,68 +0,0 @@
|
||||
-abrt-action-kerneloops(1)
|
||||
-=========================
|
||||
-
|
||||
-NAME
|
||||
-----
|
||||
-abrt-action-kerneloops - Reports kernel oops to kerneloops.org (or similar)
|
||||
-site.
|
||||
-
|
||||
-SYNOPSIS
|
||||
---------
|
||||
-'abrt-action-kerneloops' [-v] [-c CONFFILE]... [ -d DIR ]
|
||||
-
|
||||
-DESCRIPTION
|
||||
------------
|
||||
-The tool is used to report the crash to the Kerneloops tracker.
|
||||
-
|
||||
-Configuration file
|
||||
-~~~~~~~~~~~~~~~~~~
|
||||
-Configuration file contains entries in a format "Option = Value".
|
||||
-
|
||||
-The options are:
|
||||
-
|
||||
-'SubmitURL'::
|
||||
- The URL of the kerneloops tracker, the default is
|
||||
- "http://submit.kerneloops.org/submitoops.php".
|
||||
-
|
||||
-Integration with ABRT events
|
||||
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
-'abrt-action-kerneloops' can be used as a reporter, to allow users to report
|
||||
-problems to the Kerneloops tracker. This usage is pre-configured in
|
||||
-/etc/libreport/events.d/koops_event.conf:
|
||||
-
|
||||
-------------
|
||||
-EVENT=report_Kerneloops analyzer=Kerneloops abrt-action-kerneloops
|
||||
-------------
|
||||
-
|
||||
-It can be also used automatically and immediately without user interaction.
|
||||
-When this is desired, modify the event configuration file to run the tool on
|
||||
-the 'post-create' event:
|
||||
-
|
||||
-------------
|
||||
-EVENT=post-create analyzer=Kerneloops abrt-action-kerneloops
|
||||
-------------
|
||||
-
|
||||
-OPTIONS
|
||||
--------
|
||||
--v::
|
||||
- Be more verbose. Can be given multiple times.
|
||||
-
|
||||
--d DIR::
|
||||
- Path to dump directory.
|
||||
-
|
||||
--c CONFFILE::
|
||||
- Path to configration file. When used in ABRT event system, the file
|
||||
- contains site-wide configuration. Users can change the values via
|
||||
- environment variables.
|
||||
-
|
||||
-ENVIRONMENT VARIABLES
|
||||
----------------------
|
||||
-Environment variables take precedence over values provided in
|
||||
-the configuration file.
|
||||
-
|
||||
-'KerneloopsReporter_SubmitURL'::
|
||||
- The URL of the kerneloops tracker.
|
||||
-
|
||||
-AUTHORS
|
||||
--------
|
||||
-* ABRT team
|
||||
--
|
||||
1.7.6
|
||||
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
From 26a0f776d32d0d5be2e15abe781adf5a830c24cc Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 14:14:56 +0100
|
||||
Subject: [PATCH 4/5] abrtd: always explain why we delete "corrupted" dir.
|
||||
Closes rhbz#706131.
|
||||
|
||||
We were almost always explaining it, except for the case when
|
||||
'post-create' was failing silently.
|
||||
|
||||
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
---
|
||||
src/daemon/abrtd.c | 12 +++++++++++-
|
||||
1 files changed, 11 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
|
||||
index 743e40f..b5c3d4b 100644
|
||||
--- a/src/daemon/abrtd.c
|
||||
+++ b/src/daemon/abrtd.c
|
||||
@@ -313,14 +313,24 @@ static mw_result_t run_post_create_and_load_data(const char *dump_dir_name, prob
|
||||
/* Prevent having zombie child process */
|
||||
int status;
|
||||
safe_waitpid(child, &status, 0);
|
||||
- /* status = WEXITSTATUS(status); - wrong, we need to check WIFEXITED too */
|
||||
|
||||
/* exit 0 means "this is a good, non-dup dir" */
|
||||
/* exit with 1 + "DUP_OF_DIR: dir" string => dup */
|
||||
if (status != 0)
|
||||
{
|
||||
+ if (WIFSIGNALED(status))
|
||||
+ {
|
||||
+ log("'post-create' on '%s' killed by signal %d",
|
||||
+ dump_dir_name, WTERMSIG(status));
|
||||
+ return MW_ERROR;
|
||||
+ }
|
||||
+ /* else: it is WIFEXITED(status) */
|
||||
if (!dup_of_dir)
|
||||
+ {
|
||||
+ log("'post-create' on '%s' exited with %d",
|
||||
+ dump_dir_name, WEXITSTATUS(status));
|
||||
return MW_ERROR;
|
||||
+ }
|
||||
dump_dir_name = dup_of_dir;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
From 90893a0c84a594337ca22fa83f364f5b4a7fb1b2 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Toman <mtoman@redhat.com>
|
||||
Date: Thu, 21 Jul 2011 16:48:08 +0200
|
||||
Subject: [PATCH 4/4] install-debuginfo: ask before downloading
|
||||
|
||||
---
|
||||
src/plugins/abrt-action-install-debuginfo | 34 ++++++----------------------
|
||||
1 files changed, 8 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/abrt-action-install-debuginfo b/src/plugins/abrt-action-install-debuginfo
|
||||
index 2ad0790..31aab2c 100644
|
||||
--- a/src/plugins/abrt-action-install-debuginfo
|
||||
+++ b/src/plugins/abrt-action-install-debuginfo
|
||||
@@ -11,6 +11,7 @@ import errno
|
||||
import time
|
||||
import getopt
|
||||
import shutil
|
||||
+import reportclient
|
||||
from subprocess import Popen, PIPE
|
||||
from yum import _, YumBase
|
||||
from yum.callbacks import DownloadBaseCallback
|
||||
@@ -74,22 +75,6 @@ def unmute_stdout():
|
||||
else:
|
||||
print "ERR: unmute called without mute?"
|
||||
|
||||
-def ask_yes_no(prompt, retries=4):
|
||||
- while True:
|
||||
- try:
|
||||
- response = raw_input(prompt)
|
||||
- except EOFError:
|
||||
- log1("got eof, probably executed from helper, assuming - yes")
|
||||
- return True
|
||||
- if response in (_("y")): # for translators -> y/Y as yes
|
||||
- return True
|
||||
- if response in ("", _("n")): # for translators -> N/n as no
|
||||
- return False
|
||||
- retries = retries - 1
|
||||
- if retries < 0:
|
||||
- break
|
||||
- return False
|
||||
-
|
||||
# TODO: unpack just required debuginfo and not entire rpm?
|
||||
# ..that can lead to: foo.c No such file and directory
|
||||
# files is not used...
|
||||
@@ -286,16 +271,13 @@ class DebugInfoDownload(YumBase):
|
||||
print _("Can't find packages for %u debuginfo files") % len(not_found)
|
||||
if verbose != 0 or total_pkgs != 0:
|
||||
print _("Packages to download: %u") % total_pkgs
|
||||
- print _("Downloading %.2fMb, installed size: %.2fMb") % (
|
||||
- todownload_size / (1024**2),
|
||||
- installed_size / (1024**2)
|
||||
- )
|
||||
-
|
||||
- # ask only if we have terminal, because for now we don't have a way
|
||||
- # how to pass the question to gui and the response back
|
||||
- if noninteractive == False and sys.stdout.isatty():
|
||||
- if not ask_yes_no(_("Is this ok? [y/N] ")):
|
||||
- return RETURN_OK
|
||||
+ question = _("Downloading %.2fMb, installed size: %.2fMb. Continue?") % (
|
||||
+ todownload_size / (1024**2),
|
||||
+ installed_size / (1024**2)
|
||||
+ )
|
||||
+ if not reportclient.ask_yes_no(question):
|
||||
+ print _("Download cancelled by user")
|
||||
+ return RETURN_OK
|
||||
|
||||
for pkg, files in package_files_dict.iteritems():
|
||||
dnlcb.downloaded_pkgs = downloaded_pkgs
|
||||
--
|
||||
1.7.6
|
||||
|
||||
48
0005-more-glib2.31-fixes.patch
Normal file
48
0005-more-glib2.31-fixes.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
From 2e941ae3c1d13968bda8bb4594a5aa566aa2e5dd Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Moskovcak <jmoskovc@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 16:12:28 +0100
|
||||
Subject: [PATCH 5/5] more glib2.31 fixes
|
||||
|
||||
---
|
||||
src/daemon/abrtd.c | 17 +++++++++++++----
|
||||
1 files changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
|
||||
index d3a759a..3d71e80 100644
|
||||
--- a/src/daemon/abrtd.c
|
||||
+++ b/src/daemon/abrtd.c
|
||||
@@ -238,7 +238,7 @@ static gboolean handle_signal_cb(GIOChannel *gio, GIOCondition condition, gpoint
|
||||
{
|
||||
uint8_t signo;
|
||||
gsize len = 0;
|
||||
- g_io_channel_read(gio, (void*) &signo, 1, &len);
|
||||
+ g_io_channel_read_chars(gio, (void*) &signo, 1, &len, NULL);
|
||||
if (len == 1)
|
||||
{
|
||||
/* we did receive a signal */
|
||||
@@ -382,10 +382,19 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
|
||||
char *buf = (char*)xmalloc(inotify_bytes);
|
||||
errno = 0;
|
||||
gsize len;
|
||||
- GIOError err = g_io_channel_read(gio, buf, inotify_bytes, &len);
|
||||
- if (err != G_IO_ERROR_NONE)
|
||||
+ GError *gerror = NULL;
|
||||
+ g_io_channel_set_encoding(gio, NULL, &gerror);
|
||||
+ /* need to set the encoding otherwise we get:
|
||||
+ * Invalid byte sequence in conversion input
|
||||
+ * according to manual "NULL" is safe for binary data
|
||||
+ */
|
||||
+ if (gerror)
|
||||
+ perror_msg("Can't set encoding on gio channel: '%s'", gerror->message);
|
||||
+
|
||||
+ GIOStatus err = g_io_channel_read_chars(gio, buf, inotify_bytes, &len, &gerror);
|
||||
+ if (err != G_IO_STATUS_NORMAL)
|
||||
{
|
||||
- perror_msg("Error reading inotify fd");
|
||||
+ perror_msg("Error reading inotify fd: %s", gerror ? gerror->message : "unknown");
|
||||
free(buf);
|
||||
return FALSE; /* "remove this event" (huh??) */
|
||||
}
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
25
0006-missed-one-more-deprecated-g_io_channel_read.patch
Normal file
25
0006-missed-one-more-deprecated-g_io_channel_read.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From 7b937c6322c3130d9801596b93866a5e72a6da64 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Moskovcak <jmoskovc@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 16:29:03 +0100
|
||||
Subject: [PATCH 6/6] missed one more deprecated g_io_channel_read
|
||||
|
||||
---
|
||||
src/daemon/abrt-dbus.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/abrt-dbus.c b/src/daemon/abrt-dbus.c
|
||||
index 756076a..16c01d0 100644
|
||||
--- a/src/daemon/abrt-dbus.c
|
||||
+++ b/src/daemon/abrt-dbus.c
|
||||
@@ -284,7 +284,7 @@ static gboolean handle_signal_cb(GIOChannel *gio, GIOCondition condition, gpoint
|
||||
{
|
||||
uint8_t signo;
|
||||
gsize len = 0;
|
||||
- g_io_channel_read(gio, (void*) &signo, 1, &len);
|
||||
+ g_io_channel_read_chars(gio, (void*) &signo, 1, &len, NULL);
|
||||
if (len == 1)
|
||||
{
|
||||
/* we did receive a signal */
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From 8f6d5316e9d1555f8b33aeef97053f04d3903759 Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 18:08:06 +0100
|
||||
Subject: [PATCH 7/8] abrt-action-install-debuginfo: do not use scientific
|
||||
notation for sizes
|
||||
|
||||
"Downloading 5.1e+02Mb, installed size: 2.1e+03Mb" looks weird...
|
||||
|
||||
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
---
|
||||
src/plugins/abrt-action-install-debuginfo.in | 6 +++---
|
||||
1 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in
|
||||
index f6d0001..7c19331 100644
|
||||
--- a/src/plugins/abrt-action-install-debuginfo.in
|
||||
+++ b/src/plugins/abrt-action-install-debuginfo.in
|
||||
@@ -288,9 +288,9 @@ class DebugInfoDownload(YumBase):
|
||||
print _("Can't find packages for {0} debuginfo files").format(len(not_found))
|
||||
if verbose != 0 or total_pkgs != 0:
|
||||
print _("Packages to download: {0}").format(total_pkgs)
|
||||
- question = _("Downloading {0:.2}Mb, installed size: {1:.2}Mb. Continue?").format(
|
||||
- todownload_size / (1024**2),
|
||||
- installed_size / (1024**2)
|
||||
+ question = _("Downloading {0:.2f}Mb, installed size: {1:.2f}Mb. Continue?").format(
|
||||
+ todownload_size / (1024*1024),
|
||||
+ installed_size / (1024*1024)
|
||||
)
|
||||
if noninteractive == False and not reportclient.ask_yes_no(question):
|
||||
print _("Download cancelled by user")
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
256
0008-abrt-cli-add-man-page.-Closes-rhbz-747624.patch
Normal file
256
0008-abrt-cli-add-man-page.-Closes-rhbz-747624.patch
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
From 383a8c804e0a492e8261309bbd0e9d3502ec6604 Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 23:14:46 +0100
|
||||
Subject: [PATCH 8/8] abrt-cli: add man page. Closes rhbz#747624
|
||||
|
||||
This also regularizes help text a bit, and trims code
|
||||
by about 150 bytes
|
||||
|
||||
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
---
|
||||
abrt.spec.in | 3 +--
|
||||
doc/Makefile.am | 1 +
|
||||
doc/abrt-cli.txt | 31 +++++++++++++++++++++++++++++++
|
||||
src/cli/abrt-cli.c | 10 +++++-----
|
||||
src/cli/list.c | 19 ++++++++++---------
|
||||
src/cli/report.c | 16 +++++++---------
|
||||
src/cli/rm.c | 10 +++++++---
|
||||
7 files changed, 62 insertions(+), 28 deletions(-)
|
||||
create mode 100644 doc/abrt-cli.txt
|
||||
|
||||
diff --git a/abrt.spec.in b/abrt.spec.in
|
||||
index a5e78a1..7847ac0 100644
|
||||
--- a/abrt.spec.in
|
||||
+++ b/abrt.spec.in
|
||||
@@ -497,8 +497,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%files cli
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/abrt-cli
|
||||
-# provide asap
|
||||
-#% {_mandir}/man1/report-cli.1.gz
|
||||
+%{_mandir}/man1/abrt-cli.1.gz
|
||||
|
||||
%files desktop
|
||||
%defattr(-,root,root,-)
|
||||
diff --git a/doc/Makefile.am b/doc/Makefile.am
|
||||
index 65a8142..5025f93 100644
|
||||
--- a/doc/Makefile.am
|
||||
+++ b/doc/Makefile.am
|
||||
@@ -11,6 +11,7 @@ MAN1_TXT += abrt-action-list-dsos.txt
|
||||
MAN1_TXT += abrt-retrace-client.txt
|
||||
MAN1_TXT += abrt-handle-upload.txt
|
||||
MAN1_TXT += abrt-server.txt
|
||||
+MAN1_TXT += abrt-cli.txt
|
||||
MAN1_TXT += abrt-action-save-package-data.txt
|
||||
MAN1_TXT += abrt-install-ccpp-hook.txt
|
||||
|
||||
diff --git a/doc/abrt-cli.txt b/doc/abrt-cli.txt
|
||||
new file mode 100644
|
||||
index 0000000..9680ad6
|
||||
--- /dev/null
|
||||
+++ b/doc/abrt-cli.txt
|
||||
@@ -0,0 +1,31 @@
|
||||
+abrt-cli(1)
|
||||
+===========
|
||||
+
|
||||
+NAME
|
||||
+----
|
||||
+abrt-cli - List, remove, print, analyze, report problems
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+'abrt-cli' list [-vdf] [DIR]...
|
||||
+
|
||||
+'abrt-cli' rm [-v] DIR...
|
||||
+
|
||||
+'abrt-cli' report [-v] DIR...
|
||||
+
|
||||
+'abrt-cli' info [-vd] DIR...
|
||||
+
|
||||
+OPTIONS
|
||||
+-------
|
||||
+-v,--verbose::
|
||||
+ Be more verbose. Can be given multiple times.
|
||||
+
|
||||
+-d,--detailed::
|
||||
+ Show detailed report
|
||||
+
|
||||
+-f,--full::
|
||||
+ List even reported problems
|
||||
+
|
||||
+AUTHORS
|
||||
+-------
|
||||
+* ABRT team
|
||||
diff --git a/src/cli/abrt-cli.c b/src/cli/abrt-cli.c
|
||||
index 2ea5276..fdd3173 100644
|
||||
--- a/src/cli/abrt-cli.c
|
||||
+++ b/src/cli/abrt-cli.c
|
||||
@@ -138,14 +138,14 @@ int main(int argc, const char **argv)
|
||||
argc--;
|
||||
|
||||
const char *abrt_cli_usage_string = _(
|
||||
- "Usage: abrt-cli [--version] COMMAND [ARGS]"
|
||||
+ "Usage: abrt-cli [--version] COMMAND [DIR]..."
|
||||
);
|
||||
|
||||
const struct cmd_struct commands[] = {
|
||||
- {"list", cmd_list, _("List not yet reported problems")},
|
||||
- {"rm", cmd_rm, _("Remove files from problem directory")},
|
||||
- {"report", cmd_report, _("Analyze and report problem data in problem directory")},
|
||||
- {"info", cmd_info, _("Print information about DUMP_DIR")},
|
||||
+ {"list", cmd_list, _("List not yet reported problems [in DIRs]")},
|
||||
+ {"rm", cmd_rm, _("Remove problem directory DIR")},
|
||||
+ {"report", cmd_report, _("Analyze and report problem data in DIR")},
|
||||
+ {"info", cmd_info, _("Print information about DIR")},
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
diff --git a/src/cli/list.c b/src/cli/list.c
|
||||
index a9b700c..565a36f 100644
|
||||
--- a/src/cli/list.c
|
||||
+++ b/src/cli/list.c
|
||||
@@ -87,7 +87,7 @@ static void print_crash_list(vector_of_problem_data_t *crash_list, int include_r
|
||||
int cmd_list(int argc, const char **argv)
|
||||
{
|
||||
const char *program_usage_string = _(
|
||||
- "& list [options] [<dump-dir>]..."
|
||||
+ "& list [options] [DIR]..."
|
||||
);
|
||||
|
||||
static int opt_full, opt_detailed;
|
||||
@@ -101,11 +101,11 @@ int cmd_list(int argc, const char **argv)
|
||||
};
|
||||
|
||||
parse_opts(argc, (char **)argv, program_options, program_usage_string);
|
||||
+ argv += optind;
|
||||
|
||||
GList *D_list = NULL;
|
||||
- if (optind < argc)
|
||||
- while (optind < argc)
|
||||
- D_list = g_list_append(D_list, xstrdup(argv[optind++]));
|
||||
+ while (*argv)
|
||||
+ D_list = g_list_append(D_list, xstrdup(*argv++));
|
||||
if (!D_list)
|
||||
{
|
||||
load_abrt_conf();
|
||||
@@ -130,7 +130,7 @@ int cmd_list(int argc, const char **argv)
|
||||
int cmd_info(int argc, const char **argv)
|
||||
{
|
||||
const char *program_usage_string = _(
|
||||
- "& info [options] [<dump-dir>]..."
|
||||
+ "& info [options] DIR..."
|
||||
);
|
||||
|
||||
static int opt_detailed;
|
||||
@@ -143,14 +143,15 @@ int cmd_info(int argc, const char **argv)
|
||||
};
|
||||
|
||||
parse_opts(argc, (char **)argv, program_options, program_usage_string);
|
||||
+ argv += optind;
|
||||
|
||||
- if (optind == argc)
|
||||
+ if (!argv[0])
|
||||
show_usage_and_die(program_usage_string, program_options);
|
||||
|
||||
int errs = 0;
|
||||
- while (argv[optind])
|
||||
+ while (*argv)
|
||||
{
|
||||
- const char *dump_dir = argv[optind++];
|
||||
+ const char *dump_dir = *argv++;
|
||||
problem_data_t *problem = fill_crash_info(dump_dir);
|
||||
if (!problem)
|
||||
{
|
||||
@@ -161,7 +162,7 @@ int cmd_info(int argc, const char **argv)
|
||||
|
||||
print_crash(problem, opt_detailed);
|
||||
free_problem_data(problem);
|
||||
- if (optind - argc)
|
||||
+ if (*argv)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
diff --git a/src/cli/report.c b/src/cli/report.c
|
||||
index 1e6c5ce..e20bb96 100644
|
||||
--- a/src/cli/report.c
|
||||
+++ b/src/cli/report.c
|
||||
@@ -25,7 +25,7 @@
|
||||
int cmd_report(int argc, const char **argv)
|
||||
{
|
||||
const char *program_usage_string = _(
|
||||
- "& report [options] [<dump-dir>]..."
|
||||
+ "& report [options] DIR..."
|
||||
);
|
||||
|
||||
struct options program_options[] = {
|
||||
@@ -34,6 +34,10 @@ int cmd_report(int argc, const char **argv)
|
||||
};
|
||||
|
||||
parse_opts(argc, (char **)argv, program_options, program_usage_string);
|
||||
+ argv += optind;
|
||||
+
|
||||
+ if (!argv[0])
|
||||
+ show_usage_and_die(program_usage_string, program_options);
|
||||
|
||||
load_abrt_conf();
|
||||
char *home = getenv("HOME");
|
||||
@@ -43,12 +47,9 @@ int cmd_report(int argc, const char **argv)
|
||||
D_list = g_list_append(D_list, xstrdup(g_settings_dump_location));
|
||||
free_abrt_conf_data();
|
||||
|
||||
- if (!argv[optind])
|
||||
- show_usage_and_die(program_usage_string, program_options);
|
||||
-
|
||||
- while (1)
|
||||
+ while (*argv)
|
||||
{
|
||||
- const char *dir_name = argv[optind++];
|
||||
+ const char *dir_name = *argv++;
|
||||
|
||||
vector_of_problem_data_t *ci = NULL;
|
||||
if (*dir_name == '@')
|
||||
@@ -73,9 +74,6 @@ int cmd_report(int argc, const char **argv)
|
||||
free_vector_of_problem_data(ci);
|
||||
if (status)
|
||||
exit(status);
|
||||
-
|
||||
- if (!argv[optind])
|
||||
- break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
diff --git a/src/cli/rm.c b/src/cli/rm.c
|
||||
index 4a95d93..8f185a4 100644
|
||||
--- a/src/cli/rm.c
|
||||
+++ b/src/cli/rm.c
|
||||
@@ -28,7 +28,7 @@
|
||||
int cmd_rm(int argc, const char **argv)
|
||||
{
|
||||
const char *program_usage_string = _(
|
||||
- "& rm [options] [<dump-dir>]..."
|
||||
+ "& rm [options] DIR..."
|
||||
);
|
||||
|
||||
struct options program_options[] = {
|
||||
@@ -37,12 +37,16 @@ int cmd_rm(int argc, const char **argv)
|
||||
};
|
||||
|
||||
parse_opts(argc, (char **)argv, program_options, program_usage_string);
|
||||
+ argv += optind;
|
||||
+
|
||||
+ if (!argv[0])
|
||||
+ show_usage_and_die(program_usage_string, program_options);
|
||||
|
||||
int errs = 0;
|
||||
- while (argv[optind])
|
||||
+ while (*argv)
|
||||
{
|
||||
int status;
|
||||
- const char *rm_dir = argv[optind++];
|
||||
+ const char *rm_dir = *argv++;
|
||||
status = delete_dump_dir_possibly_using_abrtd(rm_dir);
|
||||
if (!status)
|
||||
log("rm '%s'", rm_dir);
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
151
abrt-ccpp.init
151
abrt-ccpp.init
|
|
@ -1,151 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Install abrt coredump hook
|
||||
#
|
||||
# chkconfig: 35 82 16
|
||||
# description: Installs coredump handler which saves segfault data
|
||||
### BEGIN INIT INFO
|
||||
# Provides: abrt-ccpp
|
||||
# Required-Start: $abrtd
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Default-Start: 3 5
|
||||
# Short-Description: Installs coredump handler which saves segfault data
|
||||
# Description: Installs coredump handler which saves segfault data
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
# For debugging
|
||||
dry_run=false
|
||||
verbose=false
|
||||
|
||||
# We don't have pid files, therefore have to use
|
||||
# a flag file in /var/lock/subsys to enable GUI service tools
|
||||
# to figure out our status
|
||||
LOCK="/var/lock/subsys/abrt-ccpp"
|
||||
|
||||
PATTERN_FILE="/proc/sys/kernel/core_pattern"
|
||||
SAVED_PATTERN_FILE="/var/run/abrt/saved_core_pattern"
|
||||
HOOK_BIN="/usr/libexec/abrt-hook-ccpp"
|
||||
PATTERN="|$HOOK_BIN /var/spool/abrt %s %c %p %u %g %t %h %e"
|
||||
|
||||
# core_pipe_limit specifies how many dump_helpers can run at the same time
|
||||
# 0 - means unlimited, but it's not guaranteed that /proc/<pid> of crashing
|
||||
# process will be available for dump_helper.
|
||||
# 4 - means that 4 dump_helpers can run at the same time (the rest will also
|
||||
# run, but they will fail to read /proc/<pid>).
|
||||
#
|
||||
# This should be enough for ABRT, we can miss some crashes, but what are
|
||||
# the odds that more processes crash at the same time? And moreover,
|
||||
# do people want to save EVERY ONE of the crashes when they have
|
||||
# a crash storm? I don't think so.
|
||||
# The value of 4 has been recommended by nhorman.
|
||||
#
|
||||
CORE_PIPE_LIMIT_FILE="/proc/sys/kernel/core_pipe_limit"
|
||||
CORE_PIPE_LIMIT="4"
|
||||
|
||||
RETVAL=0
|
||||
|
||||
check() {
|
||||
# Check that we're a privileged user
|
||||
[ "`id -u`" = 0 ] || exit 4
|
||||
}
|
||||
|
||||
start() {
|
||||
check
|
||||
|
||||
cur=`cat "$PATTERN_FILE"`
|
||||
cur_first=`printf "%s" "$cur" | sed 's/ .*//'`
|
||||
|
||||
$verbose && printf "cur:'%s'\n" "$cur"
|
||||
# Is it already installed?
|
||||
if test x"$cur_first" != x"|$HOOK_BIN"; then # no
|
||||
# It is not installed
|
||||
printf "%s\n" "$cur" >"$SAVED_PATTERN_FILE"
|
||||
OLD_PATTERN=""
|
||||
# Does old pattern start with '|'?
|
||||
if test x"${cur#|}" = x"$cur"; then # no
|
||||
# Encode it as hex string, NUL terminated
|
||||
OLD_PATTERN=`printf "%s" "$cur" | od -tx1 | sed 's/000[^ ]*//' | xargs | sed 's/ //g'`
|
||||
$verbose && printf "OLD_PATTERN:'%s'\n" "$OLD_PATTERN"
|
||||
OLD_PATTERN=" ${OLD_PATTERN}00"
|
||||
fi
|
||||
# Install new handler
|
||||
$verbose && printf "Installing to %s:'%s'\n" "$PATTERN_FILE" "${PATTERN}${OLD_PATTERN}"
|
||||
$dry_run || echo "${PATTERN}${OLD_PATTERN}" >"$PATTERN_FILE"
|
||||
$dry_run || touch -- "$LOCK"
|
||||
|
||||
# Check core_pipe_limit and change it if it's 0,
|
||||
# otherwise the abrt-hook-ccpp won't be able to read /proc/<pid>
|
||||
# of the crashing process
|
||||
if test x"`cat "$CORE_PIPE_LIMIT_FILE"`" = x"0"; then
|
||||
echo "$CORE_PIPE_LIMIT" >"$CORE_PIPE_LIMIT_FILE"
|
||||
fi
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
check
|
||||
|
||||
if test -f "$SAVED_PATTERN_FILE"; then
|
||||
$verbose && printf "Restoring to %s:'%s'\n" "$PATTERN_FILE" "`cat "$SAVED_PATTERN_FILE"`"
|
||||
$dry_run || cat "$SAVED_PATTERN_FILE" >"$PATTERN_FILE"
|
||||
fi
|
||||
$dry_run || rm -f -- "$LOCK"
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
reload)
|
||||
reload
|
||||
;;
|
||||
force-reload)
|
||||
echo "$0: Unimplemented feature."
|
||||
RETVAL=3
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
condrestart)
|
||||
cur=`cat "$PATTERN_FILE"`
|
||||
cur_first=`printf "%s" "$cur" | sed 's/ .*//'`
|
||||
# Is it already installed?
|
||||
if test x"$cur_first" = x"|$HOOK_BIN"; then # yes
|
||||
$verbose && printf "Installed, re-installing\n"
|
||||
restart
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
cur=`cat "$PATTERN_FILE"`
|
||||
cur_first=`printf "%s" "$cur" | sed 's/ .*//'`
|
||||
# Is it already installed?
|
||||
if test x"$cur_first" = x"|$HOOK_BIN"; then # yes
|
||||
$verbose && printf "Installed\n"
|
||||
RETVAL=0
|
||||
else
|
||||
$verbose && printf "Not installed\n"
|
||||
RETVAL=3 # "stopped normally"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
|
||||
RETVAL=2
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Start ABRT kernel log watcher
|
||||
#
|
||||
# chkconfig: 35 82 16
|
||||
# description: Watches system log for oops messages, creates ABRT dump directories for each oops
|
||||
### BEGIN INIT INFO
|
||||
# Provides: abrt-oops
|
||||
# Required-Start: $abrtd
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Default-Start: 3 5
|
||||
# Short-Description: Watches system log for oops messages, creates ABRT dump directories for each oops
|
||||
# Description: Watches system log for oops messages, creates ABRT dump directories for each oops
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
# For debugging
|
||||
dry_run=false
|
||||
verbose=false
|
||||
|
||||
# We don't have pid files, therefore have to use
|
||||
# a flag file in /var/lock/subsys to enable GUI service tools
|
||||
# to figure out our status
|
||||
LOCK="/var/lock/subsys/abrt-oops"
|
||||
|
||||
RETVAL=0
|
||||
|
||||
check() {
|
||||
# Check that we're a privileged user
|
||||
[ "`id -u`" = 0 ] || exit 4
|
||||
}
|
||||
|
||||
start() {
|
||||
check
|
||||
killall abrt-dump-oops 2>/dev/null
|
||||
setsid abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages </dev/null >/dev/null 2>&1 &
|
||||
$dry_run || touch -- "$LOCK"
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
check
|
||||
killall abrt-dump-oops
|
||||
$dry_run || rm -f -- "$LOCK"
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
reload)
|
||||
reload
|
||||
;;
|
||||
force-reload)
|
||||
echo "$0: Unimplemented feature."
|
||||
RETVAL=3
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
condrestart)
|
||||
# Is it already running?
|
||||
if test -f "$LOCK"; then # yes
|
||||
$verbose && printf "Running, restarting\n"
|
||||
restart
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
status abrt-dump-oops
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
|
||||
RETVAL=2
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
115
abrt.init
115
abrt.init
|
|
@ -1,115 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Starts the abrt daemon
|
||||
#
|
||||
# chkconfig: 35 82 16
|
||||
# description: Daemon to detect crashing apps
|
||||
# processname: abrtd
|
||||
### BEGIN INIT INFO
|
||||
# Provides: abrt
|
||||
# Required-Start: $syslog $local_fs
|
||||
# Required-Stop: $syslog $local_fs
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Default-Start: 3 5
|
||||
# Short-Description: start and stop abrt daemon
|
||||
# Description: Listen to and dispatch crash events
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
ABRT_BIN="/usr/sbin/abrtd"
|
||||
LOCK="/var/lock/subsys/abrtd"
|
||||
OLD_LOCK="/var/lock/subsys/abrt"
|
||||
RETVAL=0
|
||||
|
||||
#
|
||||
# Set these variables if you are behind proxy
|
||||
#
|
||||
#export http_proxy=
|
||||
#export https_proxy=
|
||||
|
||||
#
|
||||
# See how we were called.
|
||||
#
|
||||
|
||||
check() {
|
||||
# Check that we're a privileged user
|
||||
[ "`id -u`" = 0 ] || exit 4
|
||||
|
||||
# Check if abrt is executable
|
||||
test -x $ABRT_BIN || exit 5
|
||||
}
|
||||
|
||||
start() {
|
||||
|
||||
check
|
||||
|
||||
# Check if it is already running
|
||||
if [ ! -f $LOCK ] && [ ! -f $OLD_LOCK ]; then
|
||||
echo -n $"Starting abrt daemon: "
|
||||
daemon $ABRT_BIN
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && touch $LOCK
|
||||
echo
|
||||
fi
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
check
|
||||
|
||||
echo -n $"Stopping abrt daemon: "
|
||||
killproc $ABRT_BIN
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && rm -f $LOCK
|
||||
[ $RETVAL -eq 0 ] && rm -f $OLD_LOCK
|
||||
echo
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
reload)
|
||||
reload
|
||||
;;
|
||||
force-reload)
|
||||
echo "$0: Unimplemented feature."
|
||||
RETVAL=3
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
condrestart)
|
||||
if [ -f $LOCK ]; then
|
||||
restart
|
||||
fi
|
||||
# update from older version
|
||||
if [ -f $OLD_LOCK ]; then
|
||||
restart
|
||||
fi
|
||||
;;
|
||||
status)
|
||||
status abrtd
|
||||
RETVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload}"
|
||||
RETVAL=2
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
238
abrt.spec
238
abrt.spec
|
|
@ -7,21 +7,32 @@
|
|||
%bcond_with systemd
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} >= 6
|
||||
%define vendor redhat
|
||||
%else
|
||||
%define vendor fedora
|
||||
%endif
|
||||
|
||||
Summary: Automatic bug detection and reporting tool
|
||||
Name: abrt
|
||||
Version: 2.0.4
|
||||
Release: 1%{?dist}
|
||||
Version: 2.0.7
|
||||
Release: 3%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/System
|
||||
URL: https://fedorahosted.org/abrt/
|
||||
Source: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
|
||||
Source1: abrt.init
|
||||
Source2: abrt-ccpp.init
|
||||
Source3: abrt-oops.init
|
||||
Patch0: 0001-abrt-gui-launch-reporter-children-with-LIBREPORT_GET.patch
|
||||
Patch1: 0002-gui-split-the-main-window-in-2-panes-reported-not-re.patch
|
||||
Patch2: 0004-install-debuginfo-ask-before-downloading.patch
|
||||
Patch3: blacklist.patch
|
||||
Source1: abrt1_to_abrt2
|
||||
Patch0: blacklist.patch
|
||||
Patch1: abrt_disable_gpgcheck.diff
|
||||
Patch2: 0002-disabled-reporting-to-kerneloops.org.patch
|
||||
Patch3: 0003-abrtd-fix-potential-problem-with-exitcode-check-on-p.patch
|
||||
Patch4: 0004-abrtd-always-explain-why-we-delete-corrupted-dir.-Cl.patch
|
||||
Patch5: 0005-more-glib2.31-fixes.patch
|
||||
Patch6: 0006-missed-one-more-deprecated-g_io_channel_read.patch
|
||||
Patch7: 0007-abrt-action-install-debuginfo-do-not-use-scientific-.patch
|
||||
Patch8: 0008-abrt-cli-add-man-page.-Closes-rhbz-747624.patch
|
||||
Patch9: 0001-pyhook-add-timetout-to-sockets-rhbz-808562.patch
|
||||
|
||||
BuildRequires: dbus-devel
|
||||
BuildRequires: gtk2-devel
|
||||
BuildRequires: rpm-devel >= 4.6
|
||||
|
|
@ -36,16 +47,9 @@ BuildRequires: libtool
|
|||
BuildRequires: nss-devel
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: libreport-devel >= 2.0.5-2
|
||||
BuildRequires: libreport-devel > 2.0.6
|
||||
BuildRequires: btparser-devel
|
||||
|
||||
# for rhel6
|
||||
%if 0%{?rhel} >= 6
|
||||
BuildRequires: gnome-keyring-devel
|
||||
%else
|
||||
BuildRequires: libgnome-keyring-devel
|
||||
%endif
|
||||
|
||||
%if %{with systemd}
|
||||
Requires: systemd-units
|
||||
%endif
|
||||
|
|
@ -101,6 +105,16 @@ Requires: %{name} = %{version}-%{release}
|
|||
This package contains hook for C/C++ crashed programs and %{name}'s C/C++
|
||||
analyzer plugin.
|
||||
|
||||
%package retrace-client
|
||||
Summary: %{name}'s retrace client
|
||||
Group: System Environment/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: xz
|
||||
|
||||
%description retrace-client
|
||||
This package contains the client application for Retrace server
|
||||
which is able to analyze C/C++ crashes remotely.
|
||||
|
||||
%package addon-kerneloops
|
||||
Summary: %{name}'s kerneloops addon
|
||||
Group: System Environment/Libraries
|
||||
|
|
@ -111,8 +125,17 @@ Obsoletes: kerneloops > 0.0.1
|
|||
Obsoletes: abrt-plugin-kerneloops > 0.0.1
|
||||
Obsoletes: abrt-plugin-kerneloopsreporter > 0.0.1
|
||||
|
||||
%package addon-vmcore
|
||||
Summary: %{name}'s vmcore addon
|
||||
Group: System Environment/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: abrt-addon-kerneloops
|
||||
|
||||
%description addon-kerneloops
|
||||
This package contains plugin for collecting kernel crash information.
|
||||
This package contains plugin for collecting kernel crash information from system log.
|
||||
|
||||
%description addon-vmcore
|
||||
This package contains plugin for collecting kernel crash information from vmcore files.
|
||||
|
||||
%package addon-python
|
||||
Summary: %{name}'s addon for catching and analyzing Python exceptions
|
||||
|
|
@ -149,11 +172,15 @@ Group: User Interface/Desktops
|
|||
# any tweaking in abrt.conf (IOW: all plugins mentioned there must be installed)
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: abrt-addon-kerneloops
|
||||
Requires: abrt-addon-ccpp, abrt-addon-python
|
||||
Requires: abrt-addon-vmcore
|
||||
Requires: abrt-addon-ccpp
|
||||
Requires: abrt-addon-python
|
||||
# Default config of addon-ccpp requires gdb
|
||||
Requires: gdb >= 7.0-3
|
||||
Requires: abrt-gui
|
||||
Requires: libreport-plugin-logger, libreport-plugin-bugzilla
|
||||
Requires: abrt-retrace-client
|
||||
Requires: libreport-plugin-bodhi
|
||||
#Requires: abrt-plugin-firefox
|
||||
Obsoletes: bug-buddy > 0.0.1
|
||||
Provides: bug-buddy
|
||||
|
|
@ -163,16 +190,22 @@ Virtual package to make easy default installation on desktop environments.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
# Fedora specific
|
||||
%patch0 -p1 -b .blacklist
|
||||
# general
|
||||
%patch1 -p1 -b .gpg
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
|
||||
%build
|
||||
autoconf
|
||||
%configure
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
CFLAGS="-fno-strict-aliasing"
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
|
@ -183,22 +216,16 @@ make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir}
|
|||
|
||||
# remove all .la and .a files
|
||||
find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
|
||||
install -m 755 %SOURCE1 ${RPM_BUILD_ROOT}/%{_libexecdir}/abrt1-to-abrt2
|
||||
mkdir -p ${RPM_BUILD_ROOT}/%{_initrddir}
|
||||
%if ! %{with systemd}
|
||||
install -m 755 %SOURCE1 ${RPM_BUILD_ROOT}/%{_initrddir}/abrtd
|
||||
install -m 755 %SOURCE2 ${RPM_BUILD_ROOT}/%{_initrddir}/abrt-ccpp
|
||||
install -m 755 %SOURCE3 ${RPM_BUILD_ROOT}/%{_initrddir}/abrt-oops
|
||||
%endif
|
||||
mkdir -p $RPM_BUILD_ROOT/var/cache/abrt-di
|
||||
mkdir -p $RPM_BUILD_ROOT/var/run/abrt
|
||||
mkdir -p $RPM_BUILD_ROOT/var/spool/abrt
|
||||
mkdir -p $RPM_BUILD_ROOT/var/spool/abrt-upload
|
||||
# compat before we split abrt-cli and report-cli
|
||||
ln -s %{_bindir}/report-cli $RPM_BUILD_ROOT/%{_bindir}/abrt-cli
|
||||
|
||||
desktop-file-install \
|
||||
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
|
||||
--vendor fedora \
|
||||
--vendor %{vendor} \
|
||||
--delete-original \
|
||||
${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop
|
||||
|
||||
|
|
@ -212,6 +239,9 @@ rm -f %{buildroot}%{_infodir}/dir
|
|||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%pre
|
||||
#uidgid pair 173:173 reserved in setup rhbz#670231
|
||||
%define abrt_gid_uid 173
|
||||
|
|
@ -228,6 +258,7 @@ if [ $1 -eq 1 ]; then
|
|||
/sbin/chkconfig --add abrtd
|
||||
%endif
|
||||
fi
|
||||
%{_libexecdir}/abrt1-to-abrt2 || :
|
||||
|
||||
%post addon-ccpp
|
||||
# this is required for transition from 1.1.x to 2.x
|
||||
|
|
@ -253,6 +284,16 @@ if [ $1 -eq 1 ]; then
|
|||
%endif
|
||||
fi
|
||||
|
||||
%post addon-vmcore
|
||||
if [ $1 -eq 1 ]; then
|
||||
%if %{with systemd}
|
||||
# Enable (but don't start) the units by default
|
||||
/bin/systemctl enable abrt-vmcore.service >/dev/null 2>&1 || :
|
||||
%else
|
||||
/sbin/chkconfig --add abrt-vmcore
|
||||
%endif
|
||||
fi
|
||||
|
||||
%preun
|
||||
if [ "$1" -eq "0" ] ; then
|
||||
%if %{with systemd}
|
||||
|
|
@ -286,6 +327,17 @@ if [ "$1" -eq "0" ] ; then
|
|||
%endif
|
||||
fi
|
||||
|
||||
%preun addon-vmcore
|
||||
if [ "$1" -eq "0" ] ; then
|
||||
%if %{with systemd}
|
||||
/bin/systemctl --no-reload abrt-vmcore.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop abrt-vmcore.service >/dev/null 2>&1 || :
|
||||
%else
|
||||
service abrt-vmcore stop >/dev/null 2>&1
|
||||
/sbin/chkconfig --del abrt-vmcore
|
||||
%endif
|
||||
fi
|
||||
|
||||
%if %{with systemd}
|
||||
%postun
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
|
|
@ -293,6 +345,9 @@ fi
|
|||
%postun addon-kerneloops
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
|
||||
%postun addon-vmcore
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
|
||||
%postun addon-ccpp
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
|
||||
|
|
@ -321,6 +376,9 @@ service abrt-ccpp condrestart >/dev/null 2>&1 || :
|
|||
%posttrans addon-kerneloops
|
||||
service abrt-oops condrestart >/dev/null 2>&1 || :
|
||||
|
||||
%posttrans addon-vmcore
|
||||
service abrt-vmcore condrestart >/dev/null 2>&1 || :
|
||||
|
||||
%posttrans gui
|
||||
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
|
||||
|
|
@ -333,10 +391,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%{_initrddir}/abrtd
|
||||
%endif
|
||||
%{_sbindir}/abrtd
|
||||
%{_sbindir}/abrt-dbus
|
||||
%{_sbindir}/abrt-server
|
||||
%{_libexecdir}/abrt-handle-event
|
||||
%{_bindir}/abrt-handle-upload
|
||||
%{_bindir}/abrt-action-save-package-data
|
||||
%{_bindir}/abrt-retrace-client
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/abrt.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/abrt-action-save-package-data.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/gpg_keys
|
||||
|
|
@ -346,20 +405,24 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%config(noreplace) %{_sysconfdir}/libreport/events.d/smolt_event.conf
|
||||
%dir %attr(0755, abrt, abrt) %{_localstatedir}/spool/%{name}
|
||||
%dir %attr(0700, abrt, abrt) %{_localstatedir}/spool/%{name}-upload
|
||||
%dir %attr(0775, abrt, abrt) %{_localstatedir}/run/%{name}
|
||||
# abrtd runs as root
|
||||
%dir %attr(0755, root, root) %{_localstatedir}/run/%{name}
|
||||
%ghost %attr(0666, -, -) %{_localstatedir}/run/%{name}/abrt.socket
|
||||
%ghost %attr(0644, -, -) %{_localstatedir}/run/abrtd.pid
|
||||
|
||||
%dir %{_sysconfdir}/%{name}
|
||||
%dir %{_sysconfdir}/%{name}/plugins
|
||||
#%dir %{_libdir}/%{name}
|
||||
%{_mandir}/man1/abrt-handle-upload.1.gz
|
||||
%{_mandir}/man1/abrt-server.1.gz
|
||||
%{_mandir}/man1/abrt-action-save-package-data.1.gz
|
||||
%{_mandir}/man8/abrtd.8.gz
|
||||
%{_mandir}/man8/abrt-dbus.8.gz
|
||||
%{_mandir}/man5/abrt.conf.5.gz
|
||||
%{_mandir}/man5/abrt_event.conf.5.gz
|
||||
%{_mandir}/man5/abrt-action-save-package-data.conf.5.gz
|
||||
# {_mandir}/man5/pyhook.conf.5.gz
|
||||
%{_mandir}/man7/abrt-plugins.7.gz
|
||||
%{_mandir}/man1/abrt-retrace-client.1.gz
|
||||
%{_datadir}/dbus-1/system-services/com.redhat.abrt.service
|
||||
%{_libexecdir}/abrt1-to-abrt2
|
||||
|
||||
%files libs
|
||||
%defattr(-,root,root,-)
|
||||
|
|
@ -377,7 +440,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%{_bindir}/abrt-gui
|
||||
%dir %{_datadir}/%{name}
|
||||
# all glade, gtkbuilder and py files for gui
|
||||
%{_datadir}/applications/fedora-%{name}.desktop
|
||||
%{_datadir}/applications/%{vendor}-%{name}.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/*
|
||||
%{_datadir}/icons/hicolor/*/status/*
|
||||
%{_datadir}/%{name}/icons/hicolor/*/status/*
|
||||
|
|
@ -395,9 +458,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%{_initrddir}/abrt-ccpp
|
||||
%endif
|
||||
%{_libexecdir}/abrt-hook-ccpp
|
||||
%attr(4755, abrt, abrt) %{_libexecdir}/abrt-action-install-debuginfo-to-abrt-cache
|
||||
%{_bindir}/abrt-action-analyze-c
|
||||
%{_bindir}/abrt-action-trim-files
|
||||
%attr(4755, abrt, abrt) %{_bindir}/abrt-action-install-debuginfo-to-abrt-cache
|
||||
%{_bindir}/abrt-action-analyze-core
|
||||
%{_bindir}/abrt-action-install-debuginfo
|
||||
%{_bindir}/abrt-action-generate-backtrace
|
||||
|
|
@ -405,14 +468,26 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%{_bindir}/abrt-action-list-dsos
|
||||
%{_sbindir}/abrt-install-ccpp-hook
|
||||
%{_sysconfdir}/libreport/events.d/ccpp_event.conf
|
||||
%{_sysconfdir}/libreport/events.d/gconf_event.conf
|
||||
%{_sysconfdir}/libreport/events.d/vimrc_event.conf
|
||||
%{_sysconfdir}/libreport/events/analyze_LocalGDB.xml
|
||||
%{_sysconfdir}/libreport/events/analyze_RetraceServer.xml
|
||||
%{_sysconfdir}/libreport/events/analyze_xsession_errors.xml
|
||||
%{_sysconfdir}/libreport/events/analyze_Smolt.xml
|
||||
%{_sysconfdir}/libreport/events/collect_xsession_errors.xml
|
||||
%{_sysconfdir}/libreport/events/collect_Smolt.xml
|
||||
%{_sysconfdir}/libreport/events/collect_GConf.xml
|
||||
%{_sysconfdir}/libreport/events/collect_vimrc_user.xml
|
||||
%{_sysconfdir}/libreport/events/collect_vimrc_system.xml
|
||||
%{_mandir}/man*/abrt-action-analyze-c.*
|
||||
%{_mandir}/man*/abrt-action-trim-files.*
|
||||
%{_mandir}/man*/abrt-action-generate-backtrace.*
|
||||
%{_mandir}/man*/abrt-action-analyze-backtrace.*
|
||||
%{_mandir}/man*/abrt-action-list-dsos.*
|
||||
%{_mandir}/man1/abrt-install-ccpp-hook.1.gz
|
||||
|
||||
%files retrace-client
|
||||
%{_bindir}/abrt-retrace-client
|
||||
%{_mandir}/man1/abrt-retrace-client.1.gz
|
||||
%{_sysconfdir}/libreport/events.d/ccpp_retrace_event.conf
|
||||
%{_sysconfdir}/libreport/events/analyze_RetraceServer.xml
|
||||
|
||||
%files addon-kerneloops
|
||||
%defattr(-,root,root,-)
|
||||
|
|
@ -426,22 +501,101 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%{_bindir}/abrt-action-analyze-oops
|
||||
%{_mandir}/man1/abrt-action-analyze-oops.1*
|
||||
|
||||
%files addon-vmcore
|
||||
%defattr(-,root,root,-)
|
||||
%config(noreplace) %{_sysconfdir}/libreport/events.d/vmcore_event.conf
|
||||
%{_sysconfdir}/libreport/events/analyze_VMcore.xml
|
||||
%if %{with systemd}
|
||||
/lib/systemd/system/abrt-vmcore.service
|
||||
%else
|
||||
%{_initrddir}/abrt-vmcore
|
||||
%endif
|
||||
%{_sbindir}/abrt-harvest-vmcore
|
||||
%{_bindir}/abrt-action-analyze-vmcore
|
||||
|
||||
%files addon-python
|
||||
%defattr(-,root,root,-)
|
||||
#%config(noreplace) %{_sysconfdir}/%{name}/plugins/Python.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/plugins/python.conf
|
||||
%{_sysconfdir}/libreport/events.d/python_event.conf
|
||||
%{_bindir}/abrt-action-analyze-python
|
||||
%{_mandir}/man1/abrt-action-analyze-python.1*
|
||||
%{python_site}/abrt*.py*
|
||||
%{python_site}/abrt.pth
|
||||
|
||||
%files cli
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/abrt-cli
|
||||
%{_mandir}/man1/abrt-cli.1.gz
|
||||
|
||||
%files desktop
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
%changelog
|
||||
* Wed Apr 18 2012 Jiri Moskovcak <jmoskovc@redhat.com> 2.0.7-3
|
||||
- fixed freeze in crashing python apps rhbz#808562
|
||||
|
||||
* Thu Dec 08 2011 Jiri Moskovcak <jmoskovc@redhat.com> 2.0.7-2
|
||||
- added man page
|
||||
- fixed weird number formatting
|
||||
|
||||
* Wed Dec 07 2011 Jiri Moskovcak <jmoskovc@redhat.com> 2.0.7-1
|
||||
- new version
|
||||
- disabled kerneloops.org
|
||||
- abrt-ccpp hook fixes
|
||||
- catch indentation errors in python rhbz#578969
|
||||
- fixed make check
|
||||
- fixed retrace-client to work with rawhide
|
||||
- require abrtd service in other services rhbz#752014
|
||||
- fixed problems with dupes rhbz#701717
|
||||
- keep abrt services enabled when updating F15->F16
|
||||
- Resolves: 752014 749891 749603 744887 730422 665210 639068 625445 701717 752014 578969 732876 757683 753183 756146 749100
|
||||
|
||||
* Fri Nov 04 2011 Jiri Moskovcak <jmoskovc@redhat.com> 2.0.6-1
|
||||
- new version
|
||||
- Resolves: #701171 #712508 #726033 #728194 #728314 #730107 #733389 #738602
|
||||
- Resolves: #741242 #749365 #700252 #734298 #736016 #738324 #748457 #692274
|
||||
- Resolves: #711986 #723219 #749891 #712602 #744887 #749603 #625445 #665210
|
||||
- Resolves: #737991 #639068 #578969 #636000 #631856
|
||||
|
||||
* Fri Oct 07 2011 Nikola Pajkovsky <npajkovs@redhat.com> - 2.0.4.981-3
|
||||
- don't file kernel bugs if "tainted: B" is set.
|
||||
- don't file bugs about BIOS bugs.
|
||||
- incorrect TAINTED description in bugs.
|
||||
- Resoves: #718097 #708534 724838
|
||||
|
||||
* Mon Oct 3 2011 Jiri Moskovcak <jmoskovc@redhat.com> - 2.0.4-981-2
|
||||
- added abrt-retrace-client as a dependency
|
||||
|
||||
* Thu Sep 22 2011 Jiri Moskovcak <jmoskovc@redhat.com> - 2.0.4.981-1
|
||||
- updated translation
|
||||
- don't allow to skip the analyze step
|
||||
- don't send ~ backups
|
||||
- added hint to report only in English
|
||||
- renamed abrt-action-kerneloops -> reporter-kerneloops
|
||||
- explain option bugtracker and logger
|
||||
- gui added padding to main window
|
||||
- better message when gdb time outs
|
||||
- added support for catching vmcores
|
||||
- added version to Logger output
|
||||
- [RFE] abrt should have an easy way to include smolt-profile
|
||||
- Resolves: #694828 #694833 #704958 #735071 #731189 #739182 #704452 #734037 #606123 #631822
|
||||
|
||||
* Tue Sep 13 2011 Jiri Moskovcak <jmoskovc@redhat.com> - 2.0.4-5
|
||||
- minor spec file fix
|
||||
|
||||
* Tue Sep 13 2011 Jiri Moskovcak <jmoskovc@redhat.com> - 2.0.4-4
|
||||
- fixed sigsegv in a-a-save-package-data rhbz#737961
|
||||
- fixed privs for /var/run/abrt rhbz#725974
|
||||
- fixed segv in free space check
|
||||
- Resolves: #737961 #725974
|
||||
|
||||
* Tue Aug 30 2011 Jiri Moskovcak <jmoskovc@redhat.com> - 2.0.4-3
|
||||
- fixed abrt1-abrt2 update
|
||||
|
||||
* Fri Aug 19 2011 Jiri Moskovcak <jmoskovc@redhat.com> - 2.0.4-2
|
||||
- enable bugzilla for kerneloops rhbz#725970
|
||||
- Resolves: #725970
|
||||
|
||||
* Thu Jul 21 2011 Jiri Moskovcak <jmoskovc@redhat.com> - 2.0.4-1
|
||||
- new upstream version
|
||||
- resolves wrong provs/obsolete rhbz#723376
|
||||
|
|
|
|||
115
abrt1_to_abrt2
Executable file
115
abrt1_to_abrt2
Executable file
|
|
@ -0,0 +1,115 @@
|
|||
#! /usr/bin/python
|
||||
#-*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
|
||||
# abrt_v4 TABLE columns:
|
||||
UUID = 0
|
||||
UID = 1
|
||||
INFORMALL = 2
|
||||
DUMPDIR_PATH = 3
|
||||
COUNT = 4
|
||||
REPORTED = 5
|
||||
TIME = 6
|
||||
MESSAGE = 7
|
||||
|
||||
# abrt_v4_reportresult columns:
|
||||
#UUID = 0
|
||||
#UID = 1
|
||||
REPORTER = 2
|
||||
RESULT_MESSAGE = 3
|
||||
|
||||
def get_db_path():
|
||||
path = "/var/spool/abrt/abrt-db"
|
||||
try:
|
||||
with open("/etc/abrt/plugins/SQLite3.conf") as f:
|
||||
for line in f:
|
||||
line = line.split('=', 1)
|
||||
if len(line) == 2 and line[0].strip() == "DBPath":
|
||||
path = line[1].strip()
|
||||
except Exception, ex:
|
||||
pass
|
||||
return path
|
||||
|
||||
def get_url_from_text(text):
|
||||
url_marks = ["http://", "https://", "ftp://", "ftps://", "file://"]
|
||||
lines = text.split('\n')
|
||||
url = ""
|
||||
for mark in url_marks:
|
||||
for line in lines:
|
||||
last_mark = line.find(mark)
|
||||
if last_mark != -1:
|
||||
url_end = line.find(' ',last_mark)
|
||||
if url_end == -1:
|
||||
url_end = len(line)
|
||||
url = "URL=" + line[last_mark:url_end]
|
||||
return url
|
||||
|
||||
def format_reported_to(reported_to):
|
||||
reporter = reported_to[REPORTER]
|
||||
url = get_url_from_text(reported_to[RESULT_MESSAGE])
|
||||
if not url:
|
||||
url = reported_to[RESULT_MESSAGE]
|
||||
return reporter + ": " + url
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
from sqlite3 import dbapi2 as sqlite
|
||||
db = sqlite.connect(get_db_path())
|
||||
crashes = db.execute("SELECT * FROM abrt_v4")
|
||||
# abrt_v4 TABLE columns:
|
||||
# UUID | UID | INFORMALL | DUMPDIR_PATH | COUNT | REPORTED | TIME | MESSAGE
|
||||
for crash in crashes:
|
||||
# abrt_v4_reportresult columns:
|
||||
# UUID | UID | REPORTER | MESSAGE
|
||||
report_results = db.execute("SELECT * FROM abrt_v4_reportresult WHERE UUID='%s'" % crash[UUID])
|
||||
|
||||
# save count from db to file
|
||||
count_file = "%s/count" % crash[DUMPDIR_PATH]
|
||||
# don't overwrite
|
||||
if not os.path.exists(count_file):
|
||||
try:
|
||||
fout = open(count_file, "w")
|
||||
fout.write(str(crash[COUNT]))
|
||||
fout.close()
|
||||
except Exception, ex:
|
||||
# silently ignore errors -> probably stalled db, but we can't
|
||||
# do much about it, so it's better to not polute the rpm output
|
||||
pass
|
||||
|
||||
# save uuid from db to file
|
||||
uuid_file = "%s/uuid" % crash[DUMPDIR_PATH]
|
||||
# don't overwrite
|
||||
if not os.path.exists(uuid_file):
|
||||
try:
|
||||
fout = open(uuid_file, "w")
|
||||
fout.write(str(crash[UUID]))
|
||||
fout.close()
|
||||
except Exception, ex:
|
||||
# silently ignore errors -> probably stalled db, but we can't
|
||||
# do much about it, so it's better to not polute the rpm output
|
||||
pass
|
||||
|
||||
results = report_results.fetchall()
|
||||
if results:
|
||||
# save report results from db to file
|
||||
reported_to_file = "%s/reported_to" % crash[DUMPDIR_PATH]
|
||||
if not os.path.exists(reported_to_file):
|
||||
try:
|
||||
fout = open(reported_to_file, "w")
|
||||
except Exception, ex:
|
||||
# silently ignore errors -> probably stalled db, but we can't
|
||||
# do much about it, so it's better to not polute the rpm output
|
||||
continue
|
||||
|
||||
for report_result in results:
|
||||
# print "\t", format_reported_to(report_result)
|
||||
# I know, it adds a '\n' to the end, but it's not a problem
|
||||
fout.write("%s\n" % format_reported_to(report_result))
|
||||
fout.close()
|
||||
db.close()
|
||||
except Exception, ex:
|
||||
# in case of any unhandled error, just ignore it, the worst, what
|
||||
# can happen is that the old reports are marked as unreported
|
||||
#print ex
|
||||
pass
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- abrt-1.1.10/src/Daemon/abrt.conf 2010-06-30 15:08:48.000000000 +0200
|
||||
+++ abrt-1.1.10_/src/Daemon/abrt.conf 2010-07-26 13:59:27.484253074 +0200
|
||||
@@ -4,7 +4,7 @@
|
||||
--- abrt-2.0.6/src/daemon/abrt-action-save-package-data.conf 2011-11-04 13:03:43.271953835 +0100
|
||||
+++ abrt-2.0.6_/src/daemon/abrt-action-save-package-data.conf 2011-11-04 13:03:36.661746556 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
# the list of public keys used to check the signature is
|
||||
# in the file gpg_keys
|
||||
#
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
--- abrt-2.0.1/src/plugins/koops_events.conf 2011-03-30 21:10:14.000000000 +0200
|
||||
+++ abrt-2.0.1_/src/plugins/koops_events.conf 2011-04-20 14:43:46.460859863 +0200
|
||||
@@ -9,3 +9,4 @@
|
||||
|
||||
# report
|
||||
EVENT=report_Kerneloops analyzer=Kerneloops abrt-action-kerneloops
|
||||
+EVENT=report_Bugzilla analyzer=Kerneloops abrt-action-bugzilla
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
a3545ef7240579b341c810961d4cddc3 abrt-2.0.4.tar.gz
|
||||
3c507dd1f962f8bffca4873a37c6a932 abrt-2.0.7.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue