[abrt/f21] Upstream git snapshot

Jakub Filak jfilak at fedoraproject.org
Mon Nov 10 07:51:41 UTC 2014


commit 2164d6ed205040aafc65ea3da72de960d2a5b853
Author: Jakub Filak <jfilak at redhat.com>
Date:   Fri Nov 7 15:58:43 2014 +0100

    Upstream git snapshot
    
    Resolves: #1151234, #1159469

 ...updates.patch => 0001-Translation-updates.patch |    2 +-
 ...-notifications-use-return-instead-of-exit.patch |    2 +-
 ...report-attach-contact-email-if-configured.patch |    2 +-
 ...t-don-t-show-duphash-instead-of-component.patch |    2 +-
 ...notifications-skip-non-interactive-shells.patch |    2 +-
 ...s-use-the-length-result-of-sd_journal_get.patch |    3 +-
 0024-make-ABRT-quieter.patch                       |  102 ++++++++++
 ...re-writable-dump-directory-before-reporti.patch |  128 ++++++++++++
 ...-p-d-add-firefox-on-the-package-blacklist.patch |   42 ++++
 ...a-a-g-machine-id-add-systemd-s-machine-id.patch |  212 ++++++++++++++++++++
 ...ne-id-suppress-its-failures-in-abrt_event.patch |   34 +++
 ...ne-id-omit-trailing-new-line-for-one-line.patch |   59 ++++++
 ...ne-id-do-not-print-any-error-from-the-eve.patch |   31 +++
 0039-sos-use-all-valuable-plugins.patch            |   34 +++
 ...koops-improve-reason-text-for-page-faults.patch |   58 ++++++
 abrt.spec                                          |   51 ++++-
 disable-OpenGPGCheck-in-Fedora-Rawhide.patch       |   26 ---
 17 files changed, 746 insertions(+), 44 deletions(-)
---
diff --git a/0002-Translation-updates.patch b/0001-Translation-updates.patch
similarity index 99%
rename from 0002-Translation-updates.patch
rename to 0001-Translation-updates.patch
index da087d4..12ac2dc 100644
--- a/0002-Translation-updates.patch
+++ b/0001-Translation-updates.patch
@@ -1,7 +1,7 @@
 From 737d15ad4205e81c06d3d83857a97a5bdf192623 Mon Sep 17 00:00:00 2001
 From: Jakub Filak <jfilak at redhat.com>
 Date: Mon, 6 Oct 2014 13:47:31 +0200
-Subject: [PATCH 2/2] Translation updates
+Subject: [PATCH] Translation updates
 
 Signed-off-by: Jakub Filak <jfilak at redhat.com>
 ---
diff --git a/0006-console-notifications-use-return-instead-of-exit.patch b/0006-console-notifications-use-return-instead-of-exit.patch
index cae40f1..554f46e 100644
--- a/0006-console-notifications-use-return-instead-of-exit.patch
+++ b/0006-console-notifications-use-return-instead-of-exit.patch
@@ -1,7 +1,7 @@
 From b7332b068c11ec16c190472684334944abb3607b Mon Sep 17 00:00:00 2001
 From: Jakub Filak <jfilak at redhat.com>
 Date: Thu, 9 Oct 2014 16:28:12 +0200
-Subject: [PATCH 6/6] console-notifications: use return instead of exit
+Subject: [PATCH] console-notifications: use return instead of exit
 
 Thanks Ray Strode [halfline] <rstrode at redhat.com>
 
diff --git a/0007-ureport-attach-contact-email-if-configured.patch b/0007-ureport-attach-contact-email-if-configured.patch
index 8586855..e54509f 100644
--- a/0007-ureport-attach-contact-email-if-configured.patch
+++ b/0007-ureport-attach-contact-email-if-configured.patch
@@ -1,7 +1,7 @@
 From 9ef1d95f9556db4fdf02b283e1602b9e63b693c8 Mon Sep 17 00:00:00 2001
 From: Jakub Filak <jfilak at redhat.com>
 Date: Thu, 9 Oct 2014 10:24:42 +0200
-Subject: [PATCH 07/13] ureport: attach contact email if configured
+Subject: [PATCH] ureport: attach contact email if configured
 
 Related to rhbz#1150389
 
diff --git a/0008-applet-don-t-show-duphash-instead-of-component.patch b/0008-applet-don-t-show-duphash-instead-of-component.patch
index 50fecaa..340fb0b 100644
--- a/0008-applet-don-t-show-duphash-instead-of-component.patch
+++ b/0008-applet-don-t-show-duphash-instead-of-component.patch
@@ -1,7 +1,7 @@
 From ad9e9d1609fd9e1365bf558f15c62ecb21304911 Mon Sep 17 00:00:00 2001
 From: Jakub Filak <jfilak at redhat.com>
 Date: Fri, 10 Oct 2014 11:18:51 +0200
-Subject: [PATCH 08/13] applet: don't show duphash instead of component
+Subject: [PATCH] applet: don't show duphash instead of component
 
 Related to rhbz#1084031
 
diff --git a/0010-console-notifications-skip-non-interactive-shells.patch b/0010-console-notifications-skip-non-interactive-shells.patch
index 2cf0e4c..9f4332c 100644
--- a/0010-console-notifications-skip-non-interactive-shells.patch
+++ b/0010-console-notifications-skip-non-interactive-shells.patch
@@ -1,7 +1,7 @@
 From ab46bc9d85331fca923853353663c0ce0edc3716 Mon Sep 17 00:00:00 2001
 From: Jakub Filak <jfilak at redhat.com>
 Date: Sat, 11 Oct 2014 00:05:07 +0200
-Subject: [PATCH 10/13] console-notifications: skip non-interactive shells
+Subject: [PATCH] console-notifications: skip non-interactive shells
 
 Related to rhbz#1141485
 Related to rhbz#1139001
diff --git a/0020-journal-oops-use-the-length-result-of-sd_journal_get.patch b/0021-journal-oops-use-the-length-result-of-sd_journal_get.patch
similarity index 98%
rename from 0020-journal-oops-use-the-length-result-of-sd_journal_get.patch
rename to 0021-journal-oops-use-the-length-result-of-sd_journal_get.patch
index 36e0f57..638e988 100644
--- a/0020-journal-oops-use-the-length-result-of-sd_journal_get.patch
+++ b/0021-journal-oops-use-the-length-result-of-sd_journal_get.patch
@@ -1,8 +1,7 @@
 From 2e74ca0f15d6d25568f5af1cc9cd30b4b01aa849 Mon Sep 17 00:00:00 2001
 From: Jakub Filak <jfilak at redhat.com>
 Date: Tue, 14 Oct 2014 03:15:28 +0200
-Subject: [PATCH 20/21] journal-oops: use the length result of
- sd_journal_get_data()
+Subject: [PATCH] journal-oops: use the length result of sd_journal_get_data()
 
 journald doesn't guarantee NULL terminated strings returned from
 sd_journal_get_data(). It usually works but not always.
diff --git a/0024-make-ABRT-quieter.patch b/0024-make-ABRT-quieter.patch
new file mode 100644
index 0000000..3dd1bc9
--- /dev/null
+++ b/0024-make-ABRT-quieter.patch
@@ -0,0 +1,102 @@
+From 105aab5e018efa7d68e06ff648d0dc9e434e20d2 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Wed, 15 Oct 2014 13:33:51 +0200
+Subject: [PATCH] make ABRT quieter
+
+Related: #1048384, #1147664
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/daemon/abrtd.c                                |  7 +++++--
+ src/hooks/abrt-hook-ccpp.c                        | 10 +++++-----
+ src/plugins/abrt-action-generate-core-backtrace.c |  2 +-
+ 3 files changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
+index b8426dd..cce49eb 100644
+--- a/src/daemon/abrtd.c
++++ b/src/daemon/abrtd.c
+@@ -626,7 +626,7 @@ int main(int argc, char** argv)
+     s_signal_pipe_write = s_signal_pipe[1];
+ 
+     /* Enter the event loop */
+-    log("Init complete, entering main loop");
++    log_debug("Init complete, entering main loop");
+     run_main_loop(pMainloop);
+ 
+  cleanup:
+@@ -652,7 +652,10 @@ int main(int argc, char** argv)
+     /* Exiting */
+     if (s_sig_caught && s_sig_caught != SIGALRM && s_sig_caught != SIGCHLD)
+     {
+-        error_msg("Got signal %d, exiting", s_sig_caught);
++        /* We use TERM to stop abrtd, so not printing out error message. */
++        if (s_sig_caught != SIGTERM)
++            error_msg("Got signal %d, exiting", s_sig_caught);
++
+         signal(s_sig_caught, SIG_DFL);
+         raise(s_sig_caught);
+     }
+diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
+index 8e141d4..6f471e9 100644
+--- a/src/hooks/abrt-hook-ccpp.c
++++ b/src/hooks/abrt-hook-ccpp.c
+@@ -184,13 +184,13 @@ static char* get_executable(pid_t pid, int *fd_p)
+     if (deleted > executable && strcmp(deleted, " (deleted)") == 0)
+     {
+         *deleted = '\0';
+-        log("File '%s' seems to be deleted", executable);
++        log_info("File '%s' seems to be deleted", executable);
+     }
+     /* find and cut off prelink suffixes from the path */
+     char *prelink = executable + strlen(executable) - strlen(".#prelink#.XXXXXX");
+     if (prelink > executable && strncmp(prelink, ".#prelink#.", strlen(".#prelink#.")) == 0)
+     {
+-        log("File '%s' seems to be a prelink temporary file", executable);
++        log_info("File '%s' seems to be a prelink temporary file", executable);
+         *prelink = '\0';
+     }
+     return executable;
+@@ -649,7 +649,7 @@ int main(int argc, char** argv)
+              * but it does not log file name */
+             error_msg_and_die("Error saving '%s'", path);
+         }
+-        log("Saved core dump of pid %lu (%s) to %s (%llu bytes)", (long)pid, executable, path, (long long)core_size);
++        log_notice("Saved core dump of pid %lu (%s) to %s (%llu bytes)", (long)pid, executable, path, (long long)core_size);
+         return 0;
+     }
+ 
+@@ -836,7 +836,7 @@ int main(int argc, char** argv)
+             strcpy(path, newpath);
+         free(newpath);
+ 
+-        log("Saved core dump of pid %lu (%s) to %s (%llu bytes)", (long)pid, executable, path, (long long)core_size);
++        log_notice("Saved core dump of pid %lu (%s) to %s (%llu bytes)", (long)pid, executable, path, (long long)core_size);
+ 
+         notify_new_path(path);
+ 
+@@ -874,7 +874,7 @@ int main(int argc, char** argv)
+             unlink(core_basename);
+             return 1;
+         }
+-        log("Saved core dump of pid %lu to %s (%llu bytes)", (long)pid, full_core_basename, (long long)core_size);
++        log_notice("Saved core dump of pid %lu to %s (%llu bytes)", (long)pid, full_core_basename, (long long)core_size);
+     }
+ 
+     return 0;
+diff --git a/src/plugins/abrt-action-generate-core-backtrace.c b/src/plugins/abrt-action-generate-core-backtrace.c
+index a992a5b..791af83 100644
+--- a/src/plugins/abrt-action-generate-core-backtrace.c
++++ b/src/plugins/abrt-action-generate-core-backtrace.c
+@@ -61,7 +61,7 @@ int main(int argc, char **argv)
+         sr_debug_parser = true;
+ 
+     /* Let user know what's going on */
+-    log(_("Generating core_backtrace"));
++    log_notice(_("Generating core_backtrace"));
+ 
+     char *error_message = NULL;
+     bool success;
+-- 
+2.1.0
+
diff --git a/0026-applet-ensure-writable-dump-directory-before-reporti.patch b/0026-applet-ensure-writable-dump-directory-before-reporti.patch
new file mode 100644
index 0000000..963d50e
--- /dev/null
+++ b/0026-applet-ensure-writable-dump-directory-before-reporti.patch
@@ -0,0 +1,128 @@
+From 0a0f129a6622fd7099de8cec6a1d95a4189a91d1 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Tue, 21 Oct 2014 14:57:10 +0200
+Subject: [PATCH] applet: ensure writable dump directory before reporting
+
+Related to rhbz#1084027
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/applet/applet.c | 62 ++++++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 40 insertions(+), 22 deletions(-)
+
+diff --git a/src/applet/applet.c b/src/applet/applet.c
+index 90c5b0d..644da60 100644
+--- a/src/applet/applet.c
++++ b/src/applet/applet.c
+@@ -307,6 +307,7 @@ typedef struct problem_info {
+     bool incomplete;
+     bool reported;
+     bool was_announced;
++    bool is_writable;
+ } problem_info_t;
+ 
+ static void push_to_deferred_queue(problem_info_t *pi)
+@@ -324,6 +325,36 @@ static void problem_info_set_dir(problem_info_t *pi, const char *dir)
+     problem_data_add_text_noteditable(pi->problem_data, CD_DUMPDIR, dir);
+ }
+ 
++static bool problem_info_ensure_writable(problem_info_t *pi)
++{
++    if (pi->is_writable)
++        return true;
++
++    /* chown the directory in any case, because kernel oopses are not foreign */
++    /* but their dump directories are not writable without chowning them or */
++    /* stealing them. The stealing is deprecated as it breaks the local */
++    /* duplicate search and root cannot see them */
++    const int res = chown_dir_over_dbus(problem_info_get_dir(pi));
++    if (pi->foreign && res != 0)
++    {
++        error_msg(_("Can't take ownership of '%s'"), problem_info_get_dir(pi));
++        return false;
++    }
++    pi->foreign = false;
++
++    struct dump_dir *dd = open_directory_for_writing(problem_info_get_dir(pi), /* don't ask */ NULL);
++    if (!dd)
++    {
++        error_msg(_("Can't open directory for writing '%s'"), problem_info_get_dir(pi));
++        return false;
++    }
++
++    problem_info_set_dir(pi, dd->dd_dirname);
++    pi->is_writable = true;
++    dd_close(dd);
++    return true;
++}
++
+ static problem_info_t *problem_info_new(const char *dir)
+ {
+     problem_info_t *pi = xzalloc(sizeof(*pi));
+@@ -610,8 +641,13 @@ static pid_t spawn_event_handler_child(const char *dump_dir_name, const char *ev
+     return child;
+ }
+ 
+-static void run_report_from_applet(const char *dirname)
++static void run_report_from_applet(problem_info_t *pi)
+ {
++    if (!problem_info_ensure_writable(pi))
++        return;
++
++    const char *dirname = problem_info_get_dir(pi);
++
+     fflush(NULL); /* paranoia */
+     pid_t pid = fork();
+     if (pid < 0)
+@@ -649,7 +685,7 @@ static void action_report(NotifyNotification *notification, gchar *action, gpoin
+     {
+         if (strcmp(A_REPORT_REPORT, action) == 0)
+         {
+-            run_report_from_applet(problem_info_get_dir(pi));
++            run_report_from_applet(pi);
+             problem_info_free(pi);
+         }
+         else
+@@ -1118,7 +1154,7 @@ static gboolean handle_event_output_cb(GIOChannel *gio, GIOCondition condition,
+         if (pi->known || !(state->flags & REPORT_UNKNOWN_PROBLEM_IMMEDIATELY))
+             notify_problem(pi);
+         else
+-            run_report_from_applet(problem_info_get_dir(pi));
++            run_report_from_applet(pi);
+     }
+     else
+     {
+@@ -1179,29 +1215,11 @@ static void export_event_configuration(const char *event_name)
+ 
+ static void run_event_async(problem_info_t *pi, const char *event_name, int flags)
+ {
+-    /* chown the directory in any case, because kernel oopses are not foreign */
+-    /* but their dump directories are not writable without chowning them or */
+-    /* stealing them. The stealing is deprecated as it breaks the local */
+-    /* duplicate search and root cannot see them */
+-    const int res = chown_dir_over_dbus(problem_info_get_dir(pi));
+-    if (pi->foreign && res != 0)
++    if (!problem_info_ensure_writable(pi))
+     {
+-        error_msg(_("Can't take ownership of '%s'"), problem_info_get_dir(pi));
+         problem_info_free(pi);
+         return;
+     }
+-    pi->foreign = false;
+-
+-    struct dump_dir *dd = open_directory_for_writing(problem_info_get_dir(pi), /* don't ask */ NULL);
+-    if (!dd)
+-    {
+-        error_msg(_("Can't open directory for writing '%s'"), problem_info_get_dir(pi));
+-        problem_info_free(pi);
+-        return;
+-    }
+-
+-    problem_info_set_dir(pi, dd->dd_dirname);
+-    dd_close(dd);
+ 
+     export_event_configuration(event_name);
+ 
+-- 
+2.1.0
+
diff --git a/0030-a-a-s-p-d-add-firefox-on-the-package-blacklist.patch b/0030-a-a-s-p-d-add-firefox-on-the-package-blacklist.patch
new file mode 100644
index 0000000..08ba023
--- /dev/null
+++ b/0030-a-a-s-p-d-add-firefox-on-the-package-blacklist.patch
@@ -0,0 +1,42 @@
+From 2fa193aba3cb1dd630faa65385a92e11d92806d1 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Tue, 26 Aug 2014 20:37:34 +0200
+Subject: [PATCH] a-a-s-p-d: add firefox on the package blacklist
+
+And drop the path to plugins-container from the path blacklist because:
+- the path belongs to firefox package
+- the path is invalid, the correct path is:
+  /usr/lib(64)/firefox/plugin-container
+
+Resolves rhbz#1132018
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/daemon/abrt-action-save-package-data.conf | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/daemon/abrt-action-save-package-data.conf b/src/daemon/abrt-action-save-package-data.conf
+index 3d35bb6..cac3c7c 100644
+--- a/src/daemon/abrt-action-save-package-data.conf
++++ b/src/daemon/abrt-action-save-package-data.conf
+@@ -7,7 +7,7 @@ OpenGPGCheck = yes
+ 
+ # Blacklisted packages
+ #
+-BlackList = nspluginwrapper, valgrind, strace, mono-core
++BlackList = nspluginwrapper, valgrind, strace, mono-core, firefox
+ 
+ # Process crashes in executables which do not belong to any package?
+ #
+@@ -15,7 +15,7 @@ ProcessUnpackaged = no
+ 
+ # Blacklisted executable paths (shell patterns)
+ #
+-BlackListedPaths = /usr/share/doc/*, */example*, /usr/bin/nspluginviewer, /usr/lib/xulrunner-*/plugin-container
++BlackListedPaths = /usr/share/doc/*, */example*, /usr/bin/nspluginviewer
+ 
+ # interpreters names
+ Interpreters = python2, python2.7, python, python3, python3.3, perl, perl5.16.2
+-- 
+2.1.0
+
diff --git a/0032-a-a-g-machine-id-add-systemd-s-machine-id.patch b/0032-a-a-g-machine-id-add-systemd-s-machine-id.patch
new file mode 100644
index 0000000..2c558f4
--- /dev/null
+++ b/0032-a-a-g-machine-id-add-systemd-s-machine-id.patch
@@ -0,0 +1,212 @@
+From aa503cf6722fffa2dbf3d400a4e2bbeac2f78d65 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Thu, 23 Oct 2014 16:37:14 +0200
+Subject: [PATCH] a-a-g-machine-id: add systemd's machine id
+
+The dmidecode based algorithm may not work on all architectures.
+
+man machine-id
+
+Related to rhbz#1140044
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/plugins/abrt-action-generate-machine-id | 165 ++++++++++++++++++++++++++--
+ 1 file changed, 153 insertions(+), 12 deletions(-)
+
+diff --git a/src/plugins/abrt-action-generate-machine-id b/src/plugins/abrt-action-generate-machine-id
+index 0aea787..b2de822 100644
+--- a/src/plugins/abrt-action-generate-machine-id
++++ b/src/plugins/abrt-action-generate-machine-id
+@@ -1,14 +1,47 @@
+ #!/usr/bin/python
++
++## Copyright (C) 2014 ABRT team <abrt-devel-list at redhat.com>
++## Copyright (C) 2014 Red Hat, 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
++## the Free Software Foundation; either version 2 of the License, or
++## (at your option) any later version.
++
++## This program is distributed in the hope that it will be useful,
++## but WITHOUT ANY WARRANTY; without even the implied warranty of
++## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++## GNU General Public License for more details.
++
++## You should have received a copy of the GNU General Public License
++## along with this program; if not, write to the Free Software
++## Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335  USA
++
++"""This module provides algorithms for generating Machine IDs.
++"""
++
++import sys
+ from argparse import ArgumentParser
++import logging
+ 
+-import dmidecode
+ import hashlib
+ 
++def generate_machine_id_dmidecode():
++    """Generate a machine_id based off dmidecode fields
+ 
+-# Generate a machine_id based off dmidecode fields
+-def generate_machine_id():
+-    dmixml = dmidecode.dmidecodeXML()
++    The function generates the same result as sosreport-uploader
++
++    Returns a machine ID as string or throws RuntimeException
++
++    """
+ 
++    try:
++        import dmidecode
++    except ImportError as ex:
++        raise RuntimeError("Could not import dmidecode module: {0}"
++                .format(str(ex)))
++
++    dmixml = dmidecode.dmidecodeXML()
+     # Fetch all DMI data into a libxml2.xmlDoc object
+     dmixml.SetResultType(dmidecode.DMIXML_DOC)
+     xmldoc = dmixml.QuerySection('all')
+@@ -38,20 +71,128 @@ def generate_machine_id():
+     return machine_id.hexdigest()
+ 
+ 
+-if __name__ == "__main__":
+-    CMDARGS = ArgumentParser(description = "Generate a machine_id based off dmidecode fields")
+-    CMDARGS.add_argument('-o', '--output', type=str, help='Output file')
++def generate_machine_id_systemd():
++    """Generate a machine_id equals to a one generated by systemd
++
++    This function returns contents of /etc/machine-id
++
++    Returns a machine ID as string or throws RuntimeException.
++
++    """
++
++    try:
++        with open('/etc/machine-id', 'r') as midf:
++            return "".join((l.strip() for l in midf))
++    except IOError as ex:
++        raise RuntimeError("Could not use systemd's machine-id: {0}"
++                .format(str(ex)))
++
++
++GENERATORS = { 'sosreport_uploader-dmidecode' : generate_machine_id_dmidecode,
++               'systemd'                      : generate_machine_id_systemd }
++
++
++def generate_machine_id(generators):
++    """Generates all requested machine id with all required generators
++
++    Keyword arguments:
++    generators -- a list of generator names
++
++    Returns a dictionary where keys are generators and associated values are
++    products of those generators.
++
++    """
++
++    ids = {}
++    workers = GENERATORS
++    for sd in generators:
++        try:
++            ids[sd] = workers[sd]()
++        except RuntimeError as ex:
++            logging.error("Machine-ID generator '{0}' failed: {1}"
++                        .format(sd, ex.message))
++
++    return ids
++
++
++def print_result(ids, outfile, prefixed):
++    """Writes a dictionary of machine ids to a file
++
++    Each dictionary entry is written on a single line and the last line does
++    not have new line character. The new line character is omitted as it is a
++    common approach in ABRT.
++
++    Keyword arguments:
++    ids -- a dictionary [generator name: machine ids]
++    outfile -- output file
++    prefixed -- use 'generator name=' prefix or not
++    """
++
++    fmt = '{0}={1}' if prefixed else '{1}'
++
++    items_iter = ids.iteritems()
++    try:
++        sd, mid = items_iter.next()
++        outfile.write(fmt.format(sd, mid))
++    except StopIteration:
++        return
++
++    fmt = '\n' + fmt
++    for sd, mid in items_iter:
++        outfile.write(fmt.format(sd,mid))
++
++
++def print_generators(outfile=None):
++    """Prints requested generators
++
++    Keyword arguments:
++    outfile -- output file (default: sys.stdout)
++
++    """
++    if outfile is None:
++        outfile = sys.stdout
++
++    for sd in GENERATORS.iterkeys():
++        outfile.write("{0}\n".format(sd))
++
++
++if __name__ == '__main__':
++    CMDARGS = ArgumentParser(description = "Generate a machine_id")
++    CMDARGS.add_argument('-o', '--output', type=str,
++            help="Output file")
++    CMDARGS.add_argument('-g', '--generators', nargs='+', type=str,
++            help="Use given generators only")
++    CMDARGS.add_argument('-l', '--list-generators', action='store_true',
++            default=False, help="Print out a list of usable generators")
++    CMDARGS.add_argument('-n', '--noprefix', action='store_true',
++            default=False, help="Do not use generator name as prefix for IDs")
+ 
+     OPTIONS = CMDARGS.parse_args()
+     ARGS = vars(OPTIONS)
+ 
+-    machineid =  generate_machine_id()
++    logging.basicConfig(format='%(message)s')
++
++    if ARGS['list_generators']:
++        print_generators()
++        sys.exit(0)
++
++    requested_generators = None
++    if ARGS['generators']:
++        requested_generators = ARGS['generators']
++    else:
++        requested_generators = GENERATORS.keys()
++
++    machineids = generate_machine_id(requested_generators)
+ 
+     if ARGS['output']:
+         try:
+-            with open(ARGS['output'], 'w') as outfile:
+-                outfile.write(machineid)
++            with open(ARGS['output'], 'w') as fout:
++                print_result(machineids, fout, not ARGS['noprefix'])
+         except IOError as ex:
+-            print ex
++            logging.error("Could not open output file: {0}".format(str(ex)))
++            sys.exit(1)
+     else:
+-        print machineid
++        print_result(machineids, sys.stdout, not ARGS['noprefix'])
++        sys.stdout.write('\n')
++
++    sys.exit(len(requested_generators) - len(machineids.keys()))
+-- 
+2.1.0
+
diff --git a/0034-a-a-g-machine-id-suppress-its-failures-in-abrt_event.patch b/0034-a-a-g-machine-id-suppress-its-failures-in-abrt_event.patch
new file mode 100644
index 0000000..8fd4db2
--- /dev/null
+++ b/0034-a-a-g-machine-id-suppress-its-failures-in-abrt_event.patch
@@ -0,0 +1,34 @@
+From 35e52c1820a84da2623a7cf4c71baf9fa6f2e12e Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Fri, 24 Oct 2014 15:50:02 +0200
+Subject: [PATCH] a-a-g-machine-id: suppress its failures in abrt_event.conf
+
+If an event script exits with a non-zero code, abrtd deletes entire dump
+directory.
+
+Failures of a-a-g-machine-id must not lead to the deletion of a dump
+directory.
+
+Related to rhbz#1140044
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/daemon/abrt_event.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/daemon/abrt_event.conf b/src/daemon/abrt_event.conf
+index 4597627..3322a81 100644
+--- a/src/daemon/abrt_event.conf
++++ b/src/daemon/abrt_event.conf
+@@ -92,7 +92,7 @@ EVENT=post-create runlevel=
+ 
+ # Example: if you want to include *machineid* in dump directories:
+ #EVENT=post-create
+-    /usr/libexec/abrt-action-generate-machine-id -o $DUMP_DIR/machineid
++    /usr/libexec/abrt-action-generate-machine-id -o $DUMP_DIR/machineid || :
+ 
+ # Example:
+ # if you want to upload data immediately at the moment of a crash to
+-- 
+2.1.0
+
diff --git a/0037-a-a-g-machine-id-omit-trailing-new-line-for-one-line.patch b/0037-a-a-g-machine-id-omit-trailing-new-line-for-one-line.patch
new file mode 100644
index 0000000..d307e78
--- /dev/null
+++ b/0037-a-a-g-machine-id-omit-trailing-new-line-for-one-line.patch
@@ -0,0 +1,59 @@
+From 301fe7c65ba4431833ad8a9df7a4366eda889682 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Fri, 31 Oct 2014 23:00:10 +0100
+Subject: [PATCH] a-a-g-machine-id: omit trailing new-line for one-liners only
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/plugins/abrt-action-generate-machine-id | 21 +++++++++------------
+ 1 file changed, 9 insertions(+), 12 deletions(-)
+
+diff --git a/src/plugins/abrt-action-generate-machine-id b/src/plugins/abrt-action-generate-machine-id
+index b2de822..6f43258 100644
+--- a/src/plugins/abrt-action-generate-machine-id
++++ b/src/plugins/abrt-action-generate-machine-id
+@@ -118,9 +118,9 @@ def generate_machine_id(generators):
+ def print_result(ids, outfile, prefixed):
+     """Writes a dictionary of machine ids to a file
+ 
+-    Each dictionary entry is written on a single line and the last line does
+-    not have new line character. The new line character is omitted as it is a
+-    common approach in ABRT.
++    Each dictionary entry is written on a single line. The function does not
++    print trailing new-line if the dictionary contains only one item as it is
++    common format of one-liners placed in a dump directory.
+ 
+     Keyword arguments:
+     ids -- a dictionary [generator name: machine ids]
+@@ -130,15 +130,10 @@ def print_result(ids, outfile, prefixed):
+ 
+     fmt = '{0}={1}' if prefixed else '{1}'
+ 
+-    items_iter = ids.iteritems()
+-    try:
+-        sd, mid = items_iter.next()
+-        outfile.write(fmt.format(sd, mid))
+-    except StopIteration:
+-        return
++    if len(ids) > 1:
++        fmt += '\n'
+ 
+-    fmt = '\n' + fmt
+-    for sd, mid in items_iter:
++    for sd, mid in ids.iteritems():
+         outfile.write(fmt.format(sd,mid))
+ 
+ 
+@@ -193,6 +188,8 @@ if __name__ == '__main__':
+             sys.exit(1)
+     else:
+         print_result(machineids, sys.stdout, not ARGS['noprefix'])
+-        sys.stdout.write('\n')
++        # print_results() omits new-line for one-liners
++        if len(machineids) == 1:
++            sys.stdout.write('\n')
+ 
+     sys.exit(len(requested_generators) - len(machineids.keys()))
+-- 
+2.1.0
+
diff --git a/0038-a-a-g-machine-id-do-not-print-any-error-from-the-eve.patch b/0038-a-a-g-machine-id-do-not-print-any-error-from-the-eve.patch
new file mode 100644
index 0000000..b21b0b1
--- /dev/null
+++ b/0038-a-a-g-machine-id-do-not-print-any-error-from-the-eve.patch
@@ -0,0 +1,31 @@
+From 77fd4057c1364edc7a1815b73bb980229c8b9d65 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Fri, 31 Oct 2014 23:01:07 +0100
+Subject: [PATCH] a-a-g-machine-id: do not print any error from the event
+ handler
+
+It is expected that dmidecode-less systems will print an error message
+related to the fact that dmidecode doesn't work, hence forwarding of
+STDOUT and STDERR to 'event_log' file.
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/daemon/abrt_event.conf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/daemon/abrt_event.conf b/src/daemon/abrt_event.conf
+index 3322a81..feb02a3 100644
+--- a/src/daemon/abrt_event.conf
++++ b/src/daemon/abrt_event.conf
+@@ -92,7 +92,7 @@ EVENT=post-create runlevel=
+ 
+ # Example: if you want to include *machineid* in dump directories:
+ #EVENT=post-create
+-    /usr/libexec/abrt-action-generate-machine-id -o $DUMP_DIR/machineid || :
++    /usr/libexec/abrt-action-generate-machine-id -o $DUMP_DIR/machineid >>event_log 2>&1 || :
+ 
+ # Example:
+ # if you want to upload data immediately at the moment of a crash to
+-- 
+2.1.0
+
diff --git a/0039-sos-use-all-valuable-plugins.patch b/0039-sos-use-all-valuable-plugins.patch
new file mode 100644
index 0000000..b41759a
--- /dev/null
+++ b/0039-sos-use-all-valuable-plugins.patch
@@ -0,0 +1,34 @@
+From f5e65811d450c9117fa036bd82d161e5f936d5a0 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Fri, 31 Oct 2014 23:02:57 +0100
+Subject: [PATCH] sos: use all valuable plugins
+
+This commit mirrors the state of rhel7
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/daemon/abrt_event.conf | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/daemon/abrt_event.conf b/src/daemon/abrt_event.conf
+index feb02a3..1153cc0 100644
+--- a/src/daemon/abrt_event.conf
++++ b/src/daemon/abrt_event.conf
+@@ -69,11 +69,13 @@ EVENT=post-create runlevel=
+ # if you would rather perform this collection later):
+ #EVENT=post-create
+         nice sosreport --tmp-dir "$DUMP_DIR" --batch \
+-                --only=anaconda --only=bootloader --only=devicemapper \
++                --only=anaconda --only=boot --only=devicemapper \
+                 --only=filesys --only=hardware --only=kernel --only=libraries \
+                 --only=memory --only=networking --only=nfsserver --only=pam \
+                 --only=process --only=rpm -k rpm.rpmva=off --only=ssh \
+                 --only=startup --only=yum --only=general --only=x11 \
++                --only=cups --only=logs --only=grub2 --only=cron --only=pci \
++                --only=auditd --only=selinux --only=lvm2 --only=sar \
+                 >sosreport.log 2>&1 \
+         && {
+                 rm sosreport.log
+-- 
+2.1.0
+
diff --git a/0040-koops-improve-reason-text-for-page-faults.patch b/0040-koops-improve-reason-text-for-page-faults.patch
new file mode 100644
index 0000000..0de1197
--- /dev/null
+++ b/0040-koops-improve-reason-text-for-page-faults.patch
@@ -0,0 +1,58 @@
+From 1fc0e782d56af4df3f21560929176a09103923ad Mon Sep 17 00:00:00 2001
+From: Martin Milata <mmilata at redhat.com>
+Date: Tue, 4 Nov 2014 16:51:24 +0100
+Subject: [PATCH] koops: improve 'reason' text for page faults
+
+Current : 'general protection fault: 4000 [#1] SMP'
+Improved: 'general protection fault in i915_gem_do_execbuffer'
+
+Resolves rhbz#998887.
+
+Signed-off-by: Martin Milata <mmilata at redhat.com>
+---
+ src/plugins/oops-utils.c | 22 ++++++++++++++++++++--
+ 1 file changed, 20 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/oops-utils.c b/src/plugins/oops-utils.c
+index 9e2355e..ea6c639 100644
+--- a/src/plugins/oops-utils.c
++++ b/src/plugins/oops-utils.c
+@@ -12,6 +12,8 @@
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  */
++#include <satyr/stacktrace.h>
++
+ #include "oops-utils.h"
+ #include "libabrt.h"
+ 
+@@ -242,8 +244,24 @@ void abrt_oops_save_data_in_dump_dir(struct dump_dir *dd, char *oops, const char
+ 
+     // TODO: add "Kernel oops: " prefix, so that all oopses have recognizable FILENAME_REASON?
+     // kernel oops 1st line may look quite puzzling otherwise...
+-    strchrnul(second_line, '\n')[0] = '\0';
+-    dd_save_text(dd, FILENAME_REASON, second_line);
++    char *reason_pretty = NULL;
++    char *error = NULL;
++    struct sr_stacktrace *trace = sr_stacktrace_parse(SR_REPORT_KERNELOOPS, second_line, &error);
++    if (trace)
++    {
++        reason_pretty = sr_stacktrace_get_reason(trace);
++        sr_stacktrace_free(trace);
++    }
++    else
++        free(error);
++
++    if (reason_pretty)
++    {
++        dd_save_text(dd, FILENAME_REASON, reason_pretty);
++        free(reason_pretty);
++    }
++    else
++        dd_save_text(dd, FILENAME_REASON, second_line);
+ }
+ 
+ int abrt_oops_signaled_sleep(int seconds)
+-- 
+2.1.0
+
diff --git a/abrt.spec b/abrt.spec
index 4ce2554..cb06b40 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -40,23 +40,22 @@
     %define docdirversion -%{version}
 %endif
 
-%define libreport_ver 2.3.0
-%define satyr_ver 0.15
+%define libreport_ver 2.3.0-3
+%define satyr_ver 0.15-2
 
 Summary: Automatic bug detection and reporting tool
 Name: abrt
 Version: 2.3.0
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2+
 Group: Applications/System
-URL: https://fedorahosted.org/abrt/
+URL: https://github.com/abrt/abrt/wiki/ABRT-Project
 Source: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
 
-# remove this patch later, packages in F21 are not signed yet!
-Patch0: disable-OpenGPGCheck-in-Fedora-Rawhide.patch
-
-#Patch0001:  0001-testsuite-added-missing-test-for-abrt-cli-option-pro.patch
-Patch0002:  0002-Translation-updates.patch
+# git format-patch %%{Version} --topo-order -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-testsuite-added-missing-test-for-abrt-cli-option-pro.patch
 #Patch0003:  0003-testsuite-added-nachineid-test.patch
 #Patch0004:  0004-testsuite-added-test-for-ureport-with-Authentication.patch
 #Patch0005:  0005-testsuite-added-test-for-ureport-authorization-throu.patch
@@ -74,8 +73,29 @@ Patch0010:  0010-console-notifications-skip-non-interactive-shells.patch
 #Patch0017:  0017-testsuite-console-notifications-fix-couple-of-bugs.patch
 #Patch0018:  0018-testsuite-dump-journal-oops-check-output.patch
 #Patch0019:  0019-testsuite-fix-koops-journal-parsing-for-s390x.patch
-Patch0020:  0020-journal-oops-use-the-length-result-of-sd_journal_get.patch
-#Patch0021:  0021-testsuite-show-diff-of-dumped-journal-oops-and-expec.patch
+#Patch0020:  0020-testsuite-show-diff-of-dumped-journal-oops-and-expec.patch
+Patch0021:  0021-journal-oops-use-the-length-result-of-sd_journal_get.patch
+#Patch0021:  0022-testsuite-abrt-action-ureport.patch
+#Patch0022:  0023-testsuite-abrt-action-ureport.patch
+Patch0023:  0024-make-ABRT-quieter.patch
+#Patch0024:  0025-testsuite-rhts-test.patch
+Patch0025:  0026-applet-ensure-writable-dump-directory-before-reporti.patch
+#Patch0026:  0027-testsuite-rhsm-entitlement-aut-must-not-fail-with-mo.patch
+#Patch0027:  0028-testsuite-use-the-entitlement-certs-with-rhsm.patch
+#Patch0028:  0029-testsuite-do-not-user-uReport_URL-in-reporter-rhtsup.patch
+Patch0029:  0030-a-a-s-p-d-add-firefox-on-the-package-blacklist.patch
+#Patch0030:  0031-testsuite-infinite-recursion-stack-traces.patch
+Patch0031:  0032-a-a-g-machine-id-add-systemd-s-machine-id.patch
+#Patch0032:  0033-testsuite-add-sanity-test-for-a-a-g-machine-id.patch
+Patch0033:  0034-a-a-g-machine-id-suppress-its-failures-in-abrt_event.patch
+#Patch0034:  0035-testsuite-infinite-recursion-stack-traces-fix.patch
+#Patch0035:  0036-testsuite-verify-that-machineid-contains-two-values.patch
+Patch0036:  0037-a-a-g-machine-id-omit-trailing-new-line-for-one-line.patch
+Patch0037:  0038-a-a-g-machine-id-do-not-print-any-error-from-the-eve.patch
+Patch0038:  0039-sos-use-all-valuable-plugins.patch
+Patch0039:  0040-koops-improve-reason-text-for-page-faults.patch
+#Patch0040:  0041-testsuite-ureport-does-not-fail-on-rhsm-errors.patch
+#Patch0041:  0042-spec-update-the-URL.patch
 
 
 # '%%autosetup -S git' -> git
@@ -461,6 +481,7 @@ to the shell
 # 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
 
 %build
@@ -987,6 +1008,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
 
 %changelog
+* Mon Nov 10 2014 Jakub Filak <jfilak at redhat.com> - 2.3.0-3
+- re-enable GPGCheck: report only signed packages
+- koops: improve 'reason' text for page faults
+- do not detect Firefox crashes
+- make ABRT queiter
+- update Package URL
+- Resolves: #1151234, #1159469
+
 * Tue Oct 14 2014 Jakub Filak <jfilak at redhat.com> - 2.3.0-2
 - oops: get rid of invalid characters when dumping from journald
 - Resolves: #1141549, #1149477


More information about the scm-commits mailing list