[abrt] upstream git snapshot
Jakub Filak
jfilak at fedoraproject.org
Wed Oct 1 14:45:02 UTC 2014
commit 55686befa2533053a06c75688eb516f42b47eb11
Author: Jakub Filak <jfilak at redhat.com>
Date: Wed Oct 1 16:38:41 2014 +0200
upstream git snapshot
Resolves: #1141485
...-cli-make-consistent-commands-in-abrt-cli.patch | 115 +++++++++
...li-robustize-abrt-console-notification.sh.patch | 70 ++++++
...table-syntax-in-abrt-console-notification.patch | 49 ++++
0031-retrace-client-humanize-sizes.patch | 98 ++++++++
...ugins-add-abrt-action-generate-machine-id.patch | 115 +++++++++
0035-dbus-fixed-abrt-dbus-memory-leaks.patch | 47 ++++
0038-Allow-to-disable-vmcore-plugin.patch | 261 ++++++++++++++++++++
abrt.spec | 51 ++++-
8 files changed, 805 insertions(+), 1 deletions(-)
---
diff --git a/0026-cli-make-consistent-commands-in-abrt-cli.patch b/0026-cli-make-consistent-commands-in-abrt-cli.patch
new file mode 100644
index 0000000..c9ff049
--- /dev/null
+++ b/0026-cli-make-consistent-commands-in-abrt-cli.patch
@@ -0,0 +1,115 @@
+From b99e470af23347332e7c941ed88536959e92b8a8 Mon Sep 17 00:00:00 2001
+From: Matej Habrnal <mhabrnal at redhat.com>
+Date: Mon, 8 Sep 2014 13:27:56 +0200
+Subject: [PATCH 26/39] cli: make consistent commands in abrt-cli
+
+Add abbreviations to the client's parametres.
+
+Related to rhbz#1066501
+---
+ doc/abrt-cli.txt | 2 +-
+ src/cli/abrt-cli.c | 20 +++++++++++---------
+ src/cli/builtin-cmd.h | 2 +-
+ src/cli/rm.c | 2 +-
+ 4 files changed, 14 insertions(+), 12 deletions(-)
+
+diff --git a/doc/abrt-cli.txt b/doc/abrt-cli.txt
+index 792e781..1c95655 100644
+--- a/doc/abrt-cli.txt
++++ b/doc/abrt-cli.txt
+@@ -9,7 +9,7 @@ SYNOPSIS
+ --------
+ 'abrt-cli' list [-vdf] [DIR]...
+
+-'abrt-cli' rm [-v] DIR...
++'abrt-cli' remove [-v] DIR...
+
+ 'abrt-cli' report [-v] DIR...
+
+diff --git a/src/cli/abrt-cli.c b/src/cli/abrt-cli.c
+index a95b8bf..c04c132 100644
+--- a/src/cli/abrt-cli.c
++++ b/src/cli/abrt-cli.c
+@@ -20,14 +20,15 @@
+ #include "libabrt.h"
+ #include "builtin-cmd.h"
+
+-#define USAGE_OPTS_WIDTH 12
++#define USAGE_OPTS_WIDTH 16
+ #define USAGE_GAP 2
+
+ /* TODO: add --pager(default) and --no-pager */
+
+-#define CMD(NAME, help) { #NAME, cmd_##NAME , (help) }
++#define CMD(NAME, ABBREV, help) { #NAME, ABBREV, cmd_##NAME , (help) }
+ struct cmd_struct {
+ const char *cmd;
++ const char *abbrev;
+ int (*fn)(int, const char **);
+ const char *help;
+ };
+@@ -41,6 +42,7 @@ static void list_cmds_help(const struct cmd_struct *commands)
+
+ pos = fprintf(stderr, " ");
+ pos += fprintf(stderr, "%s", p->cmd);
++ pos += fprintf(stderr, ", %s", p->abbrev);
+
+ if (pos <= USAGE_OPTS_WIDTH)
+ pad = USAGE_OPTS_WIDTH - pos;
+@@ -110,7 +112,7 @@ static void handle_internal_command(int argc, const char **argv,
+
+ for (const struct cmd_struct *p = commands; p->cmd; ++p)
+ {
+- if (strcmp(p->cmd, cmd) != 0)
++ if (strcmp(p->cmd, cmd) != 0 && strcmp(p->abbrev, cmd) != 0)
+ continue;
+
+ exit(p->fn(argc, argv));
+@@ -143,12 +145,12 @@ int main(int argc, const char **argv)
+ );
+
+ const struct cmd_struct commands[] = {
+- CMD(list, _("List problems [in DIRs]")),
+- CMD(rm, _("Remove problem directory DIR")),
+- CMD(report, _("Analyze and report problem data in DIR")),
+- CMD(info, _("Print information about DIR")),
+- CMD(status, _("Print the count of the recent crashes")),
+- {NULL, NULL, NULL}
++ CMD(list, "ls", _("List problems [in DIRs]")),
++ CMD(remove, "rm", _("Remove problem directory DIR")),
++ CMD(report, "e",_("Analyze and report problem data in DIR")),
++ CMD(info, "i", _("Print information about DIR")),
++ CMD(status, "st",_("Print the count of the recent crashes")),
++ {NULL, NULL, NULL, NULL}
+ };
+
+ migrate_to_xdg_dirs();
+diff --git a/src/cli/builtin-cmd.h b/src/cli/builtin-cmd.h
+index 491760b..18588e1 100644
+--- a/src/cli/builtin-cmd.h
++++ b/src/cli/builtin-cmd.h
+@@ -21,7 +21,7 @@
+ #define _BUILTIN_CMD_H_
+
+ extern int cmd_list(int argc, const char **argv);
+-extern int cmd_rm(int argc, const char **argv);
++extern int cmd_remove(int argc, const char **argv);
+ extern int cmd_report(int argc, const char **argv);
+ extern int cmd_info(int argc, const char **argv);
+ extern int cmd_status(int argc, const char **argv);
+diff --git a/src/cli/rm.c b/src/cli/rm.c
+index 8f185a4..fe458ff 100644
+--- a/src/cli/rm.c
++++ b/src/cli/rm.c
+@@ -25,7 +25,7 @@
+ * add -q, --quite
+ */
+
+-int cmd_rm(int argc, const char **argv)
++int cmd_remove(int argc, const char **argv)
+ {
+ const char *program_usage_string = _(
+ "& rm [options] DIR..."
+--
+2.1.0
+
diff --git a/0029-cli-robustize-abrt-console-notification.sh.patch b/0029-cli-robustize-abrt-console-notification.sh.patch
new file mode 100644
index 0000000..a9d9fd7
--- /dev/null
+++ b/0029-cli-robustize-abrt-console-notification.sh.patch
@@ -0,0 +1,70 @@
+From 592b7e19a20b38547c5b3c5d81add27ed79e05a9 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Mon, 15 Sep 2014 08:40:05 +0200
+Subject: [PATCH 29/39] cli: robustize abrt-console-notification.sh
+
+- don't show any notifications without a terminal connected to stdout
+- don't continue without writable $HOME directory
+- forward all error messages to /dev/null
+
+Resolves rhbz#1141485
+Related to rhbz#1139001
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/cli/abrt-console-notification.sh | 30 ++++++++++++++++++++++++------
+ 1 file changed, 24 insertions(+), 6 deletions(-)
+
+diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
+index 937abb0..0090747 100755
+--- a/src/cli/abrt-console-notification.sh
++++ b/src/cli/abrt-console-notification.sh
+@@ -1,21 +1,39 @@
++# If shell is not connect to a terminal, exit immediately, because this script
++# should print out ABRT's status and it is senseless to continue without
++# terminal.
++tty -s || exit 0
++
++# If $HOME is not set, a non human user is logging in to shell but this script
++# should provide information to human users, therefore exiting immediately
++# without showing the notification.
++if [ -z "$HOME" ]; then
++ exit 0
++fi
++
++if [ -z "$ABRT_DEBUG_LOG" ]; then
++ ABRT_DEBUG_LOG="/dev/null"
++fi
++
+ LPATHDIR="$HOME/.cache/abrt"
+ SINCEFILE="$LPATHDIR/lastnotification"
+
+ if [ ! -f "$LPATHDIR" ]; then
+- mkdir -p "$LPATHDIR"
++ # It might happen that user doesn't have write access on his home.
++ mkdir -p "$LPATHDIR" &> "$ABRT_DEBUG_LOG" || exit 0
+ fi
+
+-TMPPATH=`mktemp --tmpdir="$LPATHDIR" lastnotification.XXXXXXXX 2> /dev/null`
++TMPPATH=`mktemp --tmpdir="$LPATHDIR" lastnotification.XXXXXXXX 2> "$ABRT_DEBUG_LOG"`
+
+ SINCE=0
+ if [ -f "$SINCEFILE" ]; then
+- SINCE=`cat $SINCEFILE 2> /dev/null`
++ SINCE=`cat $SINCEFILE 2> "$ABRT_DEBUG_LOG"`
+ fi
+
+ # always update the lastnotification
+ if [ -f "$TMPPATH" ]; then
+- date +%s > "$TMPPATH"
+- mv -f "$TMPPATH" "$SINCEFILE"
++ # Be quite in case of errors and don't scare users by strange error messages.
++ date +%s > "$TMPPATH" 2> "$ABRT_DEBUG_LOG"
++ mv -f "$TMPPATH" "$SINCEFILE" &> "$ABRT_DEBUG_LOG"
+ fi
+
+-abrt-cli status --since="$SINCE" 2> /dev/null
++abrt-cli status --since="$SINCE" 2> "$ABRT_DEBUG_LOG"
+--
+2.1.0
+
diff --git a/0030-cli-use-portable-syntax-in-abrt-console-notification.patch b/0030-cli-use-portable-syntax-in-abrt-console-notification.patch
new file mode 100644
index 0000000..53a1562
--- /dev/null
+++ b/0030-cli-use-portable-syntax-in-abrt-console-notification.patch
@@ -0,0 +1,49 @@
+From 119fb61675555c049ce9251b4ee0e3c72caf0b0f Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Mon, 15 Sep 2014 13:43:10 +0200
+Subject: [PATCH 30/39] cli: use portable syntax in abrt-console-notification
+
+Thanks Dominic Cleal
+
+Resolves rhbz#1141485
+Related to rhbz#1139001
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/cli/abrt-console-notification.sh | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
+index 0090747..849273c 100755
+--- a/src/cli/abrt-console-notification.sh
++++ b/src/cli/abrt-console-notification.sh
+@@ -19,21 +19,21 @@ SINCEFILE="$LPATHDIR/lastnotification"
+
+ if [ ! -f "$LPATHDIR" ]; then
+ # It might happen that user doesn't have write access on his home.
+- mkdir -p "$LPATHDIR" &> "$ABRT_DEBUG_LOG" || exit 0
++ mkdir -p "$LPATHDIR" >"$ABRT_DEBUG_LOG" 2>&1 || exit 0
+ fi
+
+ TMPPATH=`mktemp --tmpdir="$LPATHDIR" lastnotification.XXXXXXXX 2> "$ABRT_DEBUG_LOG"`
+
+ SINCE=0
+ if [ -f "$SINCEFILE" ]; then
+- SINCE=`cat $SINCEFILE 2> "$ABRT_DEBUG_LOG"`
++ SINCE=`cat $SINCEFILE 2>"$ABRT_DEBUG_LOG"`
+ fi
+
+ # always update the lastnotification
+ if [ -f "$TMPPATH" ]; then
+ # Be quite in case of errors and don't scare users by strange error messages.
+- date +%s > "$TMPPATH" 2> "$ABRT_DEBUG_LOG"
+- mv -f "$TMPPATH" "$SINCEFILE" &> "$ABRT_DEBUG_LOG"
++ date +%s > "$TMPPATH" 2>"$ABRT_DEBUG_LOG"
++ mv -f "$TMPPATH" "$SINCEFILE" >"$ABRT_DEBUG_LOG" 2>&1
+ fi
+
+-abrt-cli status --since="$SINCE" 2> "$ABRT_DEBUG_LOG"
++abrt-cli status --since="$SINCE" 2>"$ABRT_DEBUG_LOG"
+--
+2.1.0
+
diff --git a/0031-retrace-client-humanize-sizes.patch b/0031-retrace-client-humanize-sizes.patch
new file mode 100644
index 0000000..c7383c1
--- /dev/null
+++ b/0031-retrace-client-humanize-sizes.patch
@@ -0,0 +1,98 @@
+From 5d019a12fde3c94200aca369b77d7fe0f444971f Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Mon, 15 Sep 2014 11:44:02 +0200
+Subject: [PATCH 31/39] retrace-client: humanize sizes
+
+G_FORMAT_SIZE_IEC_UNITS
+
+ use IEC (base 1024) units with "KiB"-style suffixes. IEC units should
+only be used for reporting things with a strong "power of 2" basis, like
+RAM sizes or RAID stripe sizes. Network and storage sizes should be
+reported in the normal SI units.
+
+Fixes #844
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/plugins/abrt-retrace-client.c | 36 +++++++++++++++++++++++-------------
+ 1 file changed, 23 insertions(+), 13 deletions(-)
+
+diff --git a/src/plugins/abrt-retrace-client.c b/src/plugins/abrt-retrace-client.c
+index 60bbbc2..0b67773 100644
+--- a/src/plugins/abrt-retrace-client.c
++++ b/src/plugins/abrt-retrace-client.c
+@@ -511,10 +511,16 @@ static int create(bool delete_temp_archive,
+ if (unpacked_size > settings->max_unpacked_size)
+ {
+ alert_crash_too_large();
+- error_msg_and_die(_("The size of your crash is %lld bytes, "
++
++ /* Leaking size and max_size in hope the memory will be released in
++ * error_msg_and_die() */
++ gchar *size = g_format_size_full(unpacked_size, G_FORMAT_SIZE_IEC_UNITS);
++ gchar *max_size = g_format_size_full(settings->max_unpacked_size, G_FORMAT_SIZE_IEC_UNITS);
++
++ error_msg_and_die(_("The size of your crash is %s, "
+ "but the retrace server only accepts "
+- "crashes smaller or equal to %lld bytes."),
+- unpacked_size, settings->max_unpacked_size);
++ "crashes smaller or equal to %s."),
++ size, max_size);
+ }
+
+ if (settings->supported_formats)
+@@ -610,14 +616,19 @@ static int create(bool delete_temp_archive,
+
+ /* Get the file size. */
+ fstat(tempfd, &file_stat);
++ gchar *human_size = g_format_size_full((long long)file_stat.st_size, G_FORMAT_SIZE_IEC_UNITS);
+ if ((long long)file_stat.st_size > settings->max_packed_size)
+ {
+ alert_crash_too_large();
+- error_msg_and_die(_("The size of your archive is %lld bytes, "
++
++ /* Leaking human_size and max_size in hope the memory will be released in
++ * error_msg_and_die() */
++ gchar *max_size = g_format_size_full(settings->max_packed_size, G_FORMAT_SIZE_IEC_UNITS);
++
++ error_msg_and_die(_("The size of your archive is %s, "
+ "but the retrace server only accepts "
+- "archives smaller or equal %lld bytes."),
+- (long long)file_stat.st_size,
+- settings->max_packed_size);
++ "archives smaller or equal to %s."),
++ human_size, max_size);
+ }
+
+ free_settings(settings);
+@@ -626,8 +637,8 @@ static int create(bool delete_temp_archive,
+
+ if (size_mb > 8) /* 8 MB - should be configurable */
+ {
+- char *question = xasprintf(_("You are going to upload %d megabytes. "
+- "Continue?"), size_mb);
++ char *question = xasprintf(_("You are going to upload %s. "
++ "Continue?"), human_size);
+
+ int response = ask_yes_no(question);
+ free(question);
+@@ -669,13 +680,12 @@ static int create(bool delete_temp_archive,
+
+ if (delay)
+ {
+- if (size_mb > 1)
+- printf(_("Uploading %d megabytes\n"), size_mb);
+- else
+- printf(_("Uploading %lld bytes\n"), (long long)file_stat.st_size);
++ printf(_("Uploading %s\n"), human_size);
+ fflush(stdout);
+ }
+
++ g_free(human_size);
++
+ strbuf_free(http_request);
+ int result = 0;
+ int i;
+--
+2.1.0
+
diff --git a/0032-plugins-add-abrt-action-generate-machine-id.patch b/0032-plugins-add-abrt-action-generate-machine-id.patch
new file mode 100644
index 0000000..081c6b8
--- /dev/null
+++ b/0032-plugins-add-abrt-action-generate-machine-id.patch
@@ -0,0 +1,115 @@
+From dbdeb7f7d862d5fd29db10eaa330241837872163 Mon Sep 17 00:00:00 2001
+From: Jakub Filak <jfilak at redhat.com>
+Date: Tue, 16 Sep 2014 15:35:55 +0200
+Subject: [PATCH 32/39] plugins: add abrt-action-generate-machine-id
+
+Related to rhbz#1140044
+
+Signed-off-by: Jakub Filak <jfilak at redhat.com>
+---
+ src/daemon/abrt_event.conf | 3 ++
+ src/plugins/Makefile.am | 2 +
+ src/plugins/abrt-action-generate-machine-id | 57 +++++++++++++++++++++++++++++
+ 3 files changed, 62 insertions(+)
+ create mode 100644 src/plugins/abrt-action-generate-machine-id
+
+diff --git a/src/daemon/abrt_event.conf b/src/daemon/abrt_event.conf
+index 190c9c0..4597627 100644
+--- a/src/daemon/abrt_event.conf
++++ b/src/daemon/abrt_event.conf
+@@ -90,6 +90,9 @@ EVENT=post-create runlevel=
+ rm sosreport.log
+ exit 1
+
++# Example: if you want to include *machineid* in dump directories:
++#EVENT=post-create
++ /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
+diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
+index a804f82..bb8b1b3 100644
+--- a/src/plugins/Makefile.am
++++ b/src/plugins/Makefile.am
+@@ -36,6 +36,7 @@ libexec_PROGRAMS = \
+ abrt-action-install-debuginfo-to-abrt-cache
+
+ libexec_SCRIPTS = \
++ abrt-action-generate-machine-id \
+ abrt-action-ureport \
+ abrt-gdb-exploitable
+
+@@ -93,6 +94,7 @@ EXTRA_DIST = \
+ analyze_VMcore.xml.in \
+ abrt-action-analyze-core.in \
+ abrt-action-analyze-vmcore \
++ abrt-action-generate-machine-id \
+ abrt-action-check-oops-for-hw-error \
+ abrt-action-save-kernel-data \
+ abrt-action-ureport \
+diff --git a/src/plugins/abrt-action-generate-machine-id b/src/plugins/abrt-action-generate-machine-id
+new file mode 100644
+index 0000000..0aea787
+--- /dev/null
++++ b/src/plugins/abrt-action-generate-machine-id
+@@ -0,0 +1,57 @@
++#!/usr/bin/python
++from argparse import ArgumentParser
++
++import dmidecode
++import hashlib
++
++
++# Generate a machine_id based off dmidecode fields
++def generate_machine_id():
++ dmixml = dmidecode.dmidecodeXML()
++
++ # Fetch all DMI data into a libxml2.xmlDoc object
++ dmixml.SetResultType(dmidecode.DMIXML_DOC)
++ xmldoc = dmixml.QuerySection('all')
++
++ # Do some XPath queries on the XML document
++ dmixp = xmldoc.xpathNewContext()
++
++ # What to look for - XPath expressions
++ keys = ['/dmidecode/SystemInfo/Manufacturer',
++ '/dmidecode/SystemInfo/ProductName',
++ '/dmidecode/SystemInfo/SerialNumber',
++ '/dmidecode/SystemInfo/SystemUUID']
++
++ # Create a sha256 of ^ for machine_id
++ machine_id = hashlib.sha256()
++
++ # Run xpath expressions
++ for k in keys:
++ data = dmixp.xpathEval(k)
++ for d in data:
++ # Update the hash as we find the fields we are looking for
++ machine_id.update(d.get_content())
++
++ del dmixp
++ del xmldoc
++ # Create sha256 digest
++ 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')
++
++ OPTIONS = CMDARGS.parse_args()
++ ARGS = vars(OPTIONS)
++
++ machineid = generate_machine_id()
++
++ if ARGS['output']:
++ try:
++ with open(ARGS['output'], 'w') as outfile:
++ outfile.write(machineid)
++ except IOError as ex:
++ print ex
++ else:
++ print machineid
+--
+2.1.0
+
diff --git a/0035-dbus-fixed-abrt-dbus-memory-leaks.patch b/0035-dbus-fixed-abrt-dbus-memory-leaks.patch
new file mode 100644
index 0000000..9adeb45
--- /dev/null
+++ b/0035-dbus-fixed-abrt-dbus-memory-leaks.patch
@@ -0,0 +1,47 @@
+From 542b9c8916ca1b6c0ce68a13b9daef5941417ab9 Mon Sep 17 00:00:00 2001
+From: Matej Habrnal <mhabrnal at redhat.com>
+Date: Thu, 18 Sep 2014 15:02:01 +0200
+Subject: [PATCH 35/39] dbus: fixed abrt-dbus memory leaks
+
+Fixed memory leaks in abrt-dbus (method FindProblemByElementInTimeRange).
+This method leaks memory if fuzzing on org.freedesktop.problems interface.
+
+Related to rhbz#1015473
+
+Signed-off-by: Matej Habrnal <mhabrnal at redhat.com>
+---
+ src/dbus/abrt-dbus.c | 18 +++++++++++-------
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/src/dbus/abrt-dbus.c b/src/dbus/abrt-dbus.c
+index 0350dee..308a9af 100644
+--- a/src/dbus/abrt-dbus.c
++++ b/src/dbus/abrt-dbus.c
+@@ -685,13 +685,17 @@ static void handle_method_call(GDBusConnection *connection,
+
+ if (g_strcmp0(method_name, "FindProblemByElementInTimeRange") == 0)
+ {
+- const char *element;
+- const char *value;
+- long timestamp_from;
+- long timestamp_to;
+- bool all;
+-
+- g_variant_get(parameters, "(ssxxb)", &element, &value, ×tamp_from, ×tamp_to, &all);
++ const gchar *element;
++ const gchar *value;
++ glong timestamp_from;
++ glong timestamp_to;
++ gboolean all;
++
++ g_variant_get_child(parameters, 0, "&s", &element);
++ g_variant_get_child(parameters, 1, "&s", &value);
++ g_variant_get_child(parameters, 2, "x", ×tamp_from);
++ g_variant_get_child(parameters, 3, "x", ×tamp_to);
++ g_variant_get_child(parameters, 4, "b", &all);
+
+ if (all && polkit_check_authorization_dname(caller, "org.freedesktop.problems.getall") == PolkitYes)
+ caller_uid = 0;
+--
+2.1.0
+
diff --git a/0038-Allow-to-disable-vmcore-plugin.patch b/0038-Allow-to-disable-vmcore-plugin.patch
new file mode 100644
index 0000000..df2d7dd
--- /dev/null
+++ b/0038-Allow-to-disable-vmcore-plugin.patch
@@ -0,0 +1,261 @@
+From a744f2e96c79f44a7d856f01766a933fa9b1504a Mon Sep 17 00:00:00 2001
+From: Marcin Juszkiewicz <mjuszkiewicz at redhat.com>
+Date: Wed, 1 Oct 2014 15:02:34 +0200
+Subject: [PATCH 38/39] Allow to disable vmcore plugin
+
+On AArch64 architecture there is no kexec/kdump support yet. Disabling
+vmcore plugin allows to install Fedora there.
+
+Signed-off-by: Marcin Juszkiewicz <mjuszkiewicz at redhat.com>
+---
+ Makefile.am | 10 +++++++++-
+ configure.ac | 12 ++++++++++++
+ doc/Makefile.am | 14 +++++++++-----
+ doc/dbus-configuration/Makefile.am | 6 +++++-
+ src/hooks/Makefile.am | 12 +++++++++---
+ src/plugins/Makefile.am | 28 ++++++++++++++++++++--------
+ 6 files changed, 64 insertions(+), 18 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 9144d63..453ca19 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -50,10 +50,13 @@ if HAVE_SYSTEMD
+ init-scripts/abrt-ccpp.service \
+ init-scripts/abrt-oops.service \
+ init-scripts/abrt-xorg.service \
+- init-scripts/abrt-vmcore.service \
+ init-scripts/abrt-pstoreoops.service \
+ init-scripts/abrt-upload-watch.service
+
++if BUILD_ADDON_VMCORE
++ dist_systemdsystemunit_DATA += init-scripts/abrt-vmcore.service
++endif
++
+ systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d
+ systemdtmpfiles_DATA = init-scripts/abrt.conf
+ else
+@@ -65,6 +68,11 @@ else
+ init-scripts/abrt-vmcore \
+ init-scripts/abrt-pstoreoops \
+ init-scripts/abrt-upload-watch
++
++if BUILD_ADDON_VMCORE
++ sysv_init_SCRIPTS += init-scripts/abrt-vmcore
++endif
++
+ endif
+
+ RPM_DIRS = --define "_sourcedir `pwd`" \
+diff --git a/configure.ac b/configure.ac
+index eb42231..71d7c18 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -253,6 +253,18 @@ AC_ARG_ENABLE([native-unwinder],
+ AC_DEFINE([ENABLE_NATIVE_UNWINDER], [1], [Use elfutils/libunwind for unwinding instead of GDB.])
+ [fi]
+
++AC_ARG_ENABLE([addon-vmcore],
++ AS_HELP_STRING([--enable-addon-vmcore],
++ [allow to disable vmcore addon (for architectures without kexec/kdump) (default is yes)]),
++ [], [enable_addon_vmcore=yes])
++
++[if test "$enable_addon_vmcore" = "yes"]
++[then]
++ AC_DEFINE([ENABLE_ADDON_VMCORE], [1], [Disable vmcore addon (for architectures without kexec/kdump).])
++ AM_CONDITIONAL(BUILD_ADDON_VMCORE, true)
++[else]
++ AM_CONDITIONAL(BUILD_ADDON_VMCORE, false)
++[fi]
+
+ AC_SUBST(CONF_DIR)
+ AC_SUBST(DEFAULT_CONF_DIR)
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index abebdb0..6efd6d6 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -25,15 +25,12 @@ MAN1_TXT += abrt-auto-reporting.txt
+ MAN1_TXT += abrt-retrace-client.txt
+ MAN1_TXT += abrt-handle-upload.txt
+ MAN1_TXT += abrt-harvest-pstoreoops.txt
+-MAN1_TXT += abrt-harvest-vmcore.txt
+ MAN1_TXT += abrt-merge-pstoreoops.txt
+ MAN1_TXT += abrt-server.txt
+ MAN1_TXT += abrt-cli.txt
+ MAN1_TXT += abrt-action-save-package-data.txt
+ MAN1_TXT += abrt-action-save-kernel-data.txt
+ MAN1_TXT += abrt-install-ccpp-hook.txt
+-MAN1_TXT += abrt-action-analyze-vmcore.txt
+-MAN1_TXT += abrt-action-check-oops-for-hw-error.txt
+ MAN1_TXT += abrt-action-analyze-ccpp-local.txt
+ MAN1_TXT += abrt-watch-log.txt
+ MAN1_TXT += abrt-upload-watch.txt
+@@ -42,6 +39,7 @@ if BUILD_BODHI
+ MAN1_TXT += abrt-bodhi.txt
+ endif
+
++
+ MAN5_TXT =
+ MAN5_TXT += abrt.conf.txt
+ MAN5_TXT += abrt-action-save-package-data.conf.txt
+@@ -51,7 +49,6 @@ 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
+
+ MAN5_PREFORMATTED =
+ MAN5_PREFORMATTED += abrt_event.conf.5
+@@ -63,9 +60,16 @@ MAN5_PREFORMATTED += python_event.conf.5
+ MAN5_PREFORMATTED += python3_event.conf.5
+ MAN5_PREFORMATTED += smart_event.conf.5
+ MAN5_PREFORMATTED += vimrc_event.conf.5
+-MAN5_PREFORMATTED += vmcore_event.conf.5
+ MAN5_PREFORMATTED += xorg_event.conf.5
+
++if BUILD_ADDON_VMCORE
++MAN1_TXT += abrt-harvest-vmcore.txt
++MAN1_TXT += abrt-action-analyze-vmcore.txt
++MAN1_TXT += abrt-action-check-oops-for-hw-error.txt
++MAN5_TXT += abrt-vmcore.conf.txt
++MAN5_PREFORMATTED += vmcore_event.conf.5
++endif
++
+ MAN8_TXT =
+ MAN8_TXT += abrtd.txt abrt-dbus.txt abrt-configuration.txt
+
+diff --git a/doc/dbus-configuration/Makefile.am b/doc/dbus-configuration/Makefile.am
+index 15173de..8897139 100644
+--- a/doc/dbus-configuration/Makefile.am
++++ b/doc/dbus-configuration/Makefile.am
+@@ -10,7 +10,11 @@ dist_dbusabrtinterfaces_DATA = \
+ com.redhat.problems.configuration.ccpp.xml \
+ com.redhat.problems.configuration.oops.xml \
+ com.redhat.problems.configuration.python.xml \
+- com.redhat.problems.configuration.vmcore.xml \
+ com.redhat.problems.configuration.xorg.xml
+
++if BUILD_ADDON_VMCORE
++dist_dbusabrtinterfaces_DATA += \
++ com.redhat.problems.configuration.vmcore.xml
++endif
++
+ EXTRA_DIST = ${INTERFACES_DIST_FILES}
+diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am
+index ac3dcca..13702b5 100644
+--- a/src/hooks/Makefile.am
++++ b/src/hooks/Makefile.am
+@@ -8,7 +8,6 @@ dist_pluginsconf_DATA = \
+ CCpp.conf \
+ python.conf \
+ python3.conf \
+- vmcore.conf \
+ oops.conf
+
+ defaultpluginsconfdir = $(DEFAULT_PLUGINS_CONF_DIR)
+@@ -16,7 +15,6 @@ dist_defaultpluginsconf_DATA = $(dist_pluginsconf_DATA)
+
+ sbin_SCRIPTS = \
+ abrt-install-ccpp-hook \
+- abrt-harvest-vmcore \
+ abrt-harvest-pstoreoops
+
+ bin_PROGRAMS = \
+@@ -69,9 +67,17 @@ py3hook_PYTHON = \
+ EXTRA_DIST = abrt_exception_handler.py.in \
+ abrt_exception_handler3.py.in \
+ abrt-install-ccpp-hook.in \
+- abrt_harvest_vmcore.py.in \
+ abrt-harvest-pstoreoops.in
+
++if BUILD_ADDON_VMCORE
++sbin_SCRIPTS += \
++ abrt-harvest-vmcore
++dist_pluginsconf_DATA += \
++ vmcore.conf
++EXTRA_DIST += \
++ abrt_harvest_vmcore.py.in
++endif
++
+ CLEANFILES := $(notdir $(wildcard *~)) $(notdir $(wildcard *\#)) $(notdir $(wildcard \.\#*)) $(notdir $(wildcard *.pyc)) $(man1_MANS)
+
+ # Generate on build
+diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
+index bb8b1b3..5734ba4 100644
+--- a/src/plugins/Makefile.am
++++ b/src/plugins/Makefile.am
+@@ -4,8 +4,6 @@ bin_SCRIPTS = \
+ abrt-action-install-debuginfo \
+ abrt-action-analyze-core \
+ abrt-action-analyze-vulnerability \
+- abrt-action-analyze-vmcore \
+- abrt-action-check-oops-for-hw-error \
+ abrt-action-list-dsos \
+ abrt-action-perform-ccpp-analysis \
+ abrt-action-save-kernel-data \
+@@ -48,7 +46,6 @@ dist_events_DATA = \
+ analyze_CCpp.xml \
+ analyze_LocalGDB.xml \
+ analyze_RetraceServer.xml \
+- analyze_VMcore.xml \
+ collect_xsession_errors.xml \
+ collect_GConf.xml \
+ collect_vimrc_user.xml \
+@@ -64,7 +61,6 @@ dist_eventsconf_DATA = \
+ ccpp_retrace_event.conf \
+ koops_event.conf \
+ xorg_event.conf \
+- vmcore_event.conf \
+ python_event.conf \
+ python3_event.conf \
+ smart_event.conf \
+@@ -77,7 +73,6 @@ PYTHON_FILES = \
+ abrt-action-list-dsos \
+ abrt-action-analyze-core \
+ abrt-action-analyze-vulnerability \
+- abrt-action-analyze-vmcore.in \
+ abrt-action-check-oops-for-hw-error.in \
+ abrt-action-perform-ccpp-analysis.in \
+ abrt-action-notify
+@@ -91,11 +86,8 @@ EXTRA_DIST = \
+ analyze_CCpp.xml.in \
+ analyze_LocalGDB.xml.in \
+ analyze_RetraceServer.xml.in \
+- analyze_VMcore.xml.in \
+ abrt-action-analyze-core.in \
+- abrt-action-analyze-vmcore \
+ abrt-action-generate-machine-id \
+- abrt-action-check-oops-for-hw-error \
+ abrt-action-save-kernel-data \
+ abrt-action-ureport \
+ abrt-gdb-exploitable \
+@@ -105,6 +97,26 @@ EXTRA_DIST = \
+ post_report.xml.in \
+ abrt-action-analyze-ccpp-local.in
+
++if BUILD_ADDON_VMCORE
++bin_SCRIPTS += \
++ abrt-action-analyze-vmcore \
++ abrt-action-check-oops-for-hw-error
++
++dist_events_DATA += \
++ analyze_VMcore.xml
++
++dist_eventsconf_DATA += \
++ vmcore_event.conf
++
++PYTHON_FILES += \
++ abrt-action-analyze-vmcore.in
++
++EXTRA_DIST += \
++ analyze_VMcore.xml.in \
++ abrt-action-analyze-vmcore \
++ abrt-action-check-oops-for-hw-error
++endif
++
+ confdir = $(PLUGINS_CONF_DIR)
+ dist_conf_DATA = \
+ xorg.conf
+--
+2.1.0
+
diff --git a/abrt.spec b/abrt.spec
index f18e1c8..170bdf6 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -21,6 +21,12 @@
%endif
%endif
+%ifarch aarch64
+%define have_kexec_tools 0
+%else
+%define have_kexec_tools 1
+%endif
+
%if 0%{?rhel} >= 6
%define desktopvendor redhat
%else
@@ -40,7 +46,7 @@
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: 2.2.2
-Release: 7%{?dist}
+Release: 8%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://fedorahosted.org/abrt/
@@ -72,6 +78,21 @@ Patch21: 0021-a-a-s-p-data-reduce-amount-of-error-messages.patch
Patch22: 0022-dbus-don-t-ignore-errors-in-verbose-logging-modes.patch
Patch23: 0023-logging-less-log-messages-for-duplicates.patch
Patch24: 0024-retrace-respect-Bugzilla-event-preferences.patch
+#Patch25: 0025-testsuite-oops-processing-independent-on-localizatio.patch
+Patch26: 0026-cli-make-consistent-commands-in-abrt-cli.patch
+#Patch27: 0027-testsuite-adaedd-tests-for-abbreviations-of-commands.patch
+#Patch28: 0028-spec-remove-dependency-on-crash-from-abrt-addon-vmco.patch
+Patch29: 0029-cli-robustize-abrt-console-notification.sh.patch
+Patch30: 0030-cli-use-portable-syntax-in-abrt-console-notification.patch
+Patch31: 0031-retrace-client-humanize-sizes.patch
+Patch32: 0032-plugins-add-abrt-action-generate-machine-id.patch
+#Patch33: 0033-spec-add-abrt-action-generate-machine-id.patch
+#Patch34: 0034-testsuite-add-missing-test-for-FindProblemByElementI.patch
+Patch35: 0035-dbus-fixed-abrt-dbus-memory-leaks.patch
+#Patch36: 0036-testsuite-fixed-cli-sanity-test-because-of-new-abrt-.patch
+#Patch37: 0037-testsuite-adapt-dbus-NewProblem-to-the-updated-abrt-.patch
+Patch38: 0038-Allow-to-disable-vmcore-plugin.patch
+#Patch39: 0039-spec-disable-addon-vmcore-on-aarch64.patch
# '%%autosetup -S git' -> git
BuildRequires: git
@@ -109,6 +130,7 @@ Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-python = %{version}-%{release}
Requires(pre): shadow-utils
Requires: python-dbus
+Requires: python-dmidecode
Requires: libreport-plugin-ureport >= %{libreport_ver}
%description
@@ -229,6 +251,7 @@ Requires: abrt-libs = %{version}-%{release}
This package contains plugin for collecting Xorg crash information from Xorg
log.
+%if %{?have_kexec_tools} == 1
%package addon-vmcore
Summary: %{name}'s vmcore addon
Group: System Environment/Libraries
@@ -241,6 +264,7 @@ Requires: python-augeas
%description addon-vmcore
This package contains plugin for collecting kernel crash information from
vmcore files.
+%endif
%package addon-pstoreoops
Summary: %{name}'s pstore oops addon
@@ -307,7 +331,9 @@ Requires: %{name} = %{version}-%{release}
Requires: abrt-tui
Requires: abrt-addon-kerneloops
Requires: abrt-addon-pstoreoops
+%if %{?have_kexec_tools} == 1
Requires: abrt-addon-vmcore
+%endif
Requires: abrt-addon-ccpp
Requires: abrt-addon-python
Requires: abrt-addon-python3
@@ -340,7 +366,9 @@ Group: User Interface/Desktops
Requires: %{name} = %{version}-%{release}
Requires: abrt-addon-kerneloops
Requires: abrt-addon-pstoreoops
+%if %{?have_kexec_tools} == 1
Requires: abrt-addon-vmcore
+%endif
Requires: abrt-addon-ccpp
Requires: abrt-addon-python
Requires: abrt-addon-python3
@@ -525,8 +553,10 @@ chown -R abrt:abrt %{_localstatedir}/cache/abrt-di
%post addon-xorg
%systemd_post abrt-xorg.service
+%if %{?have_kexec_tools} == 1
%post addon-vmcore
%systemd_post abrt-vmcore.service
+%endif
%post addon-pstoreoops
%systemd_post abrt-pstoreoops.service
@@ -546,8 +576,10 @@ chown -R abrt:abrt %{_localstatedir}/cache/abrt-di
%preun addon-xorg
%systemd_preun abrt-xorg.service
+%if %{?have_kexec_tools} == 1
%preun addon-vmcore
%systemd_preun abrt-vmcore.service
+%endif
%preun addon-pstoreoops
%systemd_preun abrt-pstoreoops.service
@@ -567,8 +599,10 @@ chown -R abrt:abrt %{_localstatedir}/cache/abrt-di
%postun addon-xorg
%systemd_postun_with_restart abrt-xorg.service
+%if %{?have_kexec_tools} == 1
%postun addon-vmcore
%systemd_postun_with_restart abrt-vmcore.service
+%endif
%postun addon-pstoreoops
%systemd_postun_with_restart abrt-pstoreoops.service
@@ -619,6 +653,7 @@ service abrt-oops condrestart >/dev/null 2>&1 || :
%posttrans addon-xorg
service abrt-xorg condrestart >/dev/null 2>&1 || :
+%if %{?have_kexec_tools} == 1
%posttrans addon-vmcore
service abrt-vmcore condrestart >/dev/null 2>&1 || :
# Copy the configuration file to plugin's directory
@@ -626,6 +661,7 @@ test -f /etc/abrt/abrt-harvest-vmcore.conf && {
mv -b /etc/abrt/abrt-harvest-vmcore.conf /etc/abrt/plugins/vmcore.conf
}
exit 0
+%endif
%posttrans addon-pstoreoops
service abrt-pstoreoops condrestart >/dev/null 2>&1 || :
@@ -650,6 +686,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_sbindir}/abrt-auto-reporting
%{_libexecdir}/abrt-handle-event
%{_libexecdir}/abrt-action-ureport
+%{_libexecdir}/abrt-action-generate-machine-id
%{_bindir}/abrt-handle-upload
%{_bindir}/abrt-action-notify
%{_mandir}/man1/abrt-action-notify.1.gz
@@ -849,6 +886,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_bindir}/abrt-dump-xorg
%{_mandir}/man1/abrt-dump-xorg.1*
+%if %{?have_kexec_tools} == 1
%files addon-vmcore
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/libreport/events.d/vmcore_event.conf
@@ -868,6 +906,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_mandir}/man5/abrt-vmcore.conf.5*
%{_mandir}/man1/abrt-action-analyze-vmcore.1*
%{_mandir}/man1/abrt-action-check-oops-for-hw-error.1*
+%endif
%files addon-pstoreoops
%defattr(-,root,root,-)
@@ -931,7 +970,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.ccpp.xml
%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.oops.xml
%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.python.xml
+%if %{?have_kexec_tools} == 1
%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.vmcore.xml
+%endif
%{_datadir}/dbus-1/interfaces/com.redhat.problems.configuration.xorg.xml
%{_datadir}/dbus-1/system-services/org.freedesktop.problems.service
%{_datadir}/dbus-1/system-services/com.redhat.problems.configuration.service
@@ -959,6 +1000,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
%changelog
+* Wed Oct 01 2014 Jakub Filak <jfilak at redhat.com> - 2.2.2-8
+- dbus: fixed abrt-dbus memory leaks
+- plugins: add abrt-action-generate-machine-id
+- retrace-client: humanize sizes
+- cli: robustize abrt-console-notification.sh
+- cli: make consistent commands in abrt-cli
+- Resolves: #1141485
+
* Thu Sep 11 2014 Jakub Filak <jfilak at redhat.com> - 2.2.2-7
- remove dependency on crash
More information about the scm-commits
mailing list