fixed reporting from anaconda rhbz#926916
Resolves: #926916 Signed-off-by: Jiri Moskovcak <jmoskovc@redhat.com>
This commit is contained in:
parent
ea106229ae
commit
34323f02b2
@ -0,0 +1,67 @@
|
|||||||
|
From 6a5a335f82ed0f2f5a4a0a6905e45cb7bcb84350 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||||
|
Date: Tue, 26 Mar 2013 11:32:59 +0100
|
||||||
|
Subject: [LIBREPORT PATCH 1/5] reporter-rhtsupport: fix hint query to use
|
||||||
|
correct URL
|
||||||
|
|
||||||
|
We should use rs/problems, not rs/cases/NNNNNNNN/problems.
|
||||||
|
|
||||||
|
To make similar bugs easier to spot in the future,
|
||||||
|
I added error message if we did get an error.
|
||||||
|
|
||||||
|
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||||
|
Signed-off-by: Martin Milata <mmilata@redhat.com>
|
||||||
|
---
|
||||||
|
src/plugins/reporter-rhtsupport.c | 15 ++++++++++++++-
|
||||||
|
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
|
||||||
|
index fe13423..2eb41b4 100644
|
||||||
|
--- a/src/plugins/reporter-rhtsupport.c
|
||||||
|
+++ b/src/plugins/reporter-rhtsupport.c
|
||||||
|
@@ -261,6 +261,8 @@ int main(int argc, char **argv)
|
||||||
|
);
|
||||||
|
free_map_string(settings);
|
||||||
|
|
||||||
|
+ char *base_api_url = xstrdup(url);
|
||||||
|
+
|
||||||
|
if (opts & OPT_t)
|
||||||
|
{
|
||||||
|
if (!case_no)
|
||||||
|
@@ -386,7 +388,7 @@ int main(int argc, char **argv)
|
||||||
|
{
|
||||||
|
/* Check for hints and show them if we have something */
|
||||||
|
log(_("Checking for hints"));
|
||||||
|
- result = get_rhts_hints(url,
|
||||||
|
+ result = get_rhts_hints(base_api_url,
|
||||||
|
login,
|
||||||
|
password,
|
||||||
|
ssl_verify,
|
||||||
|
@@ -409,6 +411,16 @@ int main(int argc, char **argv)
|
||||||
|
"</problems>"
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
+ if (result->error)
|
||||||
|
+ {
|
||||||
|
+ /* We don't use result->msg here because it looks like this:
|
||||||
|
+ * Error in file upload at 'URL', HTTP code: 404,
|
||||||
|
+ * server says: '<?xml...?><error...><code>404</code><message>...</message></error>'
|
||||||
|
+ * TODO: make server send bare textual msgs, not XML.
|
||||||
|
+ */
|
||||||
|
+ error_msg("Error in file upload at '%s', HTTP code: %d",
|
||||||
|
+ base_api_url, result->http_resp_code);
|
||||||
|
+ }
|
||||||
|
if (result->error == 0 && result->body)
|
||||||
|
{
|
||||||
|
/* The message might contain URLs to known solutions and such */
|
||||||
|
@@ -559,6 +571,7 @@ int main(int argc, char **argv)
|
||||||
|
free_rhts_result(result_atch);
|
||||||
|
free_rhts_result(result);
|
||||||
|
|
||||||
|
+ free(base_api_url);
|
||||||
|
free(url);
|
||||||
|
free(login);
|
||||||
|
free(password);
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From 959b84a852789064f297bc522a12348e97898f41 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||||
|
Date: Fri, 29 Mar 2013 16:00:43 +0100
|
||||||
|
Subject: [LIBREPORT PATCH 2/5] curl upload helper: upload data with
|
||||||
|
"application/octet-stream" content type
|
||||||
|
|
||||||
|
This fixes a forgotten bit of code where "???" was 'temporarily'
|
||||||
|
used instead of correct content type.
|
||||||
|
|
||||||
|
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||||
|
---
|
||||||
|
src/lib/curl.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/lib/curl.c b/src/lib/curl.c
|
||||||
|
index baf6902..d97e4db 100644
|
||||||
|
--- a/src/lib/curl.c
|
||||||
|
+++ b/src/lib/curl.c
|
||||||
|
@@ -600,7 +600,7 @@ char *upload_file(const char *url, const char *filename)
|
||||||
|
post_state_t *state = new_post_state(POST_WANT_ERROR_MSG);
|
||||||
|
post(state,
|
||||||
|
whole_url,
|
||||||
|
- /*content_type:*/ "???",
|
||||||
|
+ /*content_type:*/ "application/octet-stream",
|
||||||
|
/*additional_headers:*/ NULL,
|
||||||
|
/*data:*/ filename,
|
||||||
|
POST_DATA_FROMFILE_PUT
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
34
0003-report-gtk-show-Next-Step-btn-at-workflow-start.patch
Normal file
34
0003-report-gtk-show-Next-Step-btn-at-workflow-start.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From cb4369636011ca5824d8285d09fe568451e80761 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jiri Moskovcak <jmoskovc@redhat.com>
|
||||||
|
Date: Tue, 2 Apr 2013 11:10:26 +0200
|
||||||
|
Subject: [LIBREPORT PATCH 3/5] report-gtk: show Next Step btn at workflow
|
||||||
|
start
|
||||||
|
|
||||||
|
Closes rhbz#926916
|
||||||
|
|
||||||
|
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||||
|
Signed-off-by: Jiri Moskovcak <jmoskovc@redhat.com>
|
||||||
|
---
|
||||||
|
src/gui-wizard-gtk/wizard.c | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
||||||
|
index 1db97b2..b55b975 100644
|
||||||
|
--- a/src/gui-wizard-gtk/wizard.c
|
||||||
|
+++ b/src/gui-wizard-gtk/wizard.c
|
||||||
|
@@ -2509,6 +2509,12 @@ static void set_auto_event_chain(GtkButton *button, gpointer user_data)
|
||||||
|
on_page_prepare(g_assistant, gtk_notebook_get_nth_page(g_assistant, next_page_no), NULL);
|
||||||
|
else
|
||||||
|
gtk_notebook_set_current_page(g_assistant, next_page_no);
|
||||||
|
+
|
||||||
|
+ /* Show Next Step button which was hidden on Selector page in non-expert
|
||||||
|
+ * mode. Next Step button must be hidden because Selector page shows only
|
||||||
|
+ * workflow buttons in non-expert mode.
|
||||||
|
+ */
|
||||||
|
+ show_next_step_button();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void add_workflow_buttons(GtkBox *box, GHashTable *workflows, GCallback func)
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
61
0004-fixed-reporting-from-bugzilla-rhbz-926916.patch
Normal file
61
0004-fixed-reporting-from-bugzilla-rhbz-926916.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
From f9b8f72eb840211b7dd197a8abcc00b9bdf9c0ff Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jiri Moskovcak <jmoskovc@redhat.com>
|
||||||
|
Date: Thu, 4 Apr 2013 18:48:01 +0200
|
||||||
|
Subject: [LIBREPORT PATCH 4/5] fixed reporting from bugzilla rhbz#926916
|
||||||
|
|
||||||
|
---
|
||||||
|
src/plugins/Makefile.am | 3 ++-
|
||||||
|
src/plugins/bugzilla_anaconda_event.conf | 3 +++
|
||||||
|
src/workflows/anaconda_event.conf | 4 ++--
|
||||||
|
src/workflows/workflow_AnacondaFedora.xml.in | 2 --
|
||||||
|
4 files changed, 7 insertions(+), 5 deletions(-)
|
||||||
|
create mode 100644 src/plugins/bugzilla_anaconda_event.conf
|
||||||
|
|
||||||
|
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
|
||||||
|
index 7ffb894..79fe9d2 100644
|
||||||
|
--- a/src/plugins/Makefile.am
|
||||||
|
+++ b/src/plugins/Makefile.am
|
||||||
|
@@ -65,7 +65,8 @@ dist_eventsconf_DATA = \
|
||||||
|
bugzilla_event.conf \
|
||||||
|
rhtsupport_event.conf \
|
||||||
|
uploader_event.conf \
|
||||||
|
- emergencyanalysis_event.conf
|
||||||
|
+ emergencyanalysis_event.conf \
|
||||||
|
+ bugzilla_anaconda_event.conf
|
||||||
|
|
||||||
|
reporters_extra_dist =
|
||||||
|
if BUILD_BUGZILLA
|
||||||
|
diff --git a/src/plugins/bugzilla_anaconda_event.conf b/src/plugins/bugzilla_anaconda_event.conf
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..6d888e4
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/plugins/bugzilla_anaconda_event.conf
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+EVENT=report_Bugzilla component=anaconda
|
||||||
|
+ reporter-bugzilla -b \
|
||||||
|
+ -F /etc/libreport/plugins/bugzilla_format_libreport.conf
|
||||||
|
diff --git a/src/workflows/anaconda_event.conf b/src/workflows/anaconda_event.conf
|
||||||
|
index f71aebd..f369acd 100644
|
||||||
|
--- a/src/workflows/anaconda_event.conf
|
||||||
|
+++ b/src/workflows/anaconda_event.conf
|
||||||
|
@@ -1,2 +1,2 @@
|
||||||
|
-EVENT=workflow_AnacondaFedora type=anaconda
|
||||||
|
-EVENT=workflow_AnacondaUpload type=anaconda
|
||||||
|
+EVENT=workflow_AnacondaFedora component=anaconda
|
||||||
|
+EVENT=workflow_AnacondaUpload component=anaconda
|
||||||
|
diff --git a/src/workflows/workflow_AnacondaFedora.xml.in b/src/workflows/workflow_AnacondaFedora.xml.in
|
||||||
|
index 5c8c2a7..6322d9a 100644
|
||||||
|
--- a/src/workflows/workflow_AnacondaFedora.xml.in
|
||||||
|
+++ b/src/workflows/workflow_AnacondaFedora.xml.in
|
||||||
|
@@ -4,8 +4,6 @@
|
||||||
|
<_description>Process the report using the Fedora infrastructure</_description>
|
||||||
|
|
||||||
|
<events>
|
||||||
|
- <event>report_uReport</event>
|
||||||
|
<event>report_Bugzilla</event>
|
||||||
|
- <event>post_report</event>
|
||||||
|
</events>
|
||||||
|
</workflow>
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
@ -5,7 +5,7 @@
|
|||||||
Summary: Generic library for reporting various problems
|
Summary: Generic library for reporting various problems
|
||||||
Name: libreport
|
Name: libreport
|
||||||
Version: 2.1.3
|
Version: 2.1.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: https://fedorahosted.org/abrt/
|
URL: https://fedorahosted.org/abrt/
|
||||||
@ -30,6 +30,10 @@ BuildRequires: newt-devel
|
|||||||
BuildRequires: libproxy-devel
|
BuildRequires: libproxy-devel
|
||||||
BuildRequires: btparser-devel
|
BuildRequires: btparser-devel
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
|
Patch0: 0001-reporter-rhtsupport-fix-hint-query-to-use-correct-UR.patch
|
||||||
|
Patch1: 0002-curl-upload-helper-upload-data-with-application-octe.patch
|
||||||
|
Patch2: 0003-report-gtk-show-Next-Step-btn-at-workflow-start.patch
|
||||||
|
Patch3: 0004-fixed-reporting-from-bugzilla-rhbz-926916.patch
|
||||||
Requires: libreport-filesystem
|
Requires: libreport-filesystem
|
||||||
# required for update from old report library, otherwise we obsolete report-gtk
|
# required for update from old report library, otherwise we obsolete report-gtk
|
||||||
# and all it's plugins, but don't provide the python bindings and the sealert
|
# and all it's plugins, but don't provide the python bindings and the sealert
|
||||||
@ -263,6 +267,10 @@ infrastructure or uploading the gathered data over ftp/scp...
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoconf
|
autoconf
|
||||||
@ -471,6 +479,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 4 2013 Jiri Moskovcak <jmoskovc@redhat.com> 2.1.3-2
|
||||||
|
- fixed reporting from anaconda
|
||||||
|
- Resolves: #926916
|
||||||
|
|
||||||
* Wed Mar 27 2013 Jakub Filak <jfilak@redhat.com> 2.1.3-1
|
* Wed Mar 27 2013 Jakub Filak <jfilak@redhat.com> 2.1.3-1
|
||||||
- rhbz: get id of duplicate from correct field
|
- rhbz: get id of duplicate from correct field
|
||||||
- change the "exited with" message with something less technical closes #143
|
- change the "exited with" message with something less technical closes #143
|
||||||
|
Loading…
Reference in New Issue
Block a user