From 6313c5efdbe08e3f2f1c01c2432ef77183c6baa1 Mon Sep 17 00:00:00 2001 From: Jakub Filak Date: Mon, 1 Sep 2014 09:20:09 +0200 Subject: [PATCH] Pre-release update --- 0011-xml-fix-a-typo-in-analyze_CCpp.patch | 28 +++ ...the-initialization-in-python-scripts.patch | 185 ++++++++++++++++++ ...Fix-json-c-detection-for-json-c-0.11.patch | 42 ++++ 0014-oops-add-man-page.patch | 60 ++++++ ...-json.h-accordingly-to-json-c-CFLAGS.patch | 34 ++++ ...t-handling-crashes-in-lxc-containers.patch | 35 ++++ ...-after-free-bug-uncoverd-by-coverity.patch | 34 ++++ ...let-disable-GDK-deprecation-warnings.patch | 35 ++++ 0020-a-h-event-don-t-spam-system-logs.patch | 39 ++++ ...data-reduce-amount-of-error-messages.patch | 53 +++++ ...nore-errors-in-verbose-logging-modes.patch | 32 +++ ...ing-less-log-messages-for-duplicates.patch | 60 ++++++ ...e-respect-Bugzilla-event-preferences.patch | 26 +++ abrt.spec | 25 ++- 14 files changed, 687 insertions(+), 1 deletion(-) create mode 100644 0011-xml-fix-a-typo-in-analyze_CCpp.patch create mode 100644 0012-gettext-fix-the-initialization-in-python-scripts.patch create mode 100644 0013-configure.ac-Fix-json-c-detection-for-json-c-0.11.patch create mode 100644 0014-oops-add-man-page.patch create mode 100644 0016-json-include-json.h-accordingly-to-json-c-CFLAGS.patch create mode 100644 0017-Revert-Support-handling-crashes-in-lxc-containers.patch create mode 100644 0018-koops-fix-a-use-after-free-bug-uncoverd-by-coverity.patch create mode 100644 0019-applet-disable-GDK-deprecation-warnings.patch create mode 100644 0020-a-h-event-don-t-spam-system-logs.patch create mode 100644 0021-a-a-s-p-data-reduce-amount-of-error-messages.patch create mode 100644 0022-dbus-don-t-ignore-errors-in-verbose-logging-modes.patch create mode 100644 0023-logging-less-log-messages-for-duplicates.patch create mode 100644 0024-retrace-respect-Bugzilla-event-preferences.patch diff --git a/0011-xml-fix-a-typo-in-analyze_CCpp.patch b/0011-xml-fix-a-typo-in-analyze_CCpp.patch new file mode 100644 index 0000000..b5c76f6 --- /dev/null +++ b/0011-xml-fix-a-typo-in-analyze_CCpp.patch @@ -0,0 +1,28 @@ +From 4d548cdc3b82d5b6af92e63b0d90f6e5bb9496cb Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Fri, 18 Jul 2014 13:50:42 +0200 +Subject: [PATCH 11/24] xml: fix a typo in analyze_CCpp + +Resolves rhbz#1120767 + +Signed-off-by: Jakub Filak +--- + src/plugins/analyze_CCpp.xml.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/analyze_CCpp.xml.in b/src/plugins/analyze_CCpp.xml.in +index bdd81eb..c3da3a3 100644 +--- a/src/plugins/analyze_CCpp.xml.in ++++ b/src/plugins/analyze_CCpp.xml.in +@@ -2,7 +2,7 @@ + + Analyze C/C++ Crash + <_description>Send core dump to remote retrace server for analysis or perform local analysis if the remote analysis fails +- <_long-description>Uploads coredump to a server, which generates backtrace and returns it. If user doens't want to upload his coredump to anywhere the event performs local analysis. Local analysis is run event if remote analysis fails. ++ <_long-description>Uploads coredump to a server, which generates backtrace and returns it. If user doesn't want to upload his coredump to anywhere the event performs local analysis. Local analysis is run event if remote analysis fails. + Pros: no need for debuginfo downloads. Retrace server's database of debuginfos is more complete. Retrace server may generate better backtraces. + Cons: coredump you upload contains all the data from the crashed program, including your private data, if any. + +-- +2.1.0 + diff --git a/0012-gettext-fix-the-initialization-in-python-scripts.patch b/0012-gettext-fix-the-initialization-in-python-scripts.patch new file mode 100644 index 0000000..f7cbd92 --- /dev/null +++ b/0012-gettext-fix-the-initialization-in-python-scripts.patch @@ -0,0 +1,185 @@ +From ed4889a23a436cc6db3e753f25a9fc9f8ffa537b Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 22 Jul 2014 16:13:25 +0200 +Subject: [PATCH 12/24] gettext: fix the initialization in python scripts + +ABRT scripts cannot import and use _ symbol from reportclient because +reporclient's _ is bound to 'libreport' package. + +Related to rhbz#1087880 + +Signed-off-by: Jakub Filak +--- + po/POTFILES.in | 2 ++ + src/daemon/abrt-handle-upload.in | 26 ++++++++++++++++++++++++-- + src/plugins/abrt-action-analyze-vmcore.in | 25 ++++++++++++++++++++++++- + src/plugins/abrt-action-install-debuginfo.in | 2 +- + src/plugins/abrt-action-ureport | 25 +++++++++++++++++++++++-- + 5 files changed, 74 insertions(+), 6 deletions(-) + +diff --git a/po/POTFILES.in b/po/POTFILES.in +index 160cd8b..21e214e 100644 +--- a/po/POTFILES.in ++++ b/po/POTFILES.in +@@ -14,6 +14,7 @@ src/daemon/abrtd.c + src/daemon/abrt-handle-event.c + src/daemon/abrt-upload-watch.c + src/daemon/abrt-auto-reporting.c ++src/daemon/abrt-handle-upload.in + src/lib/abrt_conf.c + src/lib/hooklib.c + src/lib/problem_api.c +@@ -32,6 +33,7 @@ src/plugins/abrt-action-generate-core-backtrace.c + src/plugins/abrt-action-install-debuginfo.in + src/plugins/abrt-action-perform-ccpp-analysis.in + src/plugins/abrt-action-trim-files.c ++src/plugins/abrt-action-ureport + src/plugins/abrt-gdb-exploitable + src/plugins/abrt-watch-log.c + src/plugins/abrt-dump-oops.c +diff --git a/src/daemon/abrt-handle-upload.in b/src/daemon/abrt-handle-upload.in +index 084170e..dbc4534 100755 +--- a/src/daemon/abrt-handle-upload.in ++++ b/src/daemon/abrt-handle-upload.in +@@ -11,7 +11,29 @@ import tempfile + import shutil + import datetime + +-from reportclient import _, set_verbosity, error_msg_and_die, error_msg, log ++from reportclient import set_verbosity, error_msg_and_die, error_msg, log ++ ++GETTEXT_PROGNAME = "abrt" ++import locale ++import gettext ++ ++_ = lambda x: gettext.lgettext(x) ++ ++def init_gettext(): ++ try: ++ locale.setlocale(locale.LC_ALL, "") ++ except locale.Error: ++ os.environ['LC_ALL'] = 'C' ++ locale.setlocale(locale.LC_ALL, "") ++ # Defeat "AttributeError: 'module' object has no attribute 'nl_langinfo'" ++ try: ++ gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, locale.nl_langinfo(locale.CODESET)) ++ except AttributeError: ++ pass ++ gettext.bindtextdomain(GETTEXT_PROGNAME, '/usr/share/locale') ++ gettext.textdomain(GETTEXT_PROGNAME) ++ ++ + import problem + + def write_str_to(filename, s): +@@ -32,7 +54,7 @@ if __name__ == "__main__": + sys.exit(die_exitcode) + + # localization +- #init_gettext() - done by reportclient module init ++ init_gettext() + + verbose = 0 + ABRT_VERBOSE = os.getenv("ABRT_VERBOSE") +diff --git a/src/plugins/abrt-action-analyze-vmcore.in b/src/plugins/abrt-action-analyze-vmcore.in +index 11ad846..c08af80 100644 +--- a/src/plugins/abrt-action-analyze-vmcore.in ++++ b/src/plugins/abrt-action-analyze-vmcore.in +@@ -8,7 +8,28 @@ import sys + import getopt + from subprocess import Popen, PIPE + +-from reportclient import _, verbose, set_verbosity, error_msg_and_die, error_msg ++from reportclient import verbose, set_verbosity, error_msg_and_die, error_msg ++ ++GETTEXT_PROGNAME = "abrt" ++import locale ++import gettext ++ ++_ = lambda x: gettext.lgettext(x) ++ ++def init_gettext(): ++ try: ++ locale.setlocale(locale.LC_ALL, "") ++ except locale.Error: ++ os.environ['LC_ALL'] = 'C' ++ locale.setlocale(locale.LC_ALL, "") ++ # Defeat "AttributeError: 'module' object has no attribute 'nl_langinfo'" ++ try: ++ gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, locale.nl_langinfo(locale.CODESET)) ++ except AttributeError: ++ pass ++ gettext.bindtextdomain(GETTEXT_PROGNAME, '/usr/share/locale') ++ gettext.textdomain(GETTEXT_PROGNAME) ++ + + PROGNAME = "abrt-action-analyze-vmcore" + +@@ -26,6 +47,8 @@ if __name__ == "__main__": + tmpdir = "" + vmcore = "" + ++ init_gettext() ++ + help_text = _("Usage: {0} [-v[v]] [--core=VMCORE]").format(PROGNAME) + try: + opts, args = getopt.getopt(sys.argv[1:], "hvd", ["help", "core="]) +diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in +index 5fd3110..f46d1b2 100644 +--- a/src/plugins/abrt-action-install-debuginfo.in ++++ b/src/plugins/abrt-action-install-debuginfo.in +@@ -11,7 +11,7 @@ import errno + import getopt + import reportclient + from subprocess import Popen, PIPE +-from reportclient import _, verbose, log, log1, log2, set_verbosity, error_msg_and_die, error_msg ++from reportclient import verbose, log, log1, log2, set_verbosity, error_msg_and_die, error_msg + import time + from reportclient.debuginfo import DebugInfoDownload, filter_installed_debuginfos, build_ids_to_path, clean_up + import problem +diff --git a/src/plugins/abrt-action-ureport b/src/plugins/abrt-action-ureport +index 0f6de03..1abe7b3 100755 +--- a/src/plugins/abrt-action-ureport ++++ b/src/plugins/abrt-action-ureport +@@ -10,7 +10,28 @@ import os + import getopt + + from report import dd_opendir, DD_FAIL_QUIETLY_ENOENT, run_event_state +-from reportclient import _, set_verbosity, error_msg_and_die, error_msg, log1, log ++from reportclient import set_verbosity, error_msg_and_die, error_msg, log1, log ++ ++GETTEXT_PROGNAME = "abrt" ++import locale ++import gettext ++ ++_ = lambda x: gettext.lgettext(x) ++ ++def init_gettext(): ++ try: ++ locale.setlocale(locale.LC_ALL, "") ++ except locale.Error: ++ os.environ['LC_ALL'] = 'C' ++ locale.setlocale(locale.LC_ALL, "") ++ # Defeat "AttributeError: 'module' object has no attribute 'nl_langinfo'" ++ try: ++ gettext.bind_textdomain_codeset(GETTEXT_PROGNAME, locale.nl_langinfo(locale.CODESET)) ++ except AttributeError: ++ pass ++ gettext.bindtextdomain(GETTEXT_PROGNAME, '/usr/share/locale') ++ gettext.textdomain(GETTEXT_PROGNAME) ++ + + def spawn_and_wait(prog): + try: +@@ -45,7 +66,7 @@ def run_event(event_name, dump_dir_name): + + if __name__ == "__main__": + # localization +- #init_gettext() - done by reportclient module init ++ init_gettext() + + verbose = 0 + ABRT_VERBOSE = os.getenv("ABRT_VERBOSE") +-- +2.1.0 + diff --git a/0013-configure.ac-Fix-json-c-detection-for-json-c-0.11.patch b/0013-configure.ac-Fix-json-c-detection-for-json-c-0.11.patch new file mode 100644 index 0000000..3816f9a --- /dev/null +++ b/0013-configure.ac-Fix-json-c-detection-for-json-c-0.11.patch @@ -0,0 +1,42 @@ +From 5dd86951db386391442a35f19f72939f4af0c2e1 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 29 Jul 2014 15:38:26 +0200 +Subject: [PATCH 13/24] configure.ac: Fix json-c detection for json-c >= 0.11 + +json-c-0.11 renamed the pkgconfig file to json-c +https://github.com/json-c/json-c/blob/master/ChangeLog The configure.ac +file was fixed to look for json-c if json is not available. + +Signed-off-by: Markos Chandras +Signed-off-by: Martin Milata + +libreport commit commit 07a33e562e99fa68332925c402538341d8cd82e2 +Author: Markos Chandras + +Signed-off-by: Jakub Filak +--- + configure.ac | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 03882e9..eb42231 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -273,7 +273,13 @@ ABRT_PARSE_WITH([bodhi])) + + if test -z "$NO_BODHI" + then +-PKG_CHECK_MODULES([JSON_C], [json]) ++PKG_CHECK_MODULES([JSON_C], [json], [ ++ JSON_C_PACKAGE=json ++], [ ++ PKG_CHECK_MODULES([JSON_C], [json-c], [ ++ JSON_C_PACKAGE=json-c ++ ]) ++]) + PKG_CHECK_MODULES([LIBREPORT_WEB], [libreport-web]) + AM_CONDITIONAL(BUILD_BODHI, true) + else +-- +2.1.0 + diff --git a/0014-oops-add-man-page.patch b/0014-oops-add-man-page.patch new file mode 100644 index 0000000..146df4f --- /dev/null +++ b/0014-oops-add-man-page.patch @@ -0,0 +1,60 @@ +From 6dfa20921a88453718d1e4642e109f6d1be69861 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Fri, 1 Aug 2014 09:31:53 +0200 +Subject: [PATCH 14/24] oops: add man page + +Signed-off-by: Jakub Filak +--- + doc/Makefile.am | 1 + + doc/abrt-oops.conf.txt | 27 +++++++++++++++++++++++++++ + 2 files changed, 28 insertions(+) + create mode 100644 doc/abrt-oops.conf.txt + +diff --git a/doc/Makefile.am b/doc/Makefile.am +index 064e2ba..abebdb0 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -49,6 +49,7 @@ MAN5_TXT += abrt-xorg.conf.txt + MAN5_TXT += abrt-python.conf.txt + MAN5_TXT += abrt-python3.conf.txt + MAN5_TXT += abrt-CCpp.conf.txt ++MAN5_TXT += abrt-oops.conf.txt + MAN5_TXT += gpg_keys.conf.txt + MAN5_TXT += abrt-vmcore.conf.txt + +diff --git a/doc/abrt-oops.conf.txt b/doc/abrt-oops.conf.txt +new file mode 100644 +index 0000000..1e2a2ef +--- /dev/null ++++ b/doc/abrt-oops.conf.txt +@@ -0,0 +1,27 @@ ++abrt-oops.conf(5) ++================= ++ ++NAME ++---- ++abrt-oops.conf - Configuration file for ABRT's Kernel Oops extractor ++ ++DESCRIPTION ++----------- ++The configuration file consists of items in the format "Option = Value". ++The following items are recognized: ++ ++DropNotReportableOopses = 'yes' / 'no' ++ If you want to see only reportable oopses, set to "yes". ++ Default is 'no': do not drop them. ++ ++OnlyFatalMCE = 'yes' / 'no' ++ If you want to see only fatal MCEs, set to "yes". ++ Defaults is 'yes': detect only fatal ones. ++ ++SEE ALSO ++-------- ++abrt.conf(5) ++ ++AUTHORS ++------- ++* ABRT team +-- +2.1.0 + diff --git a/0016-json-include-json.h-accordingly-to-json-c-CFLAGS.patch b/0016-json-include-json.h-accordingly-to-json-c-CFLAGS.patch new file mode 100644 index 0000000..f91cbdd --- /dev/null +++ b/0016-json-include-json.h-accordingly-to-json-c-CFLAGS.patch @@ -0,0 +1,34 @@ +From e563de7f55036ec4a036161157f172beea15010a Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Thu, 7 Aug 2014 21:41:21 +0200 +Subject: [PATCH 16/24] json: include json.h accordingly to json-c CFLAGS + +We use $(pkg-config --cflags json-c) but we include . The +proper way to include the json-c header is to include . + +That absolute include causes errors while compiling with json-c-0.12 +where the base include directory was changed to "json-c". + +https://github.com/json-c/json-c/blob/master/ChangeLog + +Signed-off-by: Jakub Filak +--- + src/plugins/bodhi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/plugins/bodhi.c b/src/plugins/bodhi.c +index f605451..fcdbd83 100644 +--- a/src/plugins/bodhi.c ++++ b/src/plugins/bodhi.c +@@ -17,7 +17,7 @@ + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +-#include ++#include + #include + #include + #include +-- +2.1.0 + diff --git a/0017-Revert-Support-handling-crashes-in-lxc-containers.patch b/0017-Revert-Support-handling-crashes-in-lxc-containers.patch new file mode 100644 index 0000000..6527ffe --- /dev/null +++ b/0017-Revert-Support-handling-crashes-in-lxc-containers.patch @@ -0,0 +1,35 @@ +From cdb507ed336fa30151eefa6510d20c9271e7fc82 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 12 Aug 2014 14:13:25 +0200 +Subject: [PATCH 17/24] Revert "Support handling crashes in lxc containers" + +This reverts commit 4ab9fbe1a6b7889a0cd59b1406e8789d52171fd2. + +Michal Toman (2014-07-16): + +While this adds support for containers that have ABRT installed inside +(unfortunately I am not aware of any at this moment), it completely +breaks the behavior for standard chroots that people are actually using +(especially koji + mock). + +Signed-off-by: Jakub Filak +--- + src/hooks/abrt-install-ccpp-hook.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hooks/abrt-install-ccpp-hook.in b/src/hooks/abrt-install-ccpp-hook.in +index 3939b15..aa01231 100755 +--- a/src/hooks/abrt-install-ccpp-hook.in ++++ b/src/hooks/abrt-install-ccpp-hook.in +@@ -9,7 +9,7 @@ verbose=false + PATTERN_FILE="/proc/sys/kernel/core_pattern" + SAVED_PATTERN_DIR="@VAR_RUN@/abrt" + SAVED_PATTERN_FILE="@VAR_RUN@/abrt/saved_core_pattern" +-HOOK_BIN="/usr/sbin/chroot /proc/%P/root @libexecdir@/abrt-hook-ccpp" ++HOOK_BIN="@libexecdir@/abrt-hook-ccpp" + # Must match percent_specifiers[] order in abrt-hook-ccpp.c: + PATTERN="|$HOOK_BIN %s %c %p %u %g %t %e" + # Same, but with bogus "executable name" parameter +-- +2.1.0 + diff --git a/0018-koops-fix-a-use-after-free-bug-uncoverd-by-coverity.patch b/0018-koops-fix-a-use-after-free-bug-uncoverd-by-coverity.patch new file mode 100644 index 0000000..56ef589 --- /dev/null +++ b/0018-koops-fix-a-use-after-free-bug-uncoverd-by-coverity.patch @@ -0,0 +1,34 @@ +From 522d6892557c5f35571834ca5a925104d486dd28 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Fri, 1 Aug 2014 16:13:35 +0200 +Subject: [PATCH 18/24] koops: fix a use-after-free bug uncoverd by coverity + +Signed-off-by: Jakub Filak +--- + src/plugins/abrt-action-analyze-oops.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/abrt-action-analyze-oops.c b/src/plugins/abrt-action-analyze-oops.c +index 1e94e43..f74ebcb 100644 +--- a/src/plugins/abrt-action-analyze-oops.c ++++ b/src/plugins/abrt-action-analyze-oops.c +@@ -62,7 +62,6 @@ int main(int argc, char **argv) + char *oops = dd_load_text(dd, FILENAME_BACKTRACE); + char hash_str[SHA1_RESULT_LEN*2 + 1]; + int bad = koops_hash_str(hash_str, oops); +- free(oops); + if (bad) + { + error_msg("Can't find a meaningful backtrace for hashing in '%s'", dump_dir_name); +@@ -96,6 +95,8 @@ int main(int argc, char **argv) + } + } + ++ free(oops); ++ + if (!bad) + { + dd_save_text(dd, FILENAME_UUID, hash_str); +-- +2.1.0 + diff --git a/0019-applet-disable-GDK-deprecation-warnings.patch b/0019-applet-disable-GDK-deprecation-warnings.patch new file mode 100644 index 0000000..00e3715 --- /dev/null +++ b/0019-applet-disable-GDK-deprecation-warnings.patch @@ -0,0 +1,35 @@ +From b36d22b022e00ddeb26499f285282b94d118a64c Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 20 Aug 2014 13:35:16 +0200 +Subject: [PATCH 19/24] applet: disable GDK deprecation warnings + +GtkStatusIcon is going to be dropped from gtk-3, but we cannot stop +using it because we have to support other desktop environments than +GNOME Desktop. + +Related to #836 + +Signed-off-by: Jakub Filak +--- + src/applet/applet.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/applet/applet.c b/src/applet/applet.c +index 27c5fad..6dde217 100644 +--- a/src/applet/applet.c ++++ b/src/applet/applet.c +@@ -21,7 +21,11 @@ + #endif + #include + #include ++ ++#define GDK_DISABLE_DEPRECATION_WARNINGS ++/* https://bugzilla.gnome.org/show_bug.cgi?id=734826 */ + #include ++ + #include + #include + #include +-- +2.1.0 + diff --git a/0020-a-h-event-don-t-spam-system-logs.patch b/0020-a-h-event-don-t-spam-system-logs.patch new file mode 100644 index 0000000..09cf82b --- /dev/null +++ b/0020-a-h-event-don-t-spam-system-logs.patch @@ -0,0 +1,39 @@ +From 88cd0ba3d8bcbe597d777895952a3867fd789f12 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 26 Aug 2014 23:57:46 +0200 +Subject: [PATCH 20/24] a-h-event: don't spam system logs + +Don't print messages about invalid dump directories so many times. +Every dump directory has at leas 4 post-create events and after end of +each of these events abrt-handle-event tries to find duplicates. It +means 4x opens every dump directory, so it prints 4 lines for a single +invalid dump directory. + +This patch dissables the error messages in the default log mode. + +Related to rhbz#1133674 + +Signed-off-by: Jakub Filak +--- + src/daemon/abrt-handle-event.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/daemon/abrt-handle-event.c b/src/daemon/abrt-handle-event.c +index 7100171..a65f86e 100644 +--- a/src/daemon/abrt-handle-event.c ++++ b/src/daemon/abrt-handle-event.c +@@ -282,7 +282,11 @@ static int is_crash_a_dup(const char *dump_dir_name, void *param) + if (strcmp(dump_dir_name, dump_dir_name2) == 0) + goto next; /* we are never a dup of ourself */ + ++ int sv_logmode = logmode; ++ /* Silently ignore any error in the silent log level. */ ++ logmode = g_verbose == 0 ? 0 : sv_logmode; + dd = dd_opendir(dump_dir_name2, /*flags:*/ DD_FAIL_QUIETLY_ENOENT | DD_OPEN_READONLY); ++ logmode = sv_logmode; + if (!dd) + goto next; + +-- +2.1.0 + diff --git a/0021-a-a-s-p-data-reduce-amount-of-error-messages.patch b/0021-a-a-s-p-data-reduce-amount-of-error-messages.patch new file mode 100644 index 0000000..1f10f27 --- /dev/null +++ b/0021-a-a-s-p-data-reduce-amount-of-error-messages.patch @@ -0,0 +1,53 @@ +From 3829489cd5f74f4b9f7e1567fee941123aa77987 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 27 Aug 2014 08:45:24 +0200 +Subject: [PATCH 21/24] a-a-s-p-data: reduce amount of error messages + +Read each GPG key only once. The GPG key dirs may contain many symlinks +and if their target cannot be read, then we print an error message for +every symlink pointing to the unreadable file. What's worse, the error +messages show a path to the target, so users see several identical +messages in the system logs. + +Related to rhbz#1133674 + +Signed-off-by: Jakub Filak +--- + src/daemon/abrt-action-save-package-data.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c +index 6dbcfc2..cc86327 100644 +--- a/src/daemon/abrt-action-save-package-data.c ++++ b/src/daemon/abrt-action-save-package-data.c +@@ -91,16 +91,22 @@ static void load_gpg_keys(void) + if (strcmp(gpg_keys_dir, "") != 0) + { + log_debug("Reading gpg keys from '%s'", gpg_keys_dir); ++ GHashTable *done_set = g_hash_table_new(g_str_hash, g_str_equal); + GList *gpg_files = get_file_list(gpg_keys_dir, NULL /* we don't care about the file ext */); +- GList *tmp_gpp_files = gpg_files; +- while (tmp_gpp_files) ++ for (GList *iter = gpg_files; iter; iter = g_list_next(iter)) + { +- log_debug("Loading gpg key '%s'", fo_get_fullpath((file_obj_t *)tmp_gpp_files->data)); +- settings_setOpenGPGPublicKeys = g_list_append(settings_setOpenGPGPublicKeys, xstrdup(fo_get_fullpath((file_obj_t *)(tmp_gpp_files->data)) )); +- tmp_gpp_files = g_list_next(tmp_gpp_files); ++ const char *key_path = fo_get_fullpath((file_obj_t *)iter->data); ++ ++ if (g_hash_table_contains(done_set, key_path)) ++ continue; ++ ++ g_hash_table_insert(done_set, (gpointer)key_path, NULL); ++ log_debug("Loading gpg key '%s'", key_path); ++ settings_setOpenGPGPublicKeys = g_list_append(settings_setOpenGPGPublicKeys, xstrdup(key_path)); + } + + g_list_free_full(gpg_files, (GDestroyNotify)free_file_obj); ++ g_hash_table_destroy(done_set); + } + } + +-- +2.1.0 + diff --git a/0022-dbus-don-t-ignore-errors-in-verbose-logging-modes.patch b/0022-dbus-don-t-ignore-errors-in-verbose-logging-modes.patch new file mode 100644 index 0000000..9fc68b0 --- /dev/null +++ b/0022-dbus-don-t-ignore-errors-in-verbose-logging-modes.patch @@ -0,0 +1,32 @@ +From 8cab3b03f23e0516a4abf32e0721411c2301bbd8 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 27 Aug 2014 08:52:39 +0200 +Subject: [PATCH 22/24] dbus: don't ignore errors in verbose logging modes + +Ignoring of errors even in higher levels of verbosity makes debugging +really hard. + +Related to rhbz#1133674 + +Signed-off-by: Jakub Filak +--- + src/lib/problem_api.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/lib/problem_api.c b/src/lib/problem_api.c +index c2b4b1c..07707db 100644 +--- a/src/lib/problem_api.c ++++ b/src/lib/problem_api.c +@@ -53,7 +53,8 @@ int for_each_problem_in_dir(const char *path, + * when we raced with wizard. + */ + int sv_logmode = logmode; +- logmode = 0; ++ /* Silently ignore errors only in the silent log level. */ ++ logmode = g_verbose == 0 ? 0: sv_logmode; + struct dump_dir *dd = dd_opendir(full_name, DD_OPEN_READONLY | DD_FAIL_QUIETLY_EACCES | DD_DONT_WAIT_FOR_LOCK); + logmode = sv_logmode; + if (dd) +-- +2.1.0 + diff --git a/0023-logging-less-log-messages-for-duplicates.patch b/0023-logging-less-log-messages-for-duplicates.patch new file mode 100644 index 0000000..678e420 --- /dev/null +++ b/0023-logging-less-log-messages-for-duplicates.patch @@ -0,0 +1,60 @@ +From c542dcd6d620ceb3f896b6016e95172db81bddab Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 27 Aug 2014 09:30:54 +0200 +Subject: [PATCH 23/24] logging: less log messages for duplicates + +Related to rhbz#1133674 + +Signed-off-by: Jakub Filak +--- + src/daemon/abrt-handle-event.c | 4 ++-- + src/daemon/abrt-server.c | 5 ++--- + 2 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/src/daemon/abrt-handle-event.c b/src/daemon/abrt-handle-event.c +index a65f86e..2ed88db 100644 +--- a/src/daemon/abrt-handle-event.c ++++ b/src/daemon/abrt-handle-event.c +@@ -142,7 +142,7 @@ static int dup_uuid_compare(const struct dump_dir *dd) + free(dd_uuid); + + if (!different) +- log("Duplicate: UUID"); ++ log_notice("Duplicate: UUID"); + + return !different; + } +@@ -197,7 +197,7 @@ static int dup_corebt_compare(const struct dump_dir *dd) + free(dd_corebt); + + if (isdup) +- log("Duplicate: core backtrace"); ++ log_notice("Duplicate: core backtrace"); + + return isdup; + } +diff --git a/src/daemon/abrt-server.c b/src/daemon/abrt-server.c +index 307b41b..9951468 100644 +--- a/src/daemon/abrt-server.c ++++ b/src/daemon/abrt-server.c +@@ -194,15 +194,14 @@ static int run_post_create(const char *dirname) + strbuf_append_str(cmd_output, raw); + char *msg = cmd_output->buf; + +- /* Hmm, DUP_OF_DIR: ends up in syslog. move log() into 'else'? */ +- log("%s", msg); +- + if (child_is_post_create + && prefixcmp(msg, "DUP_OF_DIR: ") == 0 + ) { + free(dup_of_dir); + dup_of_dir = xstrdup(msg + strlen("DUP_OF_DIR: ")); + } ++ else ++ log("%s", msg); + + strbuf_clear(cmd_output); + /* jump to next line */ +-- +2.1.0 + diff --git a/0024-retrace-respect-Bugzilla-event-preferences.patch b/0024-retrace-respect-Bugzilla-event-preferences.patch new file mode 100644 index 0000000..30dc05c --- /dev/null +++ b/0024-retrace-respect-Bugzilla-event-preferences.patch @@ -0,0 +1,26 @@ +From 3b7b9dd093e38473f796efeb724a1334d4041ea2 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Thu, 28 Aug 2014 15:02:38 +0200 +Subject: [PATCH 24/24] retrace: respect Bugzilla event preferences + +Signed-off-by: Jakub Filak +--- + src/plugins/analyze_RetraceServer.xml.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/plugins/analyze_RetraceServer.xml.in b/src/plugins/analyze_RetraceServer.xml.in +index e437cac..db2cd6e 100644 +--- a/src/plugins/analyze_RetraceServer.xml.in ++++ b/src/plugins/analyze_RetraceServer.xml.in +@@ -10,6 +10,8 @@ + no + yes + ++ ++ +