From 3556c4695b4762605047c5eb4684f9e65f2b424d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 7 May 2019 08:43:33 -0400 Subject: [PATCH] import libreport-2.9.5-6.el8 --- .gitignore | 1 + .libreport.metadata | 1 + ...t-use-python3-to-get-consumerCertDir.patch | 31 + ...Remove-option-to-screencast-problems.patch | 177 +++ ...to-Bugzilla-only-for-pre-GA-Anaconda.patch | 26 + ...ra-URLs-by-corresponding-values-for-.patch | 66 + SOURCES/0005-coverity-fix-def6.patch | 31 + SOURCES/0006-coverity-fix-def7.patch | 32 + SOURCES/0007-coverity-fix-def9.patch | 34 + SOURCES/0008-coverity-fixes-def16-def17.patch | 41 + SOURCES/0009-coverity-fixes-def21.patch | 31 + ...esource-leaking-vars-def-42-41-38-37.patch | 52 + ...f-pointer-isnt-null-before-strcmp-de.patch | 28 + ...data-type-for-bug_id-variable-def-44.patch | 44 + ...ull-pointer-before-dereferencing-it-.patch | 26 + ...check-for-null-pointer-with-no-effec.patch | 29 + ...eck-return-value-of-fstat-call-def31.patch | 28 + ...-coverity-Remove-reverse-inull-def30.patch | 29 + .../0017-coverity-Remove-deadcode-def47.patch | 32 + SPECS/libreport.spec | 1106 +++++++++++++++++ 20 files changed, 1845 insertions(+) create mode 100644 .gitignore create mode 100644 .libreport.metadata create mode 100644 SOURCES/0001-ureport-use-python3-to-get-consumerCertDir.patch create mode 100644 SOURCES/0002-Remove-option-to-screencast-problems.patch create mode 100644 SOURCES/0003-offer-reporting-to-Bugzilla-only-for-pre-GA-Anaconda.patch create mode 100644 SOURCES/0004-replace-all-Fedora-URLs-by-corresponding-values-for-.patch create mode 100644 SOURCES/0005-coverity-fix-def6.patch create mode 100644 SOURCES/0006-coverity-fix-def7.patch create mode 100644 SOURCES/0007-coverity-fix-def9.patch create mode 100644 SOURCES/0008-coverity-fixes-def16-def17.patch create mode 100644 SOURCES/0009-coverity-fixes-def21.patch create mode 100644 SOURCES/0010-coverity-Free-resource-leaking-vars-def-42-41-38-37.patch create mode 100644 SOURCES/0011-coverity-Check-if-pointer-isnt-null-before-strcmp-de.patch create mode 100644 SOURCES/0012-coverity-Change-data-type-for-bug_id-variable-def-44.patch create mode 100644 SOURCES/0013-coverity-Check-null-pointer-before-dereferencing-it-.patch create mode 100644 SOURCES/0014-coverity-Remove-check-for-null-pointer-with-no-effec.patch create mode 100644 SOURCES/0015-coverity-Check-return-value-of-fstat-call-def31.patch create mode 100644 SOURCES/0016-coverity-Remove-reverse-inull-def30.patch create mode 100644 SOURCES/0017-coverity-Remove-deadcode-def47.patch create mode 100644 SPECS/libreport.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b141f80 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libreport-2.9.5.tar.gz diff --git a/.libreport.metadata b/.libreport.metadata new file mode 100644 index 0000000..e29fab1 --- /dev/null +++ b/.libreport.metadata @@ -0,0 +1 @@ +e2e3124c591fbc2668d99537ec086185348c1d93 SOURCES/libreport-2.9.5.tar.gz diff --git a/SOURCES/0001-ureport-use-python3-to-get-consumerCertDir.patch b/SOURCES/0001-ureport-use-python3-to-get-consumerCertDir.patch new file mode 100644 index 0000000..e6fe7a6 --- /dev/null +++ b/SOURCES/0001-ureport-use-python3-to-get-consumerCertDir.patch @@ -0,0 +1,31 @@ +From 8c00a86dddaf240d4a836a5e278190bcc51b0b66 Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +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 +--- + 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 + diff --git a/SOURCES/0002-Remove-option-to-screencast-problems.patch b/SOURCES/0002-Remove-option-to-screencast-problems.patch new file mode 100644 index 0000000..e1a7be4 --- /dev/null +++ b/SOURCES/0002-Remove-option-to-screencast-problems.patch @@ -0,0 +1,177 @@ +From 602124e481d700e334de20418b94b2fdf015c834 Mon Sep 17 00:00:00 2001 +From: Martin Kutlak +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 +--- + 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" +- "su -c \"dnf install fros-recordmydesktop\"" +- )); +- } +- +- + 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 @@ + 4 + + +- +- +- True +- False +- +- +- True +- False +- end +- If you don't know how to describe it, you can +- +- +- False +- False +- 0 +- +- +- +- +- add a screencast +- True +- True +- True +- True +- start +- none +- +- +- False +- True +- 1 +- +- +- +- +- False +- True +- 5 +- +- + + + +-- +2.17.1 + diff --git a/SOURCES/0003-offer-reporting-to-Bugzilla-only-for-pre-GA-Anaconda.patch b/SOURCES/0003-offer-reporting-to-Bugzilla-only-for-pre-GA-Anaconda.patch new file mode 100644 index 0000000..45575d4 --- /dev/null +++ b/SOURCES/0003-offer-reporting-to-Bugzilla-only-for-pre-GA-Anaconda.patch @@ -0,0 +1,26 @@ +From 1fa88becd8b9a3f1aece0d009171c31ee6d379c6 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +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 +--- + 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 + diff --git a/SOURCES/0004-replace-all-Fedora-URLs-by-corresponding-values-for-.patch b/SOURCES/0004-replace-all-Fedora-URLs-by-corresponding-values-for-.patch new file mode 100644 index 0000000..1cccb95 --- /dev/null +++ b/SOURCES/0004-replace-all-Fedora-URLs-by-corresponding-values-for-.patch @@ -0,0 +1,66 @@ +From dfc340b695d047018d38090e24a501f7b0c0dad1 Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +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 +--- + 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 @@ + + + +