summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cli/Makefile.am2
-rw-r--r--src/cli/report.c4
-rw-r--r--src/gui-gtk/main.c2
-rw-r--r--src/gui-wizard-gtk/main.c27
-rw-r--r--src/gui-wizard-gtk/wizard.c269
-rw-r--r--src/gui-wizard-gtk/wizard.glade98
-rw-r--r--src/gui-wizard-gtk/wizard.h2
-rw-r--r--src/include/abrtlib.h2
-rw-r--r--src/include/report/event_config.h1
-rw-r--r--src/lib/abrt_curl.c2
-rw-r--r--src/lib/event_config.c1
-rw-r--r--src/lib/event_xml_parser.c24
-rw-r--r--src/lib/hooklib.c2
-rw-r--r--src/lib/hooklib.h2
-rw-r--r--src/lib/read_write.c2
-rw-r--r--src/plugins/Makefile.am20
-rw-r--r--src/plugins/abrt-Bugzilla.743
-rw-r--r--src/plugins/abrt-Logger.744
-rw-r--r--src/plugins/abrt-Mailx.757
-rw-r--r--src/plugins/abrt-action-bugzilla.txt96
-rw-r--r--src/plugins/abrt-action-list-dsos.txt44
-rw-r--r--src/plugins/abrt-action-mailx.txt2
-rw-r--r--src/plugins/abrt-retrace-client.c4
-rw-r--r--src/plugins/abrt_rh_support.c2
-rw-r--r--src/plugins/analyze_LocalGDB.xml.in1
-rw-r--r--src/plugins/analyze_RetraceServer.xml.in1
-rw-r--r--src/plugins/analyze_xsession_errors.xml.in10
-rw-r--r--src/plugins/ccpp_events.conf54
-rw-r--r--src/report-python/reportmodule.c2
29 files changed, 503 insertions, 317 deletions
diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am
index fa28a2bb..bc02236e 100644
--- a/src/cli/Makefile.am
+++ b/src/cli/Makefile.am
@@ -50,7 +50,7 @@ MAN_TXT = \
man1_MANS = ${MAN_TXT:%.txt=%.1}
%.1 %.5 %.7: %.xml
- $(XMLTO_SILENT) xmlto man $< > /dev/null 2>&1
+ $(XMLTO_SILENT) xmlto man $< 2>&1 | sed '/Note/d'
%.xml: %.txt ../../asciidoc.conf
$(ASCIIDOC_SILENT) asciidoc --backend=docbook --doctype=manpage --conf-file ../../asciidoc.conf -aabrt_version=$(PACKAGE_VERSION) -o $@ $<
diff --git a/src/cli/report.c b/src/cli/report.c
index 93d1abd9..7f722480 100644
--- a/src/cli/report.c
+++ b/src/cli/report.c
@@ -682,7 +682,7 @@ int report(const char *dump_dir_name, int flags)
/* Load problem_data from (possibly updated by analyze) dump dir */
struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
if (!dd)
- return -1;
+ return -1;
char *analyze_events_as_lines = list_possible_events(dd, NULL, "analyze");
dd_close(dd);
@@ -705,7 +705,7 @@ int report(const char *dump_dir_name, int flags)
/* Load problem_data from (possibly updated by analyze) dump dir */
dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
if (!dd)
- return -1;
+ return -1;
char *report_events_as_lines = list_possible_events(dd, NULL, "report");
problem_data_t *problem_data = create_problem_data_from_dump_dir(dd);
diff --git a/src/gui-gtk/main.c b/src/gui-gtk/main.c
index 39d9f7ec..bb57ce7d 100644
--- a/src/gui-gtk/main.c
+++ b/src/gui-gtk/main.c
@@ -186,7 +186,7 @@ void scan_dirs_and_add_to_dirlist(void)
{
char **argv = s_dirs;
while (*argv)
- scan_directory_and_add_to_dirlist(*argv++);
+ scan_directory_and_add_to_dirlist(*argv++);
}
int main(int argc, char **argv)
diff --git a/src/gui-wizard-gtk/main.c b/src/gui-wizard-gtk/main.c
index cdcf9e43..cd100ac8 100644
--- a/src/gui-wizard-gtk/main.c
+++ b/src/gui-wizard-gtk/main.c
@@ -28,8 +28,8 @@
char *g_glade_file = NULL;
char *g_dump_dir_name = NULL;
char *g_analyze_events = NULL;
-char *g_reanalyze_events = NULL;
char *g_report_events = NULL;
+int g_report_only = false;
problem_data_t *g_cd;
@@ -37,7 +37,6 @@ void reload_problem_data_from_dump_dir(void)
{
free_problem_data(g_cd);
free(g_analyze_events);
- free(g_reanalyze_events);
free(g_report_events);
struct dump_dir *dd = dd_opendir(g_dump_dir_name, DD_OPEN_READONLY);
@@ -48,7 +47,6 @@ void reload_problem_data_from_dump_dir(void)
add_to_problem_data_ext(g_cd, CD_DUMPDIR, g_dump_dir_name, CD_FLAG_TXT + CD_FLAG_ISNOTEDITABLE);
g_analyze_events = list_possible_events(dd, NULL, "analyze");
- g_reanalyze_events = list_possible_events(dd, NULL, "reanalyze");
g_report_events = list_possible_events(dd, NULL, "report");
dd_close(dd);
@@ -60,6 +58,7 @@ void reload_problem_data_from_dump_dir(void)
int main(int argc, char **argv)
{
+ const char *prgname = "abrt";
abrt_init(argv);
/* I18n */
@@ -69,17 +68,11 @@ int main(int argc, char **argv)
textdomain(PACKAGE);
#endif
- /* without this the name is set to argv[0] which confuses
- * desktops which uses the name to find the corresponding .desktop file
- * trac#180
- */
- g_set_prgname("abrt");
-
gtk_init(&argc, &argv);
/* Can't keep these strings/structs static: _() doesn't support that */
const char *program_usage_string = _(
- "\b [-vp] [-g GUI_FILE] DIR\n"
+ "\b [-vp] [-g GUI_FILE] [-o|--report-only] [-n|--prgname] DIR\n"
"\n"
"GUI tool to analyze and report problem saved in specified DIR"
);
@@ -87,12 +80,20 @@ int main(int argc, char **argv)
OPT_v = 1 << 0,
OPT_g = 1 << 1,
OPT_p = 1 << 2,
+ OPT_o = 1 << 3, // report only
+ OPT_n = 1 << 4, // prgname
};
/* Keep enum above and order of options below in sync! */
struct options program_options[] = {
OPT__VERBOSE(&g_verbose),
OPT_STRING('g', NULL, &g_glade_file, "FILE" , _("Alternate GUI file")),
OPT_BOOL( 'p', NULL, NULL , _("Add program names to log")),
+ /* for use from 3rd party apps to show just a reporter selector */
+ OPT_BOOL( 'o', "report-only", &g_report_only , _("Use wizard to report pre-filled problem data")),
+ /* override the default prgname, so it's the same as the application
+ which is calling us
+ */
+ OPT_STRING( 'n', "prgname", &prgname, "NAME" , _("Override the default prgname")),
OPT_END()
};
unsigned opts = parse_opts(argc, argv, program_options, program_usage_string);
@@ -100,6 +101,12 @@ int main(int argc, char **argv)
if (!argv[0] || argv[1]) /* zero or >1 arguments */
show_usage_and_die(program_usage_string, program_options);
+ /* without this the name is set to argv[0] which confuses
+ * desktops which uses the name to find the corresponding .desktop file
+ * trac#180
+ */
+ g_set_prgname(prgname);
+
export_abrt_envvars(opts & OPT_p);
g_dump_dir_name = xstrdup(argv[0]);
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 6e3bec69..23d9141d 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -36,6 +36,7 @@ typedef struct event_gui_data_t
static GtkAssistant *g_assistant;
static char *g_analyze_event_selected;
+static unsigned g_black_event_count = 0;
static GtkBox *g_box_analyzers;
/* List of event_gui_data's */
@@ -55,6 +56,7 @@ static GtkContainer *g_container_details2;
static GtkLabel *g_lbl_cd_reason;
static GtkTextView *g_tv_backtrace;
static GtkTextView *g_tv_comment;
+static GtkEventBox *g_eb_comment;
static GtkTreeView *g_tv_details;
static GtkWidget *g_widget_warnings_area;
static GtkBox *g_box_warning_labels;
@@ -110,10 +112,10 @@ static const gchar PAGE_SUMMARY[] = "page_0";
static const gchar PAGE_COMMENT[] = "page_1";
static const gchar PAGE_ANALYZE_SELECTOR[] = "page_2";
static const gchar PAGE_ANALYZE_PROGRESS[] = "page_3";
-static const gchar PAGE_REPORTER_SELECTOR[] = "page_4";
+static const gchar PAGE_REPORTER_SELECTOR[] = "page_4_report";
static const gchar PAGE_BACKTRACE_APPROVAL[] = "page_5";
-static const gchar PAGE_REPORT[] = "page_6";
-static const gchar PAGE_REPORT_PROGRESS[] = "page_7";
+static const gchar PAGE_REPORT[] = "page_6_report";
+static const gchar PAGE_REPORT_PROGRESS[] = "page_7_report";
static const gchar *const page_names[] =
{
@@ -161,6 +163,8 @@ static page_obj_t pages[] =
{ NULL }
};
+/* hardcoded 10 pages limit */
+page_obj_t *added_pages[10];
/* Utility functions */
@@ -401,11 +405,12 @@ static gint find_by_button(gconstpointer a, gconstpointer button)
static void analyze_rb_was_toggled(GtkButton *button, gpointer user_data)
{
+ free(g_analyze_event_selected);
+ g_analyze_event_selected = NULL;
GList *found = g_list_find_custom(g_list_analyzers, button, find_by_button);
if (found)
{
event_gui_data_t *evdata = found->data;
- free(g_analyze_event_selected);
g_analyze_event_selected = xstrdup(evdata->event_name);
}
}
@@ -443,15 +448,13 @@ static void report_tb_was_toggled(GtkButton *button_unused, gpointer user_data_u
* Add new {radio/check}buttons to GtkBox for each EVENTn (type depends on bool radio).
* Remember them in GList **p_event_list (list of event_gui_data_t's).
* Set "toggled" callback on each button to given GCallback if it's not NULL.
- * If prev_selected == EVENTn, set this button as active. In this case return NULL.
- * Else return 1st button created (or NULL if none created).
+ * Return active button (or NULL if none created).
*/
static event_gui_data_t *add_event_buttons(GtkBox *box,
GList **p_event_list,
char *event_name,
GCallback func,
- bool radio,
- const char *prev_selected)
+ bool radio)
{
//VERB2 log("removing all buttons from box %p", box);
gtk_container_foreach(GTK_CONTAINER(box), &remove_child_widget, NULL);
@@ -459,13 +462,18 @@ static event_gui_data_t *add_event_buttons(GtkBox *box,
g_list_free(*p_event_list);
*p_event_list = NULL;
- bool have_activated_btn = false;
+ if (radio)
+ g_black_event_count = 0;
+
event_gui_data_t *first_button = NULL;
+ event_gui_data_t *active_button = NULL;
while (event_name[0])
{
char *event_name_end = strchr(event_name, '\n');
*event_name_end = '\0';
+ event_config_t *cfg = get_event_config(event_name);
+
/* Form a pretty text representation of event */
/* By default, use event name, just strip "foo_" prefix if it exists: */
const char *event_screen_name = strchr(event_name, '_');
@@ -473,15 +481,27 @@ static event_gui_data_t *add_event_buttons(GtkBox *box,
event_screen_name++;
else
event_screen_name = event_name;
+
const char *event_description = NULL;
- event_config_t *cfg = get_event_config(event_name);
+ char *tmp_description = NULL;
+ bool green_choice = false;
if (cfg)
{
/* .xml has (presumably) prettier description, use it: */
if (cfg->screen_name)
event_screen_name = cfg->screen_name;
event_description = cfg->description;
+ if (cfg->creates_elements)
+ {
+ if (get_problem_data_item_or_NULL(g_cd, cfg->creates_elements))
+ {
+ green_choice = true;
+ event_description = tmp_description = xasprintf(_("(not needed, '%s' already exists)"), cfg->creates_elements);
+ }
+ }
}
+ if (radio && !green_choice)
+ g_black_event_count++;
//VERB2 log("adding button '%s' to box %p", event_name, box);
char *event_label = xasprintf("%s%s%s",
@@ -489,6 +509,8 @@ static event_gui_data_t *add_event_buttons(GtkBox *box,
(event_description ? " - " : ""),
event_description ? event_description : ""
);
+ free(tmp_description);
+
GtkWidget *button = radio
? gtk_radio_button_new_with_label_from_widget(
(first_button ? GTK_RADIO_BUTTON(first_button->toggle_button) : NULL),
@@ -496,33 +518,76 @@ static event_gui_data_t *add_event_buttons(GtkBox *box,
)
: gtk_check_button_new_with_label(event_label);
free(event_label);
+
+ if (green_choice)
+ {
+ //static const GdkColor red = { .red = 0xffff };
+ //gtk_widget_modify_text(button, GTK_STATE_NORMAL, &red);
+ GtkWidget *child = gtk_bin_get_child(GTK_BIN(button));
+ if (child)
+ {
+ static const GdkColor green = { .green = 0x7fff };
+ gtk_widget_modify_fg(child, GTK_STATE_NORMAL, &green);
+ gtk_widget_modify_fg(child, GTK_STATE_ACTIVE, &green);
+ gtk_widget_modify_fg(child, GTK_STATE_PRELIGHT, &green);
+ }
+ }
+
if (func)
g_signal_connect(G_OBJECT(button), "toggled", func, NULL);
- if (cfg->long_descr)
+ if (cfg && cfg->long_descr)
gtk_widget_set_tooltip_text(button, cfg->long_descr);
event_gui_data_t *event_gui_data = new_event_gui_data_t();
event_gui_data->event_name = xstrdup(event_name);
event_gui_data->toggle_button = GTK_TOGGLE_BUTTON(button);
- *p_event_list = g_list_append(*p_event_list, event_gui_data);
+ *p_event_list = g_list_append(*p_event_list, event_gui_data);
if (!first_button)
first_button = event_gui_data;
- if (prev_selected && strcmp(prev_selected, event_name) == 0)
+ if (radio && !green_choice && !active_button)
{
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), true);
- have_activated_btn = true;
- prev_selected = NULL;
+ active_button = event_gui_data;
}
*event_name_end = '\n';
event_name = event_name_end + 1;
gtk_box_pack_start(box, button, /*expand*/ false, /*fill*/ false, /*padding*/ 0);
+ }
+ if (radio)
+ {
+ const char *msg_proceed_to_reporting = _("Go to reporting step");
+ GtkWidget *button = radio
+ ? gtk_radio_button_new_with_label_from_widget(
+ (first_button ? GTK_RADIO_BUTTON(first_button->toggle_button) : NULL),
+ msg_proceed_to_reporting
+ )
+ : gtk_check_button_new_with_label(msg_proceed_to_reporting);
+ if (func)
+ g_signal_connect(G_OBJECT(button), "toggled", func, NULL);
+
+ event_gui_data_t *event_gui_data = new_event_gui_data_t();
+ event_gui_data->event_name = xstrdup("");
+ event_gui_data->toggle_button = GTK_TOGGLE_BUTTON(button);
+ *p_event_list = g_list_append(*p_event_list, event_gui_data);
+
+ //if (!first_button)
+ // first_button = event_gui_data;
+
+ if (!active_button)
+ {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), true);
+ active_button = event_gui_data;
+ }
+
+ gtk_box_pack_start(box, button, /*expand*/ false, /*fill*/ false, /*padding*/ 0);
}
- return (have_activated_btn ? NULL : first_button);
+
+ return active_button;
}
struct cd_stats {
@@ -596,15 +661,16 @@ void update_gui_state_from_problem_data(void)
load_text_to_text_view(g_tv_comment, FILENAME_COMMENT);
/* Update analyze radio buttons */
- event_gui_data_t *first_rb = add_event_buttons(g_box_analyzers, &g_list_analyzers,
+ event_gui_data_t *active_button = add_event_buttons(g_box_analyzers, &g_list_analyzers,
g_analyze_events, G_CALLBACK(analyze_rb_was_toggled),
- /*radio:*/ true, /*prev:*/ g_analyze_event_selected
+ /*radio:*/ true
);
/* Update the value of currently selected analyzer */
- if (first_rb)
+ if (active_button)
{
free(g_analyze_event_selected);
- g_analyze_event_selected = xstrdup(first_rb->event_name);
+ g_analyze_event_selected = xstrdup(active_button->event_name);
+ VERB2 log("g_analyze_event_selected='%s'", g_analyze_event_selected);
}
/* Update reporter checkboxes */
@@ -623,7 +689,7 @@ void update_gui_state_from_problem_data(void)
/* Delete old checkboxes and create new ones */
add_event_buttons(g_box_reporters, &g_list_reporters,
g_report_events, /*callback:*/ G_CALLBACK(report_tb_was_toggled),
- /*radio:*/ false, /*prev:*/ NULL
+ /*radio:*/ false
);
/* Re-select new reporters which were selected before we deleted them */
GList *li_new = g_list_reporters;
@@ -650,7 +716,7 @@ void update_gui_state_from_problem_data(void)
*/
gtk_widget_show_all(GTK_WIDGET(g_assistant));
- if (g_reanalyze_events[0])
+ if (g_analyze_events[0])
gtk_widget_show(GTK_WIDGET(g_btn_refresh));
else
gtk_widget_hide(GTK_WIDGET(g_btn_refresh));
@@ -849,9 +915,14 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
/* Unfreeze assistant
* we can't allow user to continue if analyze action fails
* i.e: if gdb fails to generate backtrace
- */
+//TODO: generic solution instead of special-casing on event name!
+ */
if (retval == 0 || (strncmp(evd->event_name, "analyze", strlen("analyze")) != 0))
+ {
gtk_assistant_set_page_complete(g_assistant, evd->page_widget, true);
+ }
+ /* Enable (un-gray out) navigation buttons */
+ gtk_widget_set_sensitive(GTK_WIDGET(g_assistant), true);
/*g_source_remove(evd->event_source_id);*/
close(evd->fd);
@@ -960,6 +1031,8 @@ static void start_event_run(const char *event_name,
/* Freeze assistant so it can't move away from the page until event run is done */
gtk_assistant_set_page_complete(g_assistant, page, false);
+ /* Disable (gray out) navigation buttons */
+ gtk_widget_set_sensitive(GTK_WIDGET(g_assistant), false);
}
@@ -1033,24 +1106,33 @@ static void on_bt_approve_toggle(GtkToggleButton *togglebutton, gpointer user_da
check_backtrace_and_allow_send();
}
+static void on_comment_changed(GtkTextBuffer *buffer, gpointer user_data)
+{
+ bool good = gtk_text_buffer_get_char_count(buffer) >= 10;
+
+ /* Allow next page only when the comment has at least 10 chars */
+ gtk_assistant_set_page_complete(g_assistant, pages[PAGENO_COMMENT].page_widget, good);
+
+ /* And show the eventbox with label */
+ if (good)
+ gtk_widget_hide(GTK_WIDGET(g_eb_comment));
+ else
+ gtk_widget_show(GTK_WIDGET(g_eb_comment));
+}
+
/* Refresh button handling */
static void on_btn_refresh_clicked(GtkButton *button)
{
- if (g_reanalyze_events[0])
- {
- /* Save backtrace text if changed */
- save_text_from_text_view(g_tv_backtrace, FILENAME_BACKTRACE);
+ /* Save backtrace text if changed */
+ save_text_from_text_view(g_tv_backtrace, FILENAME_BACKTRACE);
- g_analyze_events = append_to_malloced_string(g_analyze_events, g_reanalyze_events);
- g_reanalyze_events[0] = '\0';
- /* Refresh GUI so that we see new analyze+reanalyze buttons */
- update_gui_state_from_problem_data();
+ /* Refresh GUI so that we see new analyze buttons */
+ update_gui_state_from_problem_data();
- /* Change page to analyzer selector - let user play with them */
- gtk_assistant_set_current_page(g_assistant, PAGENO_ANALYZE_SELECTOR);
- }
+ /* Change page to analyzer selector - let user play with them */
+ gtk_assistant_set_current_page(g_assistant, PAGENO_ANALYZE_SELECTOR);
}
@@ -1059,25 +1141,29 @@ static void on_btn_refresh_clicked(GtkButton *button)
static void next_page(GtkAssistant *assistant, gpointer user_data)
{
/* page_no is actually the previous page, because this
- * function is called before assistant goes to the next_page
+ * function is called before assistant goes to the next page
*/
int page_no = gtk_assistant_get_current_page(assistant);
VERB2 log("page_no:%d", page_no);
- if (page_no == PAGENO_ANALYZE_SELECTOR
- && g_analyze_event_selected != NULL
- ) {
- start_event_run(g_analyze_event_selected,
- NULL,
- pages[PAGENO_ANALYZE_PROGRESS].page_widget,
- g_tv_analyze_log,
- g_lbl_analyze_log,
- _("Analyzing..."),
- _("Analyzing finished with exit code %d")
- );
+ if (added_pages[page_no]->name == PAGE_ANALYZE_SELECTOR)
+ {
+ VERB2 log("g_analyze_event_selected:'%s'", g_analyze_event_selected);
+ if (g_analyze_event_selected
+ && g_analyze_event_selected[0]
+ ) {
+ start_event_run(g_analyze_event_selected,
+ NULL,
+ pages[PAGENO_ANALYZE_PROGRESS].page_widget,
+ g_tv_analyze_log,
+ g_lbl_analyze_log,
+ _("Analyzing..."),
+ _("Analyzing finished with exit code %d")
+ );
+ }
}
- if (page_no == PAGENO_REPORT)
+ if (added_pages[page_no]->name == PAGE_REPORT)
{
GList *reporters = NULL;
GList *li = g_list_reporters;
@@ -1133,36 +1219,69 @@ static void on_page_prepare(GtkAssistant *assistant, GtkWidget *page, gpointer u
w
);
}
+
+ if (pages[PAGENO_COMMENT].page_widget == page)
+ on_comment_changed(gtk_text_view_get_buffer(g_tv_comment), NULL);
}
-static gint next_page_no(gint current_page_no, gpointer data)
+static gint select_next_page_no(gint current_page_no, gpointer data)
{
+ /* we don't need any magic here if we're in only-report mode */
+ if (g_report_only)
+ return current_page_no + 1;
+
+ gint prev_page_no = current_page_no;
+
again:
current_page_no++;
+
switch (current_page_no)
{
#if 0
case PAGENO_COMMENT:
if (get_problem_item_content_or_NULL(g_cd, FILENAME_COMMENT))
- break;
- goto again; /* no comment, skip next page */
+ goto again; /* no comment, skip this page */
+ break;
#endif
case PAGENO_BACKTRACE_APPROVAL:
- if (get_problem_item_content_or_NULL(g_cd, FILENAME_BACKTRACE))
- break;
- goto again; /* no backtrace, skip next page */
+ if (!get_problem_item_content_or_NULL(g_cd, FILENAME_BACKTRACE))
+ goto again; /* no backtrace, skip this page */
+ break;
case PAGENO_ANALYZE_SELECTOR:
- if (!g_analyze_events[0])
+ if (!g_analyze_events[0] || g_black_event_count == 0)
{
- //TODO: if (!g_reporter_events[0]) /* no reporters available */ then what?
- return PAGENO_REPORTER_SELECTOR; /* skip analyze pages */
+ /* skip analyze selector page and analyze log page */
+ current_page_no = PAGENO_REPORTER_SELECTOR-1;
+ goto again;
+ }
+ break;
+
+ case PAGENO_ANALYZE_PROGRESS:
+ VERB2 log("%s: ANALYZE_PROGRESS: g_analyze_event_selected:'%s'",
+ __func__, g_analyze_event_selected);
+ if (!g_analyze_event_selected || !g_analyze_event_selected[0])
+ goto again; /* skip this page */
+ break;
+
+ case PAGENO_REPORTER_SELECTOR:
+ VERB2 log("%s: REPORTER_SELECTOR: g_black_event_count:%d",
+ __func__, g_black_event_count);
+ /* if we _did_ run an event (didn't skip it)
+ * and still have analyzers which didn't run
+ */
+ if (prev_page_no == PAGENO_ANALYZE_PROGRESS
+ && g_black_event_count != 0
+ ) {
+ /* Go back to analyzer selectors */
+ current_page_no = PAGENO_ANALYZE_SELECTOR-1;
+ goto again;
}
break;
}
- VERB2 log("next page_no:%d", current_page_no);
+ VERB2 log("%s: selected page #%d", __func__, current_page_no);
return current_page_no;
}
@@ -1246,7 +1365,7 @@ static void create_details_treeview()
/* wizard.glade file as a string WIZARD_GLADE_CONTENTS: */
#include "wizard_glade.c"
-static void add_pages(void)
+static void add_pages()
{
GError *error = NULL;
if (!g_glade_file)
@@ -1268,13 +1387,24 @@ static void add_pages(void)
}
int i;
+ int page_no = 0;
for (i = 0; page_names[i] != NULL; i++)
{
+ char *delim = strrchr(page_names[i], '_');
+ if(delim != NULL)
+ {
+ if (g_report_only && (strncmp(delim+1, "report", strlen("report"))) != 0)
+ {
+ pages[i].page_widget = NULL;
+ continue;
+ }
+ }
GtkWidget *page = GTK_WIDGET(gtk_builder_get_object(builder, page_names[i]));
if (page == NULL)
continue;
pages[i].page_widget = page;
+ added_pages[page_no++] = &pages[i];
gtk_assistant_append_page(g_assistant, page);
/* If we set all pages to complete the wizard thinks there is nothing
@@ -1299,6 +1429,7 @@ static void add_pages(void)
g_tv_report_log = GTK_TEXT_VIEW( gtk_builder_get_object(builder, "tv_report_log"));
g_tv_backtrace = GTK_TEXT_VIEW( gtk_builder_get_object(builder, "tv_backtrace"));
g_tv_comment = GTK_TEXT_VIEW( gtk_builder_get_object(builder, "tv_comment"));
+ g_eb_comment = GTK_EVENT_BOX( gtk_builder_get_object(builder, "eb_comment"));
g_tv_details = GTK_TREE_VIEW( gtk_builder_get_object(builder, "tv_details"));
g_box_warning_labels = GTK_BOX( gtk_builder_get_object(builder, "box_warning_labels"));
g_tb_approve_bt = GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "cb_approve_bt"));
@@ -1320,8 +1451,9 @@ static void add_pages(void)
//gtk_widget_hide(g_widget_warnings_area);
//gtk_assistant_set_page_complete(g_assistant, pages[PAGENO_REPORTER_SELECTOR].page_widget, false);
- gtk_assistant_set_page_complete(g_assistant, pages[PAGENO_BACKTRACE_APPROVAL].page_widget,
- gtk_toggle_button_get_active(g_tb_approve_bt));
+ if (pages[PAGENO_BACKTRACE_APPROVAL].page_widget != NULL)
+ gtk_assistant_set_page_complete(g_assistant, pages[PAGENO_BACKTRACE_APPROVAL].page_widget,
+ gtk_toggle_button_get_active(g_tb_approve_bt));
/* configure btn on select analyzers page */
GtkWidget *config_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button_cfg1"));
@@ -1332,9 +1464,14 @@ static void add_pages(void)
config_btn = GTK_WIDGET(gtk_builder_get_object(builder, "button_cfg2"));
if (config_btn)
g_signal_connect(G_OBJECT(config_btn), "clicked", G_CALLBACK(on_show_event_list_cb), NULL);
+
+ /* Set color of the comment evenbox */
+ GdkColor color;
+ gdk_color_parse("#CC3333", &color);
+ gtk_widget_modify_bg(GTK_WIDGET(g_eb_comment), GTK_STATE_NORMAL, &color);
}
-void create_assistant()
+void create_assistant(void)
{
monospace_font = pango_font_description_from_string("monospace");
@@ -1342,7 +1479,7 @@ void create_assistant()
g_assistant = GTK_ASSISTANT(gtk_assistant_new());
- gtk_assistant_set_forward_page_func(g_assistant, next_page_no, NULL, NULL);
+ gtk_assistant_set_forward_page_func(g_assistant, select_next_page_no, NULL, NULL);
GtkWindow *wnd_assistant = GTK_WINDOW(g_assistant);
g_parent_window = wnd_assistant;
@@ -1368,6 +1505,7 @@ void create_assistant()
g_signal_connect(g_tb_approve_bt, "toggled", G_CALLBACK(on_bt_approve_toggle), NULL);
g_signal_connect(g_btn_refresh, "clicked", G_CALLBACK(on_btn_refresh_clicked), NULL);
+ g_signal_connect(gtk_text_view_get_buffer(g_tv_comment), "changed", G_CALLBACK(on_comment_changed), NULL);
g_signal_connect(g_tv_details, "row-activated", G_CALLBACK(tv_details_row_activated), NULL);
/* [Enter] on a row: g_signal_connect(g_tv_details, "select-cursor-row", G_CALLBACK(tv_details_select_cursor_row), NULL); */
g_signal_connect(g_tv_details, "cursor-changed", G_CALLBACK(tv_details_cursor_changed), NULL);
@@ -1378,8 +1516,9 @@ void create_assistant()
gtk_text_buffer_create_tag(backtrace_buf, "search_result_bg", "background", "red", NULL);
g_signal_connect(g_search_entry_bt, "changed", G_CALLBACK(search_timeout), NULL);
- gtk_assistant_set_page_complete(g_assistant,
- pages[PAGENO_BACKTRACE_APPROVAL].page_widget,
- gtk_toggle_button_get_active(g_tb_approve_bt)
+ if (pages[PAGENO_BACKTRACE_APPROVAL].page_widget != NULL)
+ gtk_assistant_set_page_complete(g_assistant,
+ pages[PAGENO_BACKTRACE_APPROVAL].page_widget,
+ gtk_toggle_button_get_active(g_tb_approve_bt)
);
}
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
index 301bca68..f79950ee 100644
--- a/src/gui-wizard-gtk/wizard.glade
+++ b/src/gui-wizard-gtk/wizard.glade
@@ -34,9 +34,8 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="ypad">0</property>
- <property name="wrap">True</property>
<property name="label" translatable="yes">On the following screens, you will be asked to describe how the problem occurred, to choose how to analyze the problem (if needed), to review collected data, and to choose where the problem should be reported. Click 'Forward' to proceed.</property>
+ <property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -51,8 +50,8 @@
<child>
<object class="GtkScrolledWindow" id="container_details1">
<property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
<property name="can_focus">True</property>
+ <property name="shadow_type">out</property>
<child>
<object class="GtkTreeView" id="tv_details">
<property name="visible">True</property>
@@ -85,14 +84,15 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="spacing">3</property>
<child>
- <object class="GtkLabel" id="label2">
+ <object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="ypad">5</property>
- <property name="label" translatable="yes">How did this problem happen (step-by-step)? How can it be reproduced?</property>
+ <property name="label" translatable="yes">How did this problem happen (step-by-step)? How can it be reproduced? Any additional comments useful for diagnosing the problem?</property>
+ <property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -101,37 +101,52 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label1">
+ <object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">5</property>
- <property name="label" translatable="yes">Any additional comments useful for diagnosing the problem?</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow4">
- <property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <property name="can_focus">True</property>
<child>
- <object class="GtkTextView" id="tv_comment">
+ <object class="GtkScrolledWindow" id="scrolledwindow4">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="wrap_mode">word</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">GTK_SHADOW_OUT</property>
+ <child>
+ <object class="GtkTextView" id="tv_comment">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="wrap_mode">word</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEventBox" id="eb_comment">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">You need to fill the how to before you can proceed...</property>
+ <property name="single_line_mode">True</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -140,14 +155,14 @@
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="ypad">5</property>
<property name="label" translatable="yes">&lt;b&gt;Your comments are not private.&lt;/b&gt; They may be included into publicly visible problem reports.</property>
<property name="use_markup">True</property>
+ <property name="wrap">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -160,6 +175,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="spacing">3</property>
<child>
<object class="GtkLabel" id="lbl_page5">
<property name="visible">True</property>
@@ -199,8 +215,8 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
- <property name="image_position">right</property>
<property name="use_underline">True</property>
+ <property name="image_position">right</property>
</object>
<packing>
<property name="expand">False</property>
@@ -239,12 +255,12 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="spacing">3</property>
<child>
<object class="GtkLabel" id="lbl_analyze_log">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="ypad">5</property>
<property name="label" translatable="yes">Analyzing did not start yet</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
@@ -258,8 +274,8 @@
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
<property name="can_focus">True</property>
+ <property name="shadow_type">out</property>
<child>
<object class="GtkTextView" id="tv_analyze_log">
<property name="visible">True</property>
@@ -281,10 +297,11 @@
<object class="GtkWindow" id="window4">
<property name="can_focus">False</property>
<child>
- <object class="GtkVBox" id="page_4">
+ <object class="GtkVBox" id="page_4_report">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="spacing">3</property>
<child>
<object class="GtkLabel" id="lbl_page3">
<property name="visible">True</property>
@@ -326,8 +343,8 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
- <property name="image_position">right</property>
<property name="use_underline">True</property>
+ <property name="image_position">right</property>
</object>
<packing>
<property name="expand">False</property>
@@ -367,13 +384,13 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="spacing">3</property>
<child>
<object class="GtkLabel" id="lbl_page4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
- <property name="ypad">0</property>
<property name="label" translatable="yes">Backtrace provides developers with details of the crash, helping them track down the source of the problem. Please review it and remove any sensitive data you would rather not share:</property>
<property name="wrap">True</property>
</object>
@@ -386,8 +403,8 @@
<child>
<object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
<property name="can_focus">True</property>
+ <property name="shadow_type">out</property>
<child>
<object class="GtkTextView" id="tv_backtrace">
<property name="visible">True</property>
@@ -561,10 +578,11 @@
<object class="GtkWindow" id="window6">
<property name="can_focus">False</property>
<child>
- <object class="GtkVBox" id="page_6">
+ <object class="GtkVBox" id="page_6_report">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="spacing">3</property>
<child>
<object class="GtkLabel" id="lbl_page6">
<property name="visible">True</property>
@@ -655,8 +673,8 @@
<child>
<object class="GtkScrolledWindow" id="container_details2">
<property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
<property name="can_focus">True</property>
+ <property name="shadow_type">out</property>
<child>
<placeholder/>
</child>
@@ -673,16 +691,16 @@
<object class="GtkWindow" id="window7">
<property name="can_focus">False</property>
<child>
- <object class="GtkVBox" id="page_7">
+ <object class="GtkVBox" id="page_7_report">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">10</property>
+ <property name="spacing">3</property>
<child>
<object class="GtkLabel" id="lbl_report_log">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="ypad">5</property>
<property name="label" translatable="yes">Reporting did not start yet</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
@@ -696,8 +714,8 @@
<child>
<object class="GtkScrolledWindow" id="scrolledwindow6">
<property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
<property name="can_focus">True</property>
+ <property name="shadow_type">out</property>
<child>
<object class="GtkTextView" id="tv_report_log">
<property name="visible">True</property>
diff --git a/src/gui-wizard-gtk/wizard.h b/src/gui-wizard-gtk/wizard.h
index 5e341e34..772fcc05 100644
--- a/src/gui-wizard-gtk/wizard.h
+++ b/src/gui-wizard-gtk/wizard.h
@@ -24,7 +24,7 @@ void show_error_as_msgbox(const char *msg);
extern char *g_glade_file;
extern char *g_dump_dir_name;
extern char *g_analyze_events;
-extern char *g_reanalyze_events;
extern char *g_report_events;
extern problem_data_t *g_cd;
+extern int g_report_only;
void reload_problem_data_from_dump_dir(void);
diff --git a/src/include/abrtlib.h b/src/include/abrtlib.h
index ab12ea03..294afdda 100644
--- a/src/include/abrtlib.h
+++ b/src/include/abrtlib.h
@@ -118,7 +118,7 @@ char *xmalloc_fgetline(FILE *file);
/* On error, copyfd_XX prints error messages and returns -1 */
enum {
- COPYFD_SPARSE = 1 << 0,
+ COPYFD_SPARSE = 1 << 0,
};
#define copyfd_eof abrt_copyfd_eof
off_t copyfd_eof(int src_fd, int dst_fd, int flags);
diff --git a/src/include/report/event_config.h b/src/include/report/event_config.h
index 5c898d9a..2e2783de 100644
--- a/src/include/report/event_config.h
+++ b/src/include/report/event_config.h
@@ -71,6 +71,7 @@ typedef struct
//char *action; //action description to show in gui like: Upload report to the Red Hat bugzilla"
char *description; // "Report to..."/"Save to file". Should be one sentence, not long
char *long_descr; // Long(er) explanation, if needed
+ char *creates_elements;
GList *options;
} event_config_t;
diff --git a/src/lib/abrt_curl.c b/src/lib/abrt_curl.c
index 1cb9391d..c33b2b35 100644
--- a/src/lib/abrt_curl.c
+++ b/src/lib/abrt_curl.c
@@ -246,7 +246,7 @@ abrt_post(abrt_post_state_t *state,
if (basename) basename++;
else basename = data;
#if 0
- // Simple way, without custom reader function
+ // Simple way, without custom reader function
CURLFORMcode curlform_err = curl_formadd(&post, &last,
CURLFORM_PTRNAME, "file", // element name
CURLFORM_FILE, data, // filename to read from
diff --git a/src/lib/event_config.c b/src/lib/event_config.c
index 66f9beba..9f48af54 100644
--- a/src/lib/event_config.c
+++ b/src/lib/event_config.c
@@ -55,6 +55,7 @@ void free_event_config(event_config_t *p)
//free(p->action);
free(p->description);
free(p->long_descr);
+ free(p->creates_elements);
for (opt = p->options; opt; opt = opt->next)
free_event_option(opt->data);
g_list_free(p->options);
diff --git a/src/lib/event_xml_parser.c b/src/lib/event_xml_parser.c
index 17e8a72e..5bf5f411 100644
--- a/src/lib/event_xml_parser.c
+++ b/src/lib/event_xml_parser.c
@@ -25,6 +25,7 @@
#define LONG_DESCR_ELEMENT "long-description"
#define ALLOW_EMPTY_ELEMENT "allow-empty"
#define NOTE_HTML_ELEMENT "note-html"
+#define CREATES_ELEMENT "creates-elements"
#define OPTION_ELEMENT "option"
//#define ACTION_ELEMENT "action"
#define NAME_ELEMENT "name"
@@ -55,16 +56,16 @@ static const char *const option_types[] =
static char *get_element_lang(struct my_parse_data *parse_data, const gchar **att_names, const gchar **att_values)
{
char *short_locale_end = strchr(parse_data->cur_locale, '_');
- VERB2 log("locale: %s", parse_data->cur_locale);
+ VERB3 log("locale: %s", parse_data->cur_locale);
int i;
for (i = 0; att_names[i] != NULL; ++i)
{
- VERB2 log("attr: %s:%s", att_names[i], att_values[i]);
+ VERB3 log("attr: %s:%s", att_names[i], att_values[i]);
if (strcmp(att_names[i], "xml:lang") == 0)
{
if (strcmp(att_values[i], parse_data->cur_locale) == 0)
{
- VERB2 log("found translation for: %s", parse_data->cur_locale);
+ VERB3 log("found translation for: %s", parse_data->cur_locale);
return xstrdup(att_values[i]);
}
@@ -74,7 +75,7 @@ static char *get_element_lang(struct my_parse_data *parse_data, const gchar **at
if (short_locale_end
&& strncmp(att_values[i], parse_data->cur_locale, short_locale_end - parse_data->cur_locale) == 0
) {
- VERB2 log("found translation for shortlocale: %s", parse_data->cur_locale);
+ VERB3 log("found translation for shortlocale: %s", parse_data->cur_locale);
return xstrndup(att_values[i], short_locale_end - parse_data->cur_locale);
}
}
@@ -297,11 +298,18 @@ static void text(GMarkupParseContext *context,
if (strcmp(inner_element, ACTION_ELEMENT) == 0)
{
VERB2 log("action description:'%s'", text_copy);
- free(ui->eo_action);
- ui->eo_action = text_copy;
+ free(ui->action);
+ ui->action = text_copy;
return;
}
*/
+ if (strcmp(inner_element, CREATES_ELEMENT) == 0)
+ {
+ VERB2 log("creates_elements:'%s'", text_copy);
+ free(ui->creates_elements);
+ ui->creates_elements = text_copy;
+ return;
+ }
if (strcmp(inner_element, NAME_ELEMENT) == 0)
{
if (parse_data->attribute_lang != NULL) /* if it isn't for other locale */
@@ -321,7 +329,7 @@ static void text(GMarkupParseContext *context,
}
if (strcmp(inner_element, DESCRIPTION_ELEMENT) == 0)
{
- VERB2 log("event description:'%s'", text_copy);
+ VERB3 log("event description:'%s'", text_copy);
if (parse_data->attribute_lang != NULL) /* if it isn't for other locale */
{
@@ -339,7 +347,7 @@ static void text(GMarkupParseContext *context,
}
if (strcmp(inner_element, LONG_DESCR_ELEMENT) == 0)
{
- VERB2 log("event long description:'%s'", text_copy);
+ VERB3 log("event long description:'%s'", text_copy);
if (parse_data->attribute_lang != NULL) /* if it isn't for other locale */
{
diff --git a/src/lib/hooklib.c b/src/lib/hooklib.c
index 3bde4dfa..804a2394 100644
--- a/src/lib/hooklib.c
+++ b/src/lib/hooklib.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 RedHat inc.
+ Copyright (C) 2009 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
diff --git a/src/lib/hooklib.h b/src/lib/hooklib.h
index c140f951..1add7d09 100644
--- a/src/lib/hooklib.h
+++ b/src/lib/hooklib.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2009 RedHat inc.
+ Copyright (C) 2009 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
diff --git a/src/lib/read_write.c b/src/lib/read_write.c
index da067f78..fe85fcfb 100644
--- a/src/lib/read_write.c
+++ b/src/lib/read_write.c
@@ -88,7 +88,7 @@ ssize_t full_write(int fd, const void *buf, size_t len)
/* user can do another write to know the error code */
return total;
}
- return cc; /* write() returns -1 on failure. */
+ return cc; /* write() returns -1 on failure. */
}
total += cc;
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index bfa60903..1ef7fbc2 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -40,6 +40,7 @@ dist_events_DATA = \
report_Logger.conf \
analyze_LocalGDB.xml \
analyze_RetraceServer.xml \
+ analyze_xsession_errors.xml \
report_Mailx.xml \
report_RHTSupport.xml \
report_Kerneloops.xml
@@ -55,10 +56,7 @@ dist_eventsconf_DATA = \
rhtsupport_events.conf
man_MANS = \
- abrt-Bugzilla.7 \
abrt-KerneloopsReporter.7 \
- abrt-Logger.7 \
- abrt-Mailx.7 \
abrt-Upload.7 \
abrt-plugins.7
@@ -67,13 +65,15 @@ MAN_TXT = \
abrt-action-trim-files.txt \
abrt-action-generate-backtrace.txt \
abrt-action-analyze-backtrace.txt \
- abrt-action-mailx.txt
+ abrt-action-mailx.txt \
+ abrt-action-bugzilla.txt \
+ abrt-action-list-dsos.txt
# Manual pages are generated from .txt via Docbook
man1_MANS = ${MAN_TXT:%.txt=%.1}
%.1 %.5 %.7: %.xml
- $(XMLTO_SILENT) xmlto man $< > /dev/null 2>&1
+ $(XMLTO_SILENT) xmlto man $< 2>&1 | sed '/Note/d'
%.xml: %.txt ../../asciidoc.conf
$(ASCIIDOC_SILENT) asciidoc --backend=docbook --doctype=manpage --conf-file ../../asciidoc.conf -aabrt_version=$(PACKAGE_VERSION) -o $@ $<
@@ -90,11 +90,13 @@ EXTRA_DIST = \
$(man_MANS) \
$(MAN_TXT) \
$(PYTHON_FILES) \
+ $(man1_MANS) \
+ analyze_xsession_errors.xml.in \
+ analyze_LocalGDB.xml.in \
+ analyze_RetraceServer.xml.in \
report_Bugzilla.xml.in \
report_Bugzilla.conf \
report_Logger.conf \
- analyze_LocalGDB.xml.in \
- analyze_RetraceServer.xml.in \
report_Mailx.xml.in \
report_RHTSupport.xml.in \
report_Kerneloops.xml.in
@@ -102,10 +104,6 @@ EXTRA_DIST = \
$(DESTDIR)/$(DEBUG_INFO_DIR):
$(mkdir_p) '$@'
-install-data-hook: $(DESTDIR)/$(DEBUG_INFO_DIR)
- $(LN_S) -f analyze_RetraceServer.xml $(DESTDIR)$(eventsdir)/reanalyze_RetraceServer.xml
- $(LN_S) -f analyze_LocalGDB.xml $(DESTDIR)$(eventsdir)/reanalyze_LocalGDB.xml
-
abrt_dump_oops_SOURCES = \
abrt-dump-oops.c
abrt_dump_oops_CPPFLAGS = \
diff --git a/src/plugins/abrt-Bugzilla.7 b/src/plugins/abrt-Bugzilla.7
deleted file mode 100644
index 708695c7..00000000
--- a/src/plugins/abrt-Bugzilla.7
+++ /dev/null
@@ -1,43 +0,0 @@
-.TH abrt "7" "1 Jun 2009" ""
-.SH NAME
-Bugzilla plugin for abrt(8)
-.SH DESCRIPTION
-.P
-.I abrt
-is a daemon that watches for application crashes. When a crash occurs,
-it collects the problem data and takes action according to
-its configuration. This manual page describes the \fIBugzilla\fP plugin
-for \fIabrt\fP.
-.P
-This plugin is used to report the crash to a Bugzilla instance. The
-plugin will determine the package name and distribution version. The
-problem data is attached to the bug report.
-.SH INVOCATION
-The plugin is invoked in the \fIabrt.conf\fP configuration file.
-No parameters are necessary.
-.SH CONFIGURATION
-The \fIBugzilla.conf\fP configuration file contains several
-entries in the format "Option = Value". The options are:
-.SS BugzillaURL
-The URL of the Bugzilla instance that you want to use, including the
-path to the xmlrpc. The default is https://bugzilla.redhat.com/xmlrpc.cgi
-.SS Login
-Your Bugzilla login. If you have no Bugzilla account, you cannot
-use the plugin.
-.SS Password
-Your Bugzilla password.
-.SH EXAMPLES
-.P
-This is a snippet from the \fIabrt.conf\fP configuration file.
-When something crashes, use the Bugzilla plugin:
-.P
-[common]
-.br
-ActionsAndReporters = Bugzilla
-.SH "SEE ALSO"
-.IR abrt (8),
-.IR abrt.conf (5),
-.IR abrt-plugins (7)
-.SH AUTHOR
-Written by Zdenek Prikryl <zprikryl@redhat.com>.
-Manual page written by Daniel Novotny <dnovotny@redhat.com>.
diff --git a/src/plugins/abrt-Logger.7 b/src/plugins/abrt-Logger.7
deleted file mode 100644
index a9fbae09..00000000
--- a/src/plugins/abrt-Logger.7
+++ /dev/null
@@ -1,44 +0,0 @@
-.TH abrt "7" "1 Jun 2009" ""
-.SH NAME
-Logger plugin for abrt(8)
-.SH DESCRIPTION
-.P
-.I abrt
-is a daemon that watches for application crashes. When a crash occurs,
-it collects the problem data and takes action according to
-its configuration. This manual page describes the \fILogger\fP plugin
-for \fIabrt\fP.
-.P
-This plugin is used to log the crash to a file.
-.P
-The log will contain all the file names as well as their
-content. It also contains "duplicity check": the ID
-of the crash, which is used to tell whether the same
-crash has happened previously.
-.SH INVOCATION
-The plugin is invoked in the \fIabrt.conf\fP configuration file.
-No parameters are necessary.
-.SH CONFIGURATION
-The \fILogger.conf\fP configuration file contains
-several entries in a format "Option = Value". The options are:
-.SS LogPath
-The path to the log file.
-.SS AppendLogs
-If set to "yes" (the default) \fILogger\fP will append
-the report to the file, otherwise it will overwrite the file (so
-only the last crash will be stored).
-.SH EXAMPLES
-.P
-This is a snippet from the \fIabrt.conf\fP configuration file.
-Log all the C/C++ application crashes:
-.P
-[AnalyzerActionsAndReporters]
-.br
-CCpp = Logger
-.SH "SEE ALSO"
-.IR abrt (8),
-.IR abrt.conf (5),
-.IR abrt-plugins (7)
-.SH AUTHOR
-Written by Zdenek Prikryl <zprikryl@redhat.com>. Manual
-page by Daniel Novotny <dnovotny@redhat.com>.
diff --git a/src/plugins/abrt-Mailx.7 b/src/plugins/abrt-Mailx.7
deleted file mode 100644
index 1f2f08fc..00000000
--- a/src/plugins/abrt-Mailx.7
+++ /dev/null
@@ -1,57 +0,0 @@
-.TH abrt "7" "1 Jun 2009" ""
-.SH NAME
-Mailx plugin for abrt(8)
-.SH DESCRIPTION
-.P
-.I abrt
-is a daemon that watches for application crashes. When a crash occurs,
-it collects the problem data and takes action according to
-its configuration. This manual page describes the \fIMailx\fP plugin
-for \fIabrt\fP.
-.P
-This plugin is used to mail the data about the crash
-to a specified mail address.
-.SH INVOCATION
-The plugin is invoked in the \fIabrt.conf\fP configuration file. It can take
-one parameter, a subject of the mail (if it differs from the
-one specified in the \fIMailx.conf\fP configuration file).
-.SH CONFIGURATION
-The \fIMailx.conf\fP configuration file contains
-several entries in a format "Option = Value". The options are:
-.SS Subject
-The subject of the mail.
-.SS Parameters
-The \fIMailx\fP plugin executes the external "mailx" command to
-send the mail. This option defines some additional command line
-parameters, which should be added to the program invocation, if any.
-.SS EmailFrom
-The address from which the email is sent.
-.SS EmailTo
-The address to which the email is sent.
-.SS SendBinaryData
-Can be "yes" or "no". If set to "yes", the email will also
-contain the binary files associated with the crash. Warning:
-this can cause the emails to be large! (several MB)
-.SH EXAMPLES
-.P
-These are snippets from the \fIabrt.conf\fP configuration file.
-.P
-1) Each time a crash happens, a mail is sent
-.PP
-[common]
-.br
-ActionsAndReporters = Mailx("[abrt] a crash occurs")
-.P
-2) When a program in a specific package (in this case "httpd") crashes,
-send a mail about it.
-.PP
-[AnalyzerActionsAndReporters]
-.br
-CCpp:httpd = Mailx("[abrt] Apache crash")
-.SH "SEE ALSO"
-.IR abrt (8),
-.IR abrt.conf (5),
-.IR abrt-plugins (7)
-.SH AUTHOR
-Written by Zdenek Prikryl <zprikryl@redhat.com>. Manual
-page by Daniel Novotny <dnovotny@redhat.com>.
diff --git a/src/plugins/abrt-action-bugzilla.txt b/src/plugins/abrt-action-bugzilla.txt
new file mode 100644
index 00000000..313e5b19
--- /dev/null
+++ b/src/plugins/abrt-action-bugzilla.txt
@@ -0,0 +1,96 @@
+abrt-action-buzilla(1)
+====================
+
+NAME
+----
+abrt-action-bugzilla - Sends problem information to bugzilla.
+
+SYNOPSIS
+--------
+'abrt-action-bugzilla' [-v] [-c CONFFILE] -d DIR
+
+DESCRIPTION
+-----------
+The tool reads a problem dump direcotry. Firstly, the tool is trying to find
+duplication of bug. If duplication is 'not' found, then a new bug is created.
+Otherwise if duplication 'is' found and bug is closed as duplication of the
+other bug, than, so called, 'hoping' begin. It means, that tool is going to try
+track the origin bug.
+
+Example of bug stages are:
+------------
+CLOSED DUPLICATE -> CLOSED DUPLICATE -> NEW
+------------
+Third one is the origin of the same problem. The tool adds a new comment to bug,
+logouts from bugzilla and return link to bug.
+
+Properties of bugzilla can be specified in a configuration file,
+and via environment variables.
+
+Configuration file
+~~~~~~~~~~~~~~~~~~
+Configuration file contains entries in a format "Option = Value".
+
+The options are:
+
+'Login'::
+ Login to Bugzilla account.
+
+'Password'::
+ Password to Bugzilla account.
+
+'BugzillaURL'::
+ Bugzilla http address. (default: https://bugzilla.redht.com)
+
+'SSLVerify'::
+ Use yes/true/on/1 to verify Bugzilla ssl certificate. (default: yes)
+
+Integration with ABRT events
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+'abrt-action-bugzilla' can be used as a reporter, to allow users report
+problems to bugzilla when they decide to do it. This usage is
+pre-configured in /etc/abrt/events.d/ccpp_events.conf and
+/etc/abrt/abrt_events.conf.
+
+For python problems (/etc/abrt/abrt_events.conf)
+------------
+EVENT=report_Bugzilla analyzer=Python
+ abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf
+------------
+
+For C/C++ problems (/etc/abrt/events.d/ccpp_events.conf)
+------------
+EVENT=report_Bugzilla analyzer=CCpp
+ abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf
+------------
+
+OPTIONS
+-------
+-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.
+
+'Bugzilla_Login'::
+ Login to Bugzilla account.
+
+'Bugzilla_Password'::
+ Password to Bugzilla account.
+
+'Bugzilla_BugzillaURL'::
+ Bugzilla http address. (default: https://bugzilla.redht.com)
+
+'Bugzilla_SSLVerify'::
+ Use yes/true/on/1 to verify Bugzilla ssl certificate. (default: yes)
+
+AUTHORS
+-------
+* ABRT team
diff --git a/src/plugins/abrt-action-list-dsos.txt b/src/plugins/abrt-action-list-dsos.txt
new file mode 100644
index 00000000..18d10708
--- /dev/null
+++ b/src/plugins/abrt-action-list-dsos.txt
@@ -0,0 +1,44 @@
+abrt-action-list-dsos(1)
+======================
+
+NAME
+----
+abrt-action-list-dsos - Prints out DSO from mapped memory regions.
+
+SYNOPSIS
+--------
+'abrt-action-list-dsos' [-o OUTFILE] -m PROC_PID_MAP_FILE
+
+DESCRIPTION
+-----------
+The tool reads a file containing the mapped memory regions.
+Output is printed to 'stdout' or 'file'.
+
+Output format:
+
+------------
+%p %n %v %i
+------------
+where
+
+'%p'::
+ path to library or binary file, which is mapped in memory region
+'%n'::
+ name, version, release, architecture of package, where '%p' belongs
+'%v'::
+ vendor of package
+'%i'::
+ installation time
+
+OPTIONS
+-------
+-o OUTFILE::
+ Output file, if not specified, it is printed to 'stdout'
+
+-m PROC_PID_MAP_FILE::
+ File containing the mapped memory regions
+
+AUTHORS
+-------
+* ABRT team
+
diff --git a/src/plugins/abrt-action-mailx.txt b/src/plugins/abrt-action-mailx.txt
index 2fb11bef..a12c2bf1 100644
--- a/src/plugins/abrt-action-mailx.txt
+++ b/src/plugins/abrt-action-mailx.txt
@@ -53,7 +53,7 @@ problem happens. When this is desired, modify the event configuration
file to run the tool on the 'post-create' event:
------------
-EVENT=post-create abrt-action-mailx
+EVENT=post-create abrt-action-mailx
------------
OPTIONS
diff --git a/src/plugins/abrt-retrace-client.c b/src/plugins/abrt-retrace-client.c
index aa232475..524fa186 100644
--- a/src/plugins/abrt-retrace-client.c
+++ b/src/plugins/abrt-retrace-client.c
@@ -103,7 +103,7 @@ static int create_archive(bool unlink_temp)
xmove_fd(tar_xz_pipe[0], STDIN_FILENO);
xdup2(tempfd, STDOUT_FILENO);
execvp(xz_args[0], (char * const*)xz_args);
- perror_msg("Can't execute '%s'", xz_args[0]);
+ perror_msg("Can't execute '%s'", xz_args[0]);
}
close(tar_xz_pipe[0]);
@@ -130,7 +130,7 @@ static int create_archive(bool unlink_temp)
xmove_fd(xopen("/dev/null", O_RDWR), STDIN_FILENO);
xmove_fd(tar_xz_pipe[1], STDOUT_FILENO);
execvp(tar_args[0], (char * const*)tar_args);
- perror_msg("Can't execute '%s'", tar_args[0]);
+ perror_msg("Can't execute '%s'", tar_args[0]);
}
close(tar_xz_pipe[1]);
diff --git a/src/plugins/abrt_rh_support.c b/src/plugins/abrt_rh_support.c
index 9a48485b..b83f041e 100644
--- a/src/plugins/abrt_rh_support.c
+++ b/src/plugins/abrt_rh_support.c
@@ -421,7 +421,7 @@ send_report_to_new_case(const char* baseURL,
atch_state->http_resp_code,
errmsg ? ": " : "",
errmsg ? errmsg : ""
- );
+ );
break;
case 200:
diff --git a/src/plugins/analyze_LocalGDB.xml.in b/src/plugins/analyze_LocalGDB.xml.in
index 925f2c41..4f7ccce1 100644
--- a/src/plugins/analyze_LocalGDB.xml.in
+++ b/src/plugins/analyze_LocalGDB.xml.in
@@ -5,4 +5,5 @@
<_long-description>Needs to downloads debuginfo packages, which might take significant time, and take up disk space.
However, unlike RetraceServer, doesn't send coredump to remote machines.
</_long-description>
+ <creates-elements>backtrace</creates-elements>
</event>
diff --git a/src/plugins/analyze_RetraceServer.xml.in b/src/plugins/analyze_RetraceServer.xml.in
index 497fa13e..d2072db5 100644
--- a/src/plugins/analyze_RetraceServer.xml.in
+++ b/src/plugins/analyze_RetraceServer.xml.in
@@ -6,6 +6,7 @@
Pros: no need for debuginfo downloads. Retrace server's database of debuginfos is more complete. Retrace server may generate better backtraces.
Cons: coredump you upload contains all the data from the crashed program, including your private data, if any.
</_long-description>
+ <creates-elements>backtrace</creates-elements>
<options>
<option type="text" name="RETRACE_SERVER_URL">
<_label>Retrace server URL</_label>
diff --git a/src/plugins/analyze_xsession_errors.xml.in b/src/plugins/analyze_xsession_errors.xml.in
new file mode 100644
index 00000000..9f7a46bf
--- /dev/null
+++ b/src/plugins/analyze_xsession_errors.xml.in
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<event>
+ <name>Collect .xsession-errors</name>
+ <_description>Save relevant lines from ~/.xsession-errors file</_description>
+ <_long-description>
+ Scans through ~/.xsession-errors file and saves those lines which contain executable's name.
+ The result is saved as 'xsession_errors' element.
+ </_long-description>
+ <creates-elements>xsession_errors</creates-elements>
+</event>
diff --git a/src/plugins/ccpp_events.conf b/src/plugins/ccpp_events.conf
index 0f574713..eb3384a6 100644
--- a/src/plugins/ccpp_events.conf
+++ b/src/plugins/ccpp_events.conf
@@ -1,31 +1,37 @@
EVENT=post-create analyzer=CCpp
- abrt-action-analyze-c &&
- abrt-action-list-dsos.py -m maps -o dsos
+ abrt-action-analyze-c &&
+ abrt-action-list-dsos.py -m maps -o dsos &&
+ (
+ # Try to save relevant log lines.
+ # Can't do it as analyzer step, non-root can't read log.
+ # It's not an error if /var/log/messages isn't readable:
+ test -f /var/log/messages || exit 0
+ test -r /var/log/messages || exit 0
+ executable=`cat executable` &&
+ base_executable=${executable##*/} &&
+ grep -e "$base_executable" /var/log/messages | tail -999 >var_log_messages &&
+ echo "Element 'var_log_messages' saved"
+ )
+
+EVENT=analyze_xsession_errors analyzer=CCpp
+ test -f ~/.xsession-errors || { echo "No ~/.xsession-errors"; exit 1; }
+ test -r ~/.xsession-errors || { echo "Can't read ~/.xsession-errors"; exit 1; }
+ executable=`cat executable` &&
+ base_executable=${executable##*/} &&
+ grep -e "$base_executable" ~/.xsession-errors | tail -999 >xsession_errors &&
+ echo "Element 'xsession_errors' saved"
-# We run analyze_foo steps only if backtrace is empty (not yet generated):
# TODO: can we still specify additional directories to search for debuginfos,
# or was this ability lost with move to python installer?
-EVENT=analyze_LocalGDB analyzer=CCpp backtrace=
- abrt-action-analyze-core.py --core=coredump -o build_ids &&
- abrt-action-install-debuginfo --size_mb=4096 &&
- abrt-action-generate-backtrace &&
- abrt-action-analyze-backtrace
-
-EVENT=analyze_RetraceServer analyzer=CCpp backtrace=
- abrt-retrace-client batch --dir "$DUMP_DIR" &&
- abrt-action-analyze-backtrace
-
-# Same as "analyze", but executed when user requests "refresh" in GUI
-# It doesn't check that backtrace is empty:
-EVENT=reanalyze_LocalGDB analyzer=CCpp
- abrt-action-analyze-core.py --core=coredump -o build_ids &&
- abrt-action-install-debuginfo --size_mb=4096 &&
- abrt-action-generate-backtrace &&
- abrt-action-analyze-backtrace
+EVENT=analyze_LocalGDB analyzer=CCpp
+ abrt-action-analyze-core.py --core=coredump -o build_ids &&
+ abrt-action-install-debuginfo --size_mb=4096 &&
+ abrt-action-generate-backtrace &&
+ abrt-action-analyze-backtrace
-EVENT=reanalyze_RetraceServer analyzer=CCpp
- abrt-retrace-client batch --dir "$DUMP_DIR" &&
- abrt-action-analyze-backtrace
+EVENT=analyze_RetraceServer analyzer=CCpp
+ abrt-retrace-client batch --dir "$DUMP_DIR" &&
+ abrt-action-analyze-backtrace
EVENT=report_Bugzilla analyzer=CCpp
- abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf
+ abrt-action-bugzilla -c /etc/abrt/plugins/Bugzilla.conf
diff --git a/src/report-python/reportmodule.c b/src/report-python/reportmodule.c
index c40cfaf6..92f435ce 100644
--- a/src/report-python/reportmodule.c
+++ b/src/report-python/reportmodule.c
@@ -30,7 +30,7 @@ static PyMethodDef module_methods[] = {
{ NULL }
};
-#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */
+#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */
#define PyMODINIT_FUNC void
#endif
PyMODINIT_FUNC