diff --git a/.gitignore b/.gitignore index ffae115..50a2b87 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /libreport-2.9.5.tar.gz /libreport-2.9.6.tar.gz /libreport-2.9.7.tar.gz +/libreport-2.10.0.tar.gz diff --git a/0001-rhbz-Replace-nomail-flag-with-minor_update.patch b/0001-rhbz-Replace-nomail-flag-with-minor_update.patch deleted file mode 100644 index 6ab8dce..0000000 --- a/0001-rhbz-Replace-nomail-flag-with-minor_update.patch +++ /dev/null @@ -1,232 +0,0 @@ -From 569bf0e3fed698e93b8e098bf6a0bb2f773aed6a Mon Sep 17 00:00:00 2001 -From: Martin Kutlak -Date: Fri, 4 Jan 2019 12:26:28 +0100 -Subject: [PATCH] rhbz: Replace nomail flag with minor_update - -In Bugzilla v5.0 nomail flag is replaced with minor_update. [1] -Because we still use the old nomail flag emails are being sent for every added attachment/comment. - -Related: rhbz#1660157 -Closes: abrt/abrt#1346 - -See also: -- https://partner-bugzilla.redhat.com/docs/en/html/integrating/api/Bugzilla/WebService/Bug.html?highlight=minor_update - -[1] https://bugzilla.redhat.com/show_bug.cgi?id=1655829 - -Signed-off-by: Martin Kutlak ---- - src/plugins/reporter-bugzilla.c | 12 +++++----- - src/plugins/rhbz.c | 41 ++++++++++++++++++--------------- - src/plugins/rhbz.h | 4 ++-- - 3 files changed, 30 insertions(+), 27 deletions(-) - -diff --git a/src/plugins/reporter-bugzilla.c b/src/plugins/reporter-bugzilla.c -index d4d03f8e..c12e00d1 100644 ---- a/src/plugins/reporter-bugzilla.c -+++ b/src/plugins/reporter-bugzilla.c -@@ -35,7 +35,7 @@ int attach_text_item(struct abrt_xmlrpc *ax, const char *bug_id, - log_debug("attaching '%s' as text", item_name); - int r = rhbz_attach_blob(ax, bug_id, - item_name, item->content, strlen(item->content), -- RHBZ_NOMAIL_NOTIFY -+ RHBZ_MINOR_UPDATE - ); - return (r == 0); - } -@@ -63,7 +63,7 @@ int attach_file_item(struct abrt_xmlrpc *ax, const char *bug_id, - return 0; - } - log_debug("attaching '%s' as file", item_name); -- int flag = RHBZ_NOMAIL_NOTIFY; -+ int flag = RHBZ_MINOR_UPDATE; - if (!(item->flags & CD_FLAG_BIGTXT)) - flag |= RHBZ_BINARY_ATTACHMENT; - int r = rhbz_attach_fd(ax, bug_id, item_name, fd, flag); -@@ -793,7 +793,7 @@ int main(int argc, char **argv) - if (reported_to && reported_to->url) - { - log_warning(_("Adding External URL to bug %i"), new_id); -- rhbz_set_url(client, new_id, reported_to->url, RHBZ_NOMAIL_NOTIFY); -+ rhbz_set_url(client, new_id, reported_to->url, RHBZ_MINOR_UPDATE); - free_report_result(reported_to); - } - } -@@ -821,7 +821,7 @@ int main(int argc, char **argv) - if (existing_id >= 0) - { - log_warning(_("Closing bug %i as duplicate of bug %i"), new_id, existing_id); -- rhbz_close_as_duplicate(client, new_id, existing_id, RHBZ_NOMAIL_NOTIFY); -+ rhbz_close_as_duplicate(client, new_id, existing_id, RHBZ_MINOR_UPDATE); - } - - goto log_out; -@@ -876,7 +876,7 @@ int main(int argc, char **argv) - && !g_list_find_custom(bz->bi_cc_list, rhbz.b_login, (GCompareFunc)g_strcmp0) - ) { - log_warning(_("Adding %s to CC list"), rhbz.b_login); -- rhbz_mail_to_cc(client, bz->bi_id, rhbz.b_login, RHBZ_NOMAIL_NOTIFY); -+ rhbz_mail_to_cc(client, bz->bi_id, rhbz.b_login, RHBZ_MINOR_UPDATE); - } - - /* Add comment and bt */ -@@ -911,7 +911,7 @@ int main(int argc, char **argv) - sprintf(bug_id_str, "%i", bz->bi_id); - log_warning(_("Attaching better backtrace")); - rhbz_attach_blob(client, bug_id_str, FILENAME_BACKTRACE, bt, strlen(bt), -- RHBZ_NOMAIL_NOTIFY); -+ RHBZ_MINOR_UPDATE); - } - } - else -diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c -index 680527d7..cb6505ea 100644 ---- a/src/plugins/rhbz.c -+++ b/src/plugins/rhbz.c -@@ -605,7 +605,7 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, - return new_bug_id; - } - --/* suppress mail notify by {s:i} (nomail:1) (driven by flag) */ -+/* suppress mail notify by {s:i} (minor_update:1) (driven by flag) */ - int rhbz_attach_blob(struct abrt_xmlrpc *ax, const char *bug_id, - const char *filename, const char *data, int data_len, int flags) - { -@@ -620,7 +620,7 @@ int rhbz_attach_blob(struct abrt_xmlrpc *ax, const char *bug_id, - - char *fn = xasprintf("File: %s", filename); - xmlrpc_value* result; -- int nomail_notify = !!IS_NOMAIL_NOTIFY(flags); -+ int minor_update = !!IS_MINOR_UPDATE(flags); - - /* http://www.bugzilla.org/docs/4.2/en/html/api/Bugzilla/WebService/Bug.html#add_attachment - * -@@ -640,10 +640,11 @@ int rhbz_attach_blob(struct abrt_xmlrpc *ax, const char *bug_id, - */ - "data", data, (size_t)data_len, - -- /* Undocumented argument but it works with Red Hat Bugzilla version 4.2.4-7 -- * and version 4.4.rc1.b02 -+ /* If set to true, this is considered a minor update and no mail is sent to users who do not want -+ * minor update emails. If current user is not in the minor_update_group, this parameter is simply -+ * ignored. - */ -- "nomail", nomail_notify -+ "minor_update", minor_update - ); - - free(fn); -@@ -737,25 +738,25 @@ struct bug_info *rhbz_find_origin_bug_closed_duplicate(struct abrt_xmlrpc *ax, - return bi_tmp; - } - --/* suppress mail notify by {s:i} (nomail:1) */ -+/* suppress mail notify by {s:i} (minor_update:1) */ - void rhbz_mail_to_cc(struct abrt_xmlrpc *ax, int bug_id, const char *mail, int flags) - { - func_entry(); - - xmlrpc_value *result; -- int nomail_notify = !!IS_NOMAIL_NOTIFY(flags); -+ int minor_update = !!IS_MINOR_UPDATE(flags); - #if 0 /* Obsolete API */ - result = abrt_xmlrpc_call(ax, "Bug.update", "({s:i,s:{s:(s),s:i}})", - "ids", bug_id, - "updates", "add_cc", mail, -- "nomail", nomail_notify -+ "minor_update", minor_update - ); - #endif - /* Bugzilla 4.0+ uses this API: */ - result = abrt_xmlrpc_call(ax, "Bug.update", "{s:i,s:{s:(s),s:i}}", - "ids", bug_id, - "cc", "add", mail, -- "nomail", nomail_notify -+ "minor_update", minor_update - ); - if (result) - xmlrpc_DECREF(result); -@@ -786,12 +787,12 @@ void rhbz_add_comment(struct abrt_xmlrpc *ax, int bug_id, const char *comment, - func_entry(); - - int private = !!IS_PRIVATE(flags); -- int nomail_notify = !!IS_NOMAIL_NOTIFY(flags); -+ int minor_update = !!IS_MINOR_UPDATE(flags); - - xmlrpc_value *result; - 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); -+ "private", private, "minor_update", minor_update); - - if (result) - xmlrpc_DECREF(result); -@@ -801,15 +802,16 @@ 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); -+ const int minor_update = !!IS_MINOR_UPDATE(flags); - 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 -+ /* If set to true, this is considered a minor update and no mail is sent to users who do not want -+ * minor update emails. If current user is not in the minor_update_group, this parameter is simply -+ * ignored. - */ -- "nomail", nomail_notify -+ "minor_update", minor_update - ); - - if (result) -@@ -822,17 +824,18 @@ void rhbz_close_as_duplicate(struct abrt_xmlrpc *ax, int bug_id, - { - func_entry(); - -- const int nomail_notify = !!IS_NOMAIL_NOTIFY(flags); -+ const int minor_update = !!IS_MINOR_UPDATE(flags); - xmlrpc_value *result = abrt_xmlrpc_call(ax, "Bug.update", "{s:i,s:s,s:s,s:i,s:i}", - "ids", bug_id, - "status", "CLOSED", - "resolution", "DUPLICATE", - "dupe_of", duplicate_bug, - -- /* Undocumented argument but it works with Red Hat Bugzilla version 4.2.4-7 -- * and version 4.4.rc1.b02 -+ /* If set to true, this is considered a minor update and no mail is sent to users who do not want -+ * minor update emails. If current user is not in the minor_update_group, this parameter is simply -+ * ignored. - */ -- "nomail", nomail_notify -+ "minor_update", minor_update - ); - - if (result) -diff --git a/src/plugins/rhbz.h b/src/plugins/rhbz.h -index 86632a35..3990eda0 100644 ---- a/src/plugins/rhbz.h -+++ b/src/plugins/rhbz.h -@@ -36,7 +36,7 @@ enum { - RHBZ_MANDATORY_MEMB = (1 << 0), - RHBZ_READ_STR = (1 << 1), - RHBZ_READ_INT = (1 << 2), -- RHBZ_NOMAIL_NOTIFY = (1 << 3), -+ RHBZ_MINOR_UPDATE = (1 << 3), - RHBZ_PRIVATE = (1 << 4), - RHBZ_BINARY_ATTACHMENT = (1 << 5), - }; -@@ -44,7 +44,7 @@ enum { - #define IS_MANDATORY(flags) ((flags) & RHBZ_MANDATORY_MEMB) - #define IS_READ_STR(flags) ((flags) & RHBZ_READ_STR) - #define IS_READ_INT(flags) ((flags) & RHBZ_READ_INT) --#define IS_NOMAIL_NOTIFY(flags) ((flags) & RHBZ_NOMAIL_NOTIFY) -+#define IS_MINOR_UPDATE(flags) ((flags) & RHBZ_MINOR_UPDATE) - #define IS_PRIVATE(flags) ((flags) & RHBZ_PRIVATE) - - struct bug_info { --- -2.17.2 - diff --git a/0001-tests-forbidden_words-Don-t-hardcode-sysconfdir.patch b/0001-tests-forbidden_words-Don-t-hardcode-sysconfdir.patch new file mode 100644 index 0000000..f12969c --- /dev/null +++ b/0001-tests-forbidden_words-Don-t-hardcode-sysconfdir.patch @@ -0,0 +1,63 @@ +From 7df0987d2373df664cee3014ac0ad94186ac7acb Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Mon, 4 Feb 2019 10:12:04 +0100 +Subject: [PATCH] =?UTF-8?q?tests:=20forbidden=5Fwords:=20Don=E2=80=99t=20h?= + =?UTF-8?q?ardcode=20sysconfdir?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +As it may not necessarily be /etc (an example would be rpmbuild, where +it can become /usr/local/etc or somesuch), it would make more sense to +do the same thing libreport does - define $sysconfdir in a macro. + +Signed-off-by: Ernestas Kulik +--- + tests/Makefile.am | 3 +++ + tests/forbidden_words.at | 2 +- + tests/local.at | 2 +- + 3 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 89d5f694..d46d5772 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -29,6 +29,9 @@ libreport_include_helpers_HEADERS = \ + helpers/testsuite.h \ + helpers/testsuite_tools.h + ++TESTSUITEFLAGS = \ ++ CPPFLAGS='-DCONF_DIR="$(CONF_DIR)" $(CPPFLAGS)' ++ + TESTSUITE_AT = \ + local.at \ + testsuite.at \ +diff --git a/tests/forbidden_words.at b/tests/forbidden_words.at +index 259ebc1d..a6c0193d 100644 +--- a/tests/forbidden_words.at ++++ b/tests/forbidden_words.at +@@ -34,7 +34,7 @@ TS_MAIN + { + dynamic_words = load_words_from_file("test_ignored.conf"); + } +- TS_ASSERT_STDERR_EQ_END("Can't open /etc/libreport/test_ignored.conf: No such file or directory\n", "User notified about errors!"); ++ TS_ASSERT_STDERR_EQ_END("Can't open " CONF_DIR "/test_ignored.conf: No such file or directory\n", "User notified about errors!"); + + TS_ASSERT_PTR_IS_NOT_NULL(dynamic_words); + +diff --git a/tests/local.at b/tests/local.at +index 00e088ff..3a181239 100644 +--- a/tests/local.at ++++ b/tests/local.at +@@ -6,7 +6,7 @@ + # Compile SOURCES into OUTPUT. If OUTPUT does not contain '.', + # assume that we are linking too; this is a hack. + m4_define([AT_COMPILE], +-[AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS m4_bmatch([$1], [[.]], [], [$LDFLAGS ])-o $1 m4_default([$2], [$1.c])[]m4_bmatch([$1], [[.]], [], [ $LIBS])], ++[AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $CPPFLAGS m4_bmatch([$1], [[.]], [], [$LDFLAGS ])-o $1 m4_default([$2], [$1.c])[]m4_bmatch([$1], [[.]], [], [ $LIBS])], + 0, [ignore], [ignore])]) + + # ------------------------ +-- +2.20.1 + diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index c6e1729..0000000 --- a/autogen.sh +++ /dev/null @@ -1,70 +0,0 @@ -#! /bin/sh - -print_help() -{ -cat << EOH -Prepares the source tree for configuration - -Usage: - autogen.sh [sydeps [--install]] - -Options: - - sysdeps prints out all dependencies - --install install all dependencies ('sudo yum install \$DEPS') - -EOH -} - -build_depslist() -{ - DEPS_LIST=`grep "^\(Build\)\?Requires:" *.spec.in | grep -v "%{name}" | tr -s " " | tr "," "\n" | cut -f2 -d " " | grep -v "^libreport" | sort -u | tr "\n" " "` -} - -case "$1" in - "--help"|"-h") - print_help - exit 0 - ;; - "sysdeps") - build_depslist - - if [ "$2" == "--install" ]; then - set -x verbose - sudo yum install $DEPS_LIST - set +x verbose - else - echo $DEPS_LIST - fi - exit 0 - ;; - *) - echo "Running gen-version" - ./gen-version - - mkdir -p m4 - echo "Creating m4/aclocal.m4 ..." - test -r m4/aclocal.m4 || touch m4/aclocal.m4 - - echo "Running autopoint" - autopoint --force || exit 1 - - echo "Running intltoolize..." - intltoolize --force --copy --automake || exit 1 - - echo "Running aclocal..." - aclocal || exit 1 - - echo "Running libtoolize..." - libtoolize || exit 1 - - echo "Running autoheader..." - autoheader || return 1 - - echo "Running autoconf..." - autoconf --force || exit 1 - - echo "Running automake..." - automake --add-missing --force --copy || exit 1 - ;; -esac diff --git a/libreport.spec b/libreport.spec index 9be2f32..8703bfa 100644 --- a/libreport.spec +++ b/libreport.spec @@ -10,7 +10,7 @@ %define libjson_devel json-c-devel %endif -%define glib_ver 2.43 +%define glib_ver 2.43.4 %if 0%{?fedora} || 0%{?rhel} > 7 # Enable python3 build by default @@ -28,16 +28,13 @@ Summary: Generic library for reporting various problems Name: libreport -Version: 2.9.7 -Release: 3%{?dist} +Version: 2.10.0 +Release: 1%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Patch0001: 0001-rhbz-Replace-nomail-flag-with-minor_update.patch - - BuildRequires: %{dbus_devel} BuildRequires: gtk3-devel BuildRequires: curl-devel @@ -367,9 +364,11 @@ data over ftp/scp... %autosetup -S git %build -autoconf +./gen-version +autoreconf -if +intltoolize --automake -c -f -CFLAGS="%{optflags} -Werror" %configure \ +%configure \ %if %{without python2} --without-python2 \ %endif # with python2 @@ -542,6 +541,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_includedir}/libreport/problem_details_widget.h %{_includedir}/libreport/problem_details_dialog.h %{_includedir}/libreport/problem_utils.h +%{_includedir}/libreport/report_result.h %{_includedir}/libreport/ureport.h %{_includedir}/libreport/reporters.h %{_includedir}/libreport/global_configuration.h @@ -814,6 +814,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog +* Sat Feb 02 2019 Ernestas Kulik - 2.10.0-1 +- Update to 2.10.0 +- Bump GLib dependency +- Add patch to work around issue with test + * Fri Feb 01 2019 Fedora Release Engineering - 2.9.7-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 9749b3c..948e33d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libreport-2.9.7.tar.gz) = 8e92470ada204236ae4540145ba7f750814c74b0f5858d25ec797f06d4daeb9fc40996b609a33e154072a45624513d7dbd4027587708ffbfb2f40b0687b16ac3 +SHA512 (libreport-2.10.0.tar.gz) = 978ea442d82b75abf80b2075f540cb05c5577387a9221f2070c9695c4546d36169738d223f5e903d0b774b7e1566a6111c55a6bb51a0822ad1676095f067c45b