New upstream release 2.0.13

- Resolves: #741255
This commit is contained in:
Jakub Filak 2012-08-21 17:02:47 +02:00
parent 041177be2c
commit 353b15e1bc
22 changed files with 17 additions and 80211 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/libreport-2.0.10.tar.gz
/libreport-2.0.11.tar.gz
/libreport-2.0.12.tar.gz
/libreport-2.0.13.tar.gz

View File

@ -1,58 +0,0 @@
From a4a6498eea98356b1580411136e57c7518a58b79 Mon Sep 17 00:00:00 2001
From: Jiri Moskovcak <jmoskovc@redhat.com>
Date: Mon, 6 Aug 2012 16:43:23 +0200
Subject: [PATCH 1/2] don't try to delete dump dir which doesn't exist
rhbz#799909
---
po/POTFILES.in | 1 +
src/lib/abrt_sock.c | 14 ++++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 118ca80..c991817 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,6 +10,7 @@ src/gtk-helpers/secrets.c
src/gui-wizard-gtk/main.c
src/gui-wizard-gtk/wizard.c
src/gui-wizard-gtk/wizard.glade
+src/lib/abrt_sock.c
src/lib/create_dump_dir.c
src/lib/event_config.c
src/lib/parse_options.c
diff --git a/src/lib/abrt_sock.c b/src/lib/abrt_sock.c
index b2c9928..b595208 100644
--- a/src/lib/abrt_sock.c
+++ b/src/lib/abrt_sock.c
@@ -53,7 +53,7 @@ static int connect_to_abrtd_and_call_DeleteDebugDump(const char *dump_dir_name)
}
else
{
- perror_msg("Can't connect to '%s'", SOCKET_FILE);
+ VERB1 perror_msg("Can't connect to '%s'", SOCKET_FILE);
}
close(socketfd);
@@ -70,7 +70,17 @@ int delete_dump_dir_possibly_using_abrtd(const char *dump_dir_name)
return dd_delete(dd);
dd_close(dd);
}
+ else
+ {
+ if (errno == ENOENT || errno == ENOTDIR)
+ /* No such dir, no point in trying to talk over socket */
+ return 1;
+ }
VERB1 log("Deleting '%s' via abrtd", dump_dir_name);
- return connect_to_abrtd_and_call_DeleteDebugDump(dump_dir_name);
+ const int res = connect_to_abrtd_and_call_DeleteDebugDump(dump_dir_name);
+ if (res != 0)
+ error_msg(_("Can't delete: '%s'"), dump_dir_name);
+
+ return res;
}
--
1.7.11.2

View File

@ -1,91 +0,0 @@
From f86f1d1a222b0e018601065395be169a4beb2f5e Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 7 Aug 2012 00:09:30 +0200
Subject: [PATCH 2/2] report-gtk: fixed bug in automatic running of next event
- simplified code (the 'Forward' button is simultaneously clicked)
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/gui-wizard-gtk/wizard.c | 52 +++++++++------------------------------------
1 file changed, 10 insertions(+), 42 deletions(-)
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index f5ab343..ce7b742 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -197,6 +197,7 @@ static bool check_minimal_bt_rating(const char *event_name);
static const char *get_next_processed_event(GList **events_list);
static const char *setup_next_processed_event(GList **events_list);
static void setup_and_start_even_run(const char *event_name);
+static void on_next_btn_cb(GtkWidget *btn, gpointer user_data);
static void wrap_fixer(GtkWidget *widget, gpointer data_unused)
{
@@ -1511,54 +1512,21 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
terminate_event_chain();
}
else
- {
gtk_label_set_text(evd->status_label, evd->success_msg);
- if (!g_expert_mode)
- {
- const char *event = setup_next_processed_event(&g_auto_event_list);
- if (event)
- {
- if (event_need_review(event))
- {
- if (g_verbose)
- /* do not forward user directly to review page */
- /* because we want to show to user the results of */
- /* finished events and we don't have Back button */
- /* push back event to the beginning of the chain */
- /* and let the event selector page start event */
- /* processing */
- g_auto_event_list = g_list_prepend(g_auto_event_list,
- (gpointer)event);
- else
- /* everything was ok, there is no serious reason */
- /* to bother user with the logs */
- /* move gui directly to the review page */
- gtk_notebook_set_current_page(g_assistant,
- pages[PAGENO_EDIT_COMMENT].page_no);
- }
- else
- {
- free(g_event_selected);
- g_event_selected = xstrdup(event);
- setup_and_start_even_run(g_event_selected);
- }
- }
- }
-
- /*g_source_remove(evd->event_source_id);*/
- close(evd->fd);
- free_run_event_state(evd->run_state);
- strbuf_free(evd->event_log);
- free(evd);
+ /*g_source_remove(evd->event_source_id);*/
+ close(evd->fd);
+ free_run_event_state(evd->run_state);
+ strbuf_free(evd->event_log);
+ free(evd);
- /* Inform abrt-gui that it is a good idea to rescan the directory */
- kill(getppid(), SIGCHLD);
- }
+ /* Inform abrt-gui that it is a good idea to rescan the directory */
+ kill(getppid(), SIGCHLD);
- /* this event was the last event from the chain */
if (is_reporting_finished())
update_gui_on_finished_reporting();
+ else if (retval == 0 && !g_verbose && !g_expert_mode)
+ on_next_btn_cb(GTK_WIDGET(g_btn_next), NULL);
return FALSE; /* "please remove this event" */
}
--
1.7.11.2

View File

@ -1,29 +0,0 @@
From 673b451d38aa323a82da1d94718902bb88c56375 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 7 Aug 2012 11:01:10 +0200
Subject: [PATCH 03/10] fix leaks in list_possible_events()
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/lib/run_event.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/lib/run_event.c b/src/lib/run_event.c
index 6b48568..bc04c5e 100644
--- a/src/lib/run_event.c
+++ b/src/lib/run_event.c
@@ -603,7 +603,11 @@ char *list_possible_events(struct dump_dir *dd, const char *dump_dir_name, const
pfx, pfx_len /* for events with this prefix */
);
if (!cmd)
+ {
+ free_rule_list(rule_list);
+ free(event_name);
break;
+ }
free(cmd);
if (event_name)
--
1.7.11.2

View File

@ -1,66 +0,0 @@
From d74fcb70b4b9acec451479303978bcb23673d991 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Thu, 9 Aug 2012 14:29:15 +0200
Subject: [PATCH 04/10] Do not check for analyzer == "Kerneloops" when
appending "TAINTED" msg
The check was superfluous
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
src/plugins/rhbz.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
index b4a5a06..ea8c09d 100644
--- a/src/plugins/rhbz.c
+++ b/src/plugins/rhbz.c
@@ -632,7 +632,7 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,
}
else
{
- if (analyzer && !strcmp(analyzer, "Kerneloops"))
+ if (analyzer && strcmp(analyzer, "Kerneloops") == 0)
strbuf_append_str(buf_summary, "[abrt]");
else
strbuf_append_strf(buf_summary, "[abrt] %s", package);
@@ -643,8 +643,7 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,
if (reason)
strbuf_append_strf(buf_summary, ": %s", reason);
- if (tainted_short && analyzer
- && (strcmp(analyzer, "Kerneloops") == 0))
+ if (tainted_short)
{
strbuf_append_strf(buf_summary, ": TAINTED %s", tainted_short);
}
@@ -652,7 +651,7 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,
char *status_whiteboard = xasprintf("abrt_hash:%s", duphash);
char *full_dsc = NULL;
- if (analyzer && !strcmp(analyzer, "Kerneloops"))
+ if (analyzer && strcmp(analyzer, "Kerneloops") == 0)
{
char *bz_dsc = make_description_koops(problem_data, CD_TEXT_ATT_SIZE_BZ);
full_dsc = xasprintf("libreport version: "VERSION"\n%s", bz_dsc);
@@ -831,7 +830,7 @@ int rhbz_attach_files(struct abrt_xmlrpc *ax, const char *bug_id,
const char *analyzer = problem_data_get_content_or_NULL(problem_data,
FILENAME_ANALYZER);
/* Do not attach anything if analyzer is Kerneloops */
- if (!strcmp(analyzer, "Kerneloops"))
+ if (strcmp(analyzer, "Kerneloops") == 0)
return 0;
GHashTableIter iter;
@@ -853,7 +852,7 @@ int rhbz_attach_files(struct abrt_xmlrpc *ax, const char *bug_id,
const unsigned len = strlen(content);
/* For standard bugs, do not attach backtrace shorter than CD_TEXT_ATT_SIZE_BZ */
- if (!strcmp(name, FILENAME_BACKTRACE) && len < CD_TEXT_ATT_SIZE_BZ)
+ if (len < CD_TEXT_ATT_SIZE_BZ && strcmp(name, FILENAME_BACKTRACE) == 0)
continue;
rhbz_attach_blob(ax, name, bug_id, content, len, flags);
--
1.7.11.2

View File

@ -1,58 +0,0 @@
From 046a3ceb281888bc2cb026d29e3186b929fcceb7 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 8 Aug 2012 15:58:03 +0200
Subject: [PATCH 05/10] trac#660: add support for sendining-sensitive-data
event option
* configuration parser reads a value of the 'sendining-sensitive-data'
xml element
* the default value for this option is false
* the option means that 'an event sends possibly sensitive data somewhere'
* core file is an example of sensitive data
* this option is required for automatic execution of events from event
chain (a user have to get an approval)
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/include/event_config.h | 1 +
src/lib/event_xml_parser.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/src/include/event_config.h b/src/include/event_config.h
index 15ebf52..0ca3bda 100644
--- a/src/include/event_config.h
+++ b/src/include/event_config.h
@@ -80,6 +80,7 @@ typedef struct
bool ec_exclude_binary_items;
long ec_minimal_rating;
bool ec_skip_review;
+ bool ec_sending_sensitive_data;
GList *options;
} event_config_t;
diff --git a/src/lib/event_xml_parser.c b/src/lib/event_xml_parser.c
index cd99784..157b717 100644
--- a/src/lib/event_xml_parser.c
+++ b/src/lib/event_xml_parser.c
@@ -32,6 +32,7 @@
#define DEFAULT_VALUE_ELEMENT "default-value"
#define MINIMAL_RATING_ELEMENT "minimal-rating"
#define GUI_REVIEW_ELEMENTS "gui-review-elements"
+#define SENDING_SENSITIVE_DATA_ELEMENT "sending-sensitive-data"
#define REQUIRES_ELEMENT "requires-items"
#define EXCL_BY_DEFAULT_ELEMENT "exclude-items-by-default"
@@ -423,6 +424,10 @@ static void text(GMarkupParseContext *context,
{
ui->ec_skip_review = !string_to_bool(text_copy);
}
+ else if (strcmp(inner_element, SENDING_SENSITIVE_DATA_ELEMENT) == 0)
+ {
+ ui->ec_sending_sensitive_data = string_to_bool(text_copy);
+ }
}
free(text_copy);
}
--
1.7.11.2

View File

@ -1,103 +0,0 @@
From 58b2f3df81c46f8596a0a81bd2f8071948ec9238 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 8 Aug 2012 16:59:33 +0200
Subject: [PATCH 06/10] trac#660: report-gtk: introduce generic ask_yes_no()
function for options
* the generic ask_yes_no() function shows a standard 'yes/no' dialog
with a checkbox
* if user checks the checkbox the ask_yes_no() function immediately
returns 'yes' in the future calls
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/gui-wizard-gtk/wizard.c | 52 ++++++++++++++++++++++++++++-----------------
1 file changed, 33 insertions(+), 19 deletions(-)
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index ce7b742..861d922 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -310,46 +310,60 @@ static void update_window_title(void)
free(title);
}
-static void on_toggle_ask_steal_cb(GtkToggleButton *tb, gpointer user_data)
+static void on_toggle_ask_yes_no_save_result_cb(GtkToggleButton *tb, gpointer user_data)
{
- set_user_setting("ask_steal_dir", gtk_toggle_button_get_active(tb) ? "no" : "yes");
+ set_user_setting(user_data, gtk_toggle_button_get_active(tb) ? "no" : "yes");
}
-static bool ask_continue_before_steal(const char *base_dir, const char *dump_dir)
+/*
+ * Function shows a dialog with 'Yes/No' buttons and a check box allowing to
+ * remeber the answer. The answer is stored in configuration file under
+ * 'option_name' key.
+ */
+static bool ask_yes_no_save_result(const char *message, const char *option_name)
{
- const char *ask_steal_dir = get_user_setting("ask_steal_dir");
+ const char *ask_result = get_user_setting(option_name);
- if (ask_steal_dir && string_to_bool(ask_steal_dir) == false)
+ if (ask_result && string_to_bool(ask_result) == false)
return true;
GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(g_wnd_assistant),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_OK_CANCEL,
- _("Need writable directory, but '%s' is not writable."
- " Move it to '%s' and operate on the moved data?"),
- dump_dir, base_dir
- );
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_QUESTION,
+ GTK_BUTTONS_YES_NO,
+ "%s", message);
gint response = GTK_RESPONSE_CANCEL;
- g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(save_dialog_response), &response);
+ g_signal_connect(G_OBJECT(dialog), "response",
+ G_CALLBACK(save_dialog_response), &response);
- GtkWidget *ask_steal_cb = gtk_check_button_new_with_label(_("Don't ask me again"));
+ GtkWidget *ask_yes_no_cb = gtk_check_button_new_with_label(_("Don't ask me again"));
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
- ask_steal_cb, TRUE, TRUE, 0);
- g_signal_connect(ask_steal_cb, "toggled", G_CALLBACK(on_toggle_ask_steal_cb), NULL);
+ ask_yes_no_cb, TRUE, TRUE, 0);
+ g_signal_connect(ask_yes_no_cb, "toggled",
+ G_CALLBACK(on_toggle_ask_yes_no_save_result_cb), (gpointer)option_name);
/* check it by default if it's shown for the first time */
- if (!ask_steal_dir)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ask_steal_cb), TRUE);
+ if (!ask_result)
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ask_yes_no_cb), TRUE);
- gtk_widget_show(ask_steal_cb);
+ gtk_widget_show(ask_yes_no_cb);
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
return response == GTK_RESPONSE_OK;
}
+static bool ask_continue_before_steal(const char *base_dir, const char *dump_dir)
+{
+ char *msg = xasprintf(_("Need writable directory, but '%s' is not writable."
+ " Move it to '%s' and operate on the moved data?"),
+ dump_dir, base_dir);
+ const bool response = ask_yes_no_save_result(msg, "ask_steal_dir");
+ free(msg);
+ return response;
+}
+
struct dump_dir *wizard_open_directory_for_writing(const char *dump_dir_name)
{
struct dump_dir *dd = open_directory_for_writing(dump_dir_name,
--
1.7.11.2

View File

@ -1,62 +0,0 @@
From 98156aa13a496b83c998f651efd0f7f3f0700c6b Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 8 Aug 2012 17:52:00 +0200
Subject: [PATCH 07/10] trac#660: report-gtk asks for permission to send
sensitive data
* if the currently process event has configured 'sending-sensitive-data'
report-gtk asks for permission to continue with processing of the
event
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/gui-wizard-gtk/wizard.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 861d922..6f540a8 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -2028,6 +2028,22 @@ static void on_page_prepare(GtkNotebook *assistant, GtkWidget *page, gpointer us
}
}
+static bool get_sensitive_data_permission(const char *event_name)
+{
+ event_config_t *event_cfg = get_event_config(event_name);
+
+ if (!event_cfg || !event_cfg->ec_sending_sensitive_data)
+ return true;
+
+ char *msg = xasprintf(_("Event '%s' requires permission to send possibly sensitive data."
+ "\nDo you want to continue?"),
+ event_cfg->screen_name ? event_cfg->screen_name : event_name);
+ const bool response = ask_yes_no_save_result(msg, "ask_send_sensitive_data");
+ free(msg);
+
+ return response;
+}
+
static gint select_next_page_no(gint current_page_no, gpointer data)
{
GtkWidget *page;
@@ -2049,6 +2065,16 @@ static gint select_next_page_no(gint current_page_no, gpointer data)
}
free(g_event_selected);
+
+ if (!get_sensitive_data_permission(event))
+ {
+ g_event_selected = NULL;
+ gtk_label_set_text(g_lbl_event_log, _("Processing was cancelled"));
+ terminate_event_chain();
+ current_page_no = pages[PAGENO_EVENT_PROGRESS].page_no - 1;
+ goto again;
+ }
+
g_event_selected = xstrdup(event);
if (check_event_config(g_event_selected) != 0)
--
1.7.11.2

View File

@ -1,40 +0,0 @@
From ac9f6625886d5eb283335d88b45f4bdfccf8a226 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 8 Aug 2012 18:23:52 +0200
Subject: [PATCH 08/10] trac#660: report-cli asks for premission to send
sensitive data
* if the currently process event has configured 'sending-sensitive-data'
report-cli asks for permission to continue with processing of the
event
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/cli/cli-report.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/cli/cli-report.c b/src/cli/cli-report.c
index 77ae34a..2f988fa 100644
--- a/src/cli/cli-report.c
+++ b/src/cli/cli-report.c
@@ -1003,6 +1003,17 @@ int run_events_chain(const char *dump_dir_name, GList *chain)
if (config)
{
+ if (config->ec_sending_sensitive_data)
+ {
+ char *msg = xasprintf(_("Event '%s' requires permision to send possibly sensitive data."
+ " Do you want to continue?"),
+ config->screen_name ? config->screen_name : event);
+ const bool response = ask_yesno(msg);
+ free(msg);
+ if (!response)
+ break;
+ }
+
/* can't fail */
ask_for_missing_settings(event);
--
1.7.11.2

View File

@ -1,112 +0,0 @@
From 945e99efc043b3a8ca34615a4bd3f649fd8602c3 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 31 Jul 2012 17:39:17 +0200
Subject: [PATCH 09/10] trac#623 : dd_opendir() fails if time file doesn't
contain valid time stamp
* the old implementation checks only presence of the time file
* now we check validity of the time file
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/lib/dump_dir.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 60 insertions(+), 3 deletions(-)
diff --git a/src/lib/dump_dir.c b/src/lib/dump_dir.c
index eef01f7..6a44359 100644
--- a/src/lib/dump_dir.c
+++ b/src/lib/dump_dir.c
@@ -109,6 +109,63 @@ static bool exist_file_dir(const char *path)
return false;
}
+/* Returns true if the file is not readable or */
+/* if the file doesn't contain valid unixt time stamp */
+/* implementation is a compromise between efficiency and accuracy */
+/* the function gets false negative results for big numbers */
+static bool not_valid_time_file(const char *filename)
+{
+ /* Open input file, and parse it. */
+ int fd = open(filename, O_RDONLY);
+ if (fd < 0)
+ {
+ VERB2 perror_msg("Can't open '%s'", filename);
+ return true;
+ }
+
+ /* ~ maximal number of digits for positive time stamp string*/
+ char time_buf[sizeof(time_t) * 3 + 1];
+ ssize_t rdsz = read(fd, time_buf, sizeof(time_buf));
+
+ /* Just reading, so no need to check the returned value. */
+ close(fd);
+
+ if (rdsz == -1)
+ {
+ VERB2 perror_msg("Can't read from '%s'", filename);
+ return true;
+ }
+
+ /* approximate maximal number of digits in timestamp is sizeof(time_t)*3 */
+ /* buffer has this size + 1 byte for trailing '\0' */
+ /* if whole size of buffer was read then file is bigger */
+ /* than string representing maximal time stamp */
+ if (rdsz == sizeof(time_buf))
+ {
+ VERB2 log("File '%s' is too long to be valid unix "
+ "time stamp (max size %zdB)", filename, sizeof(time_buf));
+ return true;
+ }
+
+ /* Our tools don't put trailing newline into time file,
+ * but we allow such format too:
+ */
+ if (rdsz > 0 && time_buf[rdsz - 1] == '\n')
+ rdsz--;
+ time_buf[rdsz] = '\0';
+
+ /* the value should fit to timestamp number range because of file size */
+ /* condition above, hence check if the value string consists only from digits */
+ if (!isdigit_str(time_buf))
+ {
+ VERB2 log("File '%s' doesn't contain valid unix "
+ "time stamp ('%s')", filename, time_buf);
+ return true;
+ }
+
+ return false;
+}
+
/* Return values:
* -1: error (in this case, errno is 0 if error message is already logged)
* 0: failed to lock (someone else has it locked)
@@ -203,7 +260,7 @@ static int dd_lock(struct dump_dir *dd, unsigned sleep_usec, int flags)
if (sleep_usec == WAIT_FOR_OTHER_PROCESS_USLEEP) /* yes */
{
strcpy(lock_buf + dirname_len, "/"FILENAME_TIME);
- if (access(lock_buf, F_OK) != 0)
+ if (not_valid_time_file(lock_buf))
{
/* time file doesn't exist. We managed to lock the directory
* which was just created by somebody else, or is almost deleted
@@ -212,7 +269,7 @@ static int dd_lock(struct dump_dir *dd, unsigned sleep_usec, int flags)
*/
strcpy(lock_buf + dirname_len, "/.lock");
xunlink(lock_buf);
- VERB1 log("Unlocked '%s' (no time file)", lock_buf);
+ VERB1 log("Unlocked '%s' (no or corrupted time file)", lock_buf);
if (--count == 0)
{
errno = EISDIR; /* "this is an ordinary dir, not dump dir" */
@@ -303,7 +360,7 @@ struct dump_dir *dd_opendir(const char *dir, int flags)
&& access(dir, R_OK) == 0
) {
char *time_file_name = concat_path_file(dir, FILENAME_TIME);
- if (access(time_file_name, R_OK) != 0)
+ if (not_valid_time_file(time_file_name))
{
dd_close(dd);
dd = NULL;
--
1.7.11.2

View File

@ -1,77 +0,0 @@
From a1479b71b40290ad7faeb72a7ea0fd47324cd300 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Fri, 10 Aug 2012 10:32:14 +0200
Subject: [PATCH 10/10] wizard: small changes to message texts and one
function name
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
src/gui-wizard-gtk/wizard.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 6f540a8..5d399f4 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -1279,7 +1279,7 @@ static void on_btn_cancel_event(GtkButton *button)
kill(- g_event_child_pid, SIGTERM);
}
-static bool is_reporting_finished()
+static bool is_processing_finished()
{
return !g_expert_mode && !g_auto_event_list;
}
@@ -1327,7 +1327,7 @@ static char *run_event_gtk_logging(char *log_line, void *param)
VERB1 log("Received a request for termination of processing of event chain. (Request: '%s')", log_line);
terminate_event_chain();
if (!g_expert_mode)
- evd->success_msg = _("Reporting finished. Thank you!");
+ evd->success_msg = _("Processing finished.");
}
return log_line;
@@ -1537,7 +1537,7 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
/* Inform abrt-gui that it is a good idea to rescan the directory */
kill(getppid(), SIGCHLD);
- if (is_reporting_finished())
+ if (is_processing_finished())
update_gui_on_finished_reporting();
else if (retval == 0 && !g_verbose && !g_expert_mode)
on_next_btn_cb(GTK_WIDGET(g_btn_next), NULL);
@@ -1605,7 +1605,7 @@ static void start_event_run(const char *event_name,
free_run_event_state(state);
if (!g_expert_mode)
{
- char *msg = xasprintf(_("Reporting was interrupted. Can't contiue without writable directory. Thank you!"));
+ char *msg = xasprintf(_("Processing interrupted: can't continue without writable directory."));
gtk_label_set_text(status_label, msg);
free(msg);
terminate_event_chain();
@@ -1901,10 +1901,10 @@ static void setup_and_start_even_run(const char *event_name)
g_lbl_event_log,
_("Processing..."),
g_expert_mode ? _("Processing failed. You can try another operation if available.")
- : _("Processing failed. Nothing more can be done. Thank you!"),
+ : _("Processing failed."),
/* this event is the last event from the chain */
- is_reporting_finished() ? _("Reporting finished. Thank you!")
- : _("Processing finished, please proceed to the next step.")
+ is_processing_finished() ? _("Processing finished.")
+ : _("Processing finished, please proceed to the next step.")
);
}
@@ -1937,7 +1937,7 @@ static const char *setup_next_processed_event(GList **events_list)
free(g_event_selected);
g_event_selected = NULL;
/* No next event, go to progress page and finish */
- gtk_label_set_text(g_lbl_event_log, _("Reporting finished. Thank you!"));
+ gtk_label_set_text(g_lbl_event_log, _("Processing finished."));
update_gui_on_finished_reporting();
return NULL;
}
--
1.7.11.2

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
From e2b7b7ed494e8b822aba0617d1a555a51ebdf76c Mon Sep 17 00:00:00 2001
From: Jiri Moskovcak <jmoskovc@redhat.com>
Date: Mon, 13 Aug 2012 13:56:06 +0200
Subject: [LIBREPORT PATCH 12/16] added internal_libreport.h into POTFILES.in
rhbz#801255
---
po/POTFILES.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c991817..668c526 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -10,6 +10,7 @@ src/gtk-helpers/secrets.c
src/gui-wizard-gtk/main.c
src/gui-wizard-gtk/wizard.c
src/gui-wizard-gtk/wizard.glade
+src/include/internal_libreport.h
src/lib/abrt_sock.c
src/lib/create_dump_dir.c
src/lib/event_config.c
--
1.7.11.2

View File

@ -1,34 +0,0 @@
From 5f91ab6a3db9159596839956eb9c396a87977574 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 13 Aug 2012 17:11:58 +0200
Subject: [LIBREPORT PATCH 13/16] report-gtk: don't log THANKYOU message
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/gui-wizard-gtk/wizard.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 5d399f4..16728b6 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -1320,7 +1320,6 @@ static void run_event_gtk_error(const char *error_line, void *param)
static char *run_event_gtk_logging(char *log_line, void *param)
{
struct analyze_event_data *evd = (struct analyze_event_data *)param;
- update_command_run_log(log_line, evd);
if (strcmp(log_line, "THANKYOU") == 0)
{
@@ -1329,6 +1328,8 @@ static char *run_event_gtk_logging(char *log_line, void *param)
if (!g_expert_mode)
evd->success_msg = _("Processing finished.");
}
+ else
+ update_command_run_log(log_line, evd);
return log_line;
}
--
1.7.11.2

View File

@ -1,67 +0,0 @@
From a71786ab92bdc45f5eae09ffe9d2839e86f5be11 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 9 Aug 2012 17:52:00 +0200
Subject: [LIBREPORT PATCH 14/16] trac#556: skip not provided bz bug
description template fields
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/rhbz.c | 35 +++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
index ea8c09d..3bdf139 100644
--- a/src/plugins/rhbz.c
+++ b/src/plugins/rhbz.c
@@ -659,29 +659,32 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,
}
else
{
+ /* Generating of a description according to the RH bugzilla default format:
+ * https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora
+ */
+ struct strbuf *tmp_full_dsc = strbuf_new();
+
const char *comment = problem_data_get_content_or_NULL(problem_data,
FILENAME_COMMENT);
+ if (comment)
+ strbuf_append_strf(tmp_full_dsc, "Description of problem:\n%s\n\n", comment);
+
+ if (package)
+ strbuf_append_strf(tmp_full_dsc, "Version-Release number of selected component:\n%s\n\n", package);
char *bz_dsc = make_description(problem_data, (char**)g_additional_info_files,
- CD_TEXT_ATT_SIZE_BZ, MAKEDESC_SHOW_MULTILINE | MAKEDESC_WHITELIST);
+ CD_TEXT_ATT_SIZE_BZ, MAKEDESC_SHOW_MULTILINE | MAKEDESC_WHITELIST);
+ strbuf_append_strf(tmp_full_dsc, "Additional info:\nlibreport version: "VERSION"\n%s\n", bz_dsc);
+ free(bz_dsc);
char *backtrace = rhbz_get_backtrace_info(problem_data, CD_TEXT_ATT_SIZE_BZ);
+ if (backtrace)
+ {
+ strbuf_append_str(tmp_full_dsc, backtrace);
+ free(backtrace);
+ }
- /* Generating of a description according to the RH bugzilla default format:
- * https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora
- */
- full_dsc = xasprintf("Description of problem:\n%s\n\n"
- "Version-Release number of selected component:\n%s\n\n"
- "Additional info:\n"
- "libreport version: "VERSION"\n%s\n"
- "%s",
- comment ? comment : "",
- package,
- bz_dsc,
- backtrace ? backtrace : "");
-
- free(backtrace);
- free(bz_dsc);
+ full_dsc = strbuf_free_nobuf(tmp_full_dsc);
}
char *product = NULL;
--
1.7.11.2

View File

@ -1,181 +0,0 @@
From 51efa4446d8cf30c88d0b31a9b26a9223fecdaee Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 9 Aug 2012 18:37:40 +0200
Subject: [LIBREPORT PATCH 15/16] rhbz#846389: generate koops description
according to rhbz std template
New kernel bug reports is to be created according the following
template:
<if comment exists:>
Description of problem:
<$user's comment>
<fi>
Additional info:
libreport version: <$libreport version>
abrt_version: <$abrt version>
cmdline: <$cmdline>
kernel: <$kernel version>
tainted_long: <$tainted long if present>
backtrace:
<$stack trace>
No files attacheced.
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/include/internal_libreport.h | 2 --
src/lib/make_descr.c | 19 ------------
src/plugins/rhbz.c | 66 ++++++++++++++++++----------------------
3 files changed, 29 insertions(+), 58 deletions(-)
diff --git a/src/include/internal_libreport.h b/src/include/internal_libreport.h
index e0cd7e6..db22ae1 100644
--- a/src/include/internal_libreport.h
+++ b/src/include/internal_libreport.h
@@ -587,8 +587,6 @@ char *make_description_item_multiline(const char *name, const char* content);
char* make_description_bz(problem_data_t *problem_data, unsigned max_text_size);
#define make_description_logger libreport_make_description_logger
char* make_description_logger(problem_data_t *problem_data, unsigned max_text_size);
-#define make_description_koops libreport_make_description_koops
-char* make_description_koops(problem_data_t *problem_data, unsigned max_text_size);
//UNUSED
//#define make_description_mailx libreport_make_description_mailx
//char* make_description_mailx(problem_data_t *problem_data);
diff --git a/src/lib/make_descr.c b/src/lib/make_descr.c
index c8c0f71..0b4cdb5 100644
--- a/src/lib/make_descr.c
+++ b/src/lib/make_descr.c
@@ -298,22 +298,3 @@ char* make_description_logger(problem_data_t *problem_data, unsigned max_text_si
MAKEDESC_SHOW_FILES | MAKEDESC_SHOW_MULTILINE
);
}
-
-/* Items we want to include to bz */
-static const char *const whitelisted_items[] = {
- FILENAME_CMDLINE,
- FILENAME_BACKTRACE,
- NULL
-};
-
-char* make_description_koops(problem_data_t *problem_data, unsigned max_text_size)
-{
- return make_description(
- problem_data,
- (char**)whitelisted_items,
- max_text_size,
- MAKEDESC_SHOW_FILES
- | MAKEDESC_SHOW_MULTILINE
- | MAKEDESC_WHITELIST
- );
-}
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
index 3bdf139..9c9ea34 100644
--- a/src/plugins/rhbz.c
+++ b/src/plugins/rhbz.c
@@ -624,15 +624,20 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,
FILENAME_ANALYZER);
const char *tainted_short = problem_data_get_content_or_NULL(problem_data,
FILENAME_TAINTED_SHORT);
+ const char *comment = problem_data_get_content_or_NULL(problem_data,
+ FILENAME_COMMENT);
struct strbuf *buf_summary = strbuf_new();
+
+ const bool kerneloops = analyzer && strcmp(analyzer, "Kerneloops") == 0;
+
if (analyzer && strcmp(analyzer, "libreport") == 0)
{
strbuf_append_str(buf_summary, reason);
}
else
{
- if (analyzer && strcmp(analyzer, "Kerneloops") == 0)
+ if (kerneloops)
strbuf_append_str(buf_summary, "[abrt]");
else
strbuf_append_strf(buf_summary, "[abrt] %s", package);
@@ -644,48 +649,34 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,
strbuf_append_strf(buf_summary, ": %s", reason);
if (tainted_short)
- {
strbuf_append_strf(buf_summary, ": TAINTED %s", tainted_short);
- }
}
- char *status_whiteboard = xasprintf("abrt_hash:%s", duphash);
- char *full_dsc = NULL;
- if (analyzer && strcmp(analyzer, "Kerneloops") == 0)
+ /* Generating of a description according to the RH bugzilla default format:
+ * https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora
+ */
+ struct strbuf *tmp_full_dsc = strbuf_new();
+ if (comment)
+ strbuf_append_strf(tmp_full_dsc, "Description of problem:\n%s\n\n", comment);
+
+ /* the package file always contains 'kernel' string in case of kerneloops */
+ /* it doesn't make sense to mess up a description with this useless information */
+ if (package && !kerneloops)
+ strbuf_append_strf(tmp_full_dsc, "Version-Release number of selected component:\n%s\n\n", package);
+
+ char *bz_dsc = make_description(problem_data, (char**)g_additional_info_files,
+ CD_TEXT_ATT_SIZE_BZ, MAKEDESC_SHOW_MULTILINE | MAKEDESC_WHITELIST);
+ strbuf_append_strf(tmp_full_dsc, "Additional info:\nlibreport version: "VERSION"\n%s\n", bz_dsc);
+ free(bz_dsc);
+
+ char *backtrace = rhbz_get_backtrace_info(problem_data, CD_TEXT_ATT_SIZE_BZ);
+ if (backtrace)
{
- char *bz_dsc = make_description_koops(problem_data, CD_TEXT_ATT_SIZE_BZ);
- full_dsc = xasprintf("libreport version: "VERSION"\n%s", bz_dsc);
- free(bz_dsc);
+ strbuf_append_str(tmp_full_dsc, backtrace);
+ free(backtrace);
}
- else
- {
- /* Generating of a description according to the RH bugzilla default format:
- * https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora
- */
- struct strbuf *tmp_full_dsc = strbuf_new();
- const char *comment = problem_data_get_content_or_NULL(problem_data,
- FILENAME_COMMENT);
- if (comment)
- strbuf_append_strf(tmp_full_dsc, "Description of problem:\n%s\n\n", comment);
-
- if (package)
- strbuf_append_strf(tmp_full_dsc, "Version-Release number of selected component:\n%s\n\n", package);
-
- char *bz_dsc = make_description(problem_data, (char**)g_additional_info_files,
- CD_TEXT_ATT_SIZE_BZ, MAKEDESC_SHOW_MULTILINE | MAKEDESC_WHITELIST);
- strbuf_append_strf(tmp_full_dsc, "Additional info:\nlibreport version: "VERSION"\n%s\n", bz_dsc);
- free(bz_dsc);
-
- char *backtrace = rhbz_get_backtrace_info(problem_data, CD_TEXT_ATT_SIZE_BZ);
- if (backtrace)
- {
- strbuf_append_str(tmp_full_dsc, backtrace);
- free(backtrace);
- }
-
- full_dsc = strbuf_free_nobuf(tmp_full_dsc);
- }
+ char *full_dsc = strbuf_free_nobuf(tmp_full_dsc);
char *product = NULL;
char *version = NULL;
@@ -693,6 +684,7 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,
xmlrpc_value* result = NULL;
char *summary = strbuf_free_nobuf(buf_summary);
+ char *status_whiteboard = xasprintf("abrt_hash:%s", duphash);
if (!group)
{
--
1.7.11.2

View File

@ -1,27 +0,0 @@
From 2b2c672b89d6c44a4c63d412f19631323d099490 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 14 Aug 2012 11:27:16 +0200
Subject: [LIBREPORT PATCH 16/16] report-gtk: bug fix, compare ask yes/no
dialog response to correct constant
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/gui-wizard-gtk/wizard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
index 16728b6..a4b3961 100644
--- a/src/gui-wizard-gtk/wizard.c
+++ b/src/gui-wizard-gtk/wizard.c
@@ -351,7 +351,7 @@ static bool ask_yes_no_save_result(const char *message, const char *option_name)
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
- return response == GTK_RESPONSE_OK;
+ return response == GTK_RESPONSE_YES;
}
static bool ask_continue_before_steal(const char *base_dir, const char *dump_dir)
--
1.7.11.2

View File

@ -1,60 +0,0 @@
From 9eb7698dc060869cffb56039407411c8885ec3de Mon Sep 17 00:00:00 2001
From: Michal Toman <mtoman@redhat.com>
Date: Wed, 15 Aug 2012 10:15:45 +0200
Subject: [LIBREPORT PATCH 17/19] show message from the server for known
uReports
---
src/plugins/ureport.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/plugins/ureport.c b/src/plugins/ureport.c
index 5d3d5bc..3913a89 100644
--- a/src/plugins/ureport.c
+++ b/src/plugins/ureport.c
@@ -52,6 +52,7 @@ enum response_type
struct ureport_server_response {
enum response_type type;
const char *value;
+ const char *message;
};
/*
@@ -76,7 +77,12 @@ static bool ureport_server_parse_json(json_object *json, struct ureport_server_r
if (obj)
{
out_response->type = UREPORT_SERVER_RESP_KNOWN;
- out_response->value = json_object_to_json_string(obj);
+ out_response->value = json_object_get_string(obj);
+
+ json_object *message = json_object_object_get(json, "message");
+ if (message)
+ out_response->message = json_object_get_string(message);
+
return true;
}
@@ -150,6 +156,7 @@ int main(int argc, char **argv)
struct ureport_server_response response = {
.type=UREPORT_SERVER_RESP_UNKNOWN_TYPE,
.value=NULL,
+ .message=NULL,
};
const bool is_valid_response = ureport_server_parse_json(json, &response);
@@ -167,7 +174,12 @@ int main(int argc, char **argv)
ret = 0;
/* If a reported problem is not known then emit NEEDMORE */
if (strcmp("true", response.value) == 0)
+ {
+ log("This problem has already been reported.");
+ if (response.message)
+ log(response.message);
log("THANKYOU");
+ }
break;
case UREPORT_SERVER_RESP_ERROR:
VERB1 log("server side error: %s", response.value);
--
1.7.11.2

View File

@ -1,32 +0,0 @@
From dcecc5b0c7384075cdd060efbcf80157f59bd4f5 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 14 Aug 2012 16:51:35 +0200
Subject: [LIBREPORT PATCH 18/19] trac#678: reporter-bugzilla: do not attach
empty files
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/rhbz.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
index 9c9ea34..b1c6b76 100644
--- a/src/plugins/rhbz.c
+++ b/src/plugins/rhbz.c
@@ -841,6 +841,13 @@ int rhbz_attach_files(struct abrt_xmlrpc *ax, const char *bug_id,
if (is_in_string_list(name, (char**)g_not_attached_files))
continue;
+ /* Skip empty files */
+ if (strlen(value->content) == 0)
+ {
+ log(_("Not attaching empty file '%s'"), name);
+ continue;
+ }
+
if (value->flags & CD_FLAG_TXT)
{
const char *content = value->content;
--
1.7.11.2

View File

@ -1,117 +0,0 @@
From 55af9a96d9ba4748309d0b5fb2bf6ca82b9beafd Mon Sep 17 00:00:00 2001
From: Martin Milata <mmilata@redhat.com>
Date: Mon, 13 Aug 2012 18:38:14 +0200
Subject: [LIBREPORT PATCH 19/20] rhbz#741255: don't autodetect executable for
sealert reports
- Code that adds information about current process was moved from
problem_data_add_basics to new function
problem_data_add_current_process_data.
- This change is also reflected in the python bindings (new method:
add_current_process).
- In report-python, createAlertSignature takes optional argument that
can be used to manually set the executable.
---
src/include/problem_data.h | 2 ++
src/lib/problem_data.c | 3 +++
src/report-python/__init__.py | 7 +++++--
src/report-python/problem_data.c | 17 +++++++++++++----
4 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/src/include/problem_data.h b/src/include/problem_data.h
index b03e272..d741b5d 100644
--- a/src/include/problem_data.h
+++ b/src/include/problem_data.h
@@ -66,6 +66,8 @@ static inline void problem_data_free(problem_data_t *problem_data)
void problem_data_add_basics(problem_data_t *pd);
+void problem_data_add_current_process_data(problem_data_t *pd);
+
void problem_data_add(problem_data_t *problem_data,
const char *name,
const char *content,
diff --git a/src/lib/problem_data.c b/src/lib/problem_data.c
index 06ff3cf..724a702 100644
--- a/src/lib/problem_data.c
+++ b/src/lib/problem_data.c
@@ -107,7 +107,10 @@ void problem_data_add_basics(problem_data_t *pd)
problem_data_add_text_noteditable(pd, FILENAME_DUPHASH, hash_str);
}
+}
+void problem_data_add_current_process_data(problem_data_t *pd)
+{
const char *executable = problem_data_get_content_or_NULL(pd, FILENAME_EXECUTABLE);
if (executable == NULL)
{
diff --git a/src/report-python/__init__.py b/src/report-python/__init__.py
index 34b1ed1..9c5e6b3 100644
--- a/src/report-python/__init__.py
+++ b/src/report-python/__init__.py
@@ -130,13 +130,15 @@ def getVersion():
return _hardcoded_default_version
-def createAlertSignature(component, hashmarkername, hashvalue, summary, alertSignature):
+def createAlertSignature(component, hashmarkername, hashvalue, summary, alertSignature, executable=None):
pd = problem_data()
pd.add("component", component)
pd.add("hashmarkername", hashmarkername)
pd.add("duphash", hashvalue)
pd.add("reason", summary)
pd.add("description", alertSignature)
+ if executable:
+ pd.add("executable", executable)
pd.add_basics()
return pd
@@ -163,7 +165,8 @@ def createPythonUnhandledExceptionSignature(**kwargs):
if (version and product):
# need to add "release", parse_release() expects format "<product> release <version>"
pd.add("os_release", product +" release "+ version)
- pd.add_basics() # adds product and version + some other required field
+ pd.add_basics() # adds required items
+ pd.add_current_proccess() # adds executable and component
return pd
diff --git a/src/report-python/problem_data.c b/src/report-python/problem_data.c
index d5e0133..666d839 100644
--- a/src/report-python/problem_data.c
+++ b/src/report-python/problem_data.c
@@ -120,6 +120,14 @@ static PyObject *p_problem_data_add_basics(PyObject *pself, PyObject *always_nul
Py_RETURN_NONE;
}
+static PyObject *p_problem_data_add_current_process(PyObject *pself, PyObject *always_null)
+{
+ p_problem_data *self = (p_problem_data*)pself;
+ problem_data_add_current_process_data(self->cd);
+
+ Py_RETURN_NONE;
+}
+
//static PyMemberDef p_problem_data_members[] = {
// { NULL }
@@ -127,10 +135,11 @@ static PyObject *p_problem_data_add_basics(PyObject *pself, PyObject *always_nul
static PyMethodDef p_problem_data_methods[] = {
/* method_name, func, flags, doc_string */
- { "add" , p_problem_data_add , METH_VARARGS },
- { "get" , p_problem_data_get_item , METH_VARARGS },
- { "create_dump_dir", p_create_dump_dir_from_problem_data, METH_VARARGS },
- { "add_basics", p_problem_data_add_basics, METH_NOARGS },
+ { "add" , p_problem_data_add , METH_VARARGS },
+ { "get" , p_problem_data_get_item , METH_VARARGS },
+ { "create_dump_dir" , p_create_dump_dir_from_problem_data, METH_VARARGS },
+ { "add_basics" , p_problem_data_add_basics , METH_NOARGS },
+ { "add_current_proccess", p_problem_data_add_current_process , METH_NOARGS },
{ NULL }
};
--
1.7.11.2

View File

@ -4,31 +4,12 @@
Summary: Generic library for reporting various problems
Name: libreport
Version: 2.0.12
Release: 5%{?dist}
Version: 2.0.13
Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: https://fedorahosted.org/abrt/
Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
Patch1: 0001-don-t-try-to-delete-dump-dir-which-doesn-t-exist-rhb.patch
Patch2: 0002-report-gtk-fixed-bug-in-automatic-running-of-next-ev.patch
Patch3: 0003-fix-leaks-in-list_possible_events.patch
Patch4: 0004-Do-not-check-for-analyzer-Kerneloops-when-appending-.patch
Patch5: 0005-trac-660-add-support-for-sendining-sensitive-data-ev.patch
Patch6: 0006-trac-660-report-gtk-introduce-generic-ask_yes_no-fun.patch
Patch7: 0007-trac-660-report-gtk-asks-for-permission-to-send-sens.patch
Patch8: 0008-trac-660-report-cli-asks-for-premission-to-send-sens.patch
Patch9: 0009-trac-623-dd_opendir-fails-if-time-file-doesn-t-conta.patch
Patch10: 0010-wizard-small-changes-to-message-texts-and-one-functi.patch
Patch11: 0011-updated-po-files.patch
Patch12: 0012-added-internal_libreport.h-into-POTFILES.in-rhbz-801.patch
Patch13: 0013-report-gtk-don-t-log-THANKYOU-message.patch
Patch14: 0014-trac-556-skip-not-provided-bz-bug-description-templa.patch
Patch15: 0015-rhbz-846389-generate-koops-description-according-to-.patch
Patch16: 0016-report-gtk-bug-fix-compare-ask-yes-no-dialog-respons.patch
Patch17: 0017-show-message-from-the-server-for-known-uReports.patch
Patch18: 0018-trac-678-reporter-bugzilla-do-not-attach-empty-files.patch
Patch19: 0019-rhbz-741255-don-t-autodetect-executable-for-sealert-.patch
BuildRequires: dbus-devel
BuildRequires: gtk3-devel
@ -245,30 +226,10 @@ Plugin to report bugs into anonymous FTP site associated with ticketing system.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%build
autoconf
%configure
CFLAGS="%{optflags}"
CFLAGS="%{optflags} -Werror" %configure --disable-silent-rules
make %{?_smp_mflags}
%install
@ -436,6 +397,18 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%config(noreplace) %{_sysconfdir}/libreport/events.d/uploader_event.conf
%changelog
* Tue Aug 21 2012 Jakub Filak <jfilak@redhat.com> 2.0.13-1
- rhbz#741255: don't autodetect executable for sealert reports
- reporter-ureport: save backtrace hash to reported_to
- trac#683: show the description file in bugzilla comment 0
- trac#684: report-gtk saves only loaded files
- reporter-ureport: allow sending attachments
- event_config_dialog: make it resizable; tweak Uploader hint
- add python binding for problem_data_send_to_abrt
- reporter-ureport: attach bug ID from reported_to
- reporter-ureport: make configurable only URL to a server
- Resolves: #741255
* Wed Aug 15 2012 Jakub Filak <jfilak@redhat.com> 2.0.12-5
- rhbz#741255: don't autodetect executable for sealert reports
- show message from the server for known uReports

View File

@ -1 +1 @@
6deeeb2d184b8d3ceae69c496d6cbfb4 libreport-2.0.12.tar.gz
671e86b5e64a2f60f6c724ed946c8408 libreport-2.0.13.tar.gz