Compare commits
10 Commits
abbfa0328f
...
825b013e61
Author | SHA1 | Date |
---|---|---|
Michal Srb | 825b013e61 | |
Michal Srb | fe1b2aa550 | |
Michal Srb | 8fa03e1482 | |
Michal Fabik | 8f163dc8f5 | |
Mohan Boddu | c504cda1f2 | |
Michal Fabik | 36a3b575d3 | |
Lukas Zachar | 6f6b289ac2 | |
Mohan Boddu | fbf4d46a4d | |
Mohan Boddu | 9c998184a0 | |
DistroBaker | fb7ae4546d |
|
@ -13,3 +13,4 @@
|
|||
/libreport-2.13.0.tar.gz
|
||||
/libreport-2.13.1.tar.gz
|
||||
/libreport-2.14.0.tar.gz
|
||||
/libreport-2.15.2.tar.gz
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
664ec7534bb2207e380d5b34f2260d41abb1a31b libreport-2.15.2.tar.gz
|
|
@ -0,0 +1,48 @@
|
|||
From 3389fbeb5cf00fd515049a6a9db3c5cc4ca383a0 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Srb <michal@redhat.com>
|
||||
Date: Thu, 26 Aug 2021 19:20:52 +0200
|
||||
Subject: [PATCH] Change the default Bugzilla group
|
||||
|
||||
Signed-off-by: Michal Srb <michal@redhat.com>
|
||||
---
|
||||
configure.ac | 6 +++---
|
||||
src/plugins/bugzilla.conf | 4 ++--
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fa97fa78..aa383083 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -98,14 +98,14 @@ AC_PATH_PROG([XMLRPC], [xmlrpc-c-config], [no])
|
||||
AC_ARG_WITH([redhatbugzillacreateprivate],
|
||||
AS_HELP_STRING([--with-redhatbugzillacreateprivate="yes/no"],
|
||||
[Whether the Red Hat Bugzilla plugin should open
|
||||
- bugs private by default ("no")]),
|
||||
- [], [with_redhatbugzillacreateprivate="no"])
|
||||
+ bugs private by default ("yes")]),
|
||||
+ [], [with_redhatbugzillacreateprivate="yes"])
|
||||
AC_SUBST([RED_HAT_BUGZILLA_CREATE_PRIVATE], [$with_redhatbugzillacreateprivate])
|
||||
|
||||
AC_ARG_WITH([redhatbugzillaprivategroups],
|
||||
AS_HELP_STRING([--with-redhatbugzillaprivategroups="CSV"],
|
||||
[Name of groups separated by comma]),
|
||||
- [], [with_redhatbugzillaprivategroups="fedora_contrib_private"])
|
||||
+ [], [with_redhatbugzillaprivategroups="redhat"])
|
||||
AC_SUBST([RED_HAT_BUGZILLA_PRIVATE_GROUPS], [$with_redhatbugzillaprivategroups])
|
||||
|
||||
|
||||
diff --git a/src/plugins/bugzilla.conf b/src/plugins/bugzilla.conf
|
||||
index a7727392..dbbbd05c 100644
|
||||
--- a/src/plugins/bugzilla.conf
|
||||
+++ b/src/plugins/bugzilla.conf
|
||||
@@ -22,5 +22,5 @@ Password =
|
||||
DontMatchComponents = selinux-policy
|
||||
|
||||
# for more info about these settings see: https://github.com/abrt/abrt/wiki/FAQ#creating-private-bugzilla-tickets
|
||||
-# CreatePrivate = no
|
||||
-# PrivateGroups = fedora_contrib_private
|
||||
+# CreatePrivate = yes
|
||||
+# PrivateGroups = redhat
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
From 1c646a2948d287368ec1a82b444e8175ebfbf5b9 Mon Sep 17 00:00:00 2001
|
||||
From: Ernestas Kulik <ekulik@redhat.com>
|
||||
Date: Tue, 25 Aug 2020 15:05:31 +0300
|
||||
Subject: [PATCH] gui-wizard-gtk: wizard: Remove variable
|
||||
|
||||
cmd_output is no longer used since
|
||||
440bcfa8526d50f122ec14e19f2bf2aa336f61e7 and trying to call
|
||||
g_string_free() on it results in a critical warning.
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 44900448..a4d7caa0 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -231,8 +231,6 @@ typedef struct
|
||||
|
||||
static page_obj_t pages[NUM_PAGES];
|
||||
|
||||
-static GString *cmd_output = NULL;
|
||||
-
|
||||
/* Utility functions */
|
||||
|
||||
static void clear_warnings(void);
|
||||
@@ -1667,10 +1665,6 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g
|
||||
log_notice("done running event on '%s': %d", g_dump_dir_name, retval);
|
||||
append_to_textview(g_tv_event_log, "\n");
|
||||
|
||||
- /* Free child output buffer */
|
||||
- g_string_free(cmd_output, TRUE);
|
||||
- cmd_output = NULL;
|
||||
-
|
||||
/* Hide spinner and stop btn */
|
||||
gtk_widget_hide(GTK_WIDGET(g_spinner_event_log));
|
||||
gtk_widget_hide(g_btn_stop);
|
||||
--
|
||||
2.28.0
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
From 85b687098bcedb67285ab787b8bd506d328c34e0 Mon Sep 17 00:00:00 2001
|
||||
From: Ernestas Kulik <ekulik@redhat.com>
|
||||
Date: Tue, 25 Aug 2020 15:17:54 +0300
|
||||
Subject: [PATCH] gui-wizard-gtk: wizard: Fix invalid memory read
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This partially reverts 7aba6e53bbfeedaacd95bbaa5e0c5e325a3e6a8d, which
|
||||
results in “event” being inappropriately freed before a “goto” statement
|
||||
is executed and the value stored in “g_event_selected” is read.
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index a4d7caa0..3e69a513 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -2635,7 +2635,7 @@ static gint select_next_page_no(gint current_page_no)
|
||||
|
||||
log_info("%s: Looking for next event to process", __func__);
|
||||
/* (note: this frees and sets to NULL g_event_selected) */
|
||||
- g_autofree char *event = setup_next_processed_event(&g_auto_event_list);
|
||||
+ char *event = setup_next_processed_event(&g_auto_event_list);
|
||||
if (!event)
|
||||
{
|
||||
current_page_no = PAGENO_EVENT_PROGRESS - 1;
|
||||
@@ -2644,6 +2644,8 @@ static gint select_next_page_no(gint current_page_no)
|
||||
|
||||
if (!get_sensitive_data_permission(event))
|
||||
{
|
||||
+ free(event);
|
||||
+
|
||||
cancel_processing(g_lbl_event_log, /* default message */ NULL, TERMINATE_NOFLAGS);
|
||||
current_page_no = PAGENO_EVENT_PROGRESS - 1;
|
||||
goto again;
|
||||
@@ -2659,6 +2661,8 @@ static gint select_next_page_no(gint current_page_no)
|
||||
|
||||
if (libreport_get_global_stop_on_not_reportable())
|
||||
{
|
||||
+ free(event);
|
||||
+
|
||||
cancel_processing(g_lbl_event_log, msg, TERMINATE_NOFLAGS);
|
||||
current_page_no = PAGENO_EVENT_PROGRESS - 1;
|
||||
goto again;
|
||||
--
|
||||
2.28.0
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
From 50fdc7f23f35744ffff1763fe2d804b18c1c5340 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Srb <michal@redhat.com>
|
||||
Date: Tue, 7 Sep 2021 14:40:21 +0200
|
||||
Subject: [PATCH] [rhbz] Be a little bit more defensive when working with
|
||||
subcomponents
|
||||
|
||||
Components in RHEL can have "subcomponents" in Bugzilla. Some of them
|
||||
have, some of them don't. Better be careful.
|
||||
|
||||
See: rhbz#1998435
|
||||
|
||||
Signed-off-by: Michal Srb <michal@redhat.com>
|
||||
---
|
||||
src/plugins/rhbz.c | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
|
||||
index c2855a70..0dae1e93 100644
|
||||
--- a/src/plugins/rhbz.c
|
||||
+++ b/src/plugins/rhbz.c
|
||||
@@ -1036,13 +1036,17 @@ char *rhbz_get_default_sub_component(const char *component, xmlrpc_value *sub_co
|
||||
}
|
||||
else
|
||||
{
|
||||
- xmlrpc_array_read_item(&env, sub_components, sc_array_size - 1, &sc_struct);
|
||||
- xmlrpc_struct_find_value(&env, sc_struct, "name", &sc_name);
|
||||
- xmlrpc_read_string(&env, sc_name, &sc_str_name);
|
||||
- if (sc_struct)
|
||||
- xmlrpc_DECREF(sc_struct);
|
||||
- if (sc_name)
|
||||
- xmlrpc_DECREF(sc_name);
|
||||
+ if (sc_array_size) {
|
||||
+ xmlrpc_array_read_item(&env, sub_components, sc_array_size - 1, &sc_struct);
|
||||
+ if (xmlrpc_struct_has_key(&env, sc_struct, "name")) {
|
||||
+ xmlrpc_struct_find_value(&env, sc_struct, "name", &sc_name);
|
||||
+ xmlrpc_read_string(&env, sc_name, &sc_str_name);
|
||||
+ }
|
||||
+ if (sc_struct)
|
||||
+ xmlrpc_DECREF(sc_struct);
|
||||
+ if (sc_name)
|
||||
+ xmlrpc_DECREF(sc_name);
|
||||
+ }
|
||||
}
|
||||
|
||||
return (char *)sc_str_name;
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
From ce557c0fb309184a9a8fc38a76404324d94803b0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
||||
Date: Fri, 25 Sep 2020 19:23:51 +0200
|
||||
Subject: [PATCH] gui-wizard-gtk: Fix a double free condition
|
||||
|
||||
We may only free `log_msg` in `update_command_run_log()` if it is the
|
||||
result of the call to `g_strdup_printf()`, otherwise the caller takes
|
||||
care of it.
|
||||
|
||||
Partially reverts 7aba6e53.
|
||||
|
||||
Resolves rhbz#1882319
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 8a4486f2..a532c633 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -1385,7 +1385,7 @@ static void cancel_processing(GtkLabel *status_label, const char *message, int t
|
||||
pango_attr_list_unref(list);
|
||||
}
|
||||
|
||||
-static void update_command_run_log(const char* message, struct analyze_event_data *evd)
|
||||
+static void update_command_run_log(char *message, struct analyze_event_data *evd)
|
||||
{
|
||||
const bool it_is_a_dot = (message[0] == '.' && message[1] == '\0');
|
||||
|
||||
@@ -1393,12 +1393,18 @@ static void update_command_run_log(const char* message, struct analyze_event_dat
|
||||
gtk_label_set_text(g_lbl_event_log, message);
|
||||
|
||||
/* Don't append new line behind single dot */
|
||||
- g_autofree const char *log_msg = it_is_a_dot ? message : g_strdup_printf("%s\n", message);
|
||||
+ char *log_msg = it_is_a_dot ? message : g_strdup_printf("%s\n", message);
|
||||
append_to_textview(g_tv_event_log, log_msg);
|
||||
save_to_event_log(evd, log_msg);
|
||||
+
|
||||
+ if (log_msg != message)
|
||||
+ {
|
||||
+ /* We assume message is managed by the caller. */
|
||||
+ free(log_msg);
|
||||
+ }
|
||||
}
|
||||
|
||||
-static void run_event_gtk_error(const char *error_line, void *param)
|
||||
+static void run_event_gtk_error(char *error_line, void *param)
|
||||
{
|
||||
update_command_run_log(error_line, (struct analyze_event_data *)param);
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
From 28a6267c056d43cdbf8cd3e10e69d8ab113e74f8 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Srb <michal@redhat.com>
|
||||
Date: Tue, 7 Sep 2021 21:31:21 +0200
|
||||
Subject: [PATCH] [rhbz] Retry XML-RPC calls when uploading attachments
|
||||
|
||||
If there is a bot that automatically modifies newly opened bugs, then
|
||||
it can lead to "query serialization error" from Bugzilla. Retry should
|
||||
help us here.
|
||||
|
||||
Signed-off-by: Michal Srb <michal@redhat.com>
|
||||
---
|
||||
src/lib/abrt_xmlrpc.c | 34 ++++++++++++++++++++++++++++++++++
|
||||
src/lib/abrt_xmlrpc.h | 5 +++++
|
||||
src/lib/libreport-web.sym | 1 +
|
||||
src/plugins/rhbz.c | 4 +++-
|
||||
4 files changed, 43 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib/abrt_xmlrpc.c b/src/lib/abrt_xmlrpc.c
|
||||
index 7cac9253..4c3b469a 100644
|
||||
--- a/src/lib/abrt_xmlrpc.c
|
||||
+++ b/src/lib/abrt_xmlrpc.c
|
||||
@@ -16,6 +16,7 @@
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
+#include <unistd.h>
|
||||
#include "internal_libreport.h"
|
||||
#include "abrt_xmlrpc.h"
|
||||
#include "proxies.h"
|
||||
@@ -301,3 +302,36 @@ xmlrpc_value *abrt_xmlrpc_call(struct abrt_xmlrpc *ax,
|
||||
|
||||
return result;
|
||||
}
|
||||
+
|
||||
+/* die eventually or return expected results; retry up to 5 times if the error is known */
|
||||
+xmlrpc_value *abrt_xmlrpc_call_with_retry(const char *fault_substring,
|
||||
+ struct abrt_xmlrpc *ax,
|
||||
+ const char *method,
|
||||
+ const char *format, ...)
|
||||
+{
|
||||
+ int retry_counter = 0;
|
||||
+ xmlrpc_env env;
|
||||
+
|
||||
+ va_list args;
|
||||
+
|
||||
+ do {
|
||||
+ // sleep, if this is not the first try;
|
||||
+ // sleep() can be interrupted, but that's not a big deal here
|
||||
+ if (retry_counter)
|
||||
+ sleep(retry_counter);
|
||||
+
|
||||
+ va_start(args, format);
|
||||
+ xmlrpc_value *result = abrt_xmlrpc_call_full_va(&env, ax, method, format, args);
|
||||
+ va_end(args);
|
||||
+
|
||||
+ if (!env.fault_occurred)
|
||||
+ return result; // success!
|
||||
+
|
||||
+ if (env.fault_string && !strstr(env.fault_string, fault_substring)) {
|
||||
+ // unknown error, don't bother retrying...
|
||||
+ abrt_xmlrpc_die(&env);
|
||||
+ }
|
||||
+ } while (++retry_counter <= 5);
|
||||
+
|
||||
+ abrt_xmlrpc_die(&env);
|
||||
+}
|
||||
diff --git a/src/lib/abrt_xmlrpc.h b/src/lib/abrt_xmlrpc.h
|
||||
index 31768ffc..8ddcfc54 100644
|
||||
--- a/src/lib/abrt_xmlrpc.h
|
||||
+++ b/src/lib/abrt_xmlrpc.h
|
||||
@@ -63,6 +63,11 @@ xmlrpc_value *abrt_xmlrpc_call_params(xmlrpc_env *env, struct abrt_xmlrpc *ax,
|
||||
xmlrpc_value *abrt_xmlrpc_call_full(xmlrpc_env *enf, struct abrt_xmlrpc *ax,
|
||||
const char *method, const char *format, ...);
|
||||
|
||||
+xmlrpc_value *abrt_xmlrpc_call_with_retry(const char *fault_substring,
|
||||
+ struct abrt_xmlrpc *ax,
|
||||
+ const char *method,
|
||||
+ const char *format, ...);
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
diff --git a/src/lib/libreport-web.sym b/src/lib/libreport-web.sym
|
||||
index 44f5244d..9ab88d3e 100644
|
||||
--- a/src/lib/libreport-web.sym
|
||||
+++ b/src/lib/libreport-web.sym
|
||||
@@ -51,6 +51,7 @@ global:
|
||||
abrt_xmlrpc_call;
|
||||
abrt_xmlrpc_call_params;
|
||||
abrt_xmlrpc_call_full;
|
||||
+ abrt_xmlrpc_call_with_retry;
|
||||
|
||||
/* internal_libreport.h - these symbols are only to be used by libreport developers */
|
||||
libreport_trim_all_whitespace;
|
||||
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
|
||||
index 0dae1e93..f252f914 100644
|
||||
--- a/src/plugins/rhbz.c
|
||||
+++ b/src/plugins/rhbz.c
|
||||
@@ -643,8 +643,10 @@ int rhbz_attach_blob(struct abrt_xmlrpc *ax, const char *bug_id,
|
||||
* i -> integer, single argument (int value)
|
||||
* 6 -> base64, two arguments (char* plain data which will be encoded by xmlrpc-c to base64,
|
||||
* size_t number of bytes to encode)
|
||||
+ *
|
||||
+ * Retry if another user/bot attempted to change the same data.
|
||||
*/
|
||||
- result = abrt_xmlrpc_call(ax, "Bug.add_attachment", "{s:(s),s:s,s:s,s:s,s:6,s:i}",
|
||||
+ result = abrt_xmlrpc_call_with_retry("query serialization error", ax, "Bug.add_attachment", "{s:(s),s:s,s:s,s:s,s:6,s:i}",
|
||||
"ids", bug_id,
|
||||
"summary", fn,
|
||||
"file_name", filename,
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
From cb2ab9a8b2e1dbc89e100aedc432c29a16246e84 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
||||
Date: Sun, 27 Sep 2020 20:45:32 +0200
|
||||
Subject: [PATCH] gui-wizard-gtk: Fix a segfault and memory leak
|
||||
|
||||
Only `arg[1]` has to be freed in `tv_details_row_activated()`, as
|
||||
`arg[0]` is allocated statically.
|
||||
|
||||
In `search_item_to_list_store_item()`, `tmp` gets overwritten with a new
|
||||
value for every call to `gtk_text_buffer_get_text()`, so we need to free
|
||||
the allocated memory continuously.
|
||||
|
||||
Partially reverts 7aba6e53.
|
||||
|
||||
Resolves rhbz#1882950
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index a532c633..775b709f 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -707,7 +707,7 @@ static void tv_details_row_activated(
|
||||
return;
|
||||
|
||||
gint exitcode;
|
||||
- g_autofree gchar *arg[3];
|
||||
+ gchar *arg[3];
|
||||
arg[0] = (char *) "xdg-open";
|
||||
arg[1] = g_build_filename(g_dump_dir_name ? g_dump_dir_name : "", item_name, NULL);
|
||||
arg[2] = NULL;
|
||||
@@ -751,6 +751,8 @@ static void tv_details_row_activated(
|
||||
gtk_widget_destroy(scrolled);
|
||||
gtk_widget_destroy(dialog);
|
||||
}
|
||||
+
|
||||
+ g_free(arg[1]);
|
||||
}
|
||||
|
||||
/* static gboolean tv_details_select_cursor_row(
|
||||
@@ -2126,17 +2128,20 @@ static void search_item_to_list_store_item(GtkListStore *store, GtkTreeIter *new
|
||||
gtk_text_iter_backward_char(end);
|
||||
}
|
||||
|
||||
- g_autofree gchar *tmp = gtk_text_buffer_get_text(word->buffer, beg, &(word->start),
|
||||
+ gchar *tmp = gtk_text_buffer_get_text(word->buffer, beg, &(word->start),
|
||||
/*don't include hidden chars*/FALSE);
|
||||
g_autofree gchar *prefix = g_markup_escape_text(tmp, /*NULL terminated string*/-1);
|
||||
+ g_free(tmp);
|
||||
|
||||
tmp = gtk_text_buffer_get_text(word->buffer, &(word->start), &(word->end),
|
||||
/*don't include hidden chars*/FALSE);
|
||||
g_autofree gchar *text = g_markup_escape_text(tmp, /*NULL terminated string*/-1);
|
||||
+ g_free(tmp);
|
||||
|
||||
tmp = gtk_text_buffer_get_text(word->buffer, &(word->end), end,
|
||||
/*don't include hidden chars*/FALSE);
|
||||
g_autofree gchar *suffix = g_markup_escape_text(tmp, /*NULL terminated string*/-1);
|
||||
+ g_clear_pointer(&tmp, g_free);
|
||||
|
||||
char *content = g_strdup_printf("%s<span foreground=\"red\">%s</span>%s", prefix, text, suffix);
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
From 1a22f30187163ce288b14e55a80539353a38b7be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
||||
Date: Tue, 29 Sep 2020 14:16:00 +0200
|
||||
Subject: [PATCH 1/2] gui-wizard-gtk: Fix segfault
|
||||
|
||||
Since show_error_as_msgbox() is specified as the custom logging handler
|
||||
(via setting libreport_g_custom_logger), it will get called if an error
|
||||
occurs in libreport_save_user_settings(). However, at that point,
|
||||
g_wnd_assistant has already been destroyed, which leads to an invalid
|
||||
read in show_error_as_msgbox().
|
||||
|
||||
This change unsets the custom logging handler after the GUI is destroyed
|
||||
and adds an assertion in show_error_as_msgbox() checking that
|
||||
g_wnd_assistant is not a null pointer.
|
||||
|
||||
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1883337
|
||||
---
|
||||
src/gui-wizard-gtk/main.c | 6 ++++--
|
||||
src/gui-wizard-gtk/wizard.c | 2 ++
|
||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/main.c b/src/gui-wizard-gtk/main.c
|
||||
index e111948c..f094c5fb 100644
|
||||
--- a/src/gui-wizard-gtk/main.c
|
||||
+++ b/src/gui-wizard-gtk/main.c
|
||||
@@ -125,6 +125,7 @@ int main(int argc, char **argv)
|
||||
/* List of events specified on the command line. */
|
||||
GList *user_event_list = NULL;
|
||||
const char *prgname = "abrt";
|
||||
+ int ret = 0;
|
||||
abrt_init(argv);
|
||||
|
||||
/* I18n */
|
||||
@@ -217,13 +218,14 @@ int main(int argc, char **argv)
|
||||
g_signal_connect(app, "startup", G_CALLBACK(startup_wizard), NULL);
|
||||
|
||||
/* Enter main loop */
|
||||
- g_application_run(G_APPLICATION(app), argc, argv);
|
||||
+ ret = g_application_run(G_APPLICATION(app), argc, argv);
|
||||
g_object_unref(app);
|
||||
+ libreport_g_custom_logger = NULL;
|
||||
|
||||
if (opts & OPT_d)
|
||||
delete_dump_dir_possibly_using_abrtd(g_dump_dir_name);
|
||||
|
||||
libreport_save_user_settings();
|
||||
|
||||
- return 0;
|
||||
+ return ret;
|
||||
}
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 775b709f..c4a0b4c0 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -360,6 +360,8 @@ struct dump_dir *wizard_open_directory_for_writing(const char *dump_dir_name)
|
||||
|
||||
void show_error_as_msgbox(const char *msg)
|
||||
{
|
||||
+ g_return_if_fail(g_wnd_assistant != NULL);
|
||||
+
|
||||
GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(g_wnd_assistant),
|
||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_WARNING,
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
From 41b6477bdeaa82c647db2f1c2ba1132c77b365ed Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
||||
Date: Tue, 29 Sep 2020 14:43:15 +0200
|
||||
Subject: [PATCH 2/2] event_config: Null autofree pointers before returning
|
||||
|
||||
The pointers to strings in the function check_problem_rating_usability()
|
||||
need to be nullified before the function returns as they are declared
|
||||
for auto-cleanup.
|
||||
|
||||
This change fixes a double-free condition in which the returned strings
|
||||
were attempted to be freed again in the caller,
|
||||
is_backtrace_rating_usable().
|
||||
|
||||
Bug was introduced in 05e9c9273.
|
||||
|
||||
Resolves rhbz#1883410
|
||||
---
|
||||
src/lib/event_config.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lib/event_config.c b/src/lib/event_config.c
|
||||
index c8053b7c..01e91efe 100644
|
||||
--- a/src/lib/event_config.c
|
||||
+++ b/src/lib/event_config.c
|
||||
@@ -541,10 +541,10 @@ bool check_problem_rating_usability(const event_config_t *cfg,
|
||||
|
||||
finish:
|
||||
if (description)
|
||||
- *description = tmp_desc;
|
||||
+ *description = g_steal_pointer(&tmp_desc);
|
||||
|
||||
if (detail)
|
||||
- *detail = tmp_detail;
|
||||
+ *detail = g_steal_pointer(&tmp_detail);
|
||||
|
||||
return result;
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From 9b6d40905c21b476c58e9f9a908ddb32a0a56a18 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
||||
Date: Tue, 29 Sep 2020 19:14:05 +0200
|
||||
Subject: [PATCH] gui-wizard-gtk: Don't autofree URL string
|
||||
|
||||
g_object_set_data() does not (and cannot) copy the data passed to it, so
|
||||
once url is freed, a subsequent access to the 'url' tag leads to an
|
||||
invalid read and segfault.
|
||||
|
||||
Bug was introduced in df386b097.
|
||||
|
||||
Resolves rhbz#1882328
|
||||
---
|
||||
src/gui-wizard-gtk/wizard.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||
index 0af19587..ba1998df 100644
|
||||
--- a/src/gui-wizard-gtk/wizard.c
|
||||
+++ b/src/gui-wizard-gtk/wizard.c
|
||||
@@ -462,8 +462,8 @@ static void append_to_textview(GtkTextView *tv, const char *str)
|
||||
GtkTextTag *tag;
|
||||
tag = gtk_text_buffer_create_tag(tb, NULL, "foreground", "blue",
|
||||
"underline", PANGO_UNDERLINE_SINGLE, NULL);
|
||||
- g_autofree char *url = g_strndup(t->start, t->len);
|
||||
- g_object_set_data(G_OBJECT(tag), "url", url);
|
||||
+ char *url = g_strndup(t->start, t->len);
|
||||
+ g_object_set_data_full(G_OBJECT(tag), "url", url, g_free);
|
||||
|
||||
gtk_text_buffer_insert_with_tags(tb, &text_iter, url, -1, tag, NULL);
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
From 9cdf0f9123ee39c7cb32a276371b2fd95f0df5ac Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
||||
Date: Mon, 2 Nov 2020 11:45:23 +0100
|
||||
Subject: [PATCH] rhbz: Fix a double-free condition
|
||||
|
||||
The `cc` string must not be freed after the variable goes out of scope
|
||||
since it's appended to `cc_list`. (`g_list_append()` does not copy its
|
||||
input.) We only need to free the last string in the loop, which is an
|
||||
empty string.
|
||||
|
||||
The bug was introduced in 7aba6e53.
|
||||
|
||||
Resolves rhbz#1893595
|
||||
---
|
||||
src/plugins/rhbz.c | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
|
||||
index 8a2ded79..e0d7a091 100644
|
||||
--- a/src/plugins/rhbz.c
|
||||
+++ b/src/plugins/rhbz.c
|
||||
@@ -406,18 +406,20 @@ GList *rhbz_bug_cc(xmlrpc_value* result_xml)
|
||||
if (!item)
|
||||
continue;
|
||||
|
||||
- g_autofree const char* cc = NULL;
|
||||
- xmlrpc_read_string(&env, item, &cc);
|
||||
+ char *cc = NULL;
|
||||
+ xmlrpc_read_string(&env, item, (const char **)&cc);
|
||||
xmlrpc_DECREF(item);
|
||||
if (env.fault_occurred)
|
||||
abrt_xmlrpc_die(&env);
|
||||
|
||||
if (*cc != '\0')
|
||||
{
|
||||
- cc_list = g_list_append(cc_list, (char*)cc);
|
||||
+ cc_list = g_list_append(cc_list, cc);
|
||||
log_debug("member on cc is %s", cc);
|
||||
continue;
|
||||
}
|
||||
+
|
||||
+ free(cc);
|
||||
}
|
||||
xmlrpc_DECREF(cc_member);
|
||||
return cc_list;
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From cbb6b43038f0d88b28197ba905ba9324c0602945 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
|
||||
Date: Thu, 3 Sep 2020 15:05:23 +0200
|
||||
Subject: [PATCH] client-python: Add getter for package count to downloader
|
||||
|
||||
Add a new method get_package_count() to the DebugInfoDownload class
|
||||
which returns the number of packages that will be downloaded.
|
||||
---
|
||||
src/client-python/reportclient/debuginfo.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/client-python/reportclient/debuginfo.py b/src/client-python/reportclient/debuginfo.py
|
||||
index cb318e8a..eeb2be30 100644
|
||||
--- a/src/client-python/reportclient/debuginfo.py
|
||||
+++ b/src/client-python/reportclient/debuginfo.py
|
||||
@@ -242,6 +242,9 @@ class DebugInfoDownload(object):
|
||||
def get_install_size(self):
|
||||
return self.installed_size
|
||||
|
||||
+ def get_package_count(self):
|
||||
+ return len(self.package_files_dict)
|
||||
+
|
||||
def mute_stdout(self):
|
||||
"""
|
||||
Links sys.stdout with /dev/null and saves the old stdout
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
|
|
@ -14,22 +14,14 @@
|
|||
|
||||
Summary: Generic library for reporting various problems
|
||||
Name: libreport
|
||||
Version: 2.14.0
|
||||
Release: 15%{?dist}
|
||||
Version: 2.15.2
|
||||
Release: 6%{?dist}
|
||||
License: GPLv2+
|
||||
URL: https://abrt.readthedocs.org/
|
||||
Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch0: 0001-gui-wizard-gtk-wizard-Remove-variable.patch
|
||||
Patch1: 0002-gui-wizard-gtk-wizard-Fix-invalid-memory-read.patch
|
||||
Patch2: 0003-gui-wizard-gtk-Fix-a-double-free-condition.patch
|
||||
Patch3: 0004-gui-wizard-gtk-Fix-a-segfault-and-memory-leak.patch
|
||||
Patch4: 0005-gui-wizard-gtk-Fix-segfault.patch
|
||||
Patch5: 0006-event_config-Null-autofree-pointers-before-returning.patch
|
||||
Patch6: 0007-gui-wizard-gtk-Don-t-autofree-URL-string.patch
|
||||
Patch7: 0008-rhbz-Fix-a-double-free-condition.patch
|
||||
Patch8: 0009-client-python-Add-getter-for-package-count-to-downlo.patch
|
||||
|
||||
Patch1: 0001-Change-the-default-Bugzilla-group.patch
|
||||
Patch2: 0002-rhbz-Be-a-little-bit-more-defensive-when-working-wit.patch
|
||||
Patch3: 0003-rhbz-Retry-XML-RPC-calls-when-uploading-attachments.patch
|
||||
BuildRequires: %{dbus_devel}
|
||||
BuildRequires: gtk3-devel
|
||||
BuildRequires: curl-devel
|
||||
|
@ -37,9 +29,9 @@ BuildRequires: desktop-file-utils
|
|||
BuildRequires: python3-devel
|
||||
BuildRequires: gettext
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libtar-devel
|
||||
BuildRequires: intltool
|
||||
BuildRequires: libtool
|
||||
BuildRequires: make
|
||||
BuildRequires: texinfo
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: xmlto
|
||||
|
@ -47,7 +39,6 @@ BuildRequires: newt-devel
|
|||
BuildRequires: libproxy-devel
|
||||
BuildRequires: satyr-devel >= 0.24
|
||||
BuildRequires: glib2-devel >= %{glib_ver}
|
||||
BuildRequires: nettle-devel
|
||||
BuildRequires: git-core
|
||||
|
||||
%if 0%{?fedora} >= 24 || 0%{?rhel} > 7
|
||||
|
@ -67,7 +58,6 @@ Requires: libreport-filesystem = %{version}-%{release}
|
|||
Requires: satyr%{?_isa} >= 0.24
|
||||
Requires: glib2%{?_isa} >= %{glib_ver}
|
||||
Requires: libarchive%{?_isa}
|
||||
Requires: nettle%{?_isa}
|
||||
|
||||
# Required for the temporary modularity hack, see below
|
||||
%if 0%{?_module_build}
|
||||
|
@ -191,7 +181,7 @@ The simple reporter plugin which writes a report to the systemd journal.
|
|||
%package plugin-mailx
|
||||
Summary: %{name}'s mailx reporter plugin
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: mailx
|
||||
Requires: /usr/bin/mailx
|
||||
|
||||
%description plugin-mailx
|
||||
The simple reporter plugin which sends a report via mailx to a specified
|
||||
|
@ -227,12 +217,8 @@ Workflows to report issues into the CentOS Bug Tracker.
|
|||
%package plugin-ureport
|
||||
Summary: %{name}'s micro report plugin
|
||||
BuildRequires: %{libjson_devel}
|
||||
BuildRequires: make
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: libreport-web = %{version}-%{release}
|
||||
%if 0%{?rhel} && ! 0%{?eln}
|
||||
Requires: python3-subscription-manager-rhsm
|
||||
%endif
|
||||
|
||||
%description plugin-ureport
|
||||
Uploads micro-report to abrt server
|
||||
|
@ -294,10 +280,10 @@ data over ftp/scp...
|
|||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -S git
|
||||
%autosetup -p 1
|
||||
|
||||
%build
|
||||
autoreconf
|
||||
./autogen.sh
|
||||
|
||||
%configure \
|
||||
%if %{without bugzilla}
|
||||
|
@ -312,7 +298,7 @@ autoreconf
|
|||
%make_install \
|
||||
%if %{with python3}
|
||||
PYTHON=%{__python3} \
|
||||
%endif # with python3
|
||||
%endif
|
||||
mandir=%{_mandir}
|
||||
|
||||
%find_lang %{name}
|
||||
|
@ -413,12 +399,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%config(noreplace) %{_sysconfdir}/%{name}/report_event.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/forbidden_words.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/ignored_words.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/ignored_elements.conf
|
||||
%{_datadir}/%{name}/conf.d/libreport.conf
|
||||
%{_libdir}/libreport.so.*
|
||||
%{_mandir}/man5/libreport.conf.5*
|
||||
%{_mandir}/man5/report_event.conf.5*
|
||||
%{_mandir}/man5/forbidden_words.conf.5*
|
||||
%{_mandir}/man5/ignored_words.conf.5*
|
||||
%{_mandir}/man5/ignored_elements.conf.5*
|
||||
# filesystem package owns /usr/share/augeas/lenses directory
|
||||
%{_datadir}/augeas/lenses/libreport.aug
|
||||
|
||||
|
@ -655,9 +643,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%if 0%{?fedora} || 0%{?eln}
|
||||
%{_datadir}/%{name}/workflows/workflow_AnacondaFedora.xml
|
||||
%endif
|
||||
%if 0%{?rhel} && ! 0%{?eln}
|
||||
%{_datadir}/%{name}/workflows/workflow_AnacondaRHEL.xml
|
||||
%endif
|
||||
%{_datadir}/%{name}/workflows/workflow_AnacondaUpload.xml
|
||||
%config(noreplace) %{_sysconfdir}/libreport/workflows.d/anaconda_event.conf
|
||||
%config(noreplace) %{_sysconfdir}/libreport/events.d/bugzilla_anaconda_event.conf
|
||||
|
@ -670,6 +655,42 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Jan 17 2022 Michal Srb <michal@redhat.com> - 2.15.2-6
|
||||
- [reporter-bugzilla] Retry XML-RPC calls
|
||||
- Resolves: rhbz#2037399
|
||||
|
||||
* Mon Jan 17 2022 Michal Srb <michal@redhat.com> - 2.15.2-5
|
||||
- [reporter-bugzilla] Fix subcomponent handling
|
||||
- Resolves: rhbz#2037399
|
||||
|
||||
* Mon Jan 17 2022 Michal Srb <michal@redhat.com> - 2.15.2-4
|
||||
- Change the default Bugzilla group
|
||||
- Resolves: rhbz#2037399
|
||||
|
||||
* Thu Dec 09 2021 Michal Fabik <mfabik@redhat.com> - 2.15.2-3
|
||||
- Rebuild against json-c-0.14-11
|
||||
Related: rhbz#2023322
|
||||
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.15.2-2
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Tue Jun 22 2021 Michal Fabik <mfabik@redhat.com> - 2.15.2-1
|
||||
- New upstream version 2.15.2
|
||||
|
||||
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 2.14.0-19
|
||||
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
||||
Related: rhbz#1971065
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.14.0-18
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Fri Jan 29 2021 Michal Srb <michal@redhat.com> - 2.14.0-17
|
||||
- Drop AnacondaRHEL workflow reference
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.0-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Jan 18 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2.14.0-15
|
||||
- Bump rev for upgrades
|
||||
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (libreport-2.14.0.tar.gz) = 6bc428a2d91b22f2df1abc9326c131e91e5e7be78ca64ad6533ff8246fa02df9a975360686811d29fd66210206a4e4ee5dc9faf2c9b23eccab7ca0ec07c3d43c
|
||||
SHA512 (libreport-2.15.2.tar.gz) = c98003325fa70d674177c9f602a7f121815a9675701ee780ad8908ed69862f2c69be65c7483fd3f017ba299dda51ba304f0908c771c9d97cb5bba057e3a9c5dc
|
||||
|
|
Loading…
Reference in New Issue