From 0fae6bbaccff256e3f2aeed687300d705903cd82 Mon Sep 17 00:00:00 2001 From: Matej Habrnal Date: Oct 15 2015 09:18:31 +0000 Subject: New upstream release 2.6.3 Signed-off-by: Matej Habrnal --- diff --git a/0001-Use-a-dgettext-function-returning-strings-instead-of.patch b/0001-Use-a-dgettext-function-returning-strings-instead-of.patch deleted file mode 100644 index fda94b9..0000000 --- a/0001-Use-a-dgettext-function-returning-strings-instead-of.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f09c07c847bb5be6f749d102143e8b43a1a00b7c Mon Sep 17 00:00:00 2001 -From: Matej Habrnal -Date: Wed, 22 Jul 2015 15:54:03 +0200 -Subject: [PATCH] Use a dgettext function returning strings instead of bytes - -ldgettext returns an array of bytes in system encoding and this, together with -Python3, causes troubles. - -Signed-off-by: Matej Habrnal ---- - src/client-python/reportclient/__init__.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/client-python/reportclient/__init__.py b/src/client-python/reportclient/__init__.py -index 7b59586..43afc53 100644 ---- a/src/client-python/reportclient/__init__.py -+++ b/src/client-python/reportclient/__init__.py -@@ -36,7 +36,7 @@ GETTEXT_PROGNAME = "libreport" - import locale - import gettext - --_ = lambda x: gettext.ldgettext(GETTEXT_PROGNAME, x) -+_ = lambda x: gettext.dgettext(GETTEXT_PROGNAME, x) - - def init_gettext(): - try: --- -2.4.6 - diff --git a/0002-dd-stop-warning-about-corrupted-mandatory-files.patch b/0002-dd-stop-warning-about-corrupted-mandatory-files.patch deleted file mode 100644 index 2e69d4a..0000000 --- a/0002-dd-stop-warning-about-corrupted-mandatory-files.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 63a7dba681c148603c9606e9f841fdecc4e5b549 Mon Sep 17 00:00:00 2001 -From: Jakub Filak -Date: Tue, 4 Aug 2015 19:18:38 +0200 -Subject: [PATCH] dd: stop warning about corrupted mandatory files - -These messages are printed by abrtd to syslog when it finds a dump -directory with such files. Unfortunately, abrtd prints out these -messages too often and users do not know how to get rid of them because -they make sense only to us (ABRT devels). Moreover, these messages are -not necessary because abrtd follows them with -"$PATH is not a valid problem directory" message. So admins are notified -about strange problem directories and they can remove them. - -The messages were accidentally turned on by me in these commits: -8f9fa454bd8c653758cddf07597f0a5a17ff5793 -b9e7fb2ac2ea3064dc73dab26f80beab100af65f - -Signed-off-by: Jakub Filak ---- - src/lib/dump_dir.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/lib/dump_dir.c b/src/lib/dump_dir.c -index 66e2569..aed7a15 100644 ---- a/src/lib/dump_dir.c -+++ b/src/lib/dump_dir.c -@@ -218,7 +218,7 @@ static int read_number_from_file_at(int dir_fd, const char *filename, const char - const int fd = secure_openat_read(dir_fd, filename); - if (fd < 0) - { -- log_warning("Can't open '%s'", filename); -+ log_info("Can't open '%s'", filename); - return fd; - } - -@@ -235,14 +235,14 @@ static int read_number_from_file_at(int dir_fd, const char *filename, const char - - if (value_buf == NULL) - { -- log_warning("Can't read from '%s'", filename); -+ log_info("Can't read from '%s'", filename); - ret = -EBADFD; - goto finito; - } - - if (total_read >= max_size) - { -- log_warning("File '%s' is too long to be valid %s " -+ log_info("File '%s' is too long to be valid %s " - "(max size %u)", filename, typename, (int)sizeof(value_buf)); - ret = -EMSGSIZE; - goto finito; -@@ -265,7 +265,7 @@ static int read_number_from_file_at(int dir_fd, const char *filename, const char - || (*endptr != '\0') - || endptr == value_buf - ) { -- log_warning("File '%s' doesn't contain valid %s" -+ log_info("File '%s' doesn't contain valid %s" - "('%s')", filename, typename, value_buf); - ret = -EINVAL; - goto finito; -@@ -276,7 +276,7 @@ static int read_number_from_file_at(int dir_fd, const char *filename, const char - */ - if (res <= min || res >= max) - { -- log_warning("File '%s' contains a number out-of-range of %s" -+ log_info("File '%s' contains a number out-of-range of %s" - "('%s')", filename, typename, value_buf); - ret = -ERANGE; - goto finito; -@@ -441,7 +441,7 @@ static int dd_lock(struct dump_dir *dd, unsigned sleep_usec, int flags) - if (dd->owns_lock) - xunlinkat(dd->dd_fd, ".lock", /*only files*/0); - -- log_warning("Unlocked '%s' (no or corrupted '%s' file)", dd->dd_dirname, missing_file); -+ log_notice("Unlocked '%s' (no or corrupted '%s' file)", dd->dd_dirname, missing_file); - if (--count == 0 || flags & DD_DONT_WAIT_FOR_LOCK) - { - errno = EISDIR; /* "this is an ordinary dir, not dump dir" */ --- -2.4.3 - diff --git a/0003-dd-don-t-warn-about-missing-type-if-the-locking-fail.patch b/0003-dd-don-t-warn-about-missing-type-if-the-locking-fail.patch deleted file mode 100644 index 360afef..0000000 --- a/0003-dd-don-t-warn-about-missing-type-if-the-locking-fail.patch +++ /dev/null @@ -1,42 +0,0 @@ -From eb38c73cc3aa81884e74718c6d7f412ea7a94f6f Mon Sep 17 00:00:00 2001 -From: Jakub Filak -Date: Tue, 4 Aug 2015 19:35:48 +0200 -Subject: [PATCH] dd: don't warn about missing 'type' if the locking fails - -The warning is printed out at least 10 times and makes only a little -sense to system administrators. abrtd follows those warnings with -"$path is not a valid problem directory" message which is a sufficient -way to tell the administrators to remove that directory. - -Related: rhbz#1243280 - -Signed-off-by: Jakub Filak ---- - src/lib/dump_dir.c | 11 ++++++++++- - 1 file changed, 10 insertions(+), 1 deletion(-) - -diff --git a/src/lib/dump_dir.c b/src/lib/dump_dir.c -index aed7a15..2399ca1 100644 ---- a/src/lib/dump_dir.c -+++ b/src/lib/dump_dir.c -@@ -384,7 +384,16 @@ static const char *dd_check(struct dump_dir *dd) - return FILENAME_TIME; - } - -- dd->dd_type = load_text_file_at(dd->dd_fd, FILENAME_TYPE, DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE); -+ /* Do not warn about missing 'type' file in non-verbose modes. -+ * -+ * Handling of FILENAME_TYPE should be consistent with handling of -+ * FILENAME_TIME in the function parse_time_file_at() where the missing -+ * file message is printed by log_info() (in a verbose mode). -+ */ -+ int load_flags = DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE; -+ if (g_verbose < 2) load_flags |= DD_FAIL_QUIETLY_ENOENT; -+ -+ dd->dd_type = load_text_file_at(dd->dd_fd, FILENAME_TYPE, load_flags); - if (!dd->dd_type || (strlen(dd->dd_type) == 0)) - { - log_debug("Missing or empty file: "FILENAME_TYPE); --- -2.4.3 - diff --git a/0004-curl-add-a-helper-for-HTTP-GET.patch b/0004-curl-add-a-helper-for-HTTP-GET.patch deleted file mode 100644 index 44b35fc..0000000 --- a/0004-curl-add-a-helper-for-HTTP-GET.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 85e6d59c4c9aeabb16cb9e0c68f13933b2c7ed7b Mon Sep 17 00:00:00 2001 -From: Jakub Filak -Date: Tue, 25 Aug 2015 15:49:13 +0200 -Subject: [PATCH] curl: add a helper for HTTP GET - -Please do not think I am an idiot but I really do not see any better way -to enable ABRT to use HTTP GET through libreport helper functions. - -Related: rhbz#1256493 - -Signed-off-by: Jakub Filak ---- - src/include/libreport_curl.h | 10 ++++++++++ - src/lib/curl.c | 4 ++-- - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/src/include/libreport_curl.h b/src/include/libreport_curl.h -index 4b41ecc..5478fa6 100644 ---- a/src/include/libreport_curl.h -+++ b/src/include/libreport_curl.h -@@ -70,6 +70,7 @@ enum { - POST_DATA_FROMFILE_PUT = -3, - POST_DATA_FROMFILE_AS_FORM_DATA = -4, - POST_DATA_STRING_AS_FORM_DATA = -5, -+ POST_DATA_GET = -6, - }; - int - post(post_state_t *state, -@@ -79,6 +80,15 @@ post(post_state_t *state, - const char *data, - off_t data_size); - static inline int -+get(post_state_t *state, -+ const char *url, -+ const char *content_type, -+ const char **additional_headers) -+{ -+ return post(state, url, content_type, additional_headers, -+ NULL, POST_DATA_GET); -+} -+static inline int - post_string(post_state_t *state, - const char *url, - const char *content_type, -diff --git a/src/lib/curl.c b/src/lib/curl.c -index f7321b5..c927ece 100644 ---- a/src/lib/curl.c -+++ b/src/lib/curl.c -@@ -351,7 +351,7 @@ post(post_state_t *state, - xcurl_easy_setopt_ptr(handle, CURLOPT_PASSWORD, (state->password ? state->password : "")); - } - -- if (data_size != POST_DATA_FROMFILE_PUT) -+ if (data_size != POST_DATA_FROMFILE_PUT && data_size != POST_DATA_GET) - { - // Do a HTTP POST. This also makes curl use - // a "Content-Type: application/x-www-form-urlencoded" header. -@@ -459,7 +459,7 @@ post(post_state_t *state, - error_msg_and_die("out of memory or read error (curl_formadd error code: %d)", (int)curlform_err); - xcurl_easy_setopt_ptr(handle, CURLOPT_HTTPPOST, post); - } -- else -+ else if (data_size != POST_DATA_GET) - { - // ...from a blob in memory - xcurl_easy_setopt_ptr(handle, CURLOPT_POSTFIELDS, data); --- -2.5.0 - diff --git a/0005-configure-use-hex-value-for-dump-dir-mode.patch b/0005-configure-use-hex-value-for-dump-dir-mode.patch deleted file mode 100644 index 8e08dbc..0000000 --- a/0005-configure-use-hex-value-for-dump-dir-mode.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 9f32aba65d3d56e42f22f6b4709fd5cfd8b93f4c Mon Sep 17 00:00:00 2001 -From: Jakub Filak -Date: Wed, 26 Aug 2015 08:30:14 +0200 -Subject: [PATCH] configure: use hex value for dump dir mode - -The hex value is hard to understand but is supported by all languages -(Python, C, ...). - -The octal value is an invalid token in Python3. - -The value is exported in libreport pkg-config file and projects like -ABRT use the value in their source files (sed 's/.../.../'). - -Signed-off-by: Jakub Filak ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 81a5ada..c7b9ef8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -316,8 +316,8 @@ AC_PATH_PROG(AUGPARSE, augparse, no) - - AC_ARG_WITH([defaultdumpdirmode], - AS_HELP_STRING([--with-defaultdumpdirmode=OCTAL-MODE], -- [Default dump dir mode (default: 0640)]), -- [], [with_defaultdumpdirmode="0640"]) -+ [Default dump dir mode (default: 0x1A0 (0640))]), -+ [], [with_defaultdumpdirmode="0x1A0"]) - AC_SUBST([DEFAULT_DUMP_DIR_MODE], [$with_defaultdumpdirmode]) - - DUMP_DIR_OWNED_BY_USER=1 --- -2.5.0 - diff --git a/0007-bugzilla-put-VARIANT_ID-to-Whiteboard.patch b/0007-bugzilla-put-VARIANT_ID-to-Whiteboard.patch deleted file mode 100644 index 7a4c49c..0000000 --- a/0007-bugzilla-put-VARIANT_ID-to-Whiteboard.patch +++ /dev/null @@ -1,79 +0,0 @@ -From fdf8665e241190d1a7406ae2958e88d17f9b372b Mon Sep 17 00:00:00 2001 -From: Jakub Filak -Date: Tue, 1 Sep 2015 14:56:21 +0200 -Subject: [PATCH] bugzilla: put VARIANT_ID= to Whiteboard - -Parse /etc/os-release ('os-info' element), read VARIANT_ID and put its -value to Whiteboard of the newly created bug. - -This commit allows users to search for ";VARIANT_ID=$ID;". - -Related to abrt/abrt#995 - -Signed-off-by: Jakub Filak ---- - src/plugins/rhbz.c | 34 +++++++++++++++++++++++++++++++--- - 1 file changed, 31 insertions(+), 3 deletions(-) - -diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c -index a376c13..c4af091 100644 ---- a/src/plugins/rhbz.c -+++ b/src/plugins/rhbz.c -@@ -520,7 +520,35 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, - - char *summary = shorten_string_to_length(bzsummary, MAX_SUMMARY_LENGTH); - -- char *status_whiteboard = xasprintf("abrt_hash:%s", duphash); -+ struct strbuf *status_whiteboard = strbuf_new(); -+ strbuf_append_strf(status_whiteboard, "abrt_hash:%s;", duphash); -+ -+ { /* Add fields from /etc/os-release to Whiteboard for simple metrics. */ -+ map_string_t *osinfo = new_map_string(); -+ problem_data_get_osinfo(problem_data, osinfo); -+ -+ /* This is the highest abstraction level I am willing to introduce now. -+ * -+ * The lines below can be either reduced to the body of the for loop -+ * or the opts variable can be dynamically initialized -+ * or you can simply add an another /etc/os-release option name -+ * (e.g. BUILD_ID). -+ */ -+ const char *const opts[] = { "VARIANT_ID", NULL }; -+ for (const char *const *iter = opts; *iter != NULL; ++iter) -+ { -+ const char *v = get_map_string_item_or_NULL(osinfo, *iter); -+ if (v != NULL) -+ { -+ /* semi-colon (;) is the delimiter because /etc/os-release *_ID -+ * options does not permit the ';' character in values -+ */ -+ strbuf_append_strf(status_whiteboard, "%s=%s;", *iter, v); -+ } -+ } -+ -+ free_map_string(osinfo); -+ } - - xmlrpc_env env; - xmlrpc_env_init(&env); -@@ -532,7 +560,7 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, - abrt_xmlrpc_params_add_string(&env, params, "version", version); - abrt_xmlrpc_params_add_string(&env, params, "summary", summary); - 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, "status_whiteboard", status_whiteboard->buf); - - if(arch) - abrt_xmlrpc_params_add_string(&env, params, "platform", arch); -@@ -562,7 +590,7 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, - xmlrpc_DECREF(params); - xmlrpc_env_clean(&env); - -- free(status_whiteboard); -+ strbuf_free(status_whiteboard); - free(summary); - - if (!result) --- -2.5.0 - diff --git a/libreport.spec b/libreport.spec index d3d6acb..15fb933 100644 --- a/libreport.spec +++ b/libreport.spec @@ -6,8 +6,8 @@ Summary: Generic library for reporting various problems Name: libreport -Version: 2.6.2 -Release: 5%{?dist} +Version: 2.6.3 +Release: 1%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: https://abrt.readthedocs.org/ @@ -16,13 +16,6 @@ Source1: autogen.sh # git format-patch %%{Version} -N -M --topo-order # i=0; for p in `ls 0*.patch`; do printf "Patch%04d: %s\n" $i $p; ((i++)); done -Patch0001: 0001-Use-a-dgettext-function-returning-strings-instead-of.patch -Patch0002: 0002-dd-stop-warning-about-corrupted-mandatory-files.patch -Patch0003: 0003-dd-don-t-warn-about-missing-type-if-the-locking-fail.patch -Patch0004: 0004-curl-add-a-helper-for-HTTP-GET.patch -Patch0005: 0005-configure-use-hex-value-for-dump-dir-mode.patch -#Patch0006: 0006-autogen-use-dnf-instead-of-yum-to-install-dependenci.patch -Patch0007: 0007-bugzilla-put-VARIANT_ID-to-Whiteboard.patch # git is need for '%%autosetup -S git' which automatically applies all the # patches above. Please, be aware that the patches must be generated @@ -235,6 +228,9 @@ Summary: %{name}'s RHTSupport plugin Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} Requires: libreport-web = %{version}-%{release} +%if 0%{?rhel} +Requires: redhat-access-insights +%endif %description plugin-rhtsupport Plugin to report bugs into RH support system. @@ -739,6 +735,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Oct 15 2015 Matej Habrnal 2.6.3-1 +- reporter-bugzilla: add parameter -p +- fix save users changes after reviewing dump dir files +- bugzilla: don't attach build_ids +- rewrite event rule parser +- ureport: improve curl's error messages +- curl: add posibility to use own Certificate Authority cert + * Tue Sep 15 2015 Matej Habrnal 2.6.2-5 - bugzilla: put VARIANT_ID= to Whiteboard diff --git a/sources b/sources index 7d20fea..fcf3d75 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0b80a78b158ba54da8563552a5a5c5aa libreport-2.6.2.tar.gz +a377e6dc8665e679a72fefd09341c9c5 libreport-2.6.3.tar.gz