parent
111c257f27
commit
c834b0dd87
@ -1,304 +0,0 @@
|
|||||||
From 2c86c3e41c49a6916fc44852555baccdbf7366da Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Filak <jfilak@redhat.com>
|
|
||||||
Date: Wed, 23 Apr 2014 13:33:52 +0200
|
|
||||||
Subject: [LIBREPORT PATCH 1/2] Bugzilla: pass Bugzilla_token in all relevant
|
|
||||||
XML RPC calls
|
|
||||||
|
|
||||||
Affected functions:
|
|
||||||
Bug.update
|
|
||||||
Bug.add_attachement
|
|
||||||
Bug.add_comment
|
|
||||||
Bug.get
|
|
||||||
Bug.comments
|
|
||||||
Bug.create
|
|
||||||
Bug.search
|
|
||||||
User.logout
|
|
||||||
|
|
||||||
Not affected functions:
|
|
||||||
Bugzilla.version
|
|
||||||
|
|
||||||
Instead of returning a cookie, the User.login call now returns a token
|
|
||||||
that clients must pass in the Bugzilla_token parameter to subsequent
|
|
||||||
RPC calls. If the token is not passed, Bugzilla will treat the RPC
|
|
||||||
call as unauthenticated and will not allow access to non-public data.
|
|
||||||
|
|
||||||
See
|
|
||||||
https://partner-bugzilla.redhat.com/docs/en/html/api/Bugzilla/WebService.html#LOGGING_IN
|
|
||||||
for more details.
|
|
||||||
|
|
||||||
Client scripts that access Red Hat Bugzilla via XML-RPC or JSON-RPC
|
|
||||||
and use login cookies for authentication must be updated to instead
|
|
||||||
remember the token received when logging in and pass that token back
|
|
||||||
to Bugzilla in subsequent RPC calls.
|
|
||||||
|
|
||||||
[http://post-office.corp.redhat.com/archives/bugzilla-list/2014-April/msg00005.html]
|
|
||||||
|
|
||||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
||||||
|
|
||||||
mmilata: fix typo in commit message subject
|
|
||||||
---
|
|
||||||
src/lib/abrt_xmlrpc.c | 3 ++
|
|
||||||
src/lib/abrt_xmlrpc.h | 4 +++
|
|
||||||
src/plugins/reporter-bugzilla.c | 34 ------------------
|
|
||||||
src/plugins/rhbz.c | 78 ++++++++++++++++++++++++++++++++++-------
|
|
||||||
src/plugins/rhbz.h | 4 +++
|
|
||||||
5 files changed, 76 insertions(+), 47 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lib/abrt_xmlrpc.c b/src/lib/abrt_xmlrpc.c
|
|
||||||
index 48b556f..24bdd9e 100644
|
|
||||||
--- a/src/lib/abrt_xmlrpc.c
|
|
||||||
+++ b/src/lib/abrt_xmlrpc.c
|
|
||||||
@@ -106,6 +106,9 @@ void abrt_xmlrpc_free_client(struct abrt_xmlrpc *ax)
|
|
||||||
if (ax->ax_client)
|
|
||||||
xmlrpc_client_destroy(ax->ax_client);
|
|
||||||
|
|
||||||
+ if (ax->ax_session_data && ax->ax_session_data_free)
|
|
||||||
+ ax->ax_session_data_free(ax->ax_session_data);
|
|
||||||
+
|
|
||||||
free(ax);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/lib/abrt_xmlrpc.h b/src/lib/abrt_xmlrpc.h
|
|
||||||
index 945a887..ff7a65c 100644
|
|
||||||
--- a/src/lib/abrt_xmlrpc.h
|
|
||||||
+++ b/src/lib/abrt_xmlrpc.h
|
|
||||||
@@ -30,9 +30,13 @@
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+typedef void (*abrt_xmlrpc_destroy_fn)(void *);
|
|
||||||
+
|
|
||||||
struct abrt_xmlrpc {
|
|
||||||
xmlrpc_client *ax_client;
|
|
||||||
xmlrpc_server_info *ax_server_info;
|
|
||||||
+ void *ax_session_data;
|
|
||||||
+ abrt_xmlrpc_destroy_fn ax_session_data_free;
|
|
||||||
};
|
|
||||||
|
|
||||||
xmlrpc_value *abrt_xmlrpc_array_new(xmlrpc_env *env);
|
|
||||||
diff --git a/src/plugins/reporter-bugzilla.c b/src/plugins/reporter-bugzilla.c
|
|
||||||
index 0e8b277..45aa2cc 100644
|
|
||||||
--- a/src/plugins/reporter-bugzilla.c
|
|
||||||
+++ b/src/plugins/reporter-bugzilla.c
|
|
||||||
@@ -807,40 +807,6 @@ void login(struct abrt_xmlrpc *client, struct bugzilla_struct *rhbz)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-static
|
|
||||||
-xmlrpc_value *rhbz_search_duphash(struct abrt_xmlrpc *ax,
|
|
||||||
- const char *product,
|
|
||||||
- const char *version,
|
|
||||||
- const char *component,
|
|
||||||
- const char *duphash)
|
|
||||||
-{
|
|
||||||
- struct strbuf *query = strbuf_new();
|
|
||||||
-
|
|
||||||
- strbuf_append_strf(query, "ALL whiteboard:\"%s\"", duphash);
|
|
||||||
-
|
|
||||||
- if (product)
|
|
||||||
- strbuf_append_strf(query, " product:\"%s\"", product);
|
|
||||||
-
|
|
||||||
- if (version)
|
|
||||||
- strbuf_append_strf(query, " version:\"%s\"", version);
|
|
||||||
-
|
|
||||||
- if (component)
|
|
||||||
- strbuf_append_strf(query, " component:\"%s\"", component);
|
|
||||||
-
|
|
||||||
- char *s = strbuf_free_nobuf(query);
|
|
||||||
- log_debug("search for '%s'", s);
|
|
||||||
- xmlrpc_value *search = abrt_xmlrpc_call(ax, "Bug.search", "({s:s})",
|
|
||||||
- "quicksearch", s);
|
|
||||||
- free(s);
|
|
||||||
- xmlrpc_value *bugs = rhbz_get_member("bugs", search);
|
|
||||||
- xmlrpc_DECREF(search);
|
|
||||||
-
|
|
||||||
- if (!bugs)
|
|
||||||
- error_msg_and_die(_("Bug.search(quicksearch) return value did not contain member 'bugs'"));
|
|
||||||
-
|
|
||||||
- return bugs;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
abrt_init(argv);
|
|
||||||
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
|
|
||||||
index 534aaed..bc0f87a 100644
|
|
||||||
--- a/src/plugins/rhbz.c
|
|
||||||
+++ b/src/plugins/rhbz.c
|
|
||||||
@@ -85,8 +85,9 @@ static GList *rhbz_comments(struct abrt_xmlrpc *ax, int bug_id)
|
|
||||||
* <value><array>
|
|
||||||
* ...
|
|
||||||
*/
|
|
||||||
- xmlrpc_value *xml_response = abrt_xmlrpc_call(ax, "Bug.comments", "({s:(i)})",
|
|
||||||
- "ids", bug_id);
|
|
||||||
+ xmlrpc_value *xml_response = abrt_xmlrpc_call(ax, "Bug.comments", "({s:(i),s:s})",
|
|
||||||
+ "ids", bug_id,
|
|
||||||
+ "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
/* bugs
|
|
||||||
* This is used for bugs specified in ids. This is a hash, where the
|
|
||||||
* keys are the numeric ids of the bugs, and the value is a hash with a
|
|
||||||
@@ -228,6 +229,9 @@ bool rhbz_login(struct abrt_xmlrpc *ax, const char *login, const char *password)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ ax->ax_session_data = rhbz_bug_read_item("token", result, RHBZ_READ_STR);
|
|
||||||
+ ax->ax_session_data_free = (abrt_xmlrpc_destroy_fn)free;
|
|
||||||
+
|
|
||||||
//TODO: with URL like http://bugzilla.redhat.com (that is, with http: instead of https:)
|
|
||||||
//we are getting this error:
|
|
||||||
//Logging into Bugzilla at http://bugzilla.redhat.com
|
|
||||||
@@ -472,8 +476,9 @@ struct bug_info *rhbz_bug_info(struct abrt_xmlrpc *ax, int bug_id)
|
|
||||||
* <value><array><data>
|
|
||||||
* ...
|
|
||||||
*/
|
|
||||||
- xmlrpc_value *xml_bug_response = abrt_xmlrpc_call(ax, "Bug.get", "({s:(i)})",
|
|
||||||
- "ids", bug_id);
|
|
||||||
+ xmlrpc_value *xml_bug_response = abrt_xmlrpc_call(ax, "Bug.get", "({s:(i),s:s})",
|
|
||||||
+ "ids", bug_id,
|
|
||||||
+ "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
|
|
||||||
xmlrpc_value *bugs_memb = rhbz_get_member("bugs", xml_bug_response);
|
|
||||||
xmlrpc_value *bug_item = rhbz_array_item_at(bugs_memb, 0);
|
|
||||||
@@ -599,6 +604,7 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax,
|
|
||||||
abrt_xmlrpc_params_add_string(&env, params, "summary", (summary ? summary : bzsummary));
|
|
||||||
abrt_xmlrpc_params_add_string(&env, params, "description", bzcomment);
|
|
||||||
abrt_xmlrpc_params_add_string(&env, params, "status_whiteboard", status_whiteboard);
|
|
||||||
+ abrt_xmlrpc_params_add_string(&env, params, "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
|
|
||||||
if(arch)
|
|
||||||
abrt_xmlrpc_params_add_string(&env, params, "platform", arch);
|
|
||||||
@@ -668,7 +674,7 @@ int rhbz_attach_blob(struct abrt_xmlrpc *ax, const char *bug_id,
|
|
||||||
* 6 -> base64, two arguments (char* plain data which will be encoded by xmlrpc-c to base64,
|
|
||||||
* size_t number of bytes to encode)
|
|
||||||
*/
|
|
||||||
- result = abrt_xmlrpc_call(ax, "Bug.add_attachment", "({s:(s),s:s,s:s,s:s,s:6,s:i})",
|
|
||||||
+ result = abrt_xmlrpc_call(ax, "Bug.add_attachment", "({s:(s),s:s,s:s,s:s,s:6,s:i,s:s})",
|
|
||||||
"ids", bug_id,
|
|
||||||
"summary", fn,
|
|
||||||
"file_name", filename,
|
|
||||||
@@ -681,7 +687,8 @@ int rhbz_attach_blob(struct abrt_xmlrpc *ax, const char *bug_id,
|
|
||||||
/* Undocumented argument but it works with Red Hat Bugzilla version 4.2.4-7
|
|
||||||
* and version 4.4.rc1.b02
|
|
||||||
*/
|
|
||||||
- "nomail", nomail_notify
|
|
||||||
+ "nomail", nomail_notify,
|
|
||||||
+ "Bugzilla_token", (char *)ax->ax_session_data
|
|
||||||
);
|
|
||||||
|
|
||||||
free(fn);
|
|
||||||
@@ -737,7 +744,13 @@ void rhbz_logout(struct abrt_xmlrpc *ax)
|
|
||||||
{
|
|
||||||
func_entry();
|
|
||||||
|
|
||||||
- xmlrpc_value* result = abrt_xmlrpc_call(ax, "User.logout", "(s)", "");
|
|
||||||
+ xmlrpc_env env;
|
|
||||||
+ xmlrpc_value *result = abrt_xmlrpc_call_full(&env, ax, "User.logout", "({s:s})",
|
|
||||||
+ "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
+
|
|
||||||
+ if (env.fault_occurred)
|
|
||||||
+ log_warning("xmlrpc fault: (%d) %s", env.fault_code, env.fault_string);
|
|
||||||
+
|
|
||||||
if (result)
|
|
||||||
xmlrpc_DECREF(result);
|
|
||||||
}
|
|
||||||
@@ -785,10 +798,11 @@ void rhbz_mail_to_cc(struct abrt_xmlrpc *ax, int bug_id, const char *mail, int f
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
/* Bugzilla 4.0+ uses this API: */
|
|
||||||
- result = abrt_xmlrpc_call(ax, "Bug.update", "({s:i,s:{s:(s),s:i}})",
|
|
||||||
+ result = abrt_xmlrpc_call(ax, "Bug.update", "({s:i,s:{s:(s),s:i},s:s})",
|
|
||||||
"ids", bug_id,
|
|
||||||
"cc", "add", mail,
|
|
||||||
- "nomail", nomail_notify
|
|
||||||
+ "nomail", nomail_notify,
|
|
||||||
+ "Bugzilla_token", (char *)ax->ax_session_data
|
|
||||||
);
|
|
||||||
if (result)
|
|
||||||
xmlrpc_DECREF(result);
|
|
||||||
@@ -822,9 +836,10 @@ void rhbz_add_comment(struct abrt_xmlrpc *ax, int bug_id, const char *comment,
|
|
||||||
int nomail_notify = !!IS_NOMAIL_NOTIFY(flags);
|
|
||||||
|
|
||||||
xmlrpc_value *result;
|
|
||||||
- result = abrt_xmlrpc_call(ax, "Bug.add_comment", "({s:i,s:s,s:b,s:i})",
|
|
||||||
+ result = abrt_xmlrpc_call(ax, "Bug.add_comment", "({s:i,s:s,s:b,s:i,s:s})",
|
|
||||||
"id", bug_id, "comment", comment,
|
|
||||||
- "private", private, "nomail", nomail_notify);
|
|
||||||
+ "private", private, "nomail", nomail_notify,
|
|
||||||
+ "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
xmlrpc_DECREF(result);
|
|
||||||
@@ -835,16 +850,53 @@ void rhbz_set_url(struct abrt_xmlrpc *ax, int bug_id, const char *url, int flags
|
|
||||||
func_entry();
|
|
||||||
|
|
||||||
const int nomail_notify = !!IS_NOMAIL_NOTIFY(flags);
|
|
||||||
- xmlrpc_value *result = abrt_xmlrpc_call(ax, "Bug.update", "({s:i,s:s,s:i})",
|
|
||||||
+ xmlrpc_value *result = abrt_xmlrpc_call(ax, "Bug.update", "({s:i,s:s,s:i,s:s})",
|
|
||||||
"ids", bug_id,
|
|
||||||
"url", url,
|
|
||||||
|
|
||||||
/* Undocumented argument but it works with Red Hat Bugzilla version 4.2.4-7
|
|
||||||
* and version 4.4.rc1.b02
|
|
||||||
*/
|
|
||||||
- "nomail", nomail_notify
|
|
||||||
+ "nomail", nomail_notify,
|
|
||||||
+ "Bugzilla_token", (char *)ax->ax_session_data
|
|
||||||
);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
xmlrpc_DECREF(result);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+xmlrpc_value *rhbz_search_duphash(struct abrt_xmlrpc *ax,
|
|
||||||
+ const char *product,
|
|
||||||
+ const char *version,
|
|
||||||
+ const char *component,
|
|
||||||
+ const char *duphash)
|
|
||||||
+{
|
|
||||||
+ struct strbuf *query = strbuf_new();
|
|
||||||
+
|
|
||||||
+ strbuf_append_strf(query, "ALL whiteboard:\"%s\"", duphash);
|
|
||||||
+
|
|
||||||
+ if (product)
|
|
||||||
+ strbuf_append_strf(query, " product:\"%s\"", product);
|
|
||||||
+
|
|
||||||
+ if (version)
|
|
||||||
+ strbuf_append_strf(query, " version:\"%s\"", version);
|
|
||||||
+
|
|
||||||
+ if (component)
|
|
||||||
+ strbuf_append_strf(query, " component:\"%s\"", component);
|
|
||||||
+
|
|
||||||
+ char *s = strbuf_free_nobuf(query);
|
|
||||||
+ log_debug("search for '%s'", s);
|
|
||||||
+ xmlrpc_value *search = (ax->ax_session_data == NULL)
|
|
||||||
+ ? abrt_xmlrpc_call(ax, "Bug.search", "({s:s})", "quicksearch", s)
|
|
||||||
+ : abrt_xmlrpc_call(ax, "Bug.search", "({s:s,s:s})", "quicksearch", s,
|
|
||||||
+ "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
+
|
|
||||||
+ free(s);
|
|
||||||
+ xmlrpc_value *bugs = rhbz_get_member("bugs", search);
|
|
||||||
+ xmlrpc_DECREF(search);
|
|
||||||
+
|
|
||||||
+ if (!bugs)
|
|
||||||
+ error_msg_and_die(_("Bug.search(quicksearch) return value did not contain member 'bugs'"));
|
|
||||||
+
|
|
||||||
+ return bugs;
|
|
||||||
+}
|
|
||||||
diff --git a/src/plugins/rhbz.h b/src/plugins/rhbz.h
|
|
||||||
index 742927a..976d333 100644
|
|
||||||
--- a/src/plugins/rhbz.h
|
|
||||||
+++ b/src/plugins/rhbz.h
|
|
||||||
@@ -112,6 +112,10 @@ struct bug_info *rhbz_find_origin_bug_closed_duplicate(struct abrt_xmlrpc *ax,
|
|
||||||
struct bug_info *bi);
|
|
||||||
unsigned rhbz_version(struct abrt_xmlrpc *ax);
|
|
||||||
|
|
||||||
+xmlrpc_value *rhbz_search_duphash(struct abrt_xmlrpc *ax,
|
|
||||||
+ const char *product, const char *version, const char *component,
|
|
||||||
+ const char *duphash);
|
|
||||||
+
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,347 +0,0 @@
|
|||||||
From c5be23b5c5efd1d8ec6df807fc2039454f22414d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Filak <jfilak@redhat.com>
|
|
||||||
Date: Wed, 23 Apr 2014 18:13:47 +0200
|
|
||||||
Subject: [LIBREPORT PATCH 2/2] Bugzilla: session parameters for XML RPC calls
|
|
||||||
|
|
||||||
The session parameters are added to every XMLRPC call.
|
|
||||||
|
|
||||||
abrt_xmlrpc_call*() functions expected formatting string in form of
|
|
||||||
"({...})" for some good but unknown reason. Since now, the functions
|
|
||||||
expects formatting string without the outer brackets.
|
|
||||||
|
|
||||||
() - means empty array (allowed in xmlrpc-c)
|
|
||||||
{} - means empty structure (allowed in xmlrpc-c)
|
|
||||||
|
|
||||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
||||||
---
|
|
||||||
src/lib/abrt_xmlrpc.c | 95 ++++++++++++++++++++++++++++++++++++++++-----------
|
|
||||||
src/lib/abrt_xmlrpc.h | 5 +--
|
|
||||||
src/plugins/rhbz.c | 52 +++++++++++++---------------
|
|
||||||
3 files changed, 102 insertions(+), 50 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/lib/abrt_xmlrpc.c b/src/lib/abrt_xmlrpc.c
|
|
||||||
index 24bdd9e..84ed50d 100644
|
|
||||||
--- a/src/lib/abrt_xmlrpc.c
|
|
||||||
+++ b/src/lib/abrt_xmlrpc.c
|
|
||||||
@@ -20,6 +20,12 @@
|
|
||||||
#include "abrt_xmlrpc.h"
|
|
||||||
#include "proxies.h"
|
|
||||||
|
|
||||||
+struct abrt_xmlrpc_param_pair
|
|
||||||
+{
|
|
||||||
+ char *name;
|
|
||||||
+ xmlrpc_value *value;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
void abrt_xmlrpc_die(xmlrpc_env *env)
|
|
||||||
{
|
|
||||||
error_msg_and_die("fatal: %s", env->fault_string);
|
|
||||||
@@ -106,12 +112,77 @@ void abrt_xmlrpc_free_client(struct abrt_xmlrpc *ax)
|
|
||||||
if (ax->ax_client)
|
|
||||||
xmlrpc_client_destroy(ax->ax_client);
|
|
||||||
|
|
||||||
- if (ax->ax_session_data && ax->ax_session_data_free)
|
|
||||||
- ax->ax_session_data_free(ax->ax_session_data);
|
|
||||||
+ for (GList *iter = ax->ax_session_params; iter; iter = g_list_next(iter))
|
|
||||||
+ {
|
|
||||||
+ struct abrt_xmlrpc_param_pair *param_pair = (struct abrt_xmlrpc_param_pair *)iter->data;
|
|
||||||
+ xmlrpc_DECREF(param_pair->value);
|
|
||||||
+ free(param_pair->name);
|
|
||||||
+ free(param_pair);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ g_list_free(ax->ax_session_params);
|
|
||||||
|
|
||||||
free(ax);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void abrt_xmlrpc_client_add_session_param_string(xmlrpc_env *env, struct abrt_xmlrpc *ax,
|
|
||||||
+ const char *name, const char *value)
|
|
||||||
+{
|
|
||||||
+ struct abrt_xmlrpc_param_pair *new_ses_param = xmalloc(sizeof(*new_ses_param));
|
|
||||||
+ new_ses_param->name = xstrdup(name);
|
|
||||||
+
|
|
||||||
+ new_ses_param->value = xmlrpc_string_new(env, value);
|
|
||||||
+ if (env->fault_occurred)
|
|
||||||
+ abrt_xmlrpc_die(env);
|
|
||||||
+
|
|
||||||
+ ax->ax_session_params = g_list_append(ax->ax_session_params, new_ses_param);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* internal helper function */
|
|
||||||
+static xmlrpc_value *abrt_xmlrpc_call_params_internal(xmlrpc_env *env, struct abrt_xmlrpc *ax, const char *method, xmlrpc_value *params)
|
|
||||||
+{
|
|
||||||
+ xmlrpc_value *array = xmlrpc_array_new(env);
|
|
||||||
+ if (env->fault_occurred)
|
|
||||||
+ abrt_xmlrpc_die(env);
|
|
||||||
+
|
|
||||||
+ bool destroy_params = false;
|
|
||||||
+ if (xmlrpc_value_type(params) == XMLRPC_TYPE_NIL)
|
|
||||||
+ {
|
|
||||||
+ destroy_params = true;
|
|
||||||
+ params = abrt_xmlrpc_params_new(env);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (xmlrpc_value_type(params) == XMLRPC_TYPE_STRUCT)
|
|
||||||
+ {
|
|
||||||
+ for (GList *iter = ax->ax_session_params; iter; iter = g_list_next(iter))
|
|
||||||
+ {
|
|
||||||
+ struct abrt_xmlrpc_param_pair *param_pair = (struct abrt_xmlrpc_param_pair *)iter->data;
|
|
||||||
+
|
|
||||||
+ xmlrpc_struct_set_value(env, params, param_pair->name, param_pair->value);
|
|
||||||
+ if (env->fault_occurred)
|
|
||||||
+ abrt_xmlrpc_die(env);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ log_warning("Bug: not yet supported XML RPC call type.");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ xmlrpc_array_append_item(env, array, params);
|
|
||||||
+ if (env->fault_occurred)
|
|
||||||
+ abrt_xmlrpc_die(env);
|
|
||||||
+
|
|
||||||
+ xmlrpc_value *result = NULL;
|
|
||||||
+ xmlrpc_client_call2(env, ax->ax_client, ax->ax_server_info, method,
|
|
||||||
+ array, &result);
|
|
||||||
+
|
|
||||||
+ if (destroy_params)
|
|
||||||
+ xmlrpc_DECREF(params);
|
|
||||||
+
|
|
||||||
+ xmlrpc_DECREF(array);
|
|
||||||
+ return result;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/* internal helper function */
|
|
||||||
static
|
|
||||||
xmlrpc_value *abrt_xmlrpc_call_full_va(xmlrpc_env *env, struct abrt_xmlrpc *ax,
|
|
||||||
@@ -136,10 +207,8 @@ xmlrpc_value *abrt_xmlrpc_call_full_va(xmlrpc_env *env, struct abrt_xmlrpc *ax,
|
|
||||||
suffix);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
- {
|
|
||||||
- xmlrpc_client_call2(env, ax->ax_client, ax->ax_server_info, method,
|
|
||||||
- param, &result);
|
|
||||||
- }
|
|
||||||
+ result = abrt_xmlrpc_call_params_internal(env, ax, method, param);
|
|
||||||
+
|
|
||||||
xmlrpc_DECREF(param);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
@@ -195,25 +264,13 @@ void abrt_xmlrpc_params_add_array(xmlrpc_env *env, xmlrpc_value *params, const c
|
|
||||||
if (env->fault_occurred)
|
|
||||||
abrt_xmlrpc_die(env);
|
|
||||||
}
|
|
||||||
-
|
|
||||||
xmlrpc_value *abrt_xmlrpc_call_params(xmlrpc_env *env, struct abrt_xmlrpc *ax, const char *method, xmlrpc_value *params)
|
|
||||||
{
|
|
||||||
- xmlrpc_value *array = xmlrpc_array_new(env);
|
|
||||||
- if (env->fault_occurred)
|
|
||||||
- abrt_xmlrpc_die(env);
|
|
||||||
-
|
|
||||||
- xmlrpc_array_append_item(env, array, params);
|
|
||||||
- if (env->fault_occurred)
|
|
||||||
- abrt_xmlrpc_die(env);
|
|
||||||
-
|
|
||||||
- xmlrpc_value *result = NULL;
|
|
||||||
- xmlrpc_client_call2(env, ax->ax_client, ax->ax_server_info, method,
|
|
||||||
- array, &result);
|
|
||||||
+ xmlrpc_value *result = abrt_xmlrpc_call_params_internal(env, ax, method, params);
|
|
||||||
|
|
||||||
if (env->fault_occurred)
|
|
||||||
abrt_xmlrpc_die(env);
|
|
||||||
|
|
||||||
- xmlrpc_DECREF(array);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/lib/abrt_xmlrpc.h b/src/lib/abrt_xmlrpc.h
|
|
||||||
index ff7a65c..feaa04d 100644
|
|
||||||
--- a/src/lib/abrt_xmlrpc.h
|
|
||||||
+++ b/src/lib/abrt_xmlrpc.h
|
|
||||||
@@ -23,6 +23,7 @@
|
|
||||||
* include/xmlrpc-c/base.h: typedef int32_t xmlrpc_int32;
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#include <glib.h>
|
|
||||||
#include <xmlrpc-c/base.h>
|
|
||||||
#include <xmlrpc-c/client.h>
|
|
||||||
|
|
||||||
@@ -35,8 +36,7 @@ typedef void (*abrt_xmlrpc_destroy_fn)(void *);
|
|
||||||
struct abrt_xmlrpc {
|
|
||||||
xmlrpc_client *ax_client;
|
|
||||||
xmlrpc_server_info *ax_server_info;
|
|
||||||
- void *ax_session_data;
|
|
||||||
- abrt_xmlrpc_destroy_fn ax_session_data_free;
|
|
||||||
+ GList *ax_session_params;
|
|
||||||
};
|
|
||||||
|
|
||||||
xmlrpc_value *abrt_xmlrpc_array_new(xmlrpc_env *env);
|
|
||||||
@@ -49,6 +49,7 @@ void abrt_xmlrpc_params_add_array(xmlrpc_env *env, xmlrpc_value *params, const c
|
|
||||||
|
|
||||||
struct abrt_xmlrpc *abrt_xmlrpc_new_client(const char *url, int ssl_verify);
|
|
||||||
void abrt_xmlrpc_free_client(struct abrt_xmlrpc *ax);
|
|
||||||
+void abrt_xmlrpc_client_add_session_param_string(xmlrpc_env *env, struct abrt_xmlrpc *ax, const char *name, const char *value);
|
|
||||||
void abrt_xmlrpc_die(xmlrpc_env *env) __attribute__((noreturn));
|
|
||||||
void abrt_xmlrpc_error(xmlrpc_env *env);
|
|
||||||
|
|
||||||
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
|
|
||||||
index bc0f87a..bad9ed4 100644
|
|
||||||
--- a/src/plugins/rhbz.c
|
|
||||||
+++ b/src/plugins/rhbz.c
|
|
||||||
@@ -85,9 +85,8 @@ static GList *rhbz_comments(struct abrt_xmlrpc *ax, int bug_id)
|
|
||||||
* <value><array>
|
|
||||||
* ...
|
|
||||||
*/
|
|
||||||
- xmlrpc_value *xml_response = abrt_xmlrpc_call(ax, "Bug.comments", "({s:(i),s:s})",
|
|
||||||
- "ids", bug_id,
|
|
||||||
- "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
+ xmlrpc_value *xml_response = abrt_xmlrpc_call(ax, "Bug.comments", "{s:(i)}",
|
|
||||||
+ "ids", bug_id);
|
|
||||||
/* bugs
|
|
||||||
* This is used for bugs specified in ids. This is a hash, where the
|
|
||||||
* keys are the numeric ids of the bugs, and the value is a hash with a
|
|
||||||
@@ -216,7 +215,7 @@ bool rhbz_login(struct abrt_xmlrpc *ax, const char *login, const char *password)
|
|
||||||
func_entry();
|
|
||||||
|
|
||||||
xmlrpc_env env;
|
|
||||||
- xmlrpc_value *result = abrt_xmlrpc_call_full(&env, ax, "User.login", "({s:s,s:s})",
|
|
||||||
+ xmlrpc_value *result = abrt_xmlrpc_call_full(&env, ax, "User.login", "{s:s,s:s}",
|
|
||||||
"login", login, "password", password);
|
|
||||||
|
|
||||||
if (env.fault_occurred)
|
|
||||||
@@ -229,8 +228,13 @@ bool rhbz_login(struct abrt_xmlrpc *ax, const char *login, const char *password)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
- ax->ax_session_data = rhbz_bug_read_item("token", result, RHBZ_READ_STR);
|
|
||||||
- ax->ax_session_data_free = (abrt_xmlrpc_destroy_fn)free;
|
|
||||||
+ char *token = rhbz_bug_read_item("token", result, RHBZ_READ_STR);
|
|
||||||
+ if (token != NULL)
|
|
||||||
+ {
|
|
||||||
+ log_debug("Adding session param Bugzilla_token");
|
|
||||||
+ abrt_xmlrpc_client_add_session_param_string(&env, ax, "Bugzilla_token", token);
|
|
||||||
+ free(token);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
//TODO: with URL like http://bugzilla.redhat.com (that is, with http: instead of https:)
|
|
||||||
//we are getting this error:
|
|
||||||
@@ -301,7 +305,7 @@ unsigned rhbz_version(struct abrt_xmlrpc *ax)
|
|
||||||
func_entry();
|
|
||||||
|
|
||||||
xmlrpc_value *result;
|
|
||||||
- result = abrt_xmlrpc_call(ax, "Bugzilla.version", "()");
|
|
||||||
+ result = abrt_xmlrpc_call(ax, "Bugzilla.version", "{}");
|
|
||||||
char *version = NULL;
|
|
||||||
if (result)
|
|
||||||
version = rhbz_bug_read_item("version", result, RHBZ_READ_STR);
|
|
||||||
@@ -476,9 +480,8 @@ struct bug_info *rhbz_bug_info(struct abrt_xmlrpc *ax, int bug_id)
|
|
||||||
* <value><array><data>
|
|
||||||
* ...
|
|
||||||
*/
|
|
||||||
- xmlrpc_value *xml_bug_response = abrt_xmlrpc_call(ax, "Bug.get", "({s:(i),s:s})",
|
|
||||||
- "ids", bug_id,
|
|
||||||
- "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
+ xmlrpc_value *xml_bug_response = abrt_xmlrpc_call(ax, "Bug.get", "{s:(i)}",
|
|
||||||
+ "ids", bug_id);
|
|
||||||
|
|
||||||
xmlrpc_value *bugs_memb = rhbz_get_member("bugs", xml_bug_response);
|
|
||||||
xmlrpc_value *bug_item = rhbz_array_item_at(bugs_memb, 0);
|
|
||||||
@@ -604,7 +607,6 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax,
|
|
||||||
abrt_xmlrpc_params_add_string(&env, params, "summary", (summary ? summary : bzsummary));
|
|
||||||
abrt_xmlrpc_params_add_string(&env, params, "description", bzcomment);
|
|
||||||
abrt_xmlrpc_params_add_string(&env, params, "status_whiteboard", status_whiteboard);
|
|
||||||
- abrt_xmlrpc_params_add_string(&env, params, "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
|
|
||||||
if(arch)
|
|
||||||
abrt_xmlrpc_params_add_string(&env, params, "platform", arch);
|
|
||||||
@@ -674,7 +676,7 @@ int rhbz_attach_blob(struct abrt_xmlrpc *ax, const char *bug_id,
|
|
||||||
* 6 -> base64, two arguments (char* plain data which will be encoded by xmlrpc-c to base64,
|
|
||||||
* size_t number of bytes to encode)
|
|
||||||
*/
|
|
||||||
- result = abrt_xmlrpc_call(ax, "Bug.add_attachment", "({s:(s),s:s,s:s,s:s,s:6,s:i,s:s})",
|
|
||||||
+ result = abrt_xmlrpc_call(ax, "Bug.add_attachment", "{s:(s),s:s,s:s,s:s,s:6,s:i}",
|
|
||||||
"ids", bug_id,
|
|
||||||
"summary", fn,
|
|
||||||
"file_name", filename,
|
|
||||||
@@ -687,8 +689,7 @@ int rhbz_attach_blob(struct abrt_xmlrpc *ax, const char *bug_id,
|
|
||||||
/* Undocumented argument but it works with Red Hat Bugzilla version 4.2.4-7
|
|
||||||
* and version 4.4.rc1.b02
|
|
||||||
*/
|
|
||||||
- "nomail", nomail_notify,
|
|
||||||
- "Bugzilla_token", (char *)ax->ax_session_data
|
|
||||||
+ "nomail", nomail_notify
|
|
||||||
);
|
|
||||||
|
|
||||||
free(fn);
|
|
||||||
@@ -745,8 +746,7 @@ void rhbz_logout(struct abrt_xmlrpc *ax)
|
|
||||||
func_entry();
|
|
||||||
|
|
||||||
xmlrpc_env env;
|
|
||||||
- xmlrpc_value *result = abrt_xmlrpc_call_full(&env, ax, "User.logout", "({s:s})",
|
|
||||||
- "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
+ xmlrpc_value *result = abrt_xmlrpc_call_full(&env, ax, "User.logout", "{}");
|
|
||||||
|
|
||||||
if (env.fault_occurred)
|
|
||||||
log_warning("xmlrpc fault: (%d) %s", env.fault_code, env.fault_string);
|
|
||||||
@@ -798,11 +798,10 @@ void rhbz_mail_to_cc(struct abrt_xmlrpc *ax, int bug_id, const char *mail, int f
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
/* Bugzilla 4.0+ uses this API: */
|
|
||||||
- result = abrt_xmlrpc_call(ax, "Bug.update", "({s:i,s:{s:(s),s:i},s:s})",
|
|
||||||
+ result = abrt_xmlrpc_call(ax, "Bug.update", "{s:i,s:{s:(s),s:i}}",
|
|
||||||
"ids", bug_id,
|
|
||||||
"cc", "add", mail,
|
|
||||||
- "nomail", nomail_notify,
|
|
||||||
- "Bugzilla_token", (char *)ax->ax_session_data
|
|
||||||
+ "nomail", nomail_notify
|
|
||||||
);
|
|
||||||
if (result)
|
|
||||||
xmlrpc_DECREF(result);
|
|
||||||
@@ -836,10 +835,9 @@ void rhbz_add_comment(struct abrt_xmlrpc *ax, int bug_id, const char *comment,
|
|
||||||
int nomail_notify = !!IS_NOMAIL_NOTIFY(flags);
|
|
||||||
|
|
||||||
xmlrpc_value *result;
|
|
||||||
- result = abrt_xmlrpc_call(ax, "Bug.add_comment", "({s:i,s:s,s:b,s:i,s:s})",
|
|
||||||
+ result = abrt_xmlrpc_call(ax, "Bug.add_comment", "{s:i,s:s,s:b,s:i}",
|
|
||||||
"id", bug_id, "comment", comment,
|
|
||||||
- "private", private, "nomail", nomail_notify,
|
|
||||||
- "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
+ "private", private, "nomail", nomail_notify);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
xmlrpc_DECREF(result);
|
|
||||||
@@ -850,15 +848,14 @@ void rhbz_set_url(struct abrt_xmlrpc *ax, int bug_id, const char *url, int flags
|
|
||||||
func_entry();
|
|
||||||
|
|
||||||
const int nomail_notify = !!IS_NOMAIL_NOTIFY(flags);
|
|
||||||
- xmlrpc_value *result = abrt_xmlrpc_call(ax, "Bug.update", "({s:i,s:s,s:i,s:s})",
|
|
||||||
+ xmlrpc_value *result = abrt_xmlrpc_call(ax, "Bug.update", "{s:i,s:s,s:i}",
|
|
||||||
"ids", bug_id,
|
|
||||||
"url", url,
|
|
||||||
|
|
||||||
/* Undocumented argument but it works with Red Hat Bugzilla version 4.2.4-7
|
|
||||||
* and version 4.4.rc1.b02
|
|
||||||
*/
|
|
||||||
- "nomail", nomail_notify,
|
|
||||||
- "Bugzilla_token", (char *)ax->ax_session_data
|
|
||||||
+ "nomail", nomail_notify
|
|
||||||
);
|
|
||||||
|
|
||||||
if (result)
|
|
||||||
@@ -886,10 +883,7 @@ xmlrpc_value *rhbz_search_duphash(struct abrt_xmlrpc *ax,
|
|
||||||
|
|
||||||
char *s = strbuf_free_nobuf(query);
|
|
||||||
log_debug("search for '%s'", s);
|
|
||||||
- xmlrpc_value *search = (ax->ax_session_data == NULL)
|
|
||||||
- ? abrt_xmlrpc_call(ax, "Bug.search", "({s:s})", "quicksearch", s)
|
|
||||||
- : abrt_xmlrpc_call(ax, "Bug.search", "({s:s,s:s})", "quicksearch", s,
|
|
||||||
- "Bugzilla_token", (char *)ax->ax_session_data);
|
|
||||||
+ xmlrpc_value *search = abrt_xmlrpc_call(ax, "Bug.search", "{s:s}", "quicksearch", s);
|
|
||||||
|
|
||||||
free(s);
|
|
||||||
xmlrpc_value *bugs = rhbz_get_member("bugs", search);
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,262 +0,0 @@
|
|||||||
From 27a2c75409c7abae68c4ad3af99d8e90927af803 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Filak <jfilak@redhat.com>
|
|
||||||
Date: Mon, 28 Apr 2014 13:57:05 +0200
|
|
||||||
Subject: [LIBREPORT PATCH 03/10] Worklflow: order workflows according to their
|
|
||||||
priority
|
|
||||||
|
|
||||||
Higher number -> higher priority -> more visible place in UI
|
|
||||||
|
|
||||||
Introduce 'priority' element in XML workflow definition:
|
|
||||||
- child of 'workflow' element
|
|
||||||
- the type is signed integer
|
|
||||||
- optional value, if not present, 0 is used
|
|
||||||
|
|
||||||
Related to #259
|
|
||||||
|
|
||||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
||||||
|
|
||||||
mmilata: fix DTD in manual page
|
|
||||||
---
|
|
||||||
doc/report-gtk.txt | 8 +++++++-
|
|
||||||
src/cli/cli-report.c | 32 ++++++++++++++++++--------------
|
|
||||||
src/gui-wizard-gtk/wizard.c | 10 ++++++----
|
|
||||||
src/include/workflow.h | 10 ++++++++++
|
|
||||||
src/lib/workflow.c | 21 +++++++++++++++++++++
|
|
||||||
src/lib/workflow_xml_parser.c | 20 +++++++++++++++++++-
|
|
||||||
6 files changed, 81 insertions(+), 20 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/report-gtk.txt b/doc/report-gtk.txt
|
|
||||||
index e7611de..f39c77c 100644
|
|
||||||
--- a/doc/report-gtk.txt
|
|
||||||
+++ b/doc/report-gtk.txt
|
|
||||||
@@ -64,11 +64,12 @@ These configuration files are placed in /usr/share/libreport/workflows.
|
|
||||||
Each file has XML formatting with the following DTD:
|
|
||||||
|
|
||||||
------------
|
|
||||||
-<!ELEMENT workflow (name+,description+,events*)>
|
|
||||||
+<!ELEMENT workflow (name+,description+,priority?,events*)>
|
|
||||||
<!ELEMENT name (#PCDATA)>
|
|
||||||
<!ATTLIST name xml:lang CDATA #IMPLIED>
|
|
||||||
<!ELEMENT description (#PCDATA)>
|
|
||||||
<!ATTLIST description xml:lang CDATA #IMPLIED>
|
|
||||||
+<!ELEMENT priority = (#PCDATA)>
|
|
||||||
<!ELEMENT events = (event)+>
|
|
||||||
<!ELEMENT event = (#PCDATA)>
|
|
||||||
------------
|
|
||||||
@@ -79,6 +80,10 @@ name::
|
|
||||||
description::
|
|
||||||
User visible description
|
|
||||||
|
|
||||||
+priority::
|
|
||||||
+ Priority of the workflow. Higher number means a more visible place in UI.
|
|
||||||
+ If not provided, 0 is used. The value is signed integer.
|
|
||||||
+
|
|
||||||
events::
|
|
||||||
List of executed events
|
|
||||||
|
|
||||||
@@ -98,6 +103,7 @@ Simple reporting work flow
|
|
||||||
<name xml:lang="cs">Příklad</name>
|
|
||||||
<description xml:lang="en">Example description</description>
|
|
||||||
<description xml:lang="cs">Příklad popisu</description>
|
|
||||||
+ <priority>10</priority>
|
|
||||||
<evetns>
|
|
||||||
<event>analyze_example</event>
|
|
||||||
<event>collect_example</event>
|
|
||||||
diff --git a/src/cli/cli-report.c b/src/cli/cli-report.c
|
|
||||||
index 68baa8b..9cc7613 100644
|
|
||||||
--- a/src/cli/cli-report.c
|
|
||||||
+++ b/src/cli/cli-report.c
|
|
||||||
@@ -824,32 +824,36 @@ int run_event_chain(const char *dump_dir_name, GList *chain, int interactive)
|
|
||||||
|
|
||||||
static workflow_t *select_workflow(GHashTable *workflows)
|
|
||||||
{
|
|
||||||
- GHashTableIter iter;
|
|
||||||
- gpointer key = NULL;
|
|
||||||
- workflow_t *value = NULL;
|
|
||||||
+ GList *wf_list = g_hash_table_get_values(workflows);
|
|
||||||
|
|
||||||
- g_hash_table_iter_init(&iter, workflows);
|
|
||||||
-
|
|
||||||
- if (!g_hash_table_iter_next(&iter, &key, (gpointer *)&value))
|
|
||||||
+ if (wf_list == NULL)
|
|
||||||
{
|
|
||||||
error_msg("No workflow suitable for this problem was found!");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (g_hash_table_size(workflows) == 1)
|
|
||||||
+ const guint wf_cnt = g_list_length(wf_list);
|
|
||||||
+ if (wf_cnt == 1)
|
|
||||||
{
|
|
||||||
- log_notice("autoselected workflow: '%s'", (char *)key);
|
|
||||||
- return value;
|
|
||||||
+ workflow_t *wf_selected = (workflow_t *)wf_list->data;
|
|
||||||
+ log_notice("autoselected workflow: '%s'", (char *)wf_get_name(wf_selected));
|
|
||||||
+ g_list_free(wf_list);
|
|
||||||
+ return wf_selected;
|
|
||||||
}
|
|
||||||
|
|
||||||
- workflow_t *help_wf_array[g_hash_table_size(workflows)];
|
|
||||||
+ wf_list = g_list_sort(wf_list, (GCompareFunc)wf_priority_compare);
|
|
||||||
+
|
|
||||||
+ workflow_t *help_wf_array[wf_cnt];
|
|
||||||
unsigned count = 0;
|
|
||||||
- do
|
|
||||||
+
|
|
||||||
+ for(GList *wf_iter = wf_list; wf_iter; wf_iter = g_list_next(wf_iter))
|
|
||||||
{
|
|
||||||
- help_wf_array[count] = value;
|
|
||||||
- printf("%d %s\n %s\n\n", ++count, wf_get_screen_name(value), wf_get_description(value));
|
|
||||||
+ workflow_t *wf = (workflow_t *)wf_iter->data;
|
|
||||||
+ help_wf_array[count] = wf;
|
|
||||||
+ printf("%d %s\n %s\n\n", ++count, wf_get_screen_name(wf), wf_get_description(wf));
|
|
||||||
}
|
|
||||||
- while (g_hash_table_iter_next(&iter, &key, (gpointer *)&value));
|
|
||||||
+
|
|
||||||
+ g_list_free(wf_list);
|
|
||||||
|
|
||||||
const unsigned picked = choose_number_from_range(1, count, _("Select a workflow to run: "));
|
|
||||||
return help_wf_array[picked - 1];
|
|
||||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
|
||||||
index 82bdf3e..e6f6ee7 100644
|
|
||||||
--- a/src/gui-wizard-gtk/wizard.c
|
|
||||||
+++ b/src/gui-wizard-gtk/wizard.c
|
|
||||||
@@ -2736,10 +2736,12 @@ static void add_workflow_buttons(GtkBox *box, GHashTable *workflows, GCallback f
|
|
||||||
list_possible_events_glist(g_dump_dir_name, "workflow"),
|
|
||||||
WORKFLOWS_DIR);
|
|
||||||
|
|
||||||
- GList *keys = g_hash_table_get_keys(workflow_table);
|
|
||||||
- while(keys)
|
|
||||||
+ GList *wf_list = g_hash_table_get_values(workflow_table);
|
|
||||||
+ wf_list = g_list_sort(wf_list, (GCompareFunc)wf_priority_compare);
|
|
||||||
+
|
|
||||||
+ for (GList *wf_iter = wf_list; wf_iter; wf_iter = g_list_next(wf_iter))
|
|
||||||
{
|
|
||||||
- workflow_t *w = g_hash_table_lookup(workflow_table, keys->data);
|
|
||||||
+ workflow_t *w = (workflow_t *)wf_iter->data;
|
|
||||||
char *btn_label = xasprintf("<b>%s</b>\n%s", wf_get_screen_name(w), wf_get_description(w));
|
|
||||||
GtkWidget *button = gtk_button_new_with_label(btn_label);
|
|
||||||
GList *children = gtk_container_get_children(GTK_CONTAINER(button));
|
|
||||||
@@ -2756,9 +2758,9 @@ static void add_workflow_buttons(GtkBox *box, GHashTable *workflows, GCallback f
|
|
||||||
free(btn_label);
|
|
||||||
g_signal_connect(button, "clicked", func, w);
|
|
||||||
gtk_box_pack_start(box, button, true, false, 2);
|
|
||||||
- keys = g_list_next(keys);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ g_list_free(wf_list);
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *setup_next_processed_event(GList **events_list)
|
|
||||||
diff --git a/src/include/workflow.h b/src/include/workflow.h
|
|
||||||
index 66bbdaf..d79708e 100644
|
|
||||||
--- a/src/include/workflow.h
|
|
||||||
+++ b/src/include/workflow.h
|
|
||||||
@@ -39,11 +39,21 @@ GList *wf_get_event_names(workflow_t *w);
|
|
||||||
const char *wf_get_screen_name(workflow_t *w);
|
|
||||||
const char *wf_get_description(workflow_t *w);
|
|
||||||
const char *wf_get_long_desc(workflow_t *w);
|
|
||||||
+int wf_get_priority(workflow_t *w);
|
|
||||||
|
|
||||||
void wf_set_screen_name(workflow_t *w, const char* screen_name);
|
|
||||||
void wf_set_description(workflow_t *w, const char* description);
|
|
||||||
void wf_set_long_desc(workflow_t *w, const char* long_desc);
|
|
||||||
void wf_add_event(workflow_t *w, event_config_t *ec);
|
|
||||||
+void wf_set_priority(workflow_t *w, int priority);
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Returns a negative integer if the first value comes before the second, 0 if
|
|
||||||
+ * they are equal, or a positive integer if the first value comes after the
|
|
||||||
+ * second.
|
|
||||||
+ */
|
|
||||||
+int wf_priority_compare(const workflow_t *first, const workflow_t *second);
|
|
||||||
+
|
|
||||||
GHashTable *load_workflow_config_data_from_list(GList *wf_names, const char *path);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
diff --git a/src/lib/workflow.c b/src/lib/workflow.c
|
|
||||||
index 52ad924..c6eedf4 100644
|
|
||||||
--- a/src/lib/workflow.c
|
|
||||||
+++ b/src/lib/workflow.c
|
|
||||||
@@ -24,6 +24,7 @@
|
|
||||||
struct workflow
|
|
||||||
{
|
|
||||||
config_item_info_t *info;
|
|
||||||
+ int priority; // direct correlation: higher number -> higher priority
|
|
||||||
|
|
||||||
GList *events; //list of event_option_t
|
|
||||||
};
|
|
||||||
@@ -193,6 +194,11 @@ const char *wf_get_long_desc(workflow_t *w)
|
|
||||||
return ci_get_long_desc(workflow_get_config_info(w));
|
|
||||||
}
|
|
||||||
|
|
||||||
+int wf_get_priority(workflow_t *w)
|
|
||||||
+{
|
|
||||||
+ return w->priority;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void wf_set_screen_name(workflow_t *w, const char* screen_name)
|
|
||||||
{
|
|
||||||
ci_set_screen_name(workflow_get_config_info(w), screen_name);
|
|
||||||
@@ -213,3 +219,18 @@ void wf_add_event(workflow_t *w, event_config_t *ec)
|
|
||||||
w->events = g_list_append(w->events, ec);
|
|
||||||
log_info("added to ev list: '%s'", ec_get_screen_name(ec));
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+void wf_set_priority(workflow_t *w, int priority)
|
|
||||||
+{
|
|
||||||
+ w->priority = priority;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * Returns a negative integer if the first value comes before the second, 0 if
|
|
||||||
+ * they are equal, or a positive integer if the first value comes after the
|
|
||||||
+ * second.
|
|
||||||
+ */
|
|
||||||
+int wf_priority_compare(const workflow_t *first, const workflow_t *second)
|
|
||||||
+{
|
|
||||||
+ return second->priority - first->priority;
|
|
||||||
+}
|
|
||||||
diff --git a/src/lib/workflow_xml_parser.c b/src/lib/workflow_xml_parser.c
|
|
||||||
index 0efc733..f216c18 100644
|
|
||||||
--- a/src/lib/workflow_xml_parser.c
|
|
||||||
+++ b/src/lib/workflow_xml_parser.c
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#define EVENT_ELEMENT "event"
|
|
||||||
#define DESCRIPTION_ELEMENT "description"
|
|
||||||
#define NAME_ELEMENT "name"
|
|
||||||
+#define PRIORITY_ELEMENT "priority"
|
|
||||||
|
|
||||||
static void start_element(GMarkupParseContext *context,
|
|
||||||
const gchar *element_name,
|
|
||||||
@@ -134,9 +135,26 @@ static void text(GMarkupParseContext *context,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-
|
|
||||||
}
|
|
||||||
|
|
||||||
+ else if(strcmp(inner_element, PRIORITY_ELEMENT) == 0)
|
|
||||||
+ {
|
|
||||||
+ log_debug("workflow priority:'%s'", text);
|
|
||||||
+
|
|
||||||
+ char *end = NULL;
|
|
||||||
+ long long val = strtoll(text, &end, 10);
|
|
||||||
+
|
|
||||||
+ if (text == end || end[0] != '\0'
|
|
||||||
+ || (errno == ERANGE && (val == LLONG_MAX || val == LLONG_MIN))
|
|
||||||
+ || (val > INT_MAX || val < INT_MIN)
|
|
||||||
+ || (errno != 0 && val == 0))
|
|
||||||
+ {
|
|
||||||
+ error_msg("Workflow's priority is not a number in range <%d,%d>", INT_MIN, INT_MAX);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ wf_set_priority(workflow, (int)val);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Called for strings that should be re-saved verbatim in this same
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,163 +0,0 @@
|
|||||||
From b3f6d615ce53310bd05622492357cc06c7e875c6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Filak <jfilak@redhat.com>
|
|
||||||
Date: Mon, 28 Apr 2014 14:00:14 +0200
|
|
||||||
Subject: [LIBREPORT PATCH 04/10] define priorities for the existing workflows
|
|
||||||
|
|
||||||
Related to #259
|
|
||||||
|
|
||||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
||||||
---
|
|
||||||
src/workflows/workflow_AnacondaFedora.xml.in | 1 +
|
|
||||||
src/workflows/workflow_AnacondaRHEL.xml.in | 1 +
|
|
||||||
src/workflows/workflow_AnacondaRHELBugzilla.xml.in | 1 +
|
|
||||||
src/workflows/workflow_RHELCCpp.xml.in | 1 +
|
|
||||||
src/workflows/workflow_RHELJava.xml.in | 1 +
|
|
||||||
src/workflows/workflow_RHELKerneloops.xml.in | 1 +
|
|
||||||
src/workflows/workflow_RHELLibreport.xml.in | 1 +
|
|
||||||
src/workflows/workflow_RHELPython.xml.in | 1 +
|
|
||||||
src/workflows/workflow_RHELvmcore.xml.in | 1 +
|
|
||||||
src/workflows/workflow_RHELxorg.xml.in | 1 +
|
|
||||||
src/workflows/workflow_Upload.xml.in | 3 ++-
|
|
||||||
11 files changed, 12 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/workflows/workflow_AnacondaFedora.xml.in b/src/workflows/workflow_AnacondaFedora.xml.in
|
|
||||||
index 6322d9a..5deab24 100644
|
|
||||||
--- a/src/workflows/workflow_AnacondaFedora.xml.in
|
|
||||||
+++ b/src/workflows/workflow_AnacondaFedora.xml.in
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Report a bug to Fedora maintainers</_name>
|
|
||||||
<_description>Process the report using the Fedora infrastructure</_description>
|
|
||||||
+ <priority>99</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>report_Bugzilla</event>
|
|
||||||
diff --git a/src/workflows/workflow_AnacondaRHEL.xml.in b/src/workflows/workflow_AnacondaRHEL.xml.in
|
|
||||||
index 4400546..ef4f658 100644
|
|
||||||
--- a/src/workflows/workflow_AnacondaRHEL.xml.in
|
|
||||||
+++ b/src/workflows/workflow_AnacondaRHEL.xml.in
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Report a bug to Red Hat Customer Portal</_name>
|
|
||||||
<_description>Process the report using the Red Hat infrastructure</_description>
|
|
||||||
+ <priority>99</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>report_RHTSupport</event>
|
|
||||||
diff --git a/src/workflows/workflow_AnacondaRHELBugzilla.xml.in b/src/workflows/workflow_AnacondaRHELBugzilla.xml.in
|
|
||||||
index fd7853f..e2f8b57 100644
|
|
||||||
--- a/src/workflows/workflow_AnacondaRHELBugzilla.xml.in
|
|
||||||
+++ b/src/workflows/workflow_AnacondaRHELBugzilla.xml.in
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Report a bug to Red Hat Bugzilla</_name>
|
|
||||||
<_description>Process the report using the Red Hat infrastructure</_description>
|
|
||||||
+ <priority>98</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>report_Bugzilla</event>
|
|
||||||
diff --git a/src/workflows/workflow_RHELCCpp.xml.in b/src/workflows/workflow_RHELCCpp.xml.in
|
|
||||||
index 4d0251a..a6df6eb 100644
|
|
||||||
--- a/src/workflows/workflow_RHELCCpp.xml.in
|
|
||||||
+++ b/src/workflows/workflow_RHELCCpp.xml.in
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Report to Red Hat Customer Portal</_name>
|
|
||||||
<_description>Process the C/C++ crash using the Red Hat infrastructure</_description>
|
|
||||||
+ <priority>99</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>collect_*</event>
|
|
||||||
diff --git a/src/workflows/workflow_RHELJava.xml.in b/src/workflows/workflow_RHELJava.xml.in
|
|
||||||
index 23ef0cb..2adc4b7 100644
|
|
||||||
--- a/src/workflows/workflow_RHELJava.xml.in
|
|
||||||
+++ b/src/workflows/workflow_RHELJava.xml.in
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Report to Red Hat Customer Portal</_name>
|
|
||||||
<_description>Process the Java exception using the Red Hat infrastructure</_description>
|
|
||||||
+ <priority>99</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>collect_*</event>
|
|
||||||
diff --git a/src/workflows/workflow_RHELKerneloops.xml.in b/src/workflows/workflow_RHELKerneloops.xml.in
|
|
||||||
index 941a898..d8d3b18 100644
|
|
||||||
--- a/src/workflows/workflow_RHELKerneloops.xml.in
|
|
||||||
+++ b/src/workflows/workflow_RHELKerneloops.xml.in
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Report to Red Hat Customer Portal</_name>
|
|
||||||
<_description>Process the kerneloops using the Red Hat infrastructure</_description>
|
|
||||||
+ <priority>99</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>collect_*</event>
|
|
||||||
diff --git a/src/workflows/workflow_RHELLibreport.xml.in b/src/workflows/workflow_RHELLibreport.xml.in
|
|
||||||
index b8b4f04..e76bf13 100644
|
|
||||||
--- a/src/workflows/workflow_RHELLibreport.xml.in
|
|
||||||
+++ b/src/workflows/workflow_RHELLibreport.xml.in
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Report to Red Hat Customer Portal</_name>
|
|
||||||
<_description>Process the problem using the Red Hat infrastructure</_description>
|
|
||||||
+ <priority>99</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>report_RHTSupport</event>
|
|
||||||
diff --git a/src/workflows/workflow_RHELPython.xml.in b/src/workflows/workflow_RHELPython.xml.in
|
|
||||||
index ee1c4e7..15a8978 100644
|
|
||||||
--- a/src/workflows/workflow_RHELPython.xml.in
|
|
||||||
+++ b/src/workflows/workflow_RHELPython.xml.in
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Report to Red Hat Customer Portal</_name>
|
|
||||||
<_description>Process the python exception using the Red Hat infrastructure</_description>
|
|
||||||
+ <priority>99</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>collect_*</event>
|
|
||||||
diff --git a/src/workflows/workflow_RHELvmcore.xml.in b/src/workflows/workflow_RHELvmcore.xml.in
|
|
||||||
index f2a775d..3984129 100644
|
|
||||||
--- a/src/workflows/workflow_RHELvmcore.xml.in
|
|
||||||
+++ b/src/workflows/workflow_RHELvmcore.xml.in
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Report to Red Hat Customer Portal</_name>
|
|
||||||
<_description>Process the kernel crash using the Red Hat infrastructure</_description>
|
|
||||||
+ <priority>99</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>collect_*</event>
|
|
||||||
diff --git a/src/workflows/workflow_RHELxorg.xml.in b/src/workflows/workflow_RHELxorg.xml.in
|
|
||||||
index 13697b9..55cd88d 100644
|
|
||||||
--- a/src/workflows/workflow_RHELxorg.xml.in
|
|
||||||
+++ b/src/workflows/workflow_RHELxorg.xml.in
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Report to Red Hat Customer Portal</_name>
|
|
||||||
<_description>Process the X Server problem using the Red Hat infrastructure</_description>
|
|
||||||
+ <priority>99</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>report_RHTSupport</event>
|
|
||||||
diff --git a/src/workflows/workflow_Upload.xml.in b/src/workflows/workflow_Upload.xml.in
|
|
||||||
index 3965f99..7f22cb8 100644
|
|
||||||
--- a/src/workflows/workflow_Upload.xml.in
|
|
||||||
+++ b/src/workflows/workflow_Upload.xml.in
|
|
||||||
@@ -2,10 +2,11 @@
|
|
||||||
<workflow>
|
|
||||||
<_name>Upload the problem data to a server</_name>
|
|
||||||
<_description>Analyze the problem locally and upload the data via scp or ftp</_description>
|
|
||||||
+ <priority>-99</priority>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>collect_*</event>
|
|
||||||
<event>analyze_CCpp</event>
|
|
||||||
<event>report_Uploader</event>
|
|
||||||
</events>
|
|
||||||
-</workflow>
|
|
||||||
\ No newline at end of file
|
|
||||||
+</workflow>
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
From 5f83c373c89a0e91a75a53184ce896426385293c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Filak <jfilak@redhat.com>
|
|
||||||
Date: Mon, 28 Apr 2014 14:30:51 +0200
|
|
||||||
Subject: [LIBREPORT PATCH 05/10] less confusing label for 'upload data' in
|
|
||||||
Anaconda
|
|
||||||
|
|
||||||
Because 'Upload the problem data' might evoke the automatic bug creation
|
|
||||||
in the Bugzilla.
|
|
||||||
|
|
||||||
We know that users (an me as well) read fast and do not read the entire
|
|
||||||
sentences. Hence the first words of a button's label must express the
|
|
||||||
purpose of that button.
|
|
||||||
|
|
||||||
Related to #259
|
|
||||||
|
|
||||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
||||||
---
|
|
||||||
src/workflows/workflow_AnacondaUpload.xml.in | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/workflows/workflow_AnacondaUpload.xml.in b/src/workflows/workflow_AnacondaUpload.xml.in
|
|
||||||
index a98a536..541c898 100644
|
|
||||||
--- a/src/workflows/workflow_AnacondaUpload.xml.in
|
|
||||||
+++ b/src/workflows/workflow_AnacondaUpload.xml.in
|
|
||||||
@@ -1,9 +1,9 @@
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<workflow>
|
|
||||||
- <_name>Upload the problem data to a server</_name>
|
|
||||||
- <_description>Analyze the problem locally and upload the data via scp or ftp</_description>
|
|
||||||
+ <_name>Export the problem data for manual reporting</_name>
|
|
||||||
+ <_description>Upload the data via scp or ftp to a remote destination</_description>
|
|
||||||
|
|
||||||
<events>
|
|
||||||
<event>report_Uploader</event>
|
|
||||||
</events>
|
|
||||||
-</workflow>
|
|
||||||
\ No newline at end of file
|
|
||||||
+</workflow>
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,89 +0,0 @@
|
|||||||
From c02413504497dc1477fade9495ea26281d463b52 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Filak <jfilak@redhat.com>
|
|
||||||
Date: Mon, 28 Apr 2014 14:42:42 +0200
|
|
||||||
Subject: [LIBREPORT PATCH 06/10] Bugzilla: move the advanced options to the
|
|
||||||
advanced section
|
|
||||||
|
|
||||||
Keep only login and password fields in the configuration dialogue.
|
|
||||||
|
|
||||||
URL is not changed often enough to be the first field in the
|
|
||||||
configuration dialogue. Normal users do not changed neither URL option
|
|
||||||
nor SSL Verify option.
|
|
||||||
|
|
||||||
Private ticket option should also not been checked by default. The
|
|
||||||
reporting user might request to restrict access to a bug report during
|
|
||||||
the reporting process.
|
|
||||||
|
|
||||||
Related to #259
|
|
||||||
|
|
||||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
||||||
---
|
|
||||||
src/plugins/report_Bugzilla.xml.in | 34 +++++++++++++++++-----------------
|
|
||||||
1 file changed, 17 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/plugins/report_Bugzilla.xml.in b/src/plugins/report_Bugzilla.xml.in
|
|
||||||
index 79f2bcd..7fc596e 100644
|
|
||||||
--- a/src/plugins/report_Bugzilla.xml.in
|
|
||||||
+++ b/src/plugins/report_Bugzilla.xml.in
|
|
||||||
@@ -12,34 +12,29 @@
|
|
||||||
<gui-review-elements>yes</gui-review-elements>
|
|
||||||
|
|
||||||
<options>
|
|
||||||
- <option type="text" name="Bugzilla_BugzillaURL">
|
|
||||||
- <_label>Bugzilla URL</_label>
|
|
||||||
- <allow-empty>no</allow-empty>
|
|
||||||
- <_description>Address of Bugzilla server</_description>
|
|
||||||
- <default-value>https://bugzilla.redhat.com</default-value>
|
|
||||||
- <_note-html>You can create bugzilla.redhat.com account <a href="https://bugzilla.redhat.com/createaccount.cgi">here</a></_note-html>
|
|
||||||
- </option>
|
|
||||||
<option type="text" name="Bugzilla_Login">
|
|
||||||
<_label>User name</_label>
|
|
||||||
<allow-empty>no</allow-empty>
|
|
||||||
<_description>Bugzilla account user name</_description>
|
|
||||||
+ <_note-html>You can create bugzilla.redhat.com account <a href="https://bugzilla.redhat.com/createaccount.cgi">here</a></_note-html>
|
|
||||||
</option>
|
|
||||||
<option type="password" name="Bugzilla_Password">
|
|
||||||
<_label>Password</_label>
|
|
||||||
<allow-empty>no</allow-empty>
|
|
||||||
<_description>Bugzilla account password</_description>
|
|
||||||
</option>
|
|
||||||
- <option type="bool" name="Bugzilla_SSLVerify">
|
|
||||||
- <_label>Verify SSL</_label>
|
|
||||||
- <_description>Check SSL key validity</_description>
|
|
||||||
- <default-value>yes</default-value>
|
|
||||||
- </option>
|
|
||||||
- <option type="bool" name="Bugzilla_CreatePrivate">
|
|
||||||
- <_label>Restrict access</_label>
|
|
||||||
- <_description>Restrict access to the created bugzilla ticket allowing only users from specified groups to view it (see advanced settings for more details)</_description>
|
|
||||||
- <default-value>no</default-value>
|
|
||||||
- </option>
|
|
||||||
<advanced-options>
|
|
||||||
+ <option type="text" name="Bugzilla_BugzillaURL">
|
|
||||||
+ <_label>Bugzilla URL</_label>
|
|
||||||
+ <allow-empty>no</allow-empty>
|
|
||||||
+ <_description>Address of Bugzilla server</_description>
|
|
||||||
+ <default-value>https://bugzilla.redhat.com</default-value>
|
|
||||||
+ </option>
|
|
||||||
+ <option type="bool" name="Bugzilla_SSLVerify">
|
|
||||||
+ <_label>Verify SSL</_label>
|
|
||||||
+ <_description>Check SSL key validity</_description>
|
|
||||||
+ <default-value>yes</default-value>
|
|
||||||
+ </option>
|
|
||||||
<option type="text" name="Bugzilla_Product">
|
|
||||||
<_label>Bugzilla product</_label>
|
|
||||||
<allow-empty>yes</allow-empty>
|
|
||||||
@@ -60,6 +55,11 @@
|
|
||||||
<allow-empty>yes</allow-empty>
|
|
||||||
<_note-html>Sets the proxy server to use for HTTPS</_note-html>
|
|
||||||
</option>
|
|
||||||
+ <option type="bool" name="Bugzilla_CreatePrivate">
|
|
||||||
+ <_label>Restrict access</_label>
|
|
||||||
+ <_description>Restrict access to the created bugzilla ticket allowing only users from specified groups to view it (see advanced settings for more details)</_description>
|
|
||||||
+ <default-value>no</default-value>
|
|
||||||
+ </option>
|
|
||||||
<option type="text" name="Bugzilla_PrivateGroups">
|
|
||||||
<_label>Groups</_label>
|
|
||||||
<allow-empty>yes</allow-empty>
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From 2bca7670971b25bf83605b89469e9b8195e73860 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Filak <jfilak@redhat.com>
|
|
||||||
Date: Mon, 28 Apr 2014 15:49:26 +0200
|
|
||||||
Subject: [LIBREPORT PATCH 07/10] hide "Don't store password" checkbox
|
|
||||||
|
|
||||||
Show the checkbox only if the options can be stored. For example, it does
|
|
||||||
not make sense to show this checkbox when in Anaconda.
|
|
||||||
|
|
||||||
Related to #259
|
|
||||||
|
|
||||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
||||||
---
|
|
||||||
src/gtk-helpers/event_config_dialog.c | 5 ++++-
|
|
||||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/gtk-helpers/event_config_dialog.c b/src/gtk-helpers/event_config_dialog.c
|
|
||||||
index 1ed5196..ff3e38b 100644
|
|
||||||
--- a/src/gtk-helpers/event_config_dialog.c
|
|
||||||
+++ b/src/gtk-helpers/event_config_dialog.c
|
|
||||||
@@ -237,7 +237,10 @@ config_dialog_t *create_event_config_dialog_content(event_config_t *event, GtkWi
|
|
||||||
g_list_foreach(event->options, &add_option_to_table, option_table);
|
|
||||||
|
|
||||||
/* if there is at least one password option, add checkbox to disable storing passwords */
|
|
||||||
- if (has_password_option)
|
|
||||||
+ /* if the user storage is not available nothing is to be stored, so it is not necessary
|
|
||||||
+ * to bother with an extra checkbox about storing passwords */
|
|
||||||
+ if (is_event_config_user_storage_available()
|
|
||||||
+ && has_password_option)
|
|
||||||
{
|
|
||||||
unsigned last_row = add_one_row_to_grid(GTK_GRID(option_table));
|
|
||||||
GtkWidget *pass_store_cb = gtk_check_button_new_with_label(_("Don't store passwords"));
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,158 +0,0 @@
|
|||||||
From c134783d5c9fc8ba6691408ce9b3015ab368ad16 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Filak <jfilak@redhat.com>
|
|
||||||
Date: Tue, 29 Apr 2014 09:49:23 +0200
|
|
||||||
Subject: [LIBREPORT PATCH 08/10] refactoring: unify event configuration
|
|
||||||
dialogs
|
|
||||||
|
|
||||||
Related to #259
|
|
||||||
|
|
||||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
||||||
---
|
|
||||||
src/gtk-helpers/config_dialog.c | 40 ++++++++++++++-----------
|
|
||||||
src/gtk-helpers/event_config_dialog.c | 51 +++-----------------------------
|
|
||||||
src/gtk-helpers/internal_libreport_gtk.h | 1 +
|
|
||||||
3 files changed, 28 insertions(+), 64 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/gtk-helpers/config_dialog.c b/src/gtk-helpers/config_dialog.c
|
|
||||||
index 6cc4be9..6de08e3 100644
|
|
||||||
--- a/src/gtk-helpers/config_dialog.c
|
|
||||||
+++ b/src/gtk-helpers/config_dialog.c
|
|
||||||
@@ -83,6 +83,28 @@ gpointer cdialog_get_data(config_dialog_t *cdialog)
|
|
||||||
return cdialog->data;
|
|
||||||
}
|
|
||||||
|
|
||||||
+int cdialog_run(config_dialog_t *cdialog, const char *name)
|
|
||||||
+{
|
|
||||||
+ if (cdialog == NULL || cdialog->dialog == NULL)
|
|
||||||
+ {
|
|
||||||
+ log("There is no configurable option for: '%s'", name);
|
|
||||||
+ return GTK_RESPONSE_REJECT;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ const int result = gtk_dialog_run(GTK_DIALOG(cdialog->dialog));
|
|
||||||
+ if (result == GTK_RESPONSE_APPLY)
|
|
||||||
+ {
|
|
||||||
+ if (cdialog->save_data)
|
|
||||||
+ cdialog->save_data(cdialog->data, name);
|
|
||||||
+ }
|
|
||||||
+ else if (result == GTK_RESPONSE_CANCEL)
|
|
||||||
+ log_notice("Cancelling on user request");
|
|
||||||
+
|
|
||||||
+ gtk_widget_hide(GTK_WIDGET(cdialog->dialog));
|
|
||||||
+
|
|
||||||
+ return result;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static const void *get_column_value_from_row(GtkTreeView *treeview, int column, int type)
|
|
||||||
{
|
|
||||||
GtkTreeSelection *selection = gtk_tree_view_get_selection(treeview);
|
|
||||||
@@ -246,23 +268,7 @@ static void on_configure_cb(GtkWidget *btn, gpointer user_data)
|
|
||||||
config_dialog_t *cdialog = (config_dialog_t *)get_column_value_from_row(tv, CONFIG_DIALOG, TYPE_POINTER);
|
|
||||||
const char *name = (const char *)get_column_value_from_row(tv, COLUMN_NAME, TYPE_STR);
|
|
||||||
|
|
||||||
-
|
|
||||||
- if (cdialog == NULL || cdialog->dialog == NULL)
|
|
||||||
- {
|
|
||||||
- log("There is no configurable option for: '%s'", name);
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- int result = gtk_dialog_run(GTK_DIALOG(cdialog->dialog));
|
|
||||||
- if (result == GTK_RESPONSE_APPLY)
|
|
||||||
- {
|
|
||||||
- if (cdialog->save_data)
|
|
||||||
- cdialog->save_data(cdialog->data, name);
|
|
||||||
- }
|
|
||||||
- else if (result == GTK_RESPONSE_CANCEL)
|
|
||||||
- log_notice("Cancelling on user request");
|
|
||||||
-
|
|
||||||
- gtk_widget_hide(GTK_WIDGET(cdialog->dialog));
|
|
||||||
+ cdialog_run(cdialog, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void on_close_cb(GtkWidget *btn, gpointer config_list_w)
|
|
||||||
diff --git a/src/gtk-helpers/event_config_dialog.c b/src/gtk-helpers/event_config_dialog.c
|
|
||||||
index ff3e38b..655abb6 100644
|
|
||||||
--- a/src/gtk-helpers/event_config_dialog.c
|
|
||||||
+++ b/src/gtk-helpers/event_config_dialog.c
|
|
||||||
@@ -319,7 +319,7 @@ config_dialog_t *create_event_config_dialog(const char *event_name, GtkWindow *p
|
|
||||||
if (parent_window != NULL)
|
|
||||||
{
|
|
||||||
gtk_window_set_icon_name(GTK_WINDOW(dialog),
|
|
||||||
- gtk_window_get_icon_name(parent_window));
|
|
||||||
+ gtk_window_get_icon_name(parent_window));
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkWidget *content = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
|
|
||||||
@@ -349,53 +349,10 @@ int show_event_config_dialog(const char *event_name, GtkWindow *parent)
|
|
||||||
{
|
|
||||||
INITIALIZE_LIBREPORT();
|
|
||||||
|
|
||||||
- event_config_t *event = get_event_config(event_name);
|
|
||||||
-
|
|
||||||
- GtkWindow *parent_window = parent ? parent : g_event_list_window;
|
|
||||||
-
|
|
||||||
- GtkWidget *dialog = gtk_dialog_new_with_buttons(
|
|
||||||
- /*title:*/ec_get_screen_name(event) ? ec_get_screen_name(event) : event_name,
|
|
||||||
- parent_window,
|
|
||||||
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
||||||
- _("_Cancel"),
|
|
||||||
- GTK_RESPONSE_CANCEL,
|
|
||||||
- _("_OK"),
|
|
||||||
- GTK_RESPONSE_APPLY,
|
|
||||||
- NULL);
|
|
||||||
-
|
|
||||||
- /* Allow resize?
|
|
||||||
- * W/o resize, e.g. upload configuration hint looks awfully
|
|
||||||
- * line wrapped.
|
|
||||||
- * With resize, there are some somewhat not nice effects:
|
|
||||||
- * for one, opening an expander will enlarge window,
|
|
||||||
- * but won't contract it back when expander is closed.
|
|
||||||
- */
|
|
||||||
- gtk_window_set_resizable(GTK_WINDOW(dialog), true);
|
|
||||||
- gtk_window_set_default_size(GTK_WINDOW(dialog), 450, -1);
|
|
||||||
+ config_dialog_t *dialog = create_event_config_dialog(event_name, parent);
|
|
||||||
+ const int result = cdialog_run(dialog, event_name);
|
|
||||||
+ free(dialog);
|
|
||||||
|
|
||||||
- if (parent_window != NULL)
|
|
||||||
- {
|
|
||||||
- gtk_window_set_icon_name(GTK_WINDOW(dialog),
|
|
||||||
- gtk_window_get_icon_name(parent_window));
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- GtkWidget *content = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
|
|
||||||
- content = cdialog_get_widget(create_event_config_dialog_content(event, content));
|
|
||||||
-
|
|
||||||
- gtk_widget_show_all(content);
|
|
||||||
-
|
|
||||||
- int result = gtk_dialog_run(GTK_DIALOG(dialog));
|
|
||||||
- if (result == GTK_RESPONSE_APPLY)
|
|
||||||
- {
|
|
||||||
- dehydrate_config_dialog(g_option_list);
|
|
||||||
- const char *const store_passwords_s = get_user_setting("store_passwords");
|
|
||||||
- save_event_config_data_to_user_storage(event_name,
|
|
||||||
- get_event_config(event_name),
|
|
||||||
- !(store_passwords_s && !strcmp(store_passwords_s, "no")));
|
|
||||||
- }
|
|
||||||
- //else if (result == GTK_RESPONSE_CANCEL)
|
|
||||||
- // log("log");
|
|
||||||
- gtk_widget_destroy(dialog);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/gtk-helpers/internal_libreport_gtk.h b/src/gtk-helpers/internal_libreport_gtk.h
|
|
||||||
index dc1ef31..f8f1c13 100644
|
|
||||||
--- a/src/gtk-helpers/internal_libreport_gtk.h
|
|
||||||
+++ b/src/gtk-helpers/internal_libreport_gtk.h
|
|
||||||
@@ -80,6 +80,7 @@ void load_workflow_config_data_from_user_storage(GHashTable *workflows);
|
|
||||||
void cdialog_set_widget(config_dialog_t *cdialog, GtkWidget *widget);
|
|
||||||
GtkWidget *cdialog_get_widget(config_dialog_t *cdialog);
|
|
||||||
gpointer cdialog_get_data(config_dialog_t *cdialog);
|
|
||||||
+int cdialog_run(config_dialog_t *cdialog, const char *name);
|
|
||||||
|
|
||||||
void dehydrate_config_dialog(GList *option_widgets);
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,178 +0,0 @@
|
|||||||
From 3767a3665339aaf6da005f4ac8ba7e1091f5fd7f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Filak <jfilak@redhat.com>
|
|
||||||
Date: Tue, 29 Apr 2014 12:43:27 +0200
|
|
||||||
Subject: [LIBREPORT PATCH 09/10] GUI: remove the intermediate configuration
|
|
||||||
dialog
|
|
||||||
|
|
||||||
Get rid of the dialog stating that something is not configured properly
|
|
||||||
and show the configuration dialog instead.
|
|
||||||
|
|
||||||
Related to #259
|
|
||||||
|
|
||||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
||||||
---
|
|
||||||
src/gtk-helpers/event_config_dialog.c | 7 +++-
|
|
||||||
src/gtk-helpers/workflow_config_dialog.c | 7 +++-
|
|
||||||
src/gui-wizard-gtk/wizard.c | 72 +++-----------------------------
|
|
||||||
3 files changed, 17 insertions(+), 69 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/gtk-helpers/event_config_dialog.c b/src/gtk-helpers/event_config_dialog.c
|
|
||||||
index 655abb6..0c65f80 100644
|
|
||||||
--- a/src/gtk-helpers/event_config_dialog.c
|
|
||||||
+++ b/src/gtk-helpers/event_config_dialog.c
|
|
||||||
@@ -299,8 +299,11 @@ config_dialog_t *create_event_config_dialog(const char *event_name, GtkWindow *p
|
|
||||||
|
|
||||||
GtkWindow *parent_window = parent ? parent : g_event_list_window;
|
|
||||||
|
|
||||||
+ char *window_title = xasprintf("%s - Reporting Configuration",
|
|
||||||
+ ec_get_screen_name(event) ? ec_get_screen_name(event) : event_name);
|
|
||||||
+
|
|
||||||
GtkWidget *dialog = gtk_dialog_new_with_buttons(
|
|
||||||
- /*title:*/ec_get_screen_name(event) ? ec_get_screen_name(event) : event_name,
|
|
||||||
+ window_title,
|
|
||||||
parent_window,
|
|
||||||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
||||||
_("_Cancel"),
|
|
||||||
@@ -309,6 +312,8 @@ config_dialog_t *create_event_config_dialog(const char *event_name, GtkWindow *p
|
|
||||||
GTK_RESPONSE_APPLY,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
+ free(window_title);
|
|
||||||
+
|
|
||||||
/* Allow resize?
|
|
||||||
* W/o resize, e.g. upload configuration hint looks awfully
|
|
||||||
* line wrapped.
|
|
||||||
diff --git a/src/gtk-helpers/workflow_config_dialog.c b/src/gtk-helpers/workflow_config_dialog.c
|
|
||||||
index 7c399e4..e6e48c9 100644
|
|
||||||
--- a/src/gtk-helpers/workflow_config_dialog.c
|
|
||||||
+++ b/src/gtk-helpers/workflow_config_dialog.c
|
|
||||||
@@ -71,8 +71,11 @@ config_dialog_t *create_workflow_config_dialog(const char *workflow_name, GtkWin
|
|
||||||
|
|
||||||
GtkWindow *parent_window = parent ? parent : g_parent_window;
|
|
||||||
|
|
||||||
+ char *window_title = xasprintf("%s - Reporting Configuration",
|
|
||||||
+ wf_get_screen_name(workflow) ? wf_get_screen_name(workflow) : workflow_name);
|
|
||||||
+
|
|
||||||
GtkWidget *dialog = gtk_dialog_new_with_buttons(
|
|
||||||
- /*title:*/ wf_get_screen_name(workflow) ? wf_get_screen_name(workflow) : workflow_name,
|
|
||||||
+ window_title,
|
|
||||||
parent_window,
|
|
||||||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
||||||
_("_Cancel"),
|
|
||||||
@@ -81,6 +84,8 @@ config_dialog_t *create_workflow_config_dialog(const char *workflow_name, GtkWin
|
|
||||||
GTK_RESPONSE_APPLY,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
+ free(window_title);
|
|
||||||
+
|
|
||||||
gtk_window_set_resizable(GTK_WINDOW(dialog), true);
|
|
||||||
gtk_window_set_default_size(GTK_WINDOW(dialog), 450, 450);
|
|
||||||
|
|
||||||
diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
|
|
||||||
index e6f6ee7..8895d0e 100644
|
|
||||||
--- a/src/gui-wizard-gtk/wizard.c
|
|
||||||
+++ b/src/gui-wizard-gtk/wizard.c
|
|
||||||
@@ -289,59 +289,6 @@ static void remove_child_widget(GtkWidget *widget, gpointer unused)
|
|
||||||
gtk_widget_destroy(widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void on_configure_event_cb(GtkWidget *button, gpointer user_data)
|
|
||||||
-{
|
|
||||||
- char *event_name = (char *)user_data;
|
|
||||||
- if (event_name != NULL)
|
|
||||||
- {
|
|
||||||
- int result = show_event_config_dialog(event_name, GTK_WINDOW(g_top_most_window));
|
|
||||||
- if (result == GTK_RESPONSE_APPLY)
|
|
||||||
- {
|
|
||||||
- GHashTable *errors = validate_event(event_name);
|
|
||||||
- if (errors == NULL)
|
|
||||||
- {
|
|
||||||
- gtk_widget_destroy(g_top_most_window);
|
|
||||||
- g_top_most_window = NULL;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-static void show_event_opt_error_dialog(const char *event_name)
|
|
||||||
-{
|
|
||||||
- event_config_t *ec = get_event_config(event_name);
|
|
||||||
- char *message = xasprintf(_("%s is not properly configured. You can configure it now or provide the required information later.\n\n"
|
|
||||||
- "Read more about the configuration at: https://fedorahosted.org/abrt/wiki/AbrtConfiguration"),
|
|
||||||
- ec_get_screen_name(ec));
|
|
||||||
- char *markup_message = xasprintf(_("<b>%s</b> is not properly configured. You can configure it now or provide the required information later.\n\n"
|
|
||||||
- "<a href=\"https://fedorahosted.org/abrt/wiki/AbrtConfiguration\">Read more about the configuration</a>"),
|
|
||||||
- ec_get_screen_name(ec));
|
|
||||||
- GtkWidget *wrong_settings = g_top_most_window = gtk_message_dialog_new(GTK_WINDOW(g_wnd_assistant),
|
|
||||||
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
||||||
- GTK_MESSAGE_WARNING,
|
|
||||||
- GTK_BUTTONS_CLOSE,
|
|
||||||
- message);
|
|
||||||
-
|
|
||||||
- gtk_window_set_transient_for(GTK_WINDOW(wrong_settings), GTK_WINDOW(g_wnd_assistant));
|
|
||||||
- gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(wrong_settings),
|
|
||||||
- markup_message);
|
|
||||||
- free(message);
|
|
||||||
- free(markup_message);
|
|
||||||
-
|
|
||||||
- GtkWidget *act_area = gtk_dialog_get_content_area(GTK_DIALOG(wrong_settings));
|
|
||||||
- char * conf_btn_lbl = xasprintf(_("Con_figure %s"), ec_get_screen_name(ec));
|
|
||||||
- GtkWidget *configure_event_btn = gtk_button_new_with_mnemonic(conf_btn_lbl);
|
|
||||||
- g_signal_connect(configure_event_btn, "clicked", G_CALLBACK(on_configure_event_cb), (gpointer)event_name);
|
|
||||||
- free(conf_btn_lbl);
|
|
||||||
-
|
|
||||||
- gtk_box_pack_start(GTK_BOX(act_area), configure_event_btn, false, false, 0);
|
|
||||||
- gtk_widget_show(configure_event_btn);
|
|
||||||
-
|
|
||||||
-
|
|
||||||
- gtk_dialog_run(GTK_DIALOG(wrong_settings));
|
|
||||||
- if (g_top_most_window)
|
|
||||||
- gtk_widget_destroy(wrong_settings);
|
|
||||||
-}
|
|
||||||
|
|
||||||
static void update_window_title(void)
|
|
||||||
{
|
|
||||||
@@ -906,16 +853,14 @@ static gint find_by_button(gconstpointer a, gconstpointer button)
|
|
||||||
return (evdata->toggle_button != button);
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int check_event_config(const char *event_name)
|
|
||||||
+static void check_event_config(const char *event_name)
|
|
||||||
{
|
|
||||||
GHashTable *errors = validate_event(event_name);
|
|
||||||
if (errors != NULL)
|
|
||||||
{
|
|
||||||
g_hash_table_unref(errors);
|
|
||||||
- show_event_opt_error_dialog(event_name);
|
|
||||||
- return 1;
|
|
||||||
+ show_event_config_dialog(event_name, GTK_WINDOW(g_top_most_window));
|
|
||||||
}
|
|
||||||
- return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void event_rb_was_toggled(GtkButton *button, gpointer user_data)
|
|
||||||
@@ -2850,18 +2795,11 @@ static gint select_next_page_no(gint current_page_no, gpointer data)
|
|
||||||
goto again;
|
|
||||||
}
|
|
||||||
|
|
||||||
- /* must set g_event_selected otherwise if the event was not
|
|
||||||
- * configured the reporting process will be terminated even if a
|
|
||||||
- * user configured the event on report-gtk's demand from
|
|
||||||
- * check_event_config() function
|
|
||||||
- */
|
|
||||||
g_event_selected = event;
|
|
||||||
|
|
||||||
- if (check_event_config(g_event_selected) != 0)
|
|
||||||
- {
|
|
||||||
- /* don't know what is the difference between this <<< */
|
|
||||||
- goto again;
|
|
||||||
- }
|
|
||||||
+ /* Notify a user that some configuration options miss values, but */
|
|
||||||
+ /* don't force him to provide them. */
|
|
||||||
+ check_event_config(g_event_selected);
|
|
||||||
|
|
||||||
/* >>> and this but this is clearer
|
|
||||||
* because it does exactly the same thing
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 369b1791e3fff5ea16cdf1fe9ba5c374af7faa43 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jakub Filak <jfilak@redhat.com>
|
|
||||||
Date: Tue, 29 Apr 2014 13:24:29 +0200
|
|
||||||
Subject: [LIBREPORT PATCH 10/10] reporter-upload: more descriptive message
|
|
||||||
about missing URL
|
|
||||||
|
|
||||||
Only one line is possible. Hopefully, this message is better than the
|
|
||||||
previous one.
|
|
||||||
|
|
||||||
Related to #259
|
|
||||||
|
|
||||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
||||||
---
|
|
||||||
src/plugins/reporter-upload.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/plugins/reporter-upload.c b/src/plugins/reporter-upload.c
|
|
||||||
index b903aa1..1ef38e7 100644
|
|
||||||
--- a/src/plugins/reporter-upload.c
|
|
||||||
+++ b/src/plugins/reporter-upload.c
|
|
||||||
@@ -58,7 +58,7 @@ static int create_and_upload_archive(
|
|
||||||
const char* opt = getenv("Upload_URL");
|
|
||||||
if (!opt)
|
|
||||||
opt = get_map_string_item_or_empty(settings, "URL");
|
|
||||||
- char *url = opt[0] != '\0' ? xstrdup(opt) : ask_url(_("Upload URL is not provided by configuration. Please enter upload URL:"));
|
|
||||||
+ char *url = opt[0] != '\0' ? xstrdup(opt) : ask_url(_("Please enter a URL (scp, ftp, etc.) where the problem data is to be exported:"));
|
|
||||||
|
|
||||||
/* Create a child gzip which will compress the data */
|
|
||||||
/* SELinux guys are not happy with /tmp, using /var/run/abrt */
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -6,25 +6,14 @@
|
|||||||
|
|
||||||
Summary: Generic library for reporting various problems
|
Summary: Generic library for reporting various problems
|
||||||
Name: libreport
|
Name: libreport
|
||||||
Version: 2.2.2
|
Version: 2.2.3
|
||||||
Release: 5%{?dist}
|
Release: 1%{?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
|
||||||
|
|
||||||
Patch01: 0001-Bugzilla-pass-Bugzilla_token-in-all-relevant-XML-RPC.patch
|
|
||||||
Patch02: 0002-Bugzilla-session-parameters-for-XML-RPC-calls.patch
|
|
||||||
Patch03: 0003-Worklflow-order-workflows-according-to-their-priorit.patch
|
|
||||||
Patch04: 0004-define-priorities-for-the-existing-workflows.patch
|
|
||||||
Patch05: 0005-less-confusing-label-for-upload-data-in-Anaconda.patch
|
|
||||||
Patch06: 0006-Bugzilla-move-the-advanced-options-to-the-advanced-s.patch
|
|
||||||
Patch07: 0007-hide-Don-t-store-password-checkbox.patch
|
|
||||||
Patch08: 0008-refactoring-unify-event-configuration-dialogs.patch
|
|
||||||
Patch09: 0009-GUI-remove-the-intermediate-configuration-dialog.patch
|
|
||||||
Patch10: 0010-reporter-upload-more-descriptive-message-about-missi.patch
|
|
||||||
|
|
||||||
# git is need for '%%autosetup -S git' which automatically applies all the
|
# git is need for '%%autosetup -S git' which automatically applies all the
|
||||||
# patches above. Please, be aware that the patches must be generated
|
# patches above. Please, be aware that the patches must be generated
|
||||||
# by 'git format-patch'
|
# by 'git format-patch'
|
||||||
@ -662,6 +651,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 08 2014 Jakub Filak <jfilak@redhat.com> 2.2.3-1
|
||||||
|
- wizard: Do not highlight sensitive words in user's comment
|
||||||
|
- bugzilla: show description for all configuration options
|
||||||
|
- wizard: use a tab for Advanced opts instead of an expander
|
||||||
|
- mailx: improve notification e-mail format
|
||||||
|
- configure: Support cross compiling with python3
|
||||||
|
- ignored words: add well known SELinux messages
|
||||||
|
- Resolves: #974746, #1111729, #1111734
|
||||||
|
|
||||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-5
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.2-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user