import libreport-2.9.5-10.el8
This commit is contained in:
commit
e8e6c147d2
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
SOURCES/libreport-2.9.5.tar.gz
|
1
.libreport.metadata
Normal file
1
.libreport.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
e2e3124c591fbc2668d99537ec086185348c1d93 SOURCES/libreport-2.9.5.tar.gz
|
@ -0,0 +1,31 @@
|
|||||||
|
From 8c00a86dddaf240d4a836a5e278190bcc51b0b66 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
Date: Mon, 18 Jun 2018 14:51:23 +0200
|
||||||
|
Subject: [PATCH] ureport: use python3 to get consumerCertDir
|
||||||
|
|
||||||
|
Related to #1592073
|
||||||
|
|
||||||
|
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
---
|
||||||
|
src/lib/ureport.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||||
|
index c32c948a..d2045f0f 100644
|
||||||
|
--- a/src/lib/ureport.c
|
||||||
|
+++ b/src/lib/ureport.c
|
||||||
|
@@ -81,9 +81,10 @@ rhsm_config_get_consumer_cert_dir(void)
|
||||||
|
return xstrdup(result);
|
||||||
|
|
||||||
|
result = run_in_shell_and_save_output(0,
|
||||||
|
- "python -c \"from rhsm.config import initConfig; print(initConfig().get('rhsm', 'consumerCertDir'))\"",
|
||||||
|
+ "python3 -c \"from rhsm.config import initConfig; print(initConfig().get('rhsm', 'consumerCertDir'))\"",
|
||||||
|
NULL, NULL);
|
||||||
|
|
||||||
|
+
|
||||||
|
/* run_in_shell_and_save_output always returns non-NULL */
|
||||||
|
if (result[0] != '/')
|
||||||
|
goto error;
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
177
SOURCES/0002-Remove-option-to-screencast-problems.patch
Normal file
177
SOURCES/0002-Remove-option-to-screencast-problems.patch
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
From 602124e481d700e334de20418b94b2fdf015c834 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Mon, 9 Jul 2018 10:45:37 +0200
|
||||||
|
Subject: [PATCH] Remove option to screencast problems
|
||||||
|
|
||||||
|
The fros package is broken and hasn't been maintained for quite some time.
|
||||||
|
|
||||||
|
closes #104
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
libreport.spec.in | 1 -
|
||||||
|
src/gui-wizard-gtk/wizard.c | 75 ---------------------------------
|
||||||
|
src/gui-wizard-gtk/wizard.glade | 40 ------------------
|
||||||
|
3 files changed, 116 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||||
|
index b02bc7de..ea49a2ea 100644
|
||||||
|
--- a/src/gui-wizard-gtk/wizard.c
|
||||||
|
+++ b/src/gui-wizard-gtk/wizard.c
|
||||||
|
@@ -127,7 +127,6 @@ static gboolean g_warning_issued;
|
||||||
|
static GtkSpinner *g_spinner_event_log;
|
||||||
|
static GtkImage *g_img_process_fail;
|
||||||
|
|
||||||
|
-static GtkButton *g_btn_startcast;
|
||||||
|
static GtkExpander *g_exp_report_log;
|
||||||
|
|
||||||
|
static GtkWidget *g_top_most_window;
|
||||||
|
@@ -3487,7 +3486,6 @@ static void add_pages(void)
|
||||||
|
g_exp_search = GTK_EXPANDER( gtk_builder_get_object(g_builder, "expander_search"));
|
||||||
|
g_spinner_event_log = GTK_SPINNER( gtk_builder_get_object(g_builder, "spinner_event_log"));
|
||||||
|
g_img_process_fail = GTK_IMAGE( gtk_builder_get_object(g_builder, "img_process_fail"));
|
||||||
|
- g_btn_startcast = GTK_BUTTON( gtk_builder_get_object(g_builder, "btn_startcast"));
|
||||||
|
g_exp_report_log = GTK_EXPANDER( gtk_builder_get_object(g_builder, "expand_report"));
|
||||||
|
g_vb_simple_details = GTK_BOX( gtk_builder_get_object(g_builder, "vb_simple_details"));
|
||||||
|
g_cmb_reproducible = GTK_COMBO_BOX_TEXT(gtk_builder_get_object(g_builder, "cmb_reproducible"));
|
||||||
|
@@ -3618,59 +3616,6 @@ static void assistant_quit_cb(void *obj, void *data)
|
||||||
|
g_wnd_assistant = (void *)0xdeadbeaf;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void on_btn_startcast(GtkWidget *btn, gpointer user_data)
|
||||||
|
-{
|
||||||
|
- const char *args[15];
|
||||||
|
- args[0] = (char *) "fros";
|
||||||
|
- args[1] = NULL;
|
||||||
|
-
|
||||||
|
- pid_t castapp = 0;
|
||||||
|
- castapp = fork_execv_on_steroids(
|
||||||
|
- EXECFLG_QUIET,
|
||||||
|
- (char **)args,
|
||||||
|
- NULL,
|
||||||
|
- /*env_vec:*/ NULL,
|
||||||
|
- g_dump_dir_name,
|
||||||
|
- /*uid (ignored):*/ 0
|
||||||
|
- );
|
||||||
|
- gtk_widget_hide(GTK_WIDGET(g_wnd_assistant));
|
||||||
|
- /*flush all gui events before we start waitpid
|
||||||
|
- * otherwise the main window wouldn't hide
|
||||||
|
- */
|
||||||
|
- while (gtk_events_pending())
|
||||||
|
- gtk_main_iteration_do(false);
|
||||||
|
-
|
||||||
|
- int status;
|
||||||
|
- safe_waitpid(castapp, &status, 0);
|
||||||
|
- problem_data_reload_from_dump_dir();
|
||||||
|
- update_gui_state_from_problem_data(0 /* don't update the selected event */);
|
||||||
|
- gtk_widget_show(GTK_WIDGET(g_wnd_assistant));
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static bool is_screencast_available()
|
||||||
|
-{
|
||||||
|
- const char *args[3];
|
||||||
|
- args[0] = (char *) "fros";
|
||||||
|
- args[1] = "--is-available";
|
||||||
|
- args[2] = NULL;
|
||||||
|
-
|
||||||
|
- pid_t castapp = 0;
|
||||||
|
- castapp = fork_execv_on_steroids(
|
||||||
|
- EXECFLG_QUIET,
|
||||||
|
- (char **)args,
|
||||||
|
- NULL,
|
||||||
|
- /*env_vec:*/ NULL,
|
||||||
|
- g_dump_dir_name,
|
||||||
|
- /*uid (ignored):*/ 0
|
||||||
|
- );
|
||||||
|
-
|
||||||
|
- int status;
|
||||||
|
- safe_waitpid(castapp, &status, 0);
|
||||||
|
-
|
||||||
|
- /* 0 means that it's available */
|
||||||
|
- return status == 0;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
void create_assistant(GtkApplication *app, bool expert_mode)
|
||||||
|
{
|
||||||
|
g_loaded_texts = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
|
||||||
|
@@ -3805,26 +3750,6 @@ void create_assistant(GtkApplication *app, bool expert_mode)
|
||||||
|
g_signal_connect(g_btn_add_file, "clicked", G_CALLBACK(on_btn_add_file), NULL);
|
||||||
|
g_signal_connect(g_btn_detail, "clicked", G_CALLBACK(on_btn_detail), NULL);
|
||||||
|
|
||||||
|
- if (is_screencast_available()) {
|
||||||
|
- /* we need to override the activate-link handler, because we use
|
||||||
|
- * the link button instead of normal button and if we wouldn't override it
|
||||||
|
- * gtk would try to run it's defualt action and open the associated URI
|
||||||
|
- * but since the URI is empty it would complain about it...
|
||||||
|
- */
|
||||||
|
- g_signal_connect(g_btn_startcast, "activate-link", G_CALLBACK(on_btn_startcast), NULL);
|
||||||
|
- }
|
||||||
|
- else {
|
||||||
|
- gtk_widget_set_sensitive(GTK_WIDGET(g_btn_startcast), false);
|
||||||
|
- gtk_widget_set_tooltip_markup(GTK_WIDGET(g_btn_startcast),
|
||||||
|
- _("In order to enable the built-in screencasting "
|
||||||
|
- "functionality the package fros-recordmydesktop has to be installed. "
|
||||||
|
- "Please run the following command if you want to install it."
|
||||||
|
- "\n\n"
|
||||||
|
- "<b>su -c \"dnf install fros-recordmydesktop\"</b>"
|
||||||
|
- ));
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
-
|
||||||
|
g_signal_connect(g_search_entry_bt, "changed", G_CALLBACK(search_timeout), NULL);
|
||||||
|
|
||||||
|
g_signal_connect (g_tv_event_log, "key-press-event", G_CALLBACK (key_press_event), NULL);
|
||||||
|
diff --git a/src/gui-wizard-gtk/wizard.glade b/src/gui-wizard-gtk/wizard.glade
|
||||||
|
index 47713370..f0bd2a77 100644
|
||||||
|
--- a/src/gui-wizard-gtk/wizard.glade
|
||||||
|
+++ b/src/gui-wizard-gtk/wizard.glade
|
||||||
|
@@ -506,46 +506,6 @@
|
||||||
|
<property name="position">4</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
- <child>
|
||||||
|
- <object class="GtkBox" id="box3">
|
||||||
|
- <property name="visible">True</property>
|
||||||
|
- <property name="can_focus">False</property>
|
||||||
|
- <child>
|
||||||
|
- <object class="GtkLabel" id="label9">
|
||||||
|
- <property name="visible">True</property>
|
||||||
|
- <property name="can_focus">False</property>
|
||||||
|
- <property name="halign">end</property>
|
||||||
|
- <property name="label" translatable="yes">If you don't know how to describe it, you can</property>
|
||||||
|
- </object>
|
||||||
|
- <packing>
|
||||||
|
- <property name="expand">False</property>
|
||||||
|
- <property name="fill">False</property>
|
||||||
|
- <property name="position">0</property>
|
||||||
|
- </packing>
|
||||||
|
- </child>
|
||||||
|
- <child>
|
||||||
|
- <object class="GtkLinkButton" id="btn_startcast">
|
||||||
|
- <property name="label" translatable="yes">add a screencast</property>
|
||||||
|
- <property name="visible">True</property>
|
||||||
|
- <property name="can_focus">True</property>
|
||||||
|
- <property name="receives_default">True</property>
|
||||||
|
- <property name="has_tooltip">True</property>
|
||||||
|
- <property name="halign">start</property>
|
||||||
|
- <property name="relief">none</property>
|
||||||
|
- </object>
|
||||||
|
- <packing>
|
||||||
|
- <property name="expand">False</property>
|
||||||
|
- <property name="fill">True</property>
|
||||||
|
- <property name="position">1</property>
|
||||||
|
- </packing>
|
||||||
|
- </child>
|
||||||
|
- </object>
|
||||||
|
- <packing>
|
||||||
|
- <property name="expand">False</property>
|
||||||
|
- <property name="fill">True</property>
|
||||||
|
- <property name="position">5</property>
|
||||||
|
- </packing>
|
||||||
|
- </child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 1fa88becd8b9a3f1aece0d009171c31ee6d379c6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Filak <jfilak@redhat.com>
|
||||||
|
Date: Wed, 12 Feb 2014 11:22:33 +0100
|
||||||
|
Subject: [PATCH] offer reporting to Bugzilla only for pre-GA Anaconda
|
||||||
|
exceptions
|
||||||
|
|
||||||
|
Closes rhbz#1593734
|
||||||
|
|
||||||
|
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||||
|
---
|
||||||
|
src/workflows/anaconda_event.conf | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/workflows/anaconda_event.conf b/src/workflows/anaconda_event.conf
|
||||||
|
index f9ade8e2..e894a53f 100644
|
||||||
|
--- a/src/workflows/anaconda_event.conf
|
||||||
|
+++ b/src/workflows/anaconda_event.conf
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
EVENT=workflow_AnacondaFedora component=anaconda
|
||||||
|
EVENT=workflow_AnacondaRHEL component=anaconda
|
||||||
|
-EVENT=workflow_AnacondaRHELBugzilla component=anaconda
|
||||||
|
+EVENT=workflow_AnacondaRHELBugzilla component=anaconda release_type=pre-release
|
||||||
|
EVENT=workflow_AnacondaUpload component=anaconda
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,66 @@
|
|||||||
|
From dfc340b695d047018d38090e24a501f7b0c0dad1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
Date: Tue, 28 Aug 2018 15:42:33 +0200
|
||||||
|
Subject: [PATCH] replace all Fedora URLs by corresponding values for RHEL
|
||||||
|
|
||||||
|
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
---
|
||||||
|
src/plugins/report_EmergencyAnalysis.xml.in | 2 +-
|
||||||
|
src/plugins/report_uReport.xml.in | 2 +-
|
||||||
|
src/plugins/reporter-ureport.c | 2 +-
|
||||||
|
src/plugins/ureport.conf | 2 +-
|
||||||
|
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/plugins/report_EmergencyAnalysis.xml.in b/src/plugins/report_EmergencyAnalysis.xml.in
|
||||||
|
index 3fb2bd23..c00a734f 100644
|
||||||
|
--- a/src/plugins/report_EmergencyAnalysis.xml.in
|
||||||
|
+++ b/src/plugins/report_EmergencyAnalysis.xml.in
|
||||||
|
@@ -15,7 +15,7 @@
|
||||||
|
<option type="text" name="Upload_URL">
|
||||||
|
<_label>URL</_label>
|
||||||
|
<allow-empty>no</allow-empty>
|
||||||
|
- <default-value>https://retrace.fedoraproject.org/faf/dumpdirs/new/</default-value>
|
||||||
|
+ <default-value>https://localhost/faf/dumpdirs/new/</default-value>
|
||||||
|
</option>
|
||||||
|
<advanced-options>
|
||||||
|
<option type="text" name="http_proxy">
|
||||||
|
diff --git a/src/plugins/report_uReport.xml.in b/src/plugins/report_uReport.xml.in
|
||||||
|
index 791c9faa..996f20b2 100644
|
||||||
|
--- a/src/plugins/report_uReport.xml.in
|
||||||
|
+++ b/src/plugins/report_uReport.xml.in
|
||||||
|
@@ -14,7 +14,7 @@
|
||||||
|
<_label>uReport Server URL</_label>
|
||||||
|
<allow-empty>no</allow-empty>
|
||||||
|
<_description>Address of uReport webservice</_description>
|
||||||
|
- <default-value>https://retrace.fedoraproject.org/faf</default-value>
|
||||||
|
+ <default-value>https://bug-report.redhat.com</default-value>
|
||||||
|
</option>
|
||||||
|
<option type="bool" name="uReport_WatchReportedBugs">
|
||||||
|
<_label>Watch already reported bugs</_label>
|
||||||
|
diff --git a/src/plugins/reporter-ureport.c b/src/plugins/reporter-ureport.c
|
||||||
|
index cc1cedc2..0aa3324f 100644
|
||||||
|
--- a/src/plugins/reporter-ureport.c
|
||||||
|
+++ b/src/plugins/reporter-ureport.c
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
#include "ureport.h"
|
||||||
|
#include "libreport_curl.h"
|
||||||
|
|
||||||
|
-#define DEFAULT_WEB_SERVICE_URL "https://retrace.fedoraproject.org/faf"
|
||||||
|
+#define DEFAULT_WEB_SERVICE_URL "https://bug-report.redhat.com"
|
||||||
|
|
||||||
|
int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
diff --git a/src/plugins/ureport.conf b/src/plugins/ureport.conf
|
||||||
|
index 3cde1e32..04dc1000 100644
|
||||||
|
--- a/src/plugins/ureport.conf
|
||||||
|
+++ b/src/plugins/ureport.conf
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
# Base URL to uReport server
|
||||||
|
-# URL = https://retrace.fedoraproject.org/faf
|
||||||
|
+# URL = https://bug-report.redhat.com
|
||||||
|
|
||||||
|
# no means that ssl certificates will not be checked
|
||||||
|
# SSLVerify = no
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
31
SOURCES/0005-coverity-fix-def6.patch
Normal file
31
SOURCES/0005-coverity-fix-def6.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 79650f521dc70535bf731ae3139860aef3e301b0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
Date: Wed, 18 Jul 2018 17:07:45 +0200
|
||||||
|
Subject: [PATCH] coverity fix [#def6]
|
||||||
|
|
||||||
|
libreport-2.9.5/src/gui-wizard-gtk/wizard.c:819:5: warning: 1st function call
|
||||||
|
argument is an uninitialized value
|
||||||
|
|
||||||
|
https://cov01.lab.eng.brq.redhat.com/el8-results/el8/libreport-2.9.5-2.el8+7/scan-results.html#def6
|
||||||
|
|
||||||
|
Signed-off-by: Matej Habrnal <mhabrnal@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 ea49a2ea..cb9ac5bb 100644
|
||||||
|
--- a/src/gui-wizard-gtk/wizard.c
|
||||||
|
+++ b/src/gui-wizard-gtk/wizard.c
|
||||||
|
@@ -760,7 +760,7 @@ static void tv_details_row_activated(
|
||||||
|
GtkTreeViewColumn *column,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
- gchar *item_name;
|
||||||
|
+ gchar *item_name = NULL;
|
||||||
|
struct problem_item *item = get_current_problem_item_or_NULL(tree_view, &item_name);
|
||||||
|
if (!item || !(item->flags & CD_FLAG_TXT))
|
||||||
|
goto ret;
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
32
SOURCES/0006-coverity-fix-def7.patch
Normal file
32
SOURCES/0006-coverity-fix-def7.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 6ef9f702af8df7acc69887656752a24cfd5a64c8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
Date: Wed, 18 Jul 2018 17:10:17 +0200
|
||||||
|
Subject: [PATCH] coverity fix [#def7]
|
||||||
|
|
||||||
|
libreport-2.9.5/src/gui-wizard-gtk/wizard.c:1028: dereference: Dereferencing a
|
||||||
|
null pointer "event_name_end".
|
||||||
|
|
||||||
|
https://cov01.lab.eng.brq.redhat.com/el8-results/el8/libreport-2.9.5-2.el8+7/scan-results.html#def7
|
||||||
|
|
||||||
|
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
---
|
||||||
|
src/gui-wizard-gtk/wizard.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||||
|
index cb9ac5bb..af4c255f 100644
|
||||||
|
--- a/src/gui-wizard-gtk/wizard.c
|
||||||
|
+++ b/src/gui-wizard-gtk/wizard.c
|
||||||
|
@@ -1024,6 +1024,9 @@ static event_gui_data_t *add_event_buttons(GtkBox *box,
|
||||||
|
break;
|
||||||
|
|
||||||
|
char *event_name_end = strchr(event_name, '\n');
|
||||||
|
+ if (event_name_end == NULL)
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
*event_name_end = '\0';
|
||||||
|
|
||||||
|
event_config_t *cfg = get_event_config(event_name);
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
34
SOURCES/0007-coverity-fix-def9.patch
Normal file
34
SOURCES/0007-coverity-fix-def9.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From a9d4eab52e3a30dc0baa730d9a8fd9ab21488110 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
Date: Wed, 18 Jul 2018 17:23:48 +0200
|
||||||
|
Subject: [PATCH] coverity fix [#def9]
|
||||||
|
|
||||||
|
libreport-2.9.5/src/lib/abrt_sock.c:80: negative_returns: "socketfd" is passed
|
||||||
|
to a parameter that cannot be negative.
|
||||||
|
|
||||||
|
https://cov01.lab.eng.brq.redhat.com/el8-results/el8/libreport-2.9.5-2.el8+7/scan-results.html#def9
|
||||||
|
|
||||||
|
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
---
|
||||||
|
src/lib/abrt_sock.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/abrt_sock.c b/src/lib/abrt_sock.c
|
||||||
|
index 962ecc96..8b80aac8 100644
|
||||||
|
--- a/src/lib/abrt_sock.c
|
||||||
|
+++ b/src/lib/abrt_sock.c
|
||||||
|
@@ -75,9 +75,10 @@ static int connect_to_abrtd_and_call_DeleteDebugDump(const char *dump_dir_name)
|
||||||
|
result = (response[9] - '0') * 100 + (response[10] - '0') * 10 + (response[11] - '0');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ close(socketfd);
|
||||||
|
}
|
||||||
|
|
||||||
|
- close(socketfd);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
41
SOURCES/0008-coverity-fixes-def16-def17.patch
Normal file
41
SOURCES/0008-coverity-fixes-def16-def17.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From a6cc1ba3c528c2622d229decbc59944f8ef5752a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
Date: Fri, 20 Jul 2018 15:39:13 +0200
|
||||||
|
Subject: [PATCH] coverity fixes [#def16] [#def17]
|
||||||
|
|
||||||
|
libreport-2.9.5/src/lib/dump_dir.c:890: negative_returns: "fd" is passed to a
|
||||||
|
parameter that cannot be negative.
|
||||||
|
|
||||||
|
https://cov01.lab.eng.brq.redhat.com/el8-results/el8/libreport-2.9.5-2.el8+7/scan-results.html#def16
|
||||||
|
|
||||||
|
libreport-2.9.5/src/lib/dump_dir.c:926: negative_returns: "fd" is passed to a parameter that cannot be negative.
|
||||||
|
|
||||||
|
https://cov01.lab.eng.brq.redhat.com/el8-results/el8/libreport-2.9.5-2.el8+7/scan-results.html#def17
|
||||||
|
|
||||||
|
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
---
|
||||||
|
src/lib/dump_dir.c | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/dump_dir.c b/src/lib/dump_dir.c
|
||||||
|
index f509fdc5..632a01fa 100644
|
||||||
|
--- a/src/lib/dump_dir.c
|
||||||
|
+++ b/src/lib/dump_dir.c
|
||||||
|
@@ -849,10 +849,12 @@ static int fdreopen(int dir_fd, DIR **d)
|
||||||
|
{ \
|
||||||
|
if (dot_or_dotdot(dent->d_name)) continue; \
|
||||||
|
int fd = secure_openat_read(dirfd(d), dent->d_name); \
|
||||||
|
- if (fd >= 0)
|
||||||
|
+ if (fd >= 0) \
|
||||||
|
+ {
|
||||||
|
|
||||||
|
#define FOREACH_REGULAR_FILE_AS_FD_AT_END \
|
||||||
|
- close(fd); \
|
||||||
|
+ close(fd); \
|
||||||
|
+ } \
|
||||||
|
} \
|
||||||
|
closedir(d);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
31
SOURCES/0009-coverity-fixes-def21.patch
Normal file
31
SOURCES/0009-coverity-fixes-def21.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 9c28424364eeac530e9ea2103b8436e1ed1a53de Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
Date: Mon, 6 Aug 2018 15:39:45 +0200
|
||||||
|
Subject: [PATCH] coverity fixes [#def21]
|
||||||
|
|
||||||
|
libreport-2.9.5/src/lib/event_config.c:465: leaked_storage: Variable "err"
|
||||||
|
going out of scope leaks the storage it points to.
|
||||||
|
|
||||||
|
https://cov01.lab.eng.brq.redhat.com/el8-results/el8/libreport-2.9.5-2.el8+7/scan-results.html#def21
|
||||||
|
|
||||||
|
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||||
|
---
|
||||||
|
src/lib/event_config.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/lib/event_config.c b/src/lib/event_config.c
|
||||||
|
index 88334db1..bbc8d33c 100644
|
||||||
|
--- a/src/lib/event_config.c
|
||||||
|
+++ b/src/lib/event_config.c
|
||||||
|
@@ -461,6 +461,8 @@ GList *get_options_with_err_msg(const char *event_name)
|
||||||
|
inv_opt->invopt_name = xstrdup(opt->eo_name);
|
||||||
|
inv_opt->invopt_error = xstrdup(err);
|
||||||
|
err_list = g_list_prepend(err_list, inv_opt);
|
||||||
|
+
|
||||||
|
+ free(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,52 @@
|
|||||||
|
From f092a94a3676479b472c7c7fa3a8ea5c62baf7c9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Mon, 20 Aug 2018 15:25:38 +0200
|
||||||
|
Subject: [PATCH] coverity: Free resource leaking vars #def[42,41,38,37]
|
||||||
|
|
||||||
|
The variables were used for their purpose, so we can free them.
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
src/plugins/mantisbt.c | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/plugins/mantisbt.c b/src/plugins/mantisbt.c
|
||||||
|
index 2504f9ad..f2542afd 100644
|
||||||
|
--- a/src/plugins/mantisbt.c
|
||||||
|
+++ b/src/plugins/mantisbt.c
|
||||||
|
@@ -862,6 +862,7 @@ mantisbt_search_by_abrt_hash(mantisbt_settings_t *settings, const char *abrt_has
|
||||||
|
}
|
||||||
|
|
||||||
|
GList *ids = response_get_main_ids_list(result->mr_body);
|
||||||
|
+ mantisbt_result_free(result);
|
||||||
|
|
||||||
|
return ids;
|
||||||
|
}
|
||||||
|
@@ -906,6 +907,7 @@ mantisbt_search_duplicate_issues(mantisbt_settings_t *settings, const char *cate
|
||||||
|
}
|
||||||
|
|
||||||
|
GList *ids = response_get_main_ids_list(result->mr_body);
|
||||||
|
+ mantisbt_result_free(result);
|
||||||
|
|
||||||
|
return ids;
|
||||||
|
}
|
||||||
|
@@ -1101,11 +1103,16 @@ mantisbt_get_project_id_from_name(mantisbt_settings_t *settings)
|
||||||
|
soap_node_add_child_node(req->sr_method, "project_name", SOAP_STRING, settings->m_project);
|
||||||
|
|
||||||
|
mantisbt_result_t *result = mantisbt_soap_call(settings, req);
|
||||||
|
+ soap_request_free(req);
|
||||||
|
|
||||||
|
if (result->mr_http_resp_code != 200)
|
||||||
|
+ {
|
||||||
|
+ mantisbt_result_free(result);
|
||||||
|
error_msg_and_die(_("Failed to get project id from name"));
|
||||||
|
+ }
|
||||||
|
|
||||||
|
settings->m_project_id = response_get_return_value_as_string(result->mr_body);
|
||||||
|
+ mantisbt_result_free(result);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 397ab29a84eeb73acf5bbaa5202b0b73c4de05db Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Mon, 20 Aug 2018 15:52:03 +0200
|
||||||
|
Subject: [PATCH] coverity: Check if pointer isnt null before strcmp #def40
|
||||||
|
|
||||||
|
Passing NULL pointer to strcmp results in undefined behavior.
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
src/plugins/mantisbt.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/plugins/mantisbt.c b/src/plugins/mantisbt.c
|
||||||
|
index f2542afd..1750dc5d 100644
|
||||||
|
--- a/src/plugins/mantisbt.c
|
||||||
|
+++ b/src/plugins/mantisbt.c
|
||||||
|
@@ -1042,7 +1042,7 @@ mantisbt_get_issue_info(const mantisbt_settings_t *settings, int issue_id)
|
||||||
|
issue_info->mii_dup_id = response_get_id_of_relatedto_issue(result->mr_body);
|
||||||
|
|
||||||
|
if (strcmp(issue_info->mii_status, "closed") == 0
|
||||||
|
- && strcmp(issue_info->mii_resolution, "duplicate") == 0
|
||||||
|
+ && (issue_info->mii_resolution != NULL && strcmp(issue_info->mii_resolution, "duplicate") == 0)
|
||||||
|
&& issue_info->mii_dup_id == -1 )
|
||||||
|
{
|
||||||
|
error_msg(_("Issue %i is CLOSED as DUPLICATE, but it has no DUPLICATE_ID"),
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,44 @@
|
|||||||
|
From 831f57740c054c4ee129e8de96c93c706c620382 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Mon, 20 Aug 2018 14:38:31 +0200
|
||||||
|
Subject: [PATCH] coverity: Change data type for bug_id variable #def[44,43]
|
||||||
|
|
||||||
|
If bug_id is an integer, it makes condition 'bug_id > INT_MAX' always evaluate False.
|
||||||
|
|
||||||
|
It is changed to unsigned long because of strtoul (converts strings to unsigned long).
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
src/plugins/reporter-bugzilla.c | 2 +-
|
||||||
|
src/plugins/reporter-mantisbt.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/plugins/reporter-bugzilla.c b/src/plugins/reporter-bugzilla.c
|
||||||
|
index 2922e8ac..d4d03f8e 100644
|
||||||
|
--- a/src/plugins/reporter-bugzilla.c
|
||||||
|
+++ b/src/plugins/reporter-bugzilla.c
|
||||||
|
@@ -628,7 +628,7 @@ int main(int argc, char **argv)
|
||||||
|
login(client, &rhbz);
|
||||||
|
|
||||||
|
|
||||||
|
- int bug_id = 0;
|
||||||
|
+ unsigned long bug_id = 0;
|
||||||
|
|
||||||
|
/* If REMOTE_RESULT contains "DUPLICATE 12345", we consider it a dup of 12345
|
||||||
|
* and won't search on bz server.
|
||||||
|
diff --git a/src/plugins/reporter-mantisbt.c b/src/plugins/reporter-mantisbt.c
|
||||||
|
index c2b0d0b4..67597d52 100644
|
||||||
|
--- a/src/plugins/reporter-mantisbt.c
|
||||||
|
+++ b/src/plugins/reporter-mantisbt.c
|
||||||
|
@@ -463,7 +463,7 @@ int main(int argc, char **argv)
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
- int bug_id = 0;
|
||||||
|
+ unsigned long bug_id = 0;
|
||||||
|
|
||||||
|
/* If REMOTE_RESULT contains "DUPLICATE 12345", we consider it a dup of 12345
|
||||||
|
* and won't search on MantisBT server.
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From 570496fa4d39fd5eaa6216c7962c3875794571c2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Mon, 20 Aug 2018 16:13:15 +0200
|
||||||
|
Subject: [PATCH] coverity: Check null pointer before dereferencing it #def35
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
src/lib/xatonum.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/xatonum.c b/src/lib/xatonum.c
|
||||||
|
index 510d7667..8381ec37 100644
|
||||||
|
--- a/src/lib/xatonum.c
|
||||||
|
+++ b/src/lib/xatonum.c
|
||||||
|
@@ -96,7 +96,7 @@ int xatoi_positive(const char *numstr)
|
||||||
|
|
||||||
|
int try_atoi(const char *numstr, int *value)
|
||||||
|
{
|
||||||
|
- if (*numstr != '-')
|
||||||
|
+ if (numstr != NULL && *numstr != '-')
|
||||||
|
return try_atoi_positive(numstr, value);
|
||||||
|
|
||||||
|
unsigned tmp;
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
From 7cbf5a9b3613985358aad07b6365f6c5cf06a4cf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Mon, 20 Aug 2018 16:52:13 +0200
|
||||||
|
Subject: [PATCH] coverity: Remove check for null pointer with no effect #def33
|
||||||
|
|
||||||
|
post_state->errmsg is defined as a char array, NULL is a pointer - these
|
||||||
|
are incompatible types. Comparing them always evaluates as False.
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
src/lib/ureport.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
|
||||||
|
index c32c948a..ced48108 100644
|
||||||
|
--- a/src/lib/ureport.c
|
||||||
|
+++ b/src/lib/ureport.c
|
||||||
|
@@ -570,7 +570,7 @@ ureport_server_response_from_reply(post_state_t *post_state,
|
||||||
|
*/
|
||||||
|
if (post_state->curl_result != CURLE_OK)
|
||||||
|
{
|
||||||
|
- if (post_state->errmsg != NULL && strcmp( post_state->errmsg, "") != 0)
|
||||||
|
+ if (strcmp(post_state->errmsg, "") != 0)
|
||||||
|
error_msg(_("Failed to upload uReport to the server '%s' with curl: %s"),
|
||||||
|
config->ur_url,
|
||||||
|
post_state->errmsg);
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 78e0ba4ce8d2e31c67e026f32279ad9f46a387f5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Mon, 20 Aug 2018 17:08:33 +0200
|
||||||
|
Subject: [PATCH] coverity: Check return value of fstat call #def31
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
src/lib/read_write.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/read_write.c b/src/lib/read_write.c
|
||||||
|
index 657adb0c..a2e76db0 100644
|
||||||
|
--- a/src/lib/read_write.c
|
||||||
|
+++ b/src/lib/read_write.c
|
||||||
|
@@ -133,8 +133,8 @@ void* xmalloc_read(int fd, size_t *maxsz_p)
|
||||||
|
/* Estimate file size */
|
||||||
|
{
|
||||||
|
struct stat st;
|
||||||
|
- st.st_size = 0; /* in case fstat fails, assume 0 */
|
||||||
|
- fstat(fd, &st);
|
||||||
|
+ if (fstat(fd, &st) != 0)
|
||||||
|
+ st.st_size = 0; /* in case fstat fails, assume 0 */
|
||||||
|
/* /proc/N/stat files report st_size 0 */
|
||||||
|
/* In order to make such files readable, we add small const (4k) */
|
||||||
|
size = (st.st_size | 0xfff) + 1;
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
29
SOURCES/0016-coverity-Remove-reverse-inull-def30.patch
Normal file
29
SOURCES/0016-coverity-Remove-reverse-inull-def30.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From f6a8abe53b5cfe93cb08bbfa1fb5da68b2399dbf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Mon, 20 Aug 2018 17:12:58 +0200
|
||||||
|
Subject: [PATCH] coverity: Remove reverse inull #def30
|
||||||
|
|
||||||
|
The stat_file cannot be NULL, it would already fail in xfdopen.
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
src/lib/get_cmdline.c | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/get_cmdline.c b/src/lib/get_cmdline.c
|
||||||
|
index c15fc193..83c2fb45 100644
|
||||||
|
--- a/src/lib/get_cmdline.c
|
||||||
|
+++ b/src/lib/get_cmdline.c
|
||||||
|
@@ -790,8 +790,7 @@ static int get_process_ppid_at(int pid_proc_fd, pid_t *ppid)
|
||||||
|
r = -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (stat_file != NULL)
|
||||||
|
- fclose(stat_file);
|
||||||
|
+ fclose(stat_file);
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
32
SOURCES/0017-coverity-Remove-deadcode-def47.patch
Normal file
32
SOURCES/0017-coverity-Remove-deadcode-def47.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 94ffb1d8287530ed0fb87b8aa7d693ba754a9387 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Tue, 21 Aug 2018 13:06:51 +0200
|
||||||
|
Subject: [PATCH] coverity: Remove deadcode #def47
|
||||||
|
|
||||||
|
Value of not_reportable was already checked for NULL/empty value and
|
||||||
|
therefore the ternary expression must be True and will never result in """".
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
src/report-newt/report-newt.c | 5 ++---
|
||||||
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/report-newt/report-newt.c b/src/report-newt/report-newt.c
|
||||||
|
index 61e279d1..d0585125 100644
|
||||||
|
--- a/src/report-newt/report-newt.c
|
||||||
|
+++ b/src/report-newt/report-newt.c
|
||||||
|
@@ -327,9 +327,8 @@ static int report(const char *dump_dir_name)
|
||||||
|
{
|
||||||
|
char *reason = dd_load_text_ext(dd, FILENAME_REASON, 0
|
||||||
|
| DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE);
|
||||||
|
- char *t = xasprintf("%s%s%s",
|
||||||
|
- not_reportable ? : "",
|
||||||
|
- not_reportable ? " " : "",
|
||||||
|
+ char *t = xasprintf("%s %s",
|
||||||
|
+ not_reportable,
|
||||||
|
reason ? : _("(no description)"));
|
||||||
|
|
||||||
|
newtWinMessage(_("Error"), _("Ok"), (char *)"%s", t);
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
@ -0,0 +1,53 @@
|
|||||||
|
From 1aa9e3a987439fd4435b40b9c7f56d063097f980 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Thu, 3 Jan 2019 16:32:00 +0100
|
||||||
|
Subject: [PATCH] bugzilla: change the default bugzilla group
|
||||||
|
|
||||||
|
Changes the default bugzilla group to redhat and also makes the
|
||||||
|
reported bugs private by default.
|
||||||
|
|
||||||
|
Related to rhbz#1660449
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@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 feafc28e..ce453895 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -92,14 +92,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.21.0
|
||||||
|
|
@ -0,0 +1,77 @@
|
|||||||
|
From 69c83b933da2ac7c4a1450c5882027030eb79022 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ernestas Kulik <ekulik@redhat.com>
|
||||||
|
Date: Tue, 12 Mar 2019 13:30:12 +0100
|
||||||
|
Subject: [PATCH] lib: dump_dir: Clean up on failure in dd_delete()
|
||||||
|
|
||||||
|
All callers assume that dd_delete() will succeed and the dump directory
|
||||||
|
struct will be freed, but in some cases that does not happen and leaks
|
||||||
|
occur.
|
||||||
|
|
||||||
|
Resolves rhbz#1671233
|
||||||
|
|
||||||
|
Signed-off-by: Ernestas Kulik <ekulik@redhat.com>
|
||||||
|
---
|
||||||
|
src/lib/dump_dir.c | 26 +++++++++++++++++++++-----
|
||||||
|
1 file changed, 21 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/dump_dir.c b/src/lib/dump_dir.c
|
||||||
|
index 632a01fa..4533f4c1 100644
|
||||||
|
--- a/src/lib/dump_dir.c
|
||||||
|
+++ b/src/lib/dump_dir.c
|
||||||
|
@@ -1555,19 +1555,33 @@ static int dd_delete_meta_data(struct dump_dir *dd)
|
||||||
|
|
||||||
|
int dd_delete(struct dump_dir *dd)
|
||||||
|
{
|
||||||
|
+ int retval;
|
||||||
|
+
|
||||||
|
+ retval = 0;
|
||||||
|
+
|
||||||
|
if (!dd->locked)
|
||||||
|
{
|
||||||
|
error_msg("unlocked problem directory %s cannot be deleted", dd->dd_dirname);
|
||||||
|
- return -1;
|
||||||
|
+
|
||||||
|
+ retval = -1;
|
||||||
|
+
|
||||||
|
+ goto close;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dd_delete_meta_data(dd) != 0)
|
||||||
|
- return -2;
|
||||||
|
+ {
|
||||||
|
+ retval = -2;
|
||||||
|
+
|
||||||
|
+ goto close;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if (delete_file_dir(dd->dd_fd, /*skip_lock_file:*/ true) != 0)
|
||||||
|
{
|
||||||
|
perror_msg("Can't remove contents of directory '%s'", dd->dd_dirname);
|
||||||
|
- return -2;
|
||||||
|
+
|
||||||
|
+ retval = -2;
|
||||||
|
+
|
||||||
|
+ goto close;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned cnt = RMDIR_FAIL_COUNT;
|
||||||
|
@@ -1586,12 +1600,14 @@ int dd_delete(struct dump_dir *dd)
|
||||||
|
if (cnt == 0)
|
||||||
|
{
|
||||||
|
perror_msg("Can't remove directory '%s'", dd->dd_dirname);
|
||||||
|
- return -3;
|
||||||
|
+
|
||||||
|
+ retval = -3;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd->locked = 0; /* delete_file_dir already removed .lock */
|
||||||
|
+close:
|
||||||
|
dd_close(dd);
|
||||||
|
- return 0;
|
||||||
|
+ return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
int dd_chown(struct dump_dir *dd, uid_t new_uid)
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
From 683364e35ef2da8cd646fe1e29e57a17c6e71c36 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ernestas Kulik <ekulik@redhat.com>
|
||||||
|
Date: Tue, 28 May 2019 15:51:05 +0200
|
||||||
|
Subject: [PATCH] cli: Unpack command-line argument parsing logic
|
||||||
|
|
||||||
|
Currently, checking for invalid command line needlessly involves
|
||||||
|
convoluted bitwise operations, which can be simplified drastically.
|
||||||
|
|
||||||
|
First, argc is reduced by optind, which points to the next argument to
|
||||||
|
be processed. If everything goes well, argc should be 1, since the only
|
||||||
|
remaining argument to be processed is the problem directory. If that
|
||||||
|
does not hold, we want to bail. Another point at which we want to bail
|
||||||
|
is when an option is passed that operates on the positional argument
|
||||||
|
(anything but -L, which just lists available events). Checking for that
|
||||||
|
involves ANDing the current option mask with the mask of all such
|
||||||
|
options. The result is NOTed for comparison, since argc is 0 in such
|
||||||
|
cases.
|
||||||
|
|
||||||
|
Signed-off-by: Ernestas Kulik <ekulik@redhat.com>
|
||||||
|
---
|
||||||
|
src/cli/cli.c | 17 ++++++++---------
|
||||||
|
1 file changed, 8 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/cli/cli.c b/src/cli/cli.c
|
||||||
|
index ff5b29f4..67ce7dde 100644
|
||||||
|
--- a/src/cli/cli.c
|
||||||
|
+++ b/src/cli/cli.c
|
||||||
|
@@ -39,6 +39,9 @@ static char *steal_directory_if_needed(char *dump_dir_name)
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
+ bool runaway_arguments;
|
||||||
|
+ bool missing_positional_argument;
|
||||||
|
+
|
||||||
|
abrt_init(argv);
|
||||||
|
|
||||||
|
setlocale(LC_ALL, "");
|
||||||
|
@@ -108,16 +111,12 @@ int main(int argc, char** argv)
|
||||||
|
argv += optind;
|
||||||
|
argc -= optind;
|
||||||
|
|
||||||
|
+ runaway_arguments = argc > 1;
|
||||||
|
+ missing_positional_argument = (opts & OPTMASK_need_arg) && (argc == 0);
|
||||||
|
+
|
||||||
|
/* Check for bad usage */
|
||||||
|
- if (argc > 1 /* more than one arg? */
|
||||||
|
- ||
|
||||||
|
- /* dont_need_arg == have_arg? bad in both cases:
|
||||||
|
- * TRUE == TRUE (dont need arg but have) or
|
||||||
|
- * FALSE == FALSE (need arg but havent).
|
||||||
|
- * OPT_list_events is an exception, it can be used in both cases.
|
||||||
|
- */
|
||||||
|
- (((!(opts & OPTMASK_need_arg)) == argc) && (op != OPT_list_events))
|
||||||
|
- ) {
|
||||||
|
+ if (runaway_arguments || (missing_positional_argument && op != OPT_list_events))
|
||||||
|
+ {
|
||||||
|
show_usage_and_die(program_usage_string, program_options);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
From d10e9b9e9b3118405ac701ce9109bc7239ff1752 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ernestas Kulik <ekulik@redhat.com>
|
||||||
|
Date: Wed, 29 May 2019 14:07:52 +0200
|
||||||
|
Subject: [PATCH] =?UTF-8?q?plugins:=20rhbz:=20Don=E2=80=99t=20call=20strle?=
|
||||||
|
=?UTF-8?q?n()=20on=20attachment=20data?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
It might not be textual, meaning that, if the blob somehow begins with
|
||||||
|
NUL, it would be treated as empty.
|
||||||
|
|
||||||
|
Signed-off-by: Ernestas Kulik <ekulik@redhat.com>
|
||||||
|
---
|
||||||
|
src/plugins/rhbz.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
|
||||||
|
index 680527d7..96b6d7da 100644
|
||||||
|
--- a/src/plugins/rhbz.c
|
||||||
|
+++ b/src/plugins/rhbz.c
|
||||||
|
@@ -611,7 +611,7 @@ int rhbz_attach_blob(struct abrt_xmlrpc *ax, const char *bug_id,
|
||||||
|
{
|
||||||
|
func_entry();
|
||||||
|
|
||||||
|
- if (strlen(data) == 0)
|
||||||
|
+ if (0 == data_len)
|
||||||
|
{
|
||||||
|
log_notice("not attaching an empty file: '%s'", filename);
|
||||||
|
/* Return SUCCESS */
|
||||||
|
@@ -681,7 +681,7 @@ int rhbz_attach_fd(struct abrt_xmlrpc *ax, const char *bug_id,
|
||||||
|
|
||||||
|
//TODO: need to have a method of attaching huge files (IOW: 1Gb read isn't good).
|
||||||
|
|
||||||
|
- char *data = xmalloc(size + 1);
|
||||||
|
+ char *data = xmalloc(size);
|
||||||
|
ssize_t r = full_read(fd, data, size);
|
||||||
|
if (r < 0)
|
||||||
|
{
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
34
SOURCES/0023-tests-Disable-strcpm-ing-a-freed-pointer.patch
Normal file
34
SOURCES/0023-tests-Disable-strcpm-ing-a-freed-pointer.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 677b495832484943d88f3fa4325b4f5ae38e930b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Fabik <mfabik@redhat.com>
|
||||||
|
Date: Tue, 16 Jul 2019 10:27:18 +0200
|
||||||
|
Subject: [PATCH] tests: Disable strcpm'ing a freed pointer
|
||||||
|
|
||||||
|
This was causing an i686 build failure on RHEL8
|
||||||
|
|
||||||
|
Related: rhbz#1660449
|
||||||
|
Impossible to build otherwise
|
||||||
|
|
||||||
|
Signed-off-by: Michal Fabik <mfabik@redhat.com>
|
||||||
|
---
|
||||||
|
tests/libreport_types.at | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/libreport_types.at b/tests/libreport_types.at
|
||||||
|
index 106ba3b0..c63fdad4 100644
|
||||||
|
--- a/tests/libreport_types.at
|
||||||
|
+++ b/tests/libreport_types.at
|
||||||
|
@@ -233,7 +233,10 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
|
assert(try_get_map_string_item_as_string(map, key, &retval) || !"Cannot find key string('my_string') after freeing original key");
|
||||||
|
assert(NULL != retval || !"The return value is not assigned to the return variable");
|
||||||
|
- assert(strcmp(bck, retval) == 0 || !"Garbled string('test') after freeing the original key value");
|
||||||
|
+
|
||||||
|
+ /* disabled because this line was failing during an i686 build on RHEL8 */
|
||||||
|
+ /* need to investigate what it's good for in the first place */
|
||||||
|
+ //assert(strcmp(bck, retval) == 0 || !"Garbled string('test') after freeing the original key value");
|
||||||
|
|
||||||
|
/* TODO: try to store really big string */
|
||||||
|
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
37
SOURCES/0024-lib-fix-a-SEGV-in-list_possible_events.patch
Normal file
37
SOURCES/0024-lib-fix-a-SEGV-in-list_possible_events.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From fc813bcf566e0ca1ccfff83e7e6f360647066768 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jakub Filak <jfilak@redhat.com>
|
||||||
|
Date: Thu, 9 Jul 2015 15:32:19 +0200
|
||||||
|
Subject: [PATCH] lib: fix a SEGV in list_possible_events()
|
||||||
|
|
||||||
|
The bug has been introduced in
|
||||||
|
commit fc028b3417349fd60a2ddd1aff1127a417df512b
|
||||||
|
|
||||||
|
Related: #1224984
|
||||||
|
|
||||||
|
Fixes: rhbz#1733515
|
||||||
|
|
||||||
|
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||||
|
(cherry picked from commit 38a8c2fb2b4a46a35899f6b1066ec65ef155eeac)
|
||||||
|
---
|
||||||
|
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 64c7a303..077ae189 100644
|
||||||
|
--- a/src/lib/run_event.c
|
||||||
|
+++ b/src/lib/run_event.c
|
||||||
|
@@ -417,7 +417,11 @@ static char* pop_next_command(GList **pp_rule_list,
|
||||||
|
if (pd == NULL)
|
||||||
|
free_me = real_val = dd_load_text_ext(dd, var_name, DD_FAIL_QUIETLY_ENOENT);
|
||||||
|
else
|
||||||
|
+ {
|
||||||
|
real_val = problem_data_get_content_or_NULL(pd, var_name);
|
||||||
|
+ if (real_val == NULL)
|
||||||
|
+ free_me = real_val = xstrdup("");
|
||||||
|
+ }
|
||||||
|
free(var_name);
|
||||||
|
int vals_differ = regex ? regcmp_lines(real_val, eq_sign + 1) : strcmp(real_val, eq_sign + 1);
|
||||||
|
free(free_me);
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
146
SOURCES/0025-report-client-Find-debuginfos-in-own-method.patch
Normal file
146
SOURCES/0025-report-client-Find-debuginfos-in-own-method.patch
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
From f4a632838a453f168037257d0c48e9b0976d6321 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matej Marusak <mmarusak@redhat.com>
|
||||||
|
Date: Fri, 30 Nov 2018 11:40:09 +0100
|
||||||
|
Subject: [PATCH] report-client: Find debuginfos in own method
|
||||||
|
|
||||||
|
This commit picks a piece of code responsible for looking up debuginfo
|
||||||
|
packages into own method. For making sure that it works in any code that
|
||||||
|
used it the old way, it checks if the method for finding packages was
|
||||||
|
already called and if not, calls it directly.
|
||||||
|
|
||||||
|
Purpose of this change is to be able to get size of packages those are
|
||||||
|
going to be installed before installing them. In that case anyone using
|
||||||
|
these downloader classes is going to be able for example prepare enough
|
||||||
|
space for the newly installed packages.
|
||||||
|
|
||||||
|
Related to #811978.
|
||||||
|
|
||||||
|
Signed-off-by: Matej Marusak <mmarusak@redhat.com>
|
||||||
|
---
|
||||||
|
src/client-python/reportclient/debuginfo.py | 69 +++++++++++++--------
|
||||||
|
1 file changed, 43 insertions(+), 26 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/client-python/reportclient/debuginfo.py b/src/client-python/reportclient/debuginfo.py
|
||||||
|
index 4390304e..561de52f 100644
|
||||||
|
--- a/src/client-python/reportclient/debuginfo.py
|
||||||
|
+++ b/src/client-python/reportclient/debuginfo.py
|
||||||
|
@@ -233,6 +233,17 @@ class DebugInfoDownload(object):
|
||||||
|
self.keeprpms = keep_rpms
|
||||||
|
self.noninteractive = noninteractive
|
||||||
|
self.repo_pattern = repo_pattern
|
||||||
|
+ self.package_files_dict = {}
|
||||||
|
+ self.not_found = []
|
||||||
|
+ self.todownload_size = 0
|
||||||
|
+ self.installed_size = 0
|
||||||
|
+ self.find_packages_run = False
|
||||||
|
+
|
||||||
|
+ def get_download_size(self):
|
||||||
|
+ return self.todownload_size
|
||||||
|
+
|
||||||
|
+ def get_install_size(self):
|
||||||
|
+ return self.installed_size
|
||||||
|
|
||||||
|
def mute_stdout(self):
|
||||||
|
"""
|
||||||
|
@@ -286,6 +297,26 @@ class DebugInfoDownload(object):
|
||||||
|
def download_package(self, pkg):
|
||||||
|
pass
|
||||||
|
|
||||||
|
+ def find_packages(self, files):
|
||||||
|
+ self.find_packages_run = True;
|
||||||
|
+ # nothing to download?
|
||||||
|
+ if not files:
|
||||||
|
+ return RETURN_FAILURE
|
||||||
|
+
|
||||||
|
+ print(_("Initializing package manager"))
|
||||||
|
+ self.prepare()
|
||||||
|
+
|
||||||
|
+ # This takes some time, let user know what we are doing
|
||||||
|
+ print(_("Setting up repositories"))
|
||||||
|
+ self.initialize_repositories()
|
||||||
|
+
|
||||||
|
+ print(_("Looking for needed packages in repositories"))
|
||||||
|
+ (self.package_files_dict,
|
||||||
|
+ self.not_found,
|
||||||
|
+ self.todownload_size,
|
||||||
|
+ self.installed_size) = self.triage(files)
|
||||||
|
+
|
||||||
|
+
|
||||||
|
# return value will be used as exitcode. So 0 = ok, !0 - error
|
||||||
|
def download(self, files, download_exact_files=False):
|
||||||
|
"""
|
||||||
|
@@ -309,32 +340,18 @@ class DebugInfoDownload(object):
|
||||||
|
if retval != RETURN_OK:
|
||||||
|
return retval
|
||||||
|
|
||||||
|
- print(_("Initializing package manager"))
|
||||||
|
- self.prepare()
|
||||||
|
- #if verbose == 0:
|
||||||
|
- # # this suppress yum messages about setting up repositories
|
||||||
|
- # mute_stdout()
|
||||||
|
-
|
||||||
|
- # This takes some time, let user know what we are doing
|
||||||
|
- print(_("Setting up repositories"))
|
||||||
|
- self.initialize_repositories()
|
||||||
|
-
|
||||||
|
- #if verbose == 0:
|
||||||
|
- # # re-enable the output to stdout
|
||||||
|
- # unmute_stdout()
|
||||||
|
-
|
||||||
|
- print(_("Looking for needed packages in repositories"))
|
||||||
|
- package_files_dict, not_found, todownload_size, installed_size = self.triage(files)
|
||||||
|
+ if not self.find_packages_run:
|
||||||
|
+ self.find_packages(files)
|
||||||
|
|
||||||
|
- if verbose != 0 or len(not_found) != 0:
|
||||||
|
- print(_("Can't find packages for {0} debuginfo files").format(len(not_found)))
|
||||||
|
+ if verbose != 0 or len(self.not_found) != 0:
|
||||||
|
+ print(_("Can't find packages for {0} debuginfo files").format(len(self.not_found)))
|
||||||
|
|
||||||
|
- if verbose != 0 or len(package_files_dict) != 0:
|
||||||
|
- print(_("Packages to download: {0}").format(len(package_files_dict)))
|
||||||
|
+ if verbose != 0 or len(self.package_files_dict) != 0:
|
||||||
|
+ print(_("Packages to download: {0}").format(len(self.package_files_dict)))
|
||||||
|
question = _(
|
||||||
|
"Downloading {0:.2f}Mb, installed size: {1:.2f}Mb. Continue?") \
|
||||||
|
- .format(todownload_size / (1024 * 1024),
|
||||||
|
- installed_size / (1024 * 1024))
|
||||||
|
+ .format(self.todownload_size / (1024 * 1024),
|
||||||
|
+ self.installed_size / (1024 * 1024))
|
||||||
|
|
||||||
|
if not self.noninteractive and not ask_yes_no(question):
|
||||||
|
print(_("Download cancelled by user"))
|
||||||
|
@@ -343,7 +360,7 @@ class DebugInfoDownload(object):
|
||||||
|
# check if there is enough free space in both tmp and cache
|
||||||
|
res = os.statvfs(self.tmpdir)
|
||||||
|
tmp_space = float(res.f_bsize * res.f_bavail) / (1024 * 1024)
|
||||||
|
- if (todownload_size / (1024 * 1024)) > tmp_space:
|
||||||
|
+ if (self.todownload_size / (1024 * 1024)) > tmp_space:
|
||||||
|
question = _("Warning: Not enough free space in tmp dir '{0}'"
|
||||||
|
" ({1:.2f}Mb left). Continue?").format(
|
||||||
|
self.tmpdir, tmp_space)
|
||||||
|
@@ -354,7 +371,7 @@ class DebugInfoDownload(object):
|
||||||
|
|
||||||
|
res = os.statvfs(self.cachedir)
|
||||||
|
cache_space = float(res.f_bsize * res.f_bavail) / (1024 * 1024)
|
||||||
|
- if (installed_size / (1024 * 1024)) > cache_space:
|
||||||
|
+ if (self.installed_size / (1024 * 1024)) > cache_space:
|
||||||
|
question = _("Warning: Not enough free space in cache dir "
|
||||||
|
"'{0}' ({1:.2f}Mb left). Continue?").format(
|
||||||
|
self.cachedir, cache_space)
|
||||||
|
@@ -363,10 +380,10 @@ class DebugInfoDownload(object):
|
||||||
|
print(_("Download cancelled by user"))
|
||||||
|
return RETURN_CANCEL_BY_USER
|
||||||
|
|
||||||
|
- progress_observer = DownloadProgress(len(package_files_dict))
|
||||||
|
+ progress_observer = DownloadProgress(len(self.package_files_dict))
|
||||||
|
self.initialize_progress(progress_observer)
|
||||||
|
|
||||||
|
- for pkg, files in package_files_dict.items():
|
||||||
|
+ for pkg, files in self.package_files_dict.items():
|
||||||
|
# Download
|
||||||
|
package_full_path, err = self.download_package(pkg)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.24.1
|
||||||
|
|
@ -0,0 +1,77 @@
|
|||||||
|
From 23110cb7198e53c1e211ba8a41c7406b04641574 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Mon, 3 Dec 2018 13:54:34 +0100
|
||||||
|
Subject: [PATCH] reportclient: Find and download required debuginfo packages
|
||||||
|
|
||||||
|
The current solution finds packages for given build-ids and then
|
||||||
|
downloads them. The problem is that some debuginfo packages require
|
||||||
|
other packages and if they are not available the generated backtrace
|
||||||
|
becomes unusable.
|
||||||
|
|
||||||
|
This commit adds a query for required packages and downloads them together
|
||||||
|
with the main packages.
|
||||||
|
|
||||||
|
Related: rhbz#1515265
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
.../reportclient/dnfdebuginfo.py | 34 +++++++++++++------
|
||||||
|
1 file changed, 23 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/client-python/reportclient/dnfdebuginfo.py b/src/client-python/reportclient/dnfdebuginfo.py
|
||||||
|
index 1867484f..04f98579 100644
|
||||||
|
--- a/src/client-python/reportclient/dnfdebuginfo.py
|
||||||
|
+++ b/src/client-python/reportclient/dnfdebuginfo.py
|
||||||
|
@@ -106,26 +106,38 @@ class DNFDebugInfoDownload(DebugInfoDownload):
|
||||||
|
print(_("Error setting up repositories: '{0!s}'").format(str(ex)))
|
||||||
|
|
||||||
|
def triage(self, files):
|
||||||
|
- q = self.base.sack.query()
|
||||||
|
- i = q.available()
|
||||||
|
+ dnf_query = self.base.sack.query()
|
||||||
|
+ dnf_available = dnf_query.available()
|
||||||
|
package_files_dict = {}
|
||||||
|
not_found = []
|
||||||
|
todownload_size = 0
|
||||||
|
installed_size = 0
|
||||||
|
for debuginfo_path in files:
|
||||||
|
- packages = i.filter(file=debuginfo_path)
|
||||||
|
+ di_package_list = []
|
||||||
|
+ packages = dnf_available.filter(file=debuginfo_path)
|
||||||
|
+
|
||||||
|
if not packages:
|
||||||
|
log2("not found package for %s", debuginfo_path)
|
||||||
|
not_found.append(debuginfo_path)
|
||||||
|
else:
|
||||||
|
- if packages[0] in package_files_dict.keys():
|
||||||
|
- package_files_dict[packages[0]].append(debuginfo_path)
|
||||||
|
- else:
|
||||||
|
- package_files_dict[packages[0]] = [debuginfo_path]
|
||||||
|
- todownload_size += float(packages[0].downloadsize)
|
||||||
|
- installed_size += float(packages[0].installsize)
|
||||||
|
-
|
||||||
|
- log2("found packages for %s: %s", debuginfo_path, packages[0])
|
||||||
|
+ di_package_list.append(packages[0])
|
||||||
|
+ if packages[0].requires:
|
||||||
|
+ package_reqs = dnf_available.filter(provides=packages[0].requires,
|
||||||
|
+ arch=packages[0].arch)
|
||||||
|
+ for pkg in package_reqs:
|
||||||
|
+ if pkg not in di_package_list:
|
||||||
|
+ di_package_list.append(pkg)
|
||||||
|
+ log2("found required package {0} for {1}".format(pkg, packages[0]))
|
||||||
|
+
|
||||||
|
+ for pkg in di_package_list:
|
||||||
|
+ if pkg in package_files_dict.keys():
|
||||||
|
+ package_files_dict[pkg].append(debuginfo_path)
|
||||||
|
+ else:
|
||||||
|
+ package_files_dict[pkg] = [debuginfo_path]
|
||||||
|
+ todownload_size += float(pkg.downloadsize)
|
||||||
|
+ installed_size += float(pkg.installsize)
|
||||||
|
+
|
||||||
|
+ log2("found packages for %s: %s", debuginfo_path, pkg)
|
||||||
|
return (package_files_dict, not_found, todownload_size, installed_size)
|
||||||
|
|
||||||
|
def download_package(self, pkg):
|
||||||
|
--
|
||||||
|
2.24.1
|
||||||
|
|
@ -0,0 +1,60 @@
|
|||||||
|
From c0d0e59df7d73feb971ba495c81f4651a8cea8a6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
Date: Wed, 5 Dec 2018 16:52:07 +0100
|
||||||
|
Subject: [PATCH] reportclient: Search for required packages recursively
|
||||||
|
|
||||||
|
Adds recursive function to search for required packages of required packages
|
||||||
|
of re...
|
||||||
|
|
||||||
|
Signed-off-by: Martin Kutlak <mkutlak@redhat.com>
|
||||||
|
---
|
||||||
|
.../reportclient/dnfdebuginfo.py | 21 +++++++++++++++++--
|
||||||
|
1 file changed, 19 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/client-python/reportclient/dnfdebuginfo.py b/src/client-python/reportclient/dnfdebuginfo.py
|
||||||
|
index 04f98579..165c12d0 100644
|
||||||
|
--- a/src/client-python/reportclient/dnfdebuginfo.py
|
||||||
|
+++ b/src/client-python/reportclient/dnfdebuginfo.py
|
||||||
|
@@ -112,6 +112,23 @@ class DNFDebugInfoDownload(DebugInfoDownload):
|
||||||
|
not_found = []
|
||||||
|
todownload_size = 0
|
||||||
|
installed_size = 0
|
||||||
|
+
|
||||||
|
+ def required_packages(query, package, origin):
|
||||||
|
+ """
|
||||||
|
+ Recursive function to find all required packages of required packages of ...
|
||||||
|
+ origin - should stop infinite recursion (A => B => ... => X => A)
|
||||||
|
+ """
|
||||||
|
+ required_pkg_list = []
|
||||||
|
+ if package.requires:
|
||||||
|
+ pkg_reqs = query.filter(provides=package.requires, arch=package.arch)
|
||||||
|
+ for p in pkg_reqs:
|
||||||
|
+ if p.name != origin.name and p not in required_pkg_list:
|
||||||
|
+ required_pkg_list.append(p)
|
||||||
|
+ required_pkg_list += required_packages(query, p, origin)
|
||||||
|
+
|
||||||
|
+ return required_pkg_list
|
||||||
|
+
|
||||||
|
+
|
||||||
|
for debuginfo_path in files:
|
||||||
|
di_package_list = []
|
||||||
|
packages = dnf_available.filter(file=debuginfo_path)
|
||||||
|
@@ -122,13 +139,13 @@ class DNFDebugInfoDownload(DebugInfoDownload):
|
||||||
|
else:
|
||||||
|
di_package_list.append(packages[0])
|
||||||
|
if packages[0].requires:
|
||||||
|
- package_reqs = dnf_available.filter(provides=packages[0].requires,
|
||||||
|
- arch=packages[0].arch)
|
||||||
|
+ package_reqs = required_packages(dnf_available, packages[0], packages[0])
|
||||||
|
for pkg in package_reqs:
|
||||||
|
if pkg not in di_package_list:
|
||||||
|
di_package_list.append(pkg)
|
||||||
|
log2("found required package {0} for {1}".format(pkg, packages[0]))
|
||||||
|
|
||||||
|
+
|
||||||
|
for pkg in di_package_list:
|
||||||
|
if pkg in package_files_dict.keys():
|
||||||
|
package_files_dict[pkg].append(debuginfo_path)
|
||||||
|
--
|
||||||
|
2.24.1
|
||||||
|
|
116
SOURCES/9000-Add-autogen.sh.patch
Normal file
116
SOURCES/9000-Add-autogen.sh.patch
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
From 9636b85c5570911c753bc8074ce5bd73f490d4da Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michal Fabik <mfabik@redhat.com>
|
||||||
|
Date: Wed, 19 Jun 2019 13:42:07 +0200
|
||||||
|
Subject: [PATCH] Add autogen.sh
|
||||||
|
|
||||||
|
---
|
||||||
|
autogen.sh | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 97 insertions(+)
|
||||||
|
create mode 100755 autogen.sh
|
||||||
|
|
||||||
|
diff --git a/autogen.sh b/autogen.sh
|
||||||
|
new file mode 100755
|
||||||
|
index 00000000..fd48b5f0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/autogen.sh
|
||||||
|
@@ -0,0 +1,97 @@
|
||||||
|
+#!/bin/sh
|
||||||
|
+
|
||||||
|
+print_help()
|
||||||
|
+{
|
||||||
|
+cat << EOH
|
||||||
|
+Prepares the source tree for configuration
|
||||||
|
+
|
||||||
|
+Usage:
|
||||||
|
+ autogen.sh [sysdeps [--install]]
|
||||||
|
+
|
||||||
|
+Options:
|
||||||
|
+
|
||||||
|
+ sysdeps prints out all dependencies
|
||||||
|
+ --install install all dependencies ('sudo yum install \$DEPS')
|
||||||
|
+
|
||||||
|
+EOH
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+parse_build_requires_from_spec_file()
|
||||||
|
+{
|
||||||
|
+ PACKAGE=$1
|
||||||
|
+ TEMPFILE=$(mktemp -u --suffix=.spec)
|
||||||
|
+ sed 's/@@LIBREPORT_VERSION@@/1/' < $PACKAGE.spec.in | sed 's/@.*@//' > $TEMPFILE
|
||||||
|
+ rpmspec -P $TEMPFILE | grep "^\(Build\)\?Requires:" | \
|
||||||
|
+ tr -s " " | tr "," "\n" | cut -f2- -d " " | \
|
||||||
|
+ grep -v "\(^\|python[23]-\)"$PACKAGE | sort -u | sed -E 's/^(.*) (.*)$/"\1 \2"/' | tr \" \'
|
||||||
|
+ rm $TEMPFILE
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+list_build_dependencies()
|
||||||
|
+{
|
||||||
|
+ local BUILD_SYSTEM_DEPS_LIST="gettext-devel"
|
||||||
|
+ echo $BUILD_SYSTEM_DEPS_LIST $(parse_build_requires_from_spec_file libreport)
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+case "$1" in
|
||||||
|
+ "--help"|"-h")
|
||||||
|
+ print_help
|
||||||
|
+ exit 0
|
||||||
|
+ ;;
|
||||||
|
+ "sysdeps")
|
||||||
|
+ DEPS_LIST=$(list_build_dependencies)
|
||||||
|
+
|
||||||
|
+ if [ "$2" == "--install" ]; then
|
||||||
|
+ set -x verbose
|
||||||
|
+ eval sudo dnf install --setopt=strict=0 $DEPS_LIST
|
||||||
|
+ set +x verbose
|
||||||
|
+ else
|
||||||
|
+ echo $DEPS_LIST
|
||||||
|
+ fi
|
||||||
|
+ exit 0
|
||||||
|
+ ;;
|
||||||
|
+ *)
|
||||||
|
+ echo "Running gen-version"
|
||||||
|
+ ./gen-version
|
||||||
|
+
|
||||||
|
+ mkdir -p m4
|
||||||
|
+ echo "Creating m4/aclocal.m4 ..."
|
||||||
|
+ test -r m4/aclocal.m4 || touch m4/aclocal.m4
|
||||||
|
+
|
||||||
|
+ echo "Running autopoint"
|
||||||
|
+ autopoint --force || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running intltoolize..."
|
||||||
|
+ intltoolize --force --copy --automake || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running aclocal..."
|
||||||
|
+ aclocal || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running libtoolize..."
|
||||||
|
+ libtoolize || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running autoheader..."
|
||||||
|
+ autoheader || return 1
|
||||||
|
+
|
||||||
|
+ echo "Running autoconf..."
|
||||||
|
+ autoconf --force || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running automake..."
|
||||||
|
+ automake --add-missing --force --copy || exit 1
|
||||||
|
+
|
||||||
|
+ echo "Running configure ..."
|
||||||
|
+ if [ 0 -eq $# ]; then
|
||||||
|
+ ./configure \
|
||||||
|
+ --prefix=/usr \
|
||||||
|
+ --sysconfdir=/etc \
|
||||||
|
+ --localstatedir=/var \
|
||||||
|
+ --sharedstatedir=/var/lib \
|
||||||
|
+ --mandir=/usr/share/man \
|
||||||
|
+ --infodir=/usr/share/info \
|
||||||
|
+ --enable-debug
|
||||||
|
+ echo "Configured for local debugging ..."
|
||||||
|
+ else
|
||||||
|
+ ./configure "$@"
|
||||||
|
+ fi
|
||||||
|
+ ;;
|
||||||
|
+esac
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
1142
SPECS/libreport.spec
Normal file
1142
SPECS/libreport.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user