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 <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 + 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 <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 + 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 <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 + 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 <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 + diff --git a/SOURCES/0005-coverity-fix-def6.patch b/SOURCES/0005-coverity-fix-def6.patch new file mode 100644 index 0000000..0a906ee --- /dev/null +++ b/SOURCES/0005-coverity-fix-def6.patch @@ -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 + diff --git a/SOURCES/0006-coverity-fix-def7.patch b/SOURCES/0006-coverity-fix-def7.patch new file mode 100644 index 0000000..2fc740d --- /dev/null +++ b/SOURCES/0006-coverity-fix-def7.patch @@ -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 + diff --git a/SOURCES/0007-coverity-fix-def9.patch b/SOURCES/0007-coverity-fix-def9.patch new file mode 100644 index 0000000..f554731 --- /dev/null +++ b/SOURCES/0007-coverity-fix-def9.patch @@ -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 + diff --git a/SOURCES/0008-coverity-fixes-def16-def17.patch b/SOURCES/0008-coverity-fixes-def16-def17.patch new file mode 100644 index 0000000..6325746 --- /dev/null +++ b/SOURCES/0008-coverity-fixes-def16-def17.patch @@ -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 + diff --git a/SOURCES/0009-coverity-fixes-def21.patch b/SOURCES/0009-coverity-fixes-def21.patch new file mode 100644 index 0000000..32628b7 --- /dev/null +++ b/SOURCES/0009-coverity-fixes-def21.patch @@ -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 + diff --git a/SOURCES/0010-coverity-Free-resource-leaking-vars-def-42-41-38-37.patch b/SOURCES/0010-coverity-Free-resource-leaking-vars-def-42-41-38-37.patch new file mode 100644 index 0000000..31bd64d --- /dev/null +++ b/SOURCES/0010-coverity-Free-resource-leaking-vars-def-42-41-38-37.patch @@ -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 + diff --git a/SOURCES/0011-coverity-Check-if-pointer-isnt-null-before-strcmp-de.patch b/SOURCES/0011-coverity-Check-if-pointer-isnt-null-before-strcmp-de.patch new file mode 100644 index 0000000..cf486e2 --- /dev/null +++ b/SOURCES/0011-coverity-Check-if-pointer-isnt-null-before-strcmp-de.patch @@ -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 + diff --git a/SOURCES/0012-coverity-Change-data-type-for-bug_id-variable-def-44.patch b/SOURCES/0012-coverity-Change-data-type-for-bug_id-variable-def-44.patch new file mode 100644 index 0000000..22d5c87 --- /dev/null +++ b/SOURCES/0012-coverity-Change-data-type-for-bug_id-variable-def-44.patch @@ -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 + diff --git a/SOURCES/0013-coverity-Check-null-pointer-before-dereferencing-it-.patch b/SOURCES/0013-coverity-Check-null-pointer-before-dereferencing-it-.patch new file mode 100644 index 0000000..e0ad22b --- /dev/null +++ b/SOURCES/0013-coverity-Check-null-pointer-before-dereferencing-it-.patch @@ -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 + diff --git a/SOURCES/0014-coverity-Remove-check-for-null-pointer-with-no-effec.patch b/SOURCES/0014-coverity-Remove-check-for-null-pointer-with-no-effec.patch new file mode 100644 index 0000000..c1f8f6f --- /dev/null +++ b/SOURCES/0014-coverity-Remove-check-for-null-pointer-with-no-effec.patch @@ -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 + diff --git a/SOURCES/0015-coverity-Check-return-value-of-fstat-call-def31.patch b/SOURCES/0015-coverity-Check-return-value-of-fstat-call-def31.patch new file mode 100644 index 0000000..0635dd4 --- /dev/null +++ b/SOURCES/0015-coverity-Check-return-value-of-fstat-call-def31.patch @@ -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 + diff --git a/SOURCES/0016-coverity-Remove-reverse-inull-def30.patch b/SOURCES/0016-coverity-Remove-reverse-inull-def30.patch new file mode 100644 index 0000000..cdb0eb5 --- /dev/null +++ b/SOURCES/0016-coverity-Remove-reverse-inull-def30.patch @@ -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 + diff --git a/SOURCES/0017-coverity-Remove-deadcode-def47.patch b/SOURCES/0017-coverity-Remove-deadcode-def47.patch new file mode 100644 index 0000000..9d35370 --- /dev/null +++ b/SOURCES/0017-coverity-Remove-deadcode-def47.patch @@ -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 + diff --git a/SPECS/libreport.spec b/SPECS/libreport.spec new file mode 100644 index 0000000..42aa4d4 --- /dev/null +++ b/SPECS/libreport.spec @@ -0,0 +1,1106 @@ +%if 0%{?suse_version} + %bcond_with bugzilla + + %define dbus_devel dbus-1-devel + %define libjson_devel libjson-devel +%else + %bcond_without bugzilla + + %define dbus_devel dbus-devel + %define libjson_devel json-c-devel +%endif + +%define glib_ver 2.43 + +%if 0%{?fedora} || 0%{?rhel} > 7 +# Enable python3 build by default +%bcond_without python3 +%else +%bcond_with python3 +%endif + +%if 0%{?rhel} > 7 || 0%{?fedora} > 28 +# Disable python2 build by default +%bcond_with python2 +%else +%bcond_without python2 +%endif + +Summary: Generic library for reporting various problems +Name: libreport +Version: 2.9.5 +Release: 6%{?dist} +License: GPLv2+ +URL: https://abrt.readthedocs.org/ +Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz + +Patch0001: 0001-ureport-use-python3-to-get-consumerCertDir.patch +Patch0002: 0002-Remove-option-to-screencast-problems.patch +Patch0003: 0003-offer-reporting-to-Bugzilla-only-for-pre-GA-Anaconda.patch +Patch0004: 0004-replace-all-Fedora-URLs-by-corresponding-values-for-.patch +Patch0005: 0005-coverity-fix-def6.patch +Patch0006: 0006-coverity-fix-def7.patch +Patch0007: 0007-coverity-fix-def9.patch +Patch0008: 0008-coverity-fixes-def16-def17.patch +Patch0009: 0009-coverity-fixes-def21.patch +Patch0010: 0010-coverity-Free-resource-leaking-vars-def-42-41-38-37.patch +Patch0011: 0011-coverity-Check-if-pointer-isnt-null-before-strcmp-de.patch +Patch0012: 0012-coverity-Change-data-type-for-bug_id-variable-def-44.patch +Patch0013: 0013-coverity-Check-null-pointer-before-dereferencing-it-.patch +Patch0014: 0014-coverity-Remove-check-for-null-pointer-with-no-effec.patch +Patch0015: 0015-coverity-Check-return-value-of-fstat-call-def31.patch +Patch0016: 0016-coverity-Remove-reverse-inull-def30.patch +Patch0017: 0017-coverity-Remove-deadcode-def47.patch + +BuildRequires: %{dbus_devel} +BuildRequires: gtk3-devel +BuildRequires: curl-devel +BuildRequires: desktop-file-utils +%if %{with python2} +BuildRequires: python2-devel +%endif # with python2 +%if %{with python3} +BuildRequires: python3-devel +%endif # with python3 +BuildRequires: gettext +BuildRequires: libxml2-devel +BuildRequires: libtar-devel +BuildRequires: intltool +BuildRequires: libtool +BuildRequires: texinfo +BuildRequires: asciidoc +BuildRequires: xmlto +BuildRequires: newt-devel +BuildRequires: libproxy-devel +BuildRequires: satyr-devel >= 0.24 +BuildRequires: glib2-devel >= %{glib_ver} +BuildRequires: git + +%if 0%{?fedora} >= 24 || 0%{?rhel} > 7 +# A test case uses zh_CN locale to verify XML event translations +BuildRequires: glibc-all-langpacks +%endif + +%if %{with bugzilla} +BuildRequires: xmlrpc-c-devel +%endif +BuildRequires: doxygen +BuildRequires: systemd-devel +BuildRequires: augeas-devel +BuildRequires: augeas +BuildRequires: xz +BuildRequires: lz4 +Requires: libreport-filesystem = %{version}-%{release} +Requires: satyr >= 0.24 +Requires: glib2 >= %{glib_ver} +Requires: xz +Requires: lz4 + +# Required for the temporary modularity hack, see below +%if 0%{?_module_build} +BuildRequires: sed +%endif + +%description +Libraries providing API for reporting different problems in applications +to different bug targets like Bugzilla, ftp, trac, etc... + +%package filesystem +Summary: Filesystem layout for libreport + +%description filesystem +Filesystem layout for libreport + +%package devel +Summary: Development libraries and headers for libreport +Requires: libreport = %{version}-%{release} + +%description devel +Development libraries and headers for libreport + +%package web +Summary: Library providing network API for libreport +Requires: libreport = %{version}-%{release} + +%description web +Library providing network API for libreport + +%package web-devel +Summary: Development headers for libreport-web +Requires: libreport-web = %{version}-%{release} + +%description web-devel +Development headers for libreport-web + +%if %{with python2} +%package -n python2-libreport +Summary: Python bindings for report-libs +Requires: libreport = %{version}-%{release} +Requires: python2-dnf +%{?python_provide:%python_provide python2-libreport} +# Remove before F30 +Provides: %{name}-python = %{version}-%{release} +Provides: %{name}-python%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-python < %{version}-%{release} + +%description -n python2-libreport +Python bindings for report-libs. +%endif # with python2 + +%if %{with python3} +%package -n python3-libreport +Summary: Python 3 bindings for report-libs +%if 0%{?_module_build} +# This is required for F26 Boltron (the modular release) +# Different parts of libreport are shipped with different +# modules with different dist tags; we need to weaken the +# strict NVR dependency to make it work. Temporary and +# limited to F26 Boltron. +%global distfreerelease %(echo %{release}|sed 's/%{?dist}$//'||echo 0) +Requires: libreport >= %{version}-%{distfreerelease} +%else +Requires: libreport = %{version}-%{release} +%endif +Requires: python3-dnf +%{?python_provide:%python_provide python3-libreport} +# Remove before F30 +Provides: %{name}-python3 = %{version}-%{release} +Provides: %{name}-python3%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-python3 < %{version}-%{release} + +%description -n python3-libreport +Python 3 bindings for report-libs. +%endif # with python3 + +%package cli +Summary: %{name}'s command line interface +Requires: %{name} = %{version}-%{release} + +%description cli +This package contains simple command line tool for working +with problem dump reports + +%package newt +Summary: %{name}'s newt interface +Requires: %{name} = %{version}-%{release} +Provides: report-newt = 0:0.23-1 +Obsoletes: report-newt < 0:0.23-1 + +%description newt +This package contains a simple newt application for reporting +bugs + +%package gtk +Summary: GTK front-end for libreport +Requires: libreport = %{version}-%{release} +Requires: libreport-plugin-reportuploader = %{version}-%{release} +Provides: report-gtk = 0:0.23-1 +Obsoletes: report-gtk < 0:0.23-1 + +%description gtk +Applications for reporting bugs using libreport backend + +%package gtk-devel +Summary: Development libraries and headers for libreport +Requires: libreport-gtk = %{version}-%{release} + +%description gtk-devel +Development libraries and headers for libreport-gtk + +%package plugin-kerneloops +Summary: %{name}'s kerneloops reporter plugin +Requires: curl +Requires: %{name} = %{version}-%{release} +Requires: libreport-web = %{version}-%{release} + +%description plugin-kerneloops +This package contains plugin which sends kernel crash information to specified +server, usually to kerneloops.org. + +%package plugin-logger +Summary: %{name}'s logger reporter plugin +Requires: %{name} = %{version}-%{release} + +%description plugin-logger +The simple reporter plugin which writes a report to a specified file. + +%package plugin-systemd-journal +Summary: %{name}'s systemd journal reporter plugin +Requires: %{name} = %{version}-%{release} + +%description plugin-systemd-journal +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 + +%description plugin-mailx +The simple reporter plugin which sends a report via mailx to a specified +email address. + +%if %{with bugzilla} +%package plugin-bugzilla +Summary: %{name}'s bugzilla plugin +Requires: %{name} = %{version}-%{release} +Requires: libreport-web = %{version}-%{release} + +%description plugin-bugzilla +Plugin to report bugs into the bugzilla. +%endif + +%package plugin-mantisbt +Summary: %{name}'s mantisbt plugin +Requires: %{name} = %{version}-%{release} +Requires: libreport-web = %{version}-%{release} + +%description plugin-mantisbt +Plugin to report bugs into the mantisbt. + +%package centos +Summary: %{name}'s CentOS Bug Tracker workflow +Requires: %{name} = %{version}-%{release} +Requires: libreport-web = %{version}-%{release} +Requires: libreport-plugin-mantisbt = %{version}-%{release} + +%description centos +Workflows to report issues into the CentOS Bug Tracker. + +%package plugin-ureport +Summary: %{name}'s micro report plugin +BuildRequires: %{libjson_devel} +Requires: %{name} = %{version}-%{release} +Requires: libreport-web = %{version}-%{release} +%if 0%{?rhel} +%if %{with python2} +Requires: python-rhsm +%endif # with python2 +%if %{with python3} +Requires: python3-subscription-manager-rhsm +%endif # with python3 +%endif + +%description plugin-ureport +Uploads micro-report to abrt server + +%package plugin-rhtsupport +Summary: %{name}'s RHTSupport plugin +Requires: %{name} = %{version}-%{release} +Requires: libreport-web = %{version}-%{release} + +%description plugin-rhtsupport +Plugin to report bugs into RH support system. + +%if %{with bugzilla} +%package compat +Summary: %{name}'s compat layer for obsoleted 'report' package +Requires: libreport = %{version}-%{release} +Requires: %{name}-plugin-bugzilla = %{version}-%{release} +Requires: %{name}-plugin-rhtsupport = %{version}-%{release} + +%description compat +Provides 'report' command-line tool. +%endif + +%package plugin-reportuploader +Summary: %{name}'s reportuploader plugin +Requires: %{name} = %{version}-%{release} +Requires: libreport-web = %{version}-%{release} + +%description plugin-reportuploader +Plugin to report bugs into anonymous FTP site associated with ticketing system. + +%if 0%{?fedora} +%package fedora +Summary: Default configuration for reporting bugs via Fedora infrastructure +Requires: %{name} = %{version}-%{release} + +%description fedora +Default configuration for reporting bugs via Fedora infrastructure +used to easily configure the reporting process for Fedora systems. Just +install this package and you're done. +%endif + +%if 0%{?rhel} +%package rhel +Summary: Default configuration for reporting bugs via Red Hat infrastructure +Requires: %{name} = %{version}-%{release} + +%description rhel +Default configuration for reporting bugs via Red Hat infrastructure +used to easily configure the reporting process for Red Hat systems. Just +install this package and you're done. + +%package rhel-bugzilla +Summary: Default configuration for reporting bugs to Red Hat Bugzilla +Requires: %{name} = %{version}-%{release} +Requires: libreport-plugin-bugzilla = %{version}-%{release} +Requires: libreport-plugin-ureport = %{version}-%{release} + +%description rhel-bugzilla +Default configuration for reporting bugs to Red Hat Bugzilla used to easily +configure the reporting process for Red Hat systems. Just install this package +and you're done. + +%package rhel-anaconda-bugzilla +Summary: Default configuration for reporting anaconda bugs to Red Hat Bugzilla +Requires: %{name} = %{version}-%{release} +Requires: libreport-plugin-bugzilla = %{version}-%{release} + +%description rhel-anaconda-bugzilla +Default configuration for reporting Anaconda problems to Red Hat Bugzilla used +to easily configure the reporting process for Red Hat systems. Just install this +package and you're done. +%endif + +%if %{with bugzilla} +%package anaconda +Summary: Default configuration for reporting anaconda bugs +Requires: %{name} = %{version}-%{release} +Requires: libreport-plugin-reportuploader = %{version}-%{release} +%if 0%{?rhel} +Requires: libreport-plugin-rhtsupport = %{version}-%{release} +%else +Requires: libreport-plugin-bugzilla = %{version}-%{release} +%endif + +%description anaconda +Default configuration for reporting Anaconda problems or uploading the gathered +data over ftp/scp... +%endif + +%prep +# http://www.rpm.org/wiki/PackagerDocs/Autosetup +# Default '__scm_apply_git' is 'git apply && git commit' but this workflow +# doesn't allow us to create a new file within a patch, so we have to use +# 'git am' (see /usr/lib/rpm/macros for more details) +%define __scm_apply_git(qp:m:) %{__git} am +%autosetup -S git + +%build +autoconf + +CFLAGS="%{optflags} -Werror" %configure \ +%if %{without python2} + --without-python2 \ +%endif # with python2 +%if %{without python3} + --without-python3 \ +%endif # with python3 +%if %{without bugzilla} + --without-bugzilla \ +%endif +%if 0%{?rhel} + --enable-import-rhtsupport-cert \ +%endif + --enable-doxygen-docs \ + --disable-silent-rules + +make %{?_smp_mflags} + +%install +make install DESTDIR=%{buildroot} \ + PYTHON=%{__python3} \ + mandir=%{_mandir} +%find_lang %{name} + +# Remove byte-compiled python files generated by automake. +# automake uses system's python for all *.py files, even +# for those which needs to be byte-compiled with different +# version (python2/python3). +# rpm can do this work and use the appropriate python version. +find %{buildroot} -name "*.py[co]" -delete + +# remove all .la and .a files +find %{buildroot} -name '*.la' -or -name '*.a' | xargs rm -f +mkdir -p %{buildroot}/%{_initrddir} +mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/events.d/ +mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/events/ +mkdir -p %{buildroot}/%{_sysconfdir}/%{name}/workflows.d/ +mkdir -p %{buildroot}/%{_datadir}/%{name}/events/ +mkdir -p %{buildroot}/%{_datadir}/%{name}/workflows/ + +# After everything is installed, remove info dir +rm -f %{buildroot}/%{_infodir}/dir + +# Remove unwanted Fedora specific workflow configuration files +%if 0%{!?fedora:1} +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_FedoraCCpp.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_FedoraKerneloops.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_FedoraPython.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_FedoraPython3.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_FedoraVmcore.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_FedoraXorg.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_FedoraLibreport.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_FedoraJava.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_FedoraJavaScript.xml +rm -f %{buildroot}/%{_sysconfdir}/libreport/workflows.d/report_fedora.conf +rm -f %{buildroot}%{_mandir}/man5/report_fedora.conf.5 +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_AnacondaFedora.xml +%endif + +# Remove unwanted RHEL specific workflow configuration files +%if 0%{!?rhel:1} +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELCCpp.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELKerneloops.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELPython.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELvmcore.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELxorg.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELLibreport.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELJava.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELJavaScript.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_uReport.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_AnacondaRHEL.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_AnacondaRHELBugzilla.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELBugzillaCCpp.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELBugzillaKerneloops.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELBugzillaPython.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELBugzillaVmcore.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELBugzillaXorg.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELBugzillaLibreport.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELBugzillaJava.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELBugzillaJavaScript.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELAddDataCCpp.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELAddDataKerneloops.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELAddDataPython.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELAddDatavmcore.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELAddDataxorg.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELAddDataLibreport.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELAddDataJava.xml +rm -f %{buildroot}/%{_datadir}/libreport/workflows/workflow_RHELAddDataJavaScript.xml +rm -f %{buildroot}/%{_sysconfdir}/libreport/workflows.d/report_rhel.conf +rm -f %{buildroot}/%{_sysconfdir}/libreport/workflows.d/report_rhel_add_data.conf +rm -f %{buildroot}/%{_sysconfdir}/libreport/workflows.d/report_uReport.conf +rm -f %{buildroot}/%{_sysconfdir}/libreport/workflows.d/report_rhel_bugzilla.conf +rm -f %{buildroot}%{_mandir}/man5/report_rhel.conf.5 +rm -f %{buildroot}%{_mandir}/man5/report_uReport.conf.5 +rm -f %{buildroot}%{_mandir}/man5/report_rhel_bugzilla.conf.5 +%endif + +%check +make check|| { + # find and print the logs of failed test + # do not cat tests/testsuite.log because it contains a lot of bloat + find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \; + exit 1 +} + +%if 0%{?fedora} > 27 || 0%{?rhel} > 7 +# ldconfig and gtk-update-icon-cache is not needed +%else +%post gtk +/sbin/ldconfig +# update icon cache +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%postun gtk +/sbin/ldconfig +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans gtk +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + +%post web -p /sbin/ldconfig + + +%postun web -p /sbin/ldconfig +%endif + +%files -f %{name}.lang +%doc README.md +%license COPYING +%config(noreplace) %{_sysconfdir}/%{name}/libreport.conf +%config(noreplace) %{_sysconfdir}/%{name}/report_event.conf +%config(noreplace) %{_sysconfdir}/%{name}/forbidden_words.conf +%config(noreplace) %{_sysconfdir}/%{name}/ignored_words.conf +%{_datadir}/%{name}/conf.d/libreport.conf +%{_libdir}/libreport.so.* +%{_libdir}/libabrt_dbus.so.* +%{_mandir}/man5/libreport.conf.5* +%{_mandir}/man5/report_event.conf.5* +%{_mandir}/man5/forbidden_words.conf.5* +%{_mandir}/man5/ignored_words.conf.5* +# filesystem package owns /usr/share/augeas/lenses directory +%{_datadir}/augeas/lenses/libreport.aug + +%files filesystem +%dir %{_sysconfdir}/%{name}/ +%dir %{_sysconfdir}/%{name}/events.d/ +%dir %{_sysconfdir}/%{name}/events/ +%dir %{_sysconfdir}/%{name}/workflows.d/ +%dir %{_datadir}/%{name}/ +%dir %{_datadir}/%{name}/conf.d/ +%dir %{_datadir}/%{name}/conf.d/plugins/ +%dir %{_datadir}/%{name}/events/ +%dir %{_datadir}/%{name}/workflows/ +%dir %{_sysconfdir}/%{name}/plugins/ + +%files devel +# Public api headers: +%doc apidoc/html/*.{html,png,css,js} +%{_includedir}/libreport/libreport_types.h +%{_includedir}/libreport/client.h +%{_includedir}/libreport/dump_dir.h +%{_includedir}/libreport/event_config.h +%{_includedir}/libreport/problem_data.h +%{_includedir}/libreport/problem_report.h +%{_includedir}/libreport/report.h +%{_includedir}/libreport/run_event.h +%{_includedir}/libreport/file_obj.h +%{_includedir}/libreport/config_item_info.h +%{_includedir}/libreport/workflow.h +%{_includedir}/libreport/problem_details_widget.h +%{_includedir}/libreport/problem_details_dialog.h +%{_includedir}/libreport/problem_utils.h +%{_includedir}/libreport/ureport.h +%{_includedir}/libreport/reporters.h +%{_includedir}/libreport/global_configuration.h +# Private api headers: +%{_includedir}/libreport/internal_abrt_dbus.h +%{_includedir}/libreport/internal_libreport.h +%{_includedir}/libreport/xml_parser.h +%{_includedir}/libreport/helpers +%{_libdir}/libreport.so +%{_libdir}/libabrt_dbus.so +%{_libdir}/pkgconfig/libreport.pc +%dir %{_includedir}/libreport + +%files web +%{_libdir}/libreport-web.so.* + +%files web-devel +%{_libdir}/libreport-web.so +%{_includedir}/libreport/libreport_curl.h +%{_libdir}/pkgconfig/libreport-web.pc + +%if %{with python2} +%files -n python2-libreport +%{python_sitearch}/report/ +%{python_sitearch}/reportclient/ +%endif # with python2 + +%if %{with python3} +%files -n python3-libreport +%{python3_sitearch}/report/ +%{python3_sitearch}/reportclient/ +%endif # with python3 + +%files cli +%{_bindir}/report-cli +%{_mandir}/man1/report-cli.1.gz + +%files newt +%{_bindir}/report-newt +%{_mandir}/man1/report-newt.1.gz + +%files gtk +%{_bindir}/report-gtk +%{_libdir}/libreport-gtk.so.* +%config(noreplace) %{_sysconfdir}/libreport/events.d/emergencyanalysis_event.conf +%{_mandir}/man5/emergencyanalysis_event.conf.5.* +%{_datadir}/%{name}/events/report_EmergencyAnalysis.xml +%{_mandir}/man1/report-gtk.1.gz + +%files gtk-devel +%{_libdir}/libreport-gtk.so +%{_includedir}/libreport/internal_libreport_gtk.h +%{_libdir}/pkgconfig/libreport-gtk.pc + +%files plugin-kerneloops +%{_datadir}/%{name}/events/report_Kerneloops.xml +%{_mandir}/man*/reporter-kerneloops.* +%{_bindir}/reporter-kerneloops + +%files plugin-logger +%config(noreplace) %{_sysconfdir}/libreport/events/report_Logger.conf +%{_mandir}/man5/report_Logger.conf.5.* +%{_datadir}/%{name}/events/report_Logger.xml +%{_datadir}/%{name}/workflows/workflow_Logger.xml +%{_datadir}/%{name}/workflows/workflow_LoggerCCpp.xml +%config(noreplace) %{_sysconfdir}/libreport/events.d/print_event.conf +%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_logger.conf +%{_mandir}/man5/print_event.conf.5.* +%{_mandir}/man5/report_logger.conf.5.* +%{_bindir}/reporter-print +%{_mandir}/man*/reporter-print.* + +%files plugin-systemd-journal +%{_bindir}/reporter-systemd-journal +%{_mandir}/man*/reporter-systemd-journal.* + +%files plugin-mailx +%config(noreplace) %{_sysconfdir}/libreport/plugins/mailx.conf +%{_datadir}/%{name}/conf.d/plugins/mailx.conf +%{_datadir}/%{name}/events/report_Mailx.xml +%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.mailx.xml +%{_datadir}/%{name}/workflows/workflow_Mailx.xml +%{_datadir}/%{name}/workflows/workflow_MailxCCpp.xml +%config(noreplace) %{_sysconfdir}/libreport/events.d/mailx_event.conf +%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_mailx.conf +%{_mandir}/man5/mailx.conf.5.* +%{_mandir}/man5/mailx_event.conf.5.* +%{_mandir}/man5/report_mailx.conf.5.* +%{_mandir}/man*/reporter-mailx.* +%{_bindir}/reporter-mailx + +%files plugin-ureport +%config(noreplace) %{_sysconfdir}/libreport/plugins/ureport.conf +%{_datadir}/%{name}/conf.d/plugins/ureport.conf +%{_bindir}/reporter-ureport +%{_mandir}/man1/reporter-ureport.1.gz +%{_mandir}/man5/ureport.conf.5.gz +%{_datadir}/%{name}/events/report_uReport.xml +%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.ureport.xml + +%if %{with bugzilla} +%files plugin-bugzilla +%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla.conf +%{_datadir}/%{name}/conf.d/plugins/bugzilla.conf +%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format.conf +%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_formatdup.conf +%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_analyzer_libreport.conf +%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_kernel.conf +%{_datadir}/%{name}/events/report_Bugzilla.xml +%{_datadir}/%{name}/events/watch_Bugzilla.xml +%config(noreplace) %{_sysconfdir}/libreport/events/report_Bugzilla.conf +%config(noreplace) %{_sysconfdir}/libreport/events.d/bugzilla_event.conf +%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.bugzilla.xml +# FIXME: remove with the old gui +%{_mandir}/man1/reporter-bugzilla.1.gz +%{_mandir}/man5/report_Bugzilla.conf.5.* +%{_mandir}/man5/bugzilla_event.conf.5.* +%{_mandir}/man5/bugzilla.conf.5.* +%{_mandir}/man5/bugzilla_format.conf.5.* +%{_mandir}/man5/bugzilla_formatdup.conf.5.* +%{_mandir}/man5/bugzilla_format_analyzer_libreport.conf.5.* +%{_mandir}/man5/bugzilla_format_kernel.conf.5.* +%{_bindir}/reporter-bugzilla +%endif + +%files plugin-mantisbt +%config(noreplace) %{_sysconfdir}/libreport/plugins/mantisbt.conf +%{_datadir}/%{name}/conf.d/plugins/mantisbt.conf +%config(noreplace) %{_sysconfdir}/libreport/plugins/mantisbt_format.conf +%config(noreplace) %{_sysconfdir}/libreport/plugins/mantisbt_formatdup.conf +%config(noreplace) %{_sysconfdir}/libreport/plugins/mantisbt_format_analyzer_libreport.conf +%config(noreplace) %{_sysconfdir}/libreport/plugins/mantisbt_formatdup_analyzer_libreport.conf +%{_bindir}/reporter-mantisbt +%{_mandir}/man1/reporter-mantisbt.1.gz +%{_mandir}/man5/mantisbt.conf.5.* +%{_mandir}/man5/mantisbt_format.conf.5.* +%{_mandir}/man5/mantisbt_formatdup.conf.5.* +%{_mandir}/man5/mantisbt_format_analyzer_libreport.conf.5.* +%{_mandir}/man5/mantisbt_formatdup_analyzer_libreport.conf.5.* + +%files centos +%{_datadir}/%{name}/workflows/workflow_CentOSCCpp.xml +%{_datadir}/%{name}/workflows/workflow_CentOSKerneloops.xml +%{_datadir}/%{name}/workflows/workflow_CentOSPython.xml +%{_datadir}/%{name}/workflows/workflow_CentOSPython3.xml +%{_datadir}/%{name}/workflows/workflow_CentOSVmcore.xml +%{_datadir}/%{name}/workflows/workflow_CentOSXorg.xml +%{_datadir}/%{name}/workflows/workflow_CentOSLibreport.xml +%{_datadir}/%{name}/workflows/workflow_CentOSJava.xml +%{_datadir}/%{name}/workflows/workflow_CentOSJavaScript.xml +%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_centos.conf +%{_mandir}/man5/report_centos.conf.5.* +%{_datadir}/%{name}/events/report_CentOSBugTracker.xml +%config(noreplace) %{_sysconfdir}/libreport/events/report_CentOSBugTracker.conf +%{_mandir}/man5/report_CentOSBugTracker.conf.5.* +# report_CentOSBugTracker events are shipped by libreport package +%config(noreplace) %{_sysconfdir}/libreport/events.d/centos_report_event.conf +%{_mandir}/man5/centos_report_event.conf.5.gz + +%files plugin-rhtsupport +%config(noreplace) %{_sysconfdir}/libreport/plugins/rhtsupport.conf +%{_datadir}/%{name}/conf.d/plugins/rhtsupport.conf +%{_datadir}/%{name}/events/report_RHTSupport.xml +%{_datadir}/%{name}/events/report_RHTSupport_AddData.xml +%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.rhtsupport.xml +%if 0%{?rhel} +%attr(600,root,root)%{_sysconfdir}/%{name}/cert-api.access.redhat.com.pem +%endif +%config(noreplace) %{_sysconfdir}/libreport/events.d/rhtsupport_event.conf +%{_mandir}/man1/reporter-rhtsupport.1.gz +%{_mandir}/man5/rhtsupport.conf.5.* +%{_mandir}/man5/rhtsupport_event.conf.5.* +%{_bindir}/reporter-rhtsupport + +%if %{with bugzilla} +%files compat +%{_bindir}/report +%{_mandir}/man1/report.1.gz +%endif + +%files plugin-reportuploader +%{_mandir}/man*/reporter-upload.* +%{_mandir}/man5/uploader_event.conf.5.* +%{_bindir}/reporter-upload +%{_datadir}/%{name}/events/report_Uploader.xml +%config(noreplace) %{_sysconfdir}/libreport/events.d/uploader_event.conf +%{_datadir}/%{name}/workflows/workflow_Upload.xml +%{_datadir}/%{name}/workflows/workflow_UploadCCpp.xml +%config(noreplace) %{_sysconfdir}/libreport/plugins/upload.conf +%{_datadir}/%{name}/conf.d/plugins/upload.conf +%{_mandir}/man5/upload.conf.5.* +%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_uploader.conf +%{_mandir}/man5/report_uploader.conf.5.* +%config(noreplace) %{_sysconfdir}/libreport/events/report_Uploader.conf +%{_mandir}/man5/report_Uploader.conf.5.* + +%if 0%{?fedora} +%files fedora +%{_datadir}/%{name}/workflows/workflow_FedoraCCpp.xml +%{_datadir}/%{name}/workflows/workflow_FedoraKerneloops.xml +%{_datadir}/%{name}/workflows/workflow_FedoraPython.xml +%{_datadir}/%{name}/workflows/workflow_FedoraPython3.xml +%{_datadir}/%{name}/workflows/workflow_FedoraVmcore.xml +%{_datadir}/%{name}/workflows/workflow_FedoraXorg.xml +%{_datadir}/%{name}/workflows/workflow_FedoraLibreport.xml +%{_datadir}/%{name}/workflows/workflow_FedoraJava.xml +%{_datadir}/%{name}/workflows/workflow_FedoraJavaScript.xml +%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_fedora.conf +%{_mandir}/man5/report_fedora.conf.5.* +%endif + +%if 0%{?rhel} +%files rhel +%{_datadir}/%{name}/workflows/workflow_RHELCCpp.xml +%{_datadir}/%{name}/workflows/workflow_RHELKerneloops.xml +%{_datadir}/%{name}/workflows/workflow_RHELPython.xml +%{_datadir}/%{name}/workflows/workflow_RHELvmcore.xml +%{_datadir}/%{name}/workflows/workflow_RHELxorg.xml +%{_datadir}/%{name}/workflows/workflow_RHELLibreport.xml +%{_datadir}/%{name}/workflows/workflow_RHELJava.xml +%{_datadir}/%{name}/workflows/workflow_RHELJavaScript.xml +%{_datadir}/%{name}/workflows/workflow_RHELAddDataCCpp.xml +%{_datadir}/%{name}/workflows/workflow_RHELAddDataJava.xml +%{_datadir}/%{name}/workflows/workflow_RHELAddDataKerneloops.xml +%{_datadir}/%{name}/workflows/workflow_RHELAddDataLibreport.xml +%{_datadir}/%{name}/workflows/workflow_RHELAddDataPython.xml +%{_datadir}/%{name}/workflows/workflow_RHELAddDatavmcore.xml +%{_datadir}/%{name}/workflows/workflow_RHELAddDataxorg.xml +%{_datadir}/%{name}/workflows/workflow_RHELAddDataJavaScript.xml +%{_datadir}/%{name}/workflows/workflow_uReport.xml +%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_rhel.conf +%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_rhel_add_data.conf +%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_uReport.conf +%{_mandir}/man5/report_rhel.conf.5.* +%{_mandir}/man5/report_uReport.conf.5.* + +%files rhel-bugzilla +%{_datadir}/%{name}/workflows/workflow_RHELBugzillaCCpp.xml +%{_datadir}/%{name}/workflows/workflow_RHELBugzillaKerneloops.xml +%{_datadir}/%{name}/workflows/workflow_RHELBugzillaPython.xml +%{_datadir}/%{name}/workflows/workflow_RHELBugzillaVmcore.xml +%{_datadir}/%{name}/workflows/workflow_RHELBugzillaXorg.xml +%{_datadir}/%{name}/workflows/workflow_RHELBugzillaLibreport.xml +%{_datadir}/%{name}/workflows/workflow_RHELBugzillaJava.xml +%{_datadir}/%{name}/workflows/workflow_RHELBugzillaJavaScript.xml +%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_rhel_bugzilla.conf +%{_mandir}/man5/report_rhel_bugzilla.conf.5.* + +%files rhel-anaconda-bugzilla +%{_datadir}/%{name}/workflows/workflow_AnacondaRHELBugzilla.xml +%endif + +%if %{with bugzilla} +%files anaconda +%if 0%{?fedora} +%{_datadir}/%{name}/workflows/workflow_AnacondaFedora.xml +%endif +%if 0%{?rhel} +%{_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 +%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_anaconda.conf +%config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_formatdup_anaconda.conf +%{_mandir}/man5/anaconda_event.conf.5.* +%{_mandir}/man5/bugzilla_anaconda_event.conf.5.* +%{_mandir}/man5/bugzilla_format_anaconda.conf.5.* +%{_mandir}/man5/bugzilla_formatdup_anaconda.conf.5.* +%endif + +%changelog +* Wed Aug 29 2018 Matej Habrnal <mhabrnal@redhat.com> 2.9.5-6 +- replace all Fedora URLs by corresponding values for RHEL +- fix coverity issues +- Resolves: #1602590, #1623406 + +* Thu Aug 09 2018 Matej Habrnal <mhabrnal@redhat.com> 2.9.5-5 +- Offer reporting to Bugzilla only for pre-GA Anaconda exceptions +- Resolves: #1593734 + +* Mon Jul 16 2018 Matej Habrnal <mhabrnal@redhat.com> 2.9.5-4 +- Remove option to screencast problems and requires on fros + +* Tue Jul 10 2018 Matej Habrnal <mhabrnal@redhat.com> 2.9.5-3 +- set PYTHON variable because of ./py-compile in +- Make this build without /usr/bin/python + +* Mon Apr 30 2018 Matej Habrnal <mhabrnal@redhat.com> 2.9.5-2 +- drop dependency on python-rhsm +- Resolves: #1569595 + +* Tue Apr 24 2018 Matej Habrnal <mhabrnal@redhat.com> 2.9.5-1 +- spec: actualize according to downstream +- spec: Conditionalize the Python2 and Python3 +- report-python: fix tests if configure --without-python2 +- autogen: correctly parse buildrequires from spec file + +* Tue Mar 27 2018 Martin Kutlak <mkutlak@redhat.com> 2.9.4-1 +- Translation updates +- Revert "use /usr/sbin/" +- ureport: remove json-c is_error() usage +- ldconfig and gtk-update-icon-cache is not needed in rawhide +- reporter-rhtsupport: Remove dependency on redhat-access-insights +- do not expand macro in changelog +- move defattr which match the defaults +- use /usr/sbin/ +- macro python_sitearch is always defined on rhel7+ +- remove rhel6 specific items and accomodate to rhel7+ +- This package uses names with ambiguous `python-` prefix in requirements. +- reporter-{bugzilla,mantisbt,rhtsupport}: fix free +- reporter-mailx: rely on configured email +- spec: fix unowned directories +- augeas: include local config path +- doc: update to contain newly added user's local config +- reporter-mantisbt: read configuration from user's home +- reporter-rhtsupport: read configuration from user's home +- reporter-bugzilla: read configuration from user's home +- reporter-bugzilla: ask concrete bz when requiring login +- makefile: fix make release + +* Thu Nov 02 2017 Julius Milan <jmilan@redhat.com> 2.9.3-1 +- Translation updates +- commit to delete +- workflows: fix description in workflow_RHELJavaScript.xml.in +- workflows: add workflow for adding data to existing case +- client-python,report-python: Allow python to be optional at build time +- ignored words: add SYSTEMD_NSS_BYPASS_BUS +- reporter-ureport: add 'ProcessUnpackaged' option +- spec: add workflow for adding data to existing case +- rep-sys-journal: fix in finding executable basename +- remove old obsolete +- Group is not used any more +- remove old changelogs +- requires pythonX-dnf instead of dnf +- doc: fix obsolete doxygen tags & complains +- lib: Introduce pid_for_children element from ns +- client-python: Do not try to unlink None +- spec: rename Python binary packages + +* Thu Mar 16 2017 Matej Habrnal <mhabrnal@redhat.com> 2.9.1-1 +- build: create tarball in release-* target +- problem_data: fix double const +- wizard: fix error found by -Werror=format-security +- run_event: fix cmp between pointer and zero character +- build: do not upload tarball to fedorahosted.org +- spec: do not use fedorahosted.org as source +- build: fix generating list of dependences in autogen.sh +- build: generate new release entries with date +- report-newt: free allocated variables, don't close dd twice +- build: fix scratch-build target +- changelog: reflect the PR +- lib: several bug fixes in parsing of mountinfo +- lib: correctly recognize chroot in container +- lib: declare CONTAINER_ROOTS element name +- lib: add more log wrappers for perror +- reporter-bugzilla: use /etc/os-release for default url +- configure.ac: Remove nss dependency +- spec: include testsuite headers in the devel package +- tests: include testsuite.h in the dist archive +- maint: check pulled .po files for errors +- build: fix bug in changelog generating in release target +- changelog: fix typos + +* Fri Dec 02 2016 Jakub Filak <jakub@thefilaks.net> 2.9.0-1 +- Translation updates +- build: make the release-* targets smarter +- add CHANGELOG.md +- reporter-s-journal: enable SYSLOG_IDENTIFIER from env +- report-python: add method run_event_on_problem_dir +- lib: use lz4 instead of lz4cat +- reportclient: honor ABRT_VERBOSE +- tree-wide: introduce 'stop_on_not_reportable' option +- client: add support for $releasever to debuginfo +- lib: correct test for own root +- workflows: run analyze_BodhiUpdates event on Fedora +- man: fix formating +- reporter-systemd-journal: introduce reporter-systemd-journal +- problem_data: add function which returns all problem data keys +- include: add exception_type element constant +- spec: changes related to reporter-systemd-journal +- problem_report: add normalization of crashed thread +- problem_report: make generate report configurable +- problem_report: use core_backtrace if there is no backtrace +- lib: refuse to parse negative number as unsigned int +- spec: simplify and remove old conditional +- build: add gettext-devel to sysdeps +- dd: add check for validity of new file FD +- build: configure tree for debugging by default +- spec: use %%buildroot macro +- spec: remove defattr which match the defaults +- spec: do not clean buildroot +- spec: remove Groups +- spec: code cleanup +- lib: fix a bug in dealing with errno +- lib: add convenient wrappers for uint in map_string_t +- problem_report: ensure C-string null terminator +- lib: fix invalid cgroup namespace ID +- lib: make die function configurable +- lib: allow using FD of /proc/[pid] instead of pid_t +- dd: add functions for opening dd item +- lib: add xfdopen +- problem data: search for sensitive words in more files +- dd: add dd_copy_file_at +- ignored words: add "systemd-logind" and "hawkey" +- build: reset the default version with each release +- doc: make README more verbose +- tree-wide: produce less messages in NOTICE log lvl +- ureport: less confusing logging +- spec: install JavaScript workflows +- workflow: add JavaScript workflows +- bugzilla: stop including package details + +* Fri Sep 09 2016 Jakub Filak <jfilak@redhat.com> 2.8.0-1 +- lib: fix a memory leak in create_dump_dir fn +- rhtsupport: fix a double free of config at exit +- autogen: fix typo in usage help string +- debuginfo: dnf API logging workarounds list +- lib: don't warn when user word file doesn't exist +- testuite: add test for forbidden_words +- lib: be able to define base conf dir at runtime +- wizard: use dnf instead of yum in add a screencast note +- problem_report: document resevered elements + +* Mon Jul 18 2016 Matej Habrnal <mhabrnal@redhat.com> 2.7.2-1 +- Translation updates +- wizard: do not create reproducible if complex_detail == no +- include: save_user_settings function declaration isn’t a prototype +- Bugzilla: fix typo in comment don -> don't +- client-python: fix a typo in error check +- dd: do not log missing uid file when creating new dump dir +- build: update searched pkg names for systemd + +* Wed May 18 2016 Matej Habrnal <mhabrnal@redhat.com> 2.7.1-1 +- spec: compression updates +- lib: add lz4 decompression +- lib: avoid the need to link against lzma +- all: format security +- lib: add cgroup namespace +- dd: introduce functions getting occurrence stamps +- dd: introduce dd_get_env_variable +- lib: add get env variable from a file +- RHTSupport: include count in Support cases +- lib: problem report API check fseek return code +- ignored words: remove 'kwallet_jwakely' which I added wrongly + +* Fri Apr 08 2016 Matej Habrnal <mhabrnal@redhat.com> 2.7.0-1 +- ignored words: update ignored words +- mailx: introduce debug parameter -D +- mailx: mail formatting: add comment right after %%oneline +- mailx: use problem report api to define an emais' content +- lib: remove unused function make_description_bz +- augeas: trim spaces before key value +- Revert "xml parser: be more verbose in case xml file cannot be opened" +- xml parser: be more verbose in case xml file cannot be opened +- spec: add workflows.d to filesystem package +- makefile: define LANG in release target +- mailx: stop creating dead.letter on mailx failures +- workflows: add comments to ambiguous functions +- workflows: NULL for the default configuration dir +- workflows: publish the function loading configuration +- build: fix build on Fedora24 +- augeas: exclude mantisbt format configurations +- reporter-mantisbt: add missing '=' to conf file +- curl: fix typo Ingoring -> Ignoring +- rhtsupport: attach all dump dir's element to a new case +- rhtsupport: add pkg_vendor, reproducer and reproducible to description +- report client: add silent mode to clean_up() +- doc: add documentation for requires-details attribute +- rhtsupport: Discourage users from reporting in non Red Hat stuff +- rhtsupport: Discourage users from opening one-shot crashes +- report-gtk: Require Reproducer for RHTSupport +- Add workflow for RHEL anonymous report +- spec: add workflow for RHEL anonymous report files +- wizard: fix the broken widget expansion +- dd: add documentation of dd_create_skeleton +- workflow: add extern C to the header file +- Fix minor typos +- Translation updates +- translations: update zanata configuration +- wizard: fix the broken "Show log" widget +- wizard: remove the code correcting Bugzilla groups + +* Tue Feb 02 2016 Matej Habrnal <mhabrnal@redhat.com> 2.6.4-1 +- doc: add option -o and -O into reporter-ureport man page +- rhtsupport: use problme report API to create description +- bugzilla: make the event configurable +- report-gtk: offer users to create private ticket +- bugzilla|centos: declare 'restricted access' support +- event config: add support for 'restricted access' +- lib: move CREATE_PRIVATE_TICKET to the global configuration +- dd: dd_delete_item does not die +- dd: add function getting stat of item +- dd: correct handling of TYPE when creating dump directory +- dd: add function computing dump dir file system size +- dd: add function counting number of dd items +- dd: add function copying file descriptor to element +- dd: allow 1 and 2 letter long element names +- problem_data: factor out function reading single problem element +- formatdup: more universal comment +- dd: make function uid_in_group() public +- Refactoring conditional directives that break parts of statements. +- bugzilla: actualize man pages +- bugzilla: don't report private problem as comment +- uploader: move username and password to the advanced options +- uploader: allow empty username and password +- spec: add uploader config files and related man page +- uploader: add possibility to set SSH keyfiles +- curl: add possibility to configure SSH keys +- desktop-utils: deal with Destkop files without command line +- ureport: enable attaching of arbitrary values +- update .gitignore +- uploader: save remote name in reported_to +- curl: return URLs without userinfo +- lib: add function for removing userinfo from URIs +- plugins: port reporters to add_reported_to_entry +- reported_to: add a function formatting reported_to lines +- lib: introduce parser of ISO date strings +- uploader: use shared dd_create_archive function +- dd: add a function for compressing dumpdirs +- problem_report: add examples to the documentation +- client: document environment variables + +* Thu Oct 15 2015 Matej Habrnal <mhabrnal@redhat.com> 2.6.3-1 +- wizard: correct comments in save_text_if_changed() +- events: improve example +- reporter-bugzilla: add parameter -p +- wizard: fix save users changes after reviewing dump dir files +- dd: make function load_text_file non-static +- bugzilla: don't attach build_ids +- run_event: rewrite event rule parser +- dd: add convenience wrappers fro loading numbers +- ureport: improve curl's error messages +- ureport: use Red Hat Certificate Authority to make rhsm cert trusted +- curl: add posibility to use own Certificate Authority cert +- spec: add redhat-access-insights to Requires of l-p-rhtsupport +- bugzilla: put VARIANT_ID= to Whiteboard +- autogen: use dnf instead of yum to install dependencies +- configure: use hex value for dump dir mode +- curl: add a helper for HTTP GET +- dd: don't warn about missing 'type' if the locking fails +- dd: stop warning about corrupted mandatory files +- Use a dgettext function returning strings instead of bytes