Several bug fixes and journald logging improvements

This commit is contained in:
Jakub Filak 2014-11-06 13:06:24 +01:00
parent ad32d8fee4
commit 93fc69645c
27 changed files with 2358 additions and 11 deletions

View File

@ -1,8 +1,7 @@
From c7eaedb85aa65b53e2a874592007b1242abbcfa6 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 8 Oct 2014 12:26:29 +0200
Subject: [PATCH 2/7] upload: don't ask for password if the env var is empty
string
Subject: [PATCH] upload: don't ask for password if the env var is empty string
Related to rhbz#1066486

View File

@ -1,7 +1,7 @@
From 28d979c3824d0e90e14ba7f7be679e66fb53c851 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 8 Oct 2014 12:37:24 +0200
Subject: [PATCH 3/7] lib: fix a bug in ureport response parser
Subject: [PATCH] lib: fix a bug in ureport response parser
Revealed by coverity

View File

@ -1,7 +1,7 @@
From f2a0d8fc954afef291c0989c756bbe455c1ccc92 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Fri, 26 Sep 2014 18:40:46 +0200
Subject: [PATCH 4/7] rhtsupport: re-prompt for credentials
Subject: [PATCH] rhtsupport: re-prompt for credentials
Related to rhbz#1104313

View File

@ -1,7 +1,7 @@
From e71aebba83efe673bfb554a9fbf1533b7a96bde8 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 8 Oct 2014 12:10:10 +0200
Subject: [PATCH 5/7] rhtsupport: attach the contact email to bthash
Subject: [PATCH] rhtsupport: attach the contact email to bthash
Related to rhbz#1150388

View File

@ -1,7 +1,7 @@
From 8f350e29a97311e620aa915e4fb977cae615dfb9 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 9 Oct 2014 13:16:00 +0200
Subject: [PATCH 6/7] ureport: document rhsm-entitlement in the man page
Subject: [PATCH] ureport: document rhsm-entitlement in the man page
Related: #1140224

View File

@ -1,7 +1,7 @@
From 0f59cec364a05aa8b1137739ecb4076f16a0406a Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 9 Oct 2014 14:02:11 +0200
Subject: [PATCH 7/7] rhtsupport: send ureport before creating description
Subject: [PATCH] rhtsupport: send ureport before creating description
Because we want to include the URL to uReport stored in 'reported_to'
file in the description.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
From 7dc7f62c8ca4189255417dbf88083df7d4461c50 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Wed, 22 Oct 2014 00:17:28 +0200
Subject: [PATCH] testsuite: changed atlocal.in to work with last commit
Added special library libreport-web.la and CFLAGS DEFAULT_DUMP_DIR_MODE.
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
tests/atlocal.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 5150b21..1a82edb 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -6,10 +6,10 @@ CC='@CC@'
LIBTOOL="$abs_top_builddir/libtool"
# We want no optimization.
-CFLAGS="@O0CFLAGS@ -I$abs_top_builddir/src/include -I$abs_top_builddir/src/lib -I$abs_top_builddir/src/gtk-helpers -D_GNU_SOURCE @GLIB_CFLAGS@ @GTK_CFLAGS@"
+CFLAGS="@O0CFLAGS@ -I$abs_top_builddir/src/include -I$abs_top_builddir/src/lib -I$abs_top_builddir/src/gtk-helpers -D_GNU_SOURCE @GLIB_CFLAGS@ @GTK_CFLAGS@ -DDEFAULT_DUMP_DIR_MODE=@DEFAULT_DUMP_DIR_MODE@"
# Are special link options needed?
-LDFLAGS="@LDFLAGS@ $abs_top_builddir/src/lib/libreport.la $abs_top_builddir/src/gtk-helpers/libreport-gtk.la"
+LDFLAGS="@LDFLAGS@"
# Are special libraries needed?
-LIBS="@LIBS@"
+LIBS="@LIBS@ $abs_top_builddir/src/lib/libreport.la $abs_top_builddir/src/gtk-helpers/libreport-gtk.la $abs_top_builddir/src/lib/libreport-web.la"
--
2.1.0

View File

@ -0,0 +1,100 @@
From a9e2277e8c717db2ebef46db700806e40359a8c0 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 22 Oct 2014 08:00:39 +0200
Subject: [PATCH] ureport: allow multiple cert file in rhsm-entitlement dir
Thanks Martin Milata <mmilata@redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=1140224#c6
Related to #1140224
Fixes #296
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/lib/ureport.c | 54 +++++++++++++++++++++++-------------------------------
1 file changed, 23 insertions(+), 31 deletions(-)
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
index 731b96c..3c7a935 100644
--- a/src/lib/ureport.c
+++ b/src/lib/ureport.c
@@ -102,52 +102,44 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
GList *certs = get_file_list(RHSMENT_PEM_DIR_PATH, "pem");
- if (g_list_length(certs) != 2)
+ if (g_list_length(certs) < 2)
{
+ g_list_free_full(certs, (GDestroyNotify)free_file_obj);
+
log_notice(RHSMENT_PEM_DIR_PATH" does not contain unique cert-key files pair");
log_notice("Not using client authentication");
return;
}
- const char *cert = NULL;
- const char *key = NULL;
-
- file_obj_t *fst = (file_obj_t *)certs->data;
- file_obj_t *scn = (file_obj_t *)certs->next->data;
-
- if (strlen(fo_get_filename(fst)) < strlen(fo_get_filename(scn)))
+ /* Use the last non-key file found. */
+ file_obj_t *cert = NULL;
+ for (GList *iter = certs; iter != NULL; iter = g_list_next(iter))
{
- cert = fo_get_filename(fst);
- key = fo_get_filename(scn);
+ file_obj_t *tmp = (file_obj_t *)iter->data;
+ const char *file_name = fo_get_filename(tmp);
- config->ur_client_cert = xstrdup(fo_get_fullpath(fst));
- config->ur_client_key = xstrdup(fo_get_fullpath(scn));
+ if (suffixcmp(file_name, "-key"))
+ cert = tmp;
}
- else
+
+ if (cert == NULL)
{
- cert = fo_get_filename(scn);
- key = fo_get_filename(fst);
+ g_list_free_full(certs, (GDestroyNotify)free_file_obj);
- config->ur_client_cert = xstrdup(fo_get_fullpath(scn));
- config->ur_client_key = xstrdup(fo_get_fullpath(fst));
+ log_notice(RHSMENT_PEM_DIR_PATH" contains only key files");
+ log_notice("Not using client authentication");
+ return;
}
- const bool iscomplement = prefixcmp(key, cert) != 0 || strcmp("-key", key + strlen(cert)) != 0;
- g_list_free_full(certs, (GDestroyNotify)free_file_obj);
+ config->ur_client_cert = xstrdup(fo_get_fullpath(cert));
+ /* Yes, the key file may not exists. I over took this code from
+ * sos-uploader and they are pretty happy with this approach, so why
+ * shouldn't we?. */
+ config->ur_client_key = xasprintf("%s/%s-key.pem", RHSMENT_PEM_DIR_PATH, fo_get_filename(cert));
- if (iscomplement)
- {
- log_notice("Key file '%s' isn't complement to cert file '%s'",
- config->ur_client_key, config->ur_client_cert);
- log_notice("Not using client authentication");
-
- free(config->ur_client_cert);
- free(config->ur_client_key);
- config->ur_client_cert = NULL;
- config->ur_client_key = NULL;
+ log_debug("Using cert files: '%s' : '%s'", config->ur_client_cert, config->ur_client_key);
- return;
- }
+ g_list_free_full(certs, (GDestroyNotify)free_file_obj);
char *certdata = xmalloc_open_read_close(config->ur_client_cert, /*no size limit*/NULL);
if (certdata != NULL)
--
2.1.0

View File

@ -0,0 +1,84 @@
From c901c734ff5840ed3005f05af9711a7b20cc38fb Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 22 Oct 2014 08:12:44 +0200
Subject: [PATCH] ureport: use entit certs with 'rhsm' and drop
'rhsm-entitlement'
/etc/pki/consumer certificates cannot be used for authentication in
Strata. Martin Milata has correctly pointed out that it does not make
sense to have both 'rhsm' and 'rhsm-entitlement' options.
Related #1140224
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
doc/reporter-ureport.txt | 6 ++----
src/lib/ureport.c | 11 -----------
src/plugins/ureport.conf | 4 +---
3 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/doc/reporter-ureport.txt b/doc/reporter-ureport.txt
index f31dd45..a69c7ae 100644
--- a/doc/reporter-ureport.txt
+++ b/doc/reporter-ureport.txt
@@ -35,10 +35,8 @@ Configuration file lines should have 'PARAM = VALUE' format. The parameters are:
Possible values are:
'rhsm';;
- Uses the system certificate that is used for Red Hat subscription management.
-
- 'rhsm-entitlement';;
- Same as 'rhsm' but uses the V3 RHSM entitlement certificates.
+ Uses the system V3 entitlement certificate that is used for Red Hat
+ subscription management.
'puppet';;
Uses the certificate that is used by the Puppet configuration management tool.
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
index 3c7a935..d6c3ead 100644
--- a/src/lib/ureport.c
+++ b/src/lib/ureport.c
@@ -31,9 +31,6 @@
#define RHSM_WEB_SERVICE_URL "https://api.access.redhat.com/rs/telemetry/abrt"
-#define RHSM_CERT_PATH "/etc/pki/consumer/cert.pem"
-#define RHSM_KEY_PATH "/etc/pki/consumer/key.pem"
-
#define RHSMENT_PEM_DIR_PATH "/etc/pki/entitlement"
#define RHSMENT_ENT_DATA_BEGIN_TAG "-----BEGIN ENTITLEMENT DATA-----"
#define RHSMENT_ENT_DATA_END_TAG "-----END ENTITLEMENT DATA-----"
@@ -93,14 +90,6 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
if (config->ur_url == NULL)
ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
- config->ur_client_cert = xstrdup(RHSM_CERT_PATH);
- config->ur_client_key = xstrdup(RHSM_KEY_PATH);
- }
- else if (strcmp(client_auth, "rhsm-entitlement") == 0)
- {
- if (config->ur_url == NULL)
- ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
-
GList *certs = get_file_list(RHSMENT_PEM_DIR_PATH, "pem");
if (g_list_length(certs) < 2)
{
diff --git a/src/plugins/ureport.conf b/src/plugins/ureport.conf
index a3aa456..da00990 100644
--- a/src/plugins/ureport.conf
+++ b/src/plugins/ureport.conf
@@ -22,10 +22,8 @@
# 'IncludeAuthData' to 'yes'.
# None (default):
# SSLClientAuth =
-# Using RH subscription management certificate:
-# SSLClientAuth = rhsm
# Using RH subscription management entitlement certificate:
-# SSLClientAuth = rhsm-entitlement
+# SSLClientAuth = rhsm
# Using Puppet certificate:
# SSLClientAuth = puppet
# Using custom certificate:
--
2.1.0

View File

@ -0,0 +1,106 @@
From 5abe5538f971ae33795e106af23b25e1d07ea1b0 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 22 Oct 2014 14:27:00 +0200
Subject: [PATCH] ureport: get rhsm entitlement cert dir from rhsm conf
Related #1140224
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/lib/ureport.c | 46 +++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 41 insertions(+), 5 deletions(-)
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
index d6c3ead..83eb1b1 100644
--- a/src/lib/ureport.c
+++ b/src/lib/ureport.c
@@ -31,7 +31,6 @@
#define RHSM_WEB_SERVICE_URL "https://api.access.redhat.com/rs/telemetry/abrt"
-#define RHSMENT_PEM_DIR_PATH "/etc/pki/entitlement"
#define RHSMENT_ENT_DATA_BEGIN_TAG "-----BEGIN ENTITLEMENT DATA-----"
#define RHSMENT_ENT_DATA_END_TAG "-----END ENTITLEMENT DATA-----"
#define RHSMENT_SIG_DATA_BEGIN_TAG "-----BEGIN RSA SIGNATURE-----"
@@ -68,6 +67,33 @@ ureport_server_config_set_url(struct ureport_server_config *config,
config->ur_url = server_url;
}
+static char *
+rhsm_config_get_entitlement_cert_dir(void)
+{
+ char *result = getenv("LIBREPORT_DEBUG_RHSMENT_PEM_DIR_PATH");
+ if (result != NULL)
+ return xstrdup(result);
+
+ result = run_in_shell_and_save_output(0,
+ "python -c \"from rhsm.config import initConfig; print(initConfig().get('rhsm', 'entitlementCertDir'))\"",
+ NULL, NULL);
+
+ /* run_in_shell_and_save_output always returns non-NULL */
+ if (result[0] != '/')
+ goto error;
+
+ char *newline = strchrnul(result, '\n');
+ if (!newline)
+ goto error;
+
+ *newline = '\0';
+ return result;
+error:
+ error_msg("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module.");
+ free(result);
+ return NULL;
+}
+
void
ureport_server_config_set_client_auth(struct ureport_server_config *config,
const char *client_auth)
@@ -90,13 +116,21 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
if (config->ur_url == NULL)
ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
- GList *certs = get_file_list(RHSMENT_PEM_DIR_PATH, "pem");
+ char *rhsm_dir = rhsm_config_get_entitlement_cert_dir();
+ if (rhsm_dir == NULL)
+ {
+ log_notice("Not using client authentication");
+ return;
+ }
+
+ GList *certs = get_file_list(rhsm_dir, "pem");
if (g_list_length(certs) < 2)
{
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
- log_notice(RHSMENT_PEM_DIR_PATH" does not contain unique cert-key files pair");
+ log_notice("'%s' does not contain a cert-key files pair", rhsm_dir);
log_notice("Not using client authentication");
+ free(rhsm_dir);
return;
}
@@ -115,8 +149,9 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
{
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
- log_notice(RHSMENT_PEM_DIR_PATH" contains only key files");
+ log_notice("'%s' does not contain a cert file (only keys)", rhsm_dir);
log_notice("Not using client authentication");
+ free(rhsm_dir);
return;
}
@@ -124,7 +159,8 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
/* Yes, the key file may not exists. I over took this code from
* sos-uploader and they are pretty happy with this approach, so why
* shouldn't we?. */
- config->ur_client_key = xasprintf("%s/%s-key.pem", RHSMENT_PEM_DIR_PATH, fo_get_filename(cert));
+ config->ur_client_key = xasprintf("%s/%s-key.pem", rhsm_dir, fo_get_filename(cert));
+ free(rhsm_dir);
log_debug("Using cert files: '%s' : '%s'", config->ur_client_cert, config->ur_client_key);
--
2.1.0

View File

@ -0,0 +1,78 @@
From 3461f0e3d59e051da6507b1a1ac2530067c7f02b Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 22 Oct 2014 09:16:48 +0200
Subject: [PATCH] ureport: consistently die on all client auth errors
Related #1140224
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/lib/ureport.c | 25 ++++---------------------
1 file changed, 4 insertions(+), 21 deletions(-)
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
index 83eb1b1..d39709d 100644
--- a/src/lib/ureport.c
+++ b/src/lib/ureport.c
@@ -89,9 +89,8 @@ rhsm_config_get_entitlement_cert_dir(void)
*newline = '\0';
return result;
error:
- error_msg("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module.");
free(result);
- return NULL;
+ error_msg_and_die("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module.");
}
void
@@ -117,21 +116,12 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
char *rhsm_dir = rhsm_config_get_entitlement_cert_dir();
- if (rhsm_dir == NULL)
- {
- log_notice("Not using client authentication");
- return;
- }
GList *certs = get_file_list(rhsm_dir, "pem");
if (g_list_length(certs) < 2)
{
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
-
- log_notice("'%s' does not contain a cert-key files pair", rhsm_dir);
- log_notice("Not using client authentication");
- free(rhsm_dir);
- return;
+ error_msg_and_die("'%s' does not contain a cert-key files pair", rhsm_dir);
}
/* Use the last non-key file found. */
@@ -148,11 +138,7 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
if (cert == NULL)
{
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
-
- log_notice("'%s' does not contain a cert file (only keys)", rhsm_dir);
- log_notice("Not using client authentication");
- free(rhsm_dir);
- return;
+ error_msg_and_die("'%s' does not contain a cert file (only keys)", rhsm_dir);
}
config->ur_client_cert = xstrdup(fo_get_fullpath(cert));
@@ -188,10 +174,7 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
xasprintf(RHSMENT_SIG_DATA_BEGIN_TAG"%s"RHSMENT_SIG_DATA_END_TAG, sig_data));
}
else
- {
- log_notice("Cert file '%s' doesn't contain Entitlement and RSA Signature sections", config->ur_client_cert);
- log_notice("Not using HTTP authentication headers");
- }
+ error_msg_and_die("Cert file '%s' doesn't contain Entitlement and RSA Signature sections", config->ur_client_cert);
free(sig_data);
free(ent_data);
--
2.1.0

View File

@ -0,0 +1,57 @@
From 7f97600ab8f814fb8446536b9708ddb90b576284 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 22 Oct 2014 10:21:07 +0200
Subject: [PATCH] rhtsupport: never use uReport URL from ureport.config
The GUI reporter always export uReport_URL, thus reporter-rhtsupport
never use the Strata URL.
Moreover, usage of uReport_URL is really bad idea, because a reporter
thinks he is going to send data to the portal but the ureport might end
somewhere else.
Related #1139987
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/reporter-rhtsupport.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
index 9a1f392..4b74c5c 100644
--- a/src/plugins/reporter-rhtsupport.c
+++ b/src/plugins/reporter-rhtsupport.c
@@ -383,18 +383,18 @@ void prepare_ureport_configuration(const char *urcfile,
load_conf_file(urcfile, settings, false);
ureport_server_config_init(urconf);
- char *url = NULL;
- UREPORT_OPTION_VALUE_FROM_CONF(settings, "URL", url, xstrdup);
- if (url == NULL)
- {
- ureport_server_config_set_url(urconf, concat_path_file(portal_url, "/telemetry/abrt"));
- urconf->ur_ssl_verify = ssl_verify;
- }
- else
- {
- ureport_server_config_set_url(urconf, url);
- UREPORT_OPTION_VALUE_FROM_CONF(settings, "SSLVerify", urconf->ur_ssl_verify, string_to_bool);
- }
+ /* The following lines cause that we always use URL from ureport's
+ * configuration becuase the GUI reporter always exports uReport_URL env
+ * var.
+ *
+ * char *url = NULL;
+ * UREPORT_OPTION_VALUE_FROM_CONF(settings, "URL", url, xstrdup);
+ * if (url != NULL)
+ * ureport_server_config_set_url(urconf, url);
+ */
+
+ ureport_server_config_set_url(urconf, concat_path_file(portal_url, "/telemetry/abrt"));
+ urconf->ur_ssl_verify = ssl_verify;
ureport_server_config_set_basic_auth(urconf, login, password);
--
2.1.0

View File

@ -0,0 +1,53 @@
From 256a8e48db14512357f8e1412018a88b3003bbce Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 22 Oct 2014 11:09:43 +0200
Subject: [PATCH] rhtsupport: do not leak the hints results
The leak was introduced in commit
5ff7f36c1a06f5317241b43999f4f03a21594c79
Related to rhbz#1139987
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/reporter-rhtsupport.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
index 4b74c5c..add0d6b 100644
--- a/src/plugins/reporter-rhtsupport.c
+++ b/src/plugins/reporter-rhtsupport.c
@@ -275,6 +275,7 @@ void attach_to_ureport(struct ureport_server_config *conf,
static
bool check_for_hints(const char *url, char **login, char **password, bool ssl_verify, const char *tempfile)
{
+ bool retval = false;
rhts_result_t *result = NULL;
INVALID_CREDENTIALS_LOOP((*login), (*password),
@@ -317,14 +318,18 @@ bool check_for_hints(const char *url, char **login, char **password, bool ssl_ve
hint = append_to_malloced_string(hint,
_("Do you still want to create a RHTSupport ticket?")
);
- int create_ticket = ask_yes_no(hint);
+
+ /*
+ * 'Yes' to the create ticket question means no hints were found.
+ */
+ retval = !ask_yes_no(hint);
+
free(hint);
- if (!create_ticket)
- return true;
}
}
+
free_rhts_result(result);
- return false;
+ return retval;
}
static
--
2.1.0

View File

@ -0,0 +1,42 @@
From 323ddb510c031a631ba294fc549b22a83d4159bb Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 23 Oct 2014 11:30:14 +0200
Subject: [PATCH] ureport: fall back to the hardcoded rhsm cert dir
This commit adds a fallback execution path for cases where getting the
rhsm entitlement dir path via an execution of python from the
librepor-web library fails for any reason.
See commit 2b20c9f91342da7744ae40ee623735ab95f83219
Related #1140224
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/lib/ureport.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
index d39709d..868bb4f 100644
--- a/src/lib/ureport.c
+++ b/src/lib/ureport.c
@@ -31,6 +31,7 @@
#define RHSM_WEB_SERVICE_URL "https://api.access.redhat.com/rs/telemetry/abrt"
+#define RHSMENT_PEM_DIR_PATH "/etc/pki/entitlement"
#define RHSMENT_ENT_DATA_BEGIN_TAG "-----BEGIN ENTITLEMENT DATA-----"
#define RHSMENT_ENT_DATA_END_TAG "-----END ENTITLEMENT DATA-----"
#define RHSMENT_SIG_DATA_BEGIN_TAG "-----BEGIN RSA SIGNATURE-----"
@@ -90,7 +91,8 @@ rhsm_config_get_entitlement_cert_dir(void)
return result;
error:
free(result);
- error_msg_and_die("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module.");
+ error_msg("Failed to get 'rhsm':'entitlementCertDir' from rhsm.config python module. Using "RHSMENT_PEM_DIR_PATH);
+ return xstrdup(RHSMENT_PEM_DIR_PATH);
}
void
--
2.1.0

View File

@ -0,0 +1,41 @@
From 49651673afe704d5911ba29404390958dbc7ee05 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Wed, 22 Oct 2014 01:32:33 +0200
Subject: [PATCH] ureport: wrong description of two functions in ureport.h
Changed wrong description of function ureport_attach_string and
ureport_attach_int. Both of these functions returns True in case of any error
(not False).
fixes #298
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
src/include/ureport.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/include/ureport.h b/src/include/ureport.h
index 104e8d0..852ee0e 100644
--- a/src/include/ureport.h
+++ b/src/include/ureport.h
@@ -233,7 +233,7 @@ ureport_json_attachment_new(const char *bthash, const char *type, const char *da
* @param type Type of attachment
* @param data Attached data
* @param config Configuration used in communication
- * @return False in case of any error; otherwise True
+ * @return True in case of any error; otherwise False
*/
#define ureport_attach_string libreport_ureport_attach_string
bool
@@ -247,7 +247,7 @@ ureport_attach_string(const char *bthash, const char *type, const char *data,
* @param type Type of attachment
* @param data Attached data
* @param config Configuration used in communication
- * @return False in case of any error; otherwise True
+ * @return True in case of any error; otherwise False
*/
#define ureport_attach_int libreport_ureport_attach_int
bool
--
2.1.0

View File

@ -0,0 +1,27 @@
From 70f0b9bbfb297cdcd1eb56162d9cbe9ca832f84f Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Fri, 31 Oct 2014 09:27:33 +0100
Subject: [PATCH] ureport: fix a memory leak related to AuthDataItems
Related to rhbz#1139557
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/lib/ureport.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
index 868bb4f..9c007fe 100644
--- a/src/lib/ureport.c
+++ b/src/lib/ureport.c
@@ -640,6 +640,7 @@ ureport_from_dump_dir_ext(const char *dump_dir_path, const struct ureport_prefer
}
sr_report_add_auth(report, key, value);
+ free(value);
}
dd_close(dd);
--
2.1.0

View File

@ -0,0 +1,31 @@
From d4dfba834acb573a5040c0a26a07d59f59551214 Mon Sep 17 00:00:00 2001
From: Martin Milata <mmilata@redhat.com>
Date: Mon, 3 Nov 2014 12:26:01 +0100
Subject: [PATCH] doc: fix asciidoc misrendering
http://www.methods.co.nz/asciidoc/chunked/ch21.html#X77
Signed-off-by: Martin Milata <mmilata@redhat.com>
---
doc/reporter-upload.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/reporter-upload.txt b/doc/reporter-upload.txt
index 40a8694..8acf798 100644
--- a/doc/reporter-upload.txt
+++ b/doc/reporter-upload.txt
@@ -54,9 +54,9 @@ OPTIONS
-u URL::
The URL where tarball should be uploaded.
- URL should have form protocol://[user[:pass]@]host/dir/[file.tar.gz]
+ URL should have the form protocol://[user[:pass]@]host/dir/[file.tar.gz]
where protocol can be http(s), ftp, scp, or file.
- File protocol can't have user and host parts: file:///dir/[file.tar.gz].
+ File protocol can't have user and host parts: pass:[file:///dir/[file.tar.gz]].
If URL ends with a slash, the archive name will be generated and appended
to URL; otherwise, URL will be used as full file name.
--
2.1.0

View File

@ -0,0 +1,26 @@
From 6ccff130d77158005128cbf6c00267f8a386a5a2 Mon Sep 17 00:00:00 2001
From: Martin Milata <mmilata@redhat.com>
Date: Tue, 4 Nov 2014 16:22:41 +0100
Subject: [PATCH] testsuite: add tests/ureport/ to EXTRA_DIST
Otherwise make rpm fails.
---
tests/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cda9375..1cfc206 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -49,7 +49,7 @@ TESTSUITE = $(srcdir)/testsuite
MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
check_DATA = atconfig atlocal $(TESTSUITE)
DISTCLEANFILES = atconfig
-EXTRA_DIST += atlocal.in conf
+EXTRA_DIST += atlocal.in conf ureport
atconfig: $(top_builddir)/config.status
(cd ${top_builddir} && ./config.status ${subdir}/atconfig)
--
2.1.0

View File

@ -0,0 +1,32 @@
From fb554038d9bc692d99fbd6eace61979dc48a8b93 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 3 Nov 2014 15:51:32 +0100
Subject: [PATCH] ureport: use 'rhsm' ssl client auth by default
libreport used to be configured to use 'rhsm' by default and I (Jakub
Filak <jfilak@redhat.com>) inappropriately changed it to no ssl
client auth in commit 4f61f5d9eec75e471c8176dac0c21f4361e40ee6
Related to rhbz#1140224
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/ureport.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/ureport.conf b/src/plugins/ureport.conf
index da00990..75c4893 100644
--- a/src/plugins/ureport.conf
+++ b/src/plugins/ureport.conf
@@ -23,7 +23,7 @@
# None (default):
# SSLClientAuth =
# Using RH subscription management entitlement certificate:
-# SSLClientAuth = rhsm
+SSLClientAuth = rhsm
# Using Puppet certificate:
# SSLClientAuth = puppet
# Using custom certificate:
--
2.1.0

View File

@ -0,0 +1,35 @@
From 07118b21e400670b91093cafc677395fc59b88b4 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 3 Nov 2014 15:59:26 +0100
Subject: [PATCH] ureport: be able to configure ContactEmail from GUI
reporter-rhtsupport reads uReport_ContactEmail configuration option
before attaching the contact email to uReport. It is likely that users
will run the reporter from the GUI, so they must be able to configure
the reporter from the GUI too.
Related to rhbz#1150388
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/report_uReport.xml.in | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/plugins/report_uReport.xml.in b/src/plugins/report_uReport.xml.in
index a02f484..1147880 100644
--- a/src/plugins/report_uReport.xml.in
+++ b/src/plugins/report_uReport.xml.in
@@ -20,6 +20,10 @@
<_note-html>Adds your Bugzilla login to CC List of already reported bugs.</_note-html>
<default-value>yes</default-value>
</option>
+ <option type="text" name="uReport_ContactEmail">
+ <_label>Contact email address</_label>
+ <_description>Email address that can be used by ABRT server to inform you about news and updates</_description>
+ </option>
<option type="bool" name="uReport_SSLVerify">
<_label>Verify SSL</_label>
<_description>Check SSL key validity</_description>
--
2.1.0

View File

@ -0,0 +1,34 @@
From f019d1d37bbd9723bddc2637283c3601fae6f79b Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 3 Nov 2014 16:07:28 +0100
Subject: [PATCH] rhtsupport: be able to turn uReport off from GUI
Expose SubmitUReport configuration option in the GUI configuration.
Users should be able to configure entire reporting process from GUI.
Related to rhbz#1139987
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/report_RHTSupport.xml.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/plugins/report_RHTSupport.xml.in b/src/plugins/report_RHTSupport.xml.in
index e040d8f..4efc4dc 100644
--- a/src/plugins/report_RHTSupport.xml.in
+++ b/src/plugins/report_RHTSupport.xml.in
@@ -34,6 +34,11 @@
<default-value>yes</default-value>
</option>
<advanced-options>
+ <option type="bool" name="RHTSupport_SubmitUReport">
+ <_label>Submit uReport</_label>
+ <_note-html>Submit &lt;a href="https://access.redhat.com/articles/642323"&gt;micro-report&lt;/a&gt; when creating a new case. </_note-html>
+ <default-value>yes</default-value>
+ </option>
<option type="text" name="http_proxy">
<_label>HTTP Proxy</_label>
<allow-empty>yes</allow-empty>
--
2.1.0

View File

@ -0,0 +1,53 @@
From 1bf4d7cee7aaeeb777b7244f441fb4c603864e48 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 3 Nov 2014 16:15:45 +0100
Subject: [PATCH] rhtsupport: move RH Portal URL c. o. to Advanced section
It is unlikely that a regular user will ever want to edit that
configuration option.
Related to rhbz#1139987
Signed-off-by: Jakub Filak <jfilak@redhat.com>
Conflicts:
src/plugins/report_RHTSupport.xml.in
---
src/plugins/report_RHTSupport.xml.in | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/plugins/report_RHTSupport.xml.in b/src/plugins/report_RHTSupport.xml.in
index 4efc4dc..a612a1e 100644
--- a/src/plugins/report_RHTSupport.xml.in
+++ b/src/plugins/report_RHTSupport.xml.in
@@ -12,12 +12,8 @@
<gui-review-elements>yes</gui-review-elements>
<options>
- <option type="text" name="RHTSupport_URL">
- <_label>RH Portal URL</_label>
- <allow-empty>no</allow-empty>
- <_description>Address of the Red Hat support portal</_description>
- <default-value>https://api.access.redhat.com/rs</default-value>
- </option>
+ <import-event-options event="report_uReport"/>
+
<option type="text" name="RHTSupport_Login">
<_label>Username</_label>
<_description>Red Hat customer user name</_description>
@@ -39,6 +35,12 @@
<_note-html>Submit &lt;a href="https://access.redhat.com/articles/642323"&gt;micro-report&lt;/a&gt; when creating a new case. </_note-html>
<default-value>yes</default-value>
</option>
+ <option type="text" name="RHTSupport_URL">
+ <_label>RH Portal URL</_label>
+ <allow-empty>no</allow-empty>
+ <_description>Address of the Red Hat support portal</_description>
+ <default-value>https://api.access.redhat.com/rs</default-value>
+ </option>
<option type="text" name="http_proxy">
<_label>HTTP Proxy</_label>
<allow-empty>yes</allow-empty>
--
2.1.0

View File

@ -0,0 +1,75 @@
From 1b3cc8824c6143ae9863e70d4f3d9a2050682f60 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 4 Nov 2014 09:14:43 +0100
Subject: [PATCH] Revert "ureport: consistently die on all client auth errors"
This reverts commit fca34b5620a6213e1d191bcb99e8757f34bbe0a5.
Related #1140224
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/lib/ureport.c | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/src/lib/ureport.c b/src/lib/ureport.c
index 9c007fe..3a9dbe3 100644
--- a/src/lib/ureport.c
+++ b/src/lib/ureport.c
@@ -118,12 +118,21 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
ureport_server_config_set_url(config, xstrdup(RHSM_WEB_SERVICE_URL));
char *rhsm_dir = rhsm_config_get_entitlement_cert_dir();
+ if (rhsm_dir == NULL)
+ {
+ log_notice("Not using client authentication");
+ return;
+ }
GList *certs = get_file_list(rhsm_dir, "pem");
if (g_list_length(certs) < 2)
{
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
- error_msg_and_die("'%s' does not contain a cert-key files pair", rhsm_dir);
+
+ log_notice("'%s' does not contain a cert-key files pair", rhsm_dir);
+ log_notice("Not using client authentication");
+ free(rhsm_dir);
+ return;
}
/* Use the last non-key file found. */
@@ -140,7 +149,11 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
if (cert == NULL)
{
g_list_free_full(certs, (GDestroyNotify)free_file_obj);
- error_msg_and_die("'%s' does not contain a cert file (only keys)", rhsm_dir);
+
+ log_notice("'%s' does not contain a cert file (only keys)", rhsm_dir);
+ log_notice("Not using client authentication");
+ free(rhsm_dir);
+ return;
}
config->ur_client_cert = xstrdup(fo_get_fullpath(cert));
@@ -176,7 +189,16 @@ ureport_server_config_set_client_auth(struct ureport_server_config *config,
xasprintf(RHSMENT_SIG_DATA_BEGIN_TAG"%s"RHSMENT_SIG_DATA_END_TAG, sig_data));
}
else
- error_msg_and_die("Cert file '%s' doesn't contain Entitlement and RSA Signature sections", config->ur_client_cert);
+ {
+ log_notice("Cert file '%s' doesn't contain Entitlement and RSA Signature sections", config->ur_client_cert);
+ log_notice("Not using client authentication");
+
+ free(config->ur_client_cert);
+ config->ur_client_cert = NULL;
+
+ free(config->ur_client_key);
+ config->ur_client_key = NULL;
+ }
free(sig_data);
free(ent_data);
--
2.1.0

View File

@ -0,0 +1,137 @@
From 5a60e11298020e04b17160edbd9d575055ecb643 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 4 Nov 2014 15:29:06 +0100
Subject: [PATCH] testsuite: do not expected ureport exiting on rhsm cert
errors
Related #1140224
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
tests/ureport.at | 66 ++++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 50 insertions(+), 16 deletions(-)
diff --git a/tests/ureport.at b/tests/ureport.at
index 22d34e9..76e2f7a 100644
--- a/tests/ureport.at
+++ b/tests/ureport.at
@@ -339,12 +339,24 @@ void set_ureport_server_config(struct ureport_server_config *config,
void my_assert(const char *str1, const char *str2)
{
- if (str1 == NULL || str2 == NULL)
- assert( str1 == NULL && str2 == NULL );
- else
- assert(strcmp(str1, str2) == 0);
+ if (str1 == str2)
+ return;
- return;
+ if (str1 == NULL && str2 != NULL)
+ {
+ fprintf(stderr, "Assertion failed: NULL == '%s'\n", str2);
+ abort();
+ }
+ else if (str1 != NULL && str2 == NULL)
+ {
+ fprintf(stderr, "Assertion failed: '%s' == NULL\n", str1);
+ abort();
+ }
+ else if (strcmp(str1, str2) != 0)
+ {
+ fprintf(stderr, "Assertion failed: '%s' == '%s'\n", str1, str2);
+ abort();
+ }
}
void assert_ureport_server_config(struct ureport_server_config *config,
@@ -365,8 +377,10 @@ void assert_ureport_server_config(struct ureport_server_config *config,
return;
}
-int test_ureport_server_config_set_client_auth_exit_code(struct ureport_server_config *config,
- const char *client_auth)
+int test_ureport_server_config_set_client_auth_exit_code_ext(struct ureport_server_config *config,
+ const char *client_auth,
+ const char *cert_file,
+ const char *key_file)
{
ureport_server_config_init(config);
@@ -380,6 +394,8 @@ int test_ureport_server_config_set_client_auth_exit_code(struct ureport_server_c
if (pid == 0)
{
ureport_server_config_set_client_auth(config, client_auth);
+ assert((cert_file == (void *)-1) || (cert_file == NULL && config->ur_client_cert == NULL) || (strcmp(cert_file, config->ur_client_cert) == 0));
+ assert((key_file == (void *)-1) || (key_file == NULL && config->ur_client_cert == NULL) || (strcmp(key_file, config->ur_client_key) == 0));
exit(0);
}
int status;
@@ -390,6 +406,12 @@ int test_ureport_server_config_set_client_auth_exit_code(struct ureport_server_c
return status;
}
+int test_ureport_server_config_set_client_auth_exit_code(struct ureport_server_config *config,
+ const char *client_auth)
+{
+ return test_ureport_server_config_set_client_auth_exit_code_ext(config, client_auth, (void *)-1, (void *)-1);
+}
+
int main(void)
{
g_verbose=3;
@@ -418,8 +440,8 @@ int main(void)
assert(empty_cert_dir);
setenv("LIBREPORT_DEBUG_RHSMENT_PEM_DIR_PATH", empty_cert_dir, 1);
- int status = test_ureport_server_config_set_client_auth_exit_code(&config, "rhsm");
- assert(status != 0 && status != -1);
+ int status = test_ureport_server_config_set_client_auth_exit_code_ext(&config, "rhsm", NULL, NULL);
+ assert(status == 0);
assert(rmdir(empty_cert_dir) == 0);
@@ -429,8 +451,8 @@ int main(void)
setenv("LIBREPORT_DEBUG_RHSMENT_PEM_DIR_PATH", TESTING_CERTS_INCORRECT_CONTENT_DIR_PATH, 1);
- status = test_ureport_server_config_set_client_auth_exit_code(&config, "rhsm");
- assert(status != 0 && status != -1);
+ status = test_ureport_server_config_set_client_auth_exit_code_ext(&config, "rhsm", NULL, NULL);
+ assert(status == 0);
/* client_auth == rhsm */
/* ur_url == NULL */
@@ -548,12 +570,24 @@ AT_TESTFUN([ureport_server_config_set_basic_auth],
void my_assert(const char *str1, const char *str2)
{
- if (str1 == NULL || str2 == NULL)
- assert( str1 == NULL && str2 == NULL );
- else
- assert(strcmp(str1, str2) == 0);
+ if (str1 == str2)
+ return;
- return;
+ if (str1 == NULL && str2 != NULL)
+ {
+ fprintf(stderr, "Assertion failed: NULL == '%s'\n", str2);
+ abort();
+ }
+ else if (str1 != NULL && str2 == NULL)
+ {
+ fprintf(stderr, "Assertion failed: '%s' == NULL\n", str1);
+ abort();
+ }
+ else if (strcmp(str1, str2) != 0)
+ {
+ fprintf(stderr, "Assertion failed: '%s' == '%s'\n", str1, str2);
+ abort();
+ }
}
void assert_ureport_server_config(struct ureport_server_config *config,
--
2.1.0

View File

@ -0,0 +1,47 @@
From d1eaae97f0287f7676508ff9eaa2c4dba24d6a2b Mon Sep 17 00:00:00 2001
From: Tim Waugh <twaugh@redhat.com>
Date: Thu, 6 Nov 2014 10:12:35 +0000
Subject: [PATCH] Prevent duplicate values for CODE_* fields being logged to
journal.
As code location fields CODE_FILE, CODE_LINE, and CODE_FUNC are
handled by libreport, we do not want the automatic values supplied by
the sd_journal API.
Without suppressing these, both the actual log event source and the
call to sd_journal_send() are logged. For example:
[...]
"CODE_FILE" : [ "logging.c", "abrtd.c" ],
"CODE_LINE" : [ "143", "629" ],
"CODE_FUNC" : [ "log_handler", "main" ],
"MESSAGE" : "Init complete, entering main loop",
[...]
---
src/lib/logging.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lib/logging.c b/src/lib/logging.c
index 4b9dd87..878556b 100644
--- a/src/lib/logging.c
+++ b/src/lib/logging.c
@@ -1,6 +1,6 @@
/*
Copyright (C) 2010 ABRT team
- Copyright (C) 2010 RedHat Inc
+ Copyright (C) 2010, 2014 RedHat Inc
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,6 +17,8 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <syslog.h>
+/* Suppress automatic CODE_* fields as we handle those here */
+#define SD_JOURNAL_SUPPRESS_LOCATION
#include <systemd/sd-journal.h>
#include "internal_libreport.h"
--
2.1.0

View File

@ -7,13 +7,15 @@
Summary: Generic library for reporting various problems
Name: libreport
Version: 2.3.0
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: https://fedorahosted.org/abrt/
URL: https://github.com/abrt/abrt/wiki/ABRT-Project
Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz
Source1: autogen.sh
# git format-patch %%{Version} -N -M;
# for p in `ls 0*.patch`; do printf "Patch%04d: %s\n" $i $p; ((i++)); done
Patch0001: 0001-Translation-updates.patch
Patch0002: 0002-upload-don-t-ask-for-password-if-the-env-var-is-empt.patch
Patch0003: 0003-lib-fix-a-bug-in-ureport-response-parser.patch
@ -21,6 +23,29 @@ Patch0004: 0004-rhtsupport-re-prompt-for-credentials.patch
Patch0005: 0005-rhtsupport-attach-the-contact-email-to-bthash.patch
Patch0006: 0006-ureport-document-rhsm-entitlement-in-the-man-page.patch
Patch0007: 0007-rhtsupport-send-ureport-before-creating-description.patch
Patch0008: 0008-testsuite-add-unittests-for-uReport-API.patch
Patch0009: 0009-testsuite-changed-atlocal.in-to-work-with-last-commi.patch
Patch0010: 0010-ureport-allow-multiple-cert-file-in-rhsm-entitlement.patch
Patch0011: 0011-ureport-use-entit-certs-with-rhsm-and-drop-rhsm-enti.patch
Patch0012: 0012-ureport-get-rhsm-entitlement-cert-dir-from-rhsm-conf.patch
Patch0013: 0013-ureport-consistently-die-on-all-client-auth-errors.patch
Patch0014: 0014-rhtsupport-never-use-uReport-URL-from-ureport.config.patch
Patch0015: 0015-rhtsupport-do-not-leak-the-hints-results.patch
#Patch0016: 0016-spec-ureport-requires-python-rhsm-on-rhel.patch
Patch0017: 0017-ureport-fall-back-to-the-hardcoded-rhsm-cert-dir.patch
Patch0018: 0018-ureport-wrong-description-of-two-functions-in-urepor.patch
Patch0019: 0019-ureport-fix-a-memory-leak-related-to-AuthDataItems.patch
Patch0020: 0020-doc-fix-asciidoc-misrendering.patch
Patch0021: 0021-testsuite-add-tests-ureport-to-EXTRA_DIST.patch
Patch0022: 0022-ureport-use-rhsm-ssl-client-auth-by-default.patch
Patch0023: 0023-ureport-be-able-to-configure-ContactEmail-from-GUI.patch
Patch0024: 0024-rhtsupport-be-able-to-turn-uReport-off-from-GUI.patch
Patch0025: 0025-rhtsupport-move-RH-Portal-URL-c.-o.-to-Advanced-sect.patch
Patch0026: 0026-Revert-ureport-consistently-die-on-all-client-auth-e.patch
Patch0027: 0027-testsuite-do-not-expected-ureport-exiting-on-rhsm-ce.patch
#Patch0028: 0028-spec-dump-the-log-files-of-failed-unit-tests.patch
Patch0029: 0029-Prevent-duplicate-values-for-CODE_-fields-being-logg.patch
#Patch0030: 0030-spec-update-the-URL.patch
Patch1001: 0001-Temporary-Rawhide-patch-test-FAF-s-Webui2.patch
# git is need for '%%autosetup -S git' which automatically applies all the
@ -210,6 +235,9 @@ BuildRequires: json-c-devel
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: libreport-web = %{version}-%{release}
%if 0%{?rhel}
Requires: python-rhsm
%endif
%description plugin-ureport
Uploads micro-report to abrt server
@ -310,6 +338,7 @@ data over ftp/scp...
# doesn't allow us to create a new file within a patch, so we have to use
# 'git am' (see /usr/lib/rpm/macros for more details)
%define __scm_apply_git(qp:m:) %{__git} am
#%%define __scm_apply_git(qp:m:) %%{__git} am --exclude libreport.spec.in --exclude .gitignore
%autosetup -S git
# koji in f19 has new autotools, so we need to regenerate everything
@ -388,8 +417,10 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man5/report_rhel_bugzilla.conf.5
rm -rf $RPM_BUILD_ROOT
%check
make check || {
cat tests/testsuite.log
make check|| {
# find and print the logs of failed test
# do not cat tests/testsuite.log because it contains a lot of bloat
find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \;
exit 1
}
@ -678,6 +709,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
* Thu Nov 06 2014 Jakub Filak <jfilak@redhat.com> 2.3.0-5
- Prevent duplicate values for CODE_* fields being logged to journal
- ureport and rhtsupport bug fixes
- update Package URL
* Fri Oct 17 2014 Jakub Filak <jfilak@redhat.com> 2.3.0-4
- ureport: use FAF2 server