add the patches which make reporter-bugzilla more reliable

Resolves: #980228
This commit is contained in:
Jakub Filak 2013-07-02 11:46:18 +02:00
parent 23f2f4734d
commit a023dcd71f
3 changed files with 76 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From 0b4ef1e6f83e7f4a2e0262d0c2dc6280cfbd72a0 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 2 Jul 2013 09:55:52 +0200
Subject: [LIBREPORT PATCH 5/6] rhbz: test rhbz_new_bug() return value for
errors
Related to rhbz#980228
Signed-off-by: Jakub Filak <jfilak@redhat.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
---
src/plugins/reporter-bugzilla.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/plugins/reporter-bugzilla.c b/src/plugins/reporter-bugzilla.c
index d0e04b6..626b41f 100644
--- a/src/plugins/reporter-bugzilla.c
+++ b/src/plugins/reporter-bugzilla.c
@@ -1240,6 +1240,11 @@ int main(int argc, char **argv)
free(bzcomment);
free(summary);
+ if (new_id == -1)
+ {
+ error_msg_and_die(_("Failed to create a new bug."));
+ }
+
log(_("Adding attachments to bug %i"), new_id);
char new_id_str[sizeof(int)*3 + 2];
sprintf(new_id_str, "%i", new_id);
--
1.8.2.1

View File

@ -0,0 +1,31 @@
From ed04964627f465d8bd18297286abf3a3d3e922ce Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 2 Jul 2013 09:55:53 +0200
Subject: [LIBREPORT PATCH 6/6] rhbz: test xmlrpc env for errors in
abrt_xmlrpc_call_params()
Closes rhbz#980228
Signed-off-by: Jakub Filak <jfilak@redhat.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
---
src/lib/abrt_xmlrpc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lib/abrt_xmlrpc.c b/src/lib/abrt_xmlrpc.c
index b531d25..75f1f2b 100644
--- a/src/lib/abrt_xmlrpc.c
+++ b/src/lib/abrt_xmlrpc.c
@@ -206,6 +206,9 @@ xmlrpc_value *abrt_xmlrpc_call_params(xmlrpc_env *env, struct abrt_xmlrpc *ax, c
xmlrpc_client_call2(env, ax->ax_client, ax->ax_server_info, method,
array, &result);
+ if (env->fault_occurred)
+ abrt_xmlrpc_die(env);
+
xmlrpc_DECREF(array);
return result;
}
--
1.8.2.1

View File

@ -5,13 +5,17 @@
Summary: Generic library for reporting various problems Summary: Generic library for reporting various problems
Name: libreport Name: libreport
Version: 2.1.5 Version: 2.1.5
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/
Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
Source1: autogen.sh Source1: autogen.sh
# Remove these patches with libreport-2.1.6
Patch5: 0005-rhbz-test-rhbz_new_bug-return-value-for-errors.patch
Patch6: 0006-rhbz-test-xmlrpc-env-for-errors-in-abrt_xmlrpc_call_.patch
BuildRequires: dbus-devel BuildRequires: dbus-devel
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
BuildRequires: curl-devel BuildRequires: curl-devel
@ -268,6 +272,9 @@ infrastructure or uploading the gathered data over ftp/scp...
%prep %prep
%setup -q %setup -q
%patch5 -p1
%patch6 -p1
# koji in f19 has new autotools, so we need to regenerate everything # koji in f19 has new autotools, so we need to regenerate everything
cp %SOURCE1 %_builddir/%{name}-%{version} cp %SOURCE1 %_builddir/%{name}-%{version}
./autogen.sh ./autogen.sh
@ -482,6 +489,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog %changelog
* Tue Jul 02 2013 Jakub Filak <jfilak@redhat.com> 2.1.5-2
- reporter-bugzilla: test return values for errors
- Resolves: #980228
* Fri Jun 14 2013 Jakub Filak <jfilak@redhat.com> 2.1.5-1 * Fri Jun 14 2013 Jakub Filak <jfilak@redhat.com> 2.1.5-1
- make the uploader event available for all report types - make the uploader event available for all report types
- ureport: add conversion from abrt vmcore type to ureport KERNELOOPS type - ureport: add conversion from abrt vmcore type to ureport KERNELOOPS type