[libreport] add the patches which make reporter-bugzilla more reliable
Jakub Filak
jfilak at fedoraproject.org
Tue Jul 2 09:59:45 UTC 2013
commit a023dcd71f17bf1c471d63fc96220f0552b3ca79
Author: Jakub Filak <jfilak at redhat.com>
Date: Tue Jul 2 11:46:18 2013 +0200
add the patches which make reporter-bugzilla more reliable
Resolves: #980228
...test-rhbz_new_bug-return-value-for-errors.patch | 33 ++++++++++++++++++++
...mlrpc-env-for-errors-in-abrt_xmlrpc_call_.patch | 31 ++++++++++++++++++
libreport.spec | 13 +++++++-
3 files changed, 76 insertions(+), 1 deletions(-)
---
diff --git a/0005-rhbz-test-rhbz_new_bug-return-value-for-errors.patch b/0005-rhbz-test-rhbz_new_bug-return-value-for-errors.patch
new file mode 100644
index 0000000..80f04c0
--- /dev/null
+++ b/0005-rhbz-test-rhbz_new_bug-return-value-for-errors.patch
@@ -0,0 +1,33 @@
+From 0b4ef1e6f83e7f4a2e0262d0c2dc6280cfbd72a0 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at 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 at redhat.com>
+Signed-off-by: Denys Vlasenko <dvlasenk at 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
+
diff --git a/0006-rhbz-test-xmlrpc-env-for-errors-in-abrt_xmlrpc_call_.patch b/0006-rhbz-test-xmlrpc-env-for-errors-in-abrt_xmlrpc_call_.patch
new file mode 100644
index 0000000..0449adf
--- /dev/null
+++ b/0006-rhbz-test-xmlrpc-env-for-errors-in-abrt_xmlrpc_call_.patch
@@ -0,0 +1,31 @@
+From ed04964627f465d8bd18297286abf3a3d3e922ce Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at 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 at redhat.com>
+Signed-off-by: Denys Vlasenko <dvlasenk at 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
+
diff --git a/libreport.spec b/libreport.spec
index f87be9b..0a3a3bb 100644
--- a/libreport.spec
+++ b/libreport.spec
@@ -5,13 +5,17 @@
Summary: Generic library for reporting various problems
Name: libreport
Version: 2.1.5
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: https://fedorahosted.org/abrt/
Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
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: gtk3-devel
BuildRequires: curl-devel
@@ -268,6 +272,9 @@ infrastructure or uploading the gathered data over ftp/scp...
%prep
%setup -q
+%patch5 -p1
+%patch6 -p1
+
# koji in f19 has new autotools, so we need to regenerate everything
cp %SOURCE1 %_builddir/%{name}-%{version}
./autogen.sh
@@ -482,6 +489,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
+* Tue Jul 02 2013 Jakub Filak <jfilak at redhat.com> 2.1.5-2
+- reporter-bugzilla: test return values for errors
+- Resolves: #980228
+
* Fri Jun 14 2013 Jakub Filak <jfilak at redhat.com> 2.1.5-1
- make the uploader event available for all report types
- ureport: add conversion from abrt vmcore type to ureport KERNELOOPS type
More information about the scm-commits
mailing list