New upstream release 2.3.0

This commit is contained in:
Jakub Filak 2014-10-09 11:42:01 +02:00
parent 5cd8f8ac40
commit 98d5ba2974
27 changed files with 159371 additions and 3520 deletions

1
.gitignore vendored
View File

@ -37,3 +37,4 @@ abrt-1.1.13.tar.gz
/abrt-2.2.0.tar.gz
/abrt-2.2.1.tar.gz
/abrt-2.2.2.tar.gz
/abrt-2.3.0.tar.gz

159358
0002-Translation-updates.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,40 +0,0 @@
From 6b57ceebb1366e23321b1fe40d15285708e16869 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Wed, 9 Jul 2014 17:55:36 +0200
Subject: [PATCH 2/9] python: support exceptions without traceback
e.g. SyntaxError (python-2.7.5-13.fc20, python-2.7.7-2.fc21)
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/hooks/abrt_exception_handler.py.in | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/hooks/abrt_exception_handler.py.in b/src/hooks/abrt_exception_handler.py.in
index cb32e14..fa4f34f 100644
--- a/src/hooks/abrt_exception_handler.py.in
+++ b/src/hooks/abrt_exception_handler.py.in
@@ -55,12 +55,14 @@ def write_dump(tb_text, tb):
executable = sys.argv[0]
dso_list = None
- try:
- import rpm
- dso_list = get_dso_list(tb)
- except ImportError as imperr:
- syslog("RPM module not available, cannot query RPM db for package "\
- "names")
+ # Trace back is None in case of SyntaxError exception.
+ if tb:
+ try:
+ import rpm
+ dso_list = get_dso_list(tb)
+ except ImportError as imperr:
+ syslog("RPM module not available, cannot query RPM db for package "\
+ "names")
# Open ABRT daemon's socket and write data to it
try:
--
1.9.3

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +0,0 @@
From 6581aa9a25334aaa9abd1e40676664602b34ea0b Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Tue, 15 Jul 2014 13:10:04 +0200
Subject: [PATCH 8/9] abrt-journal: fix includes
Related to rhbz#1059724
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/abrt-journal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/abrt-journal.c b/src/plugins/abrt-journal.c
index 472357d..89c8393 100644
--- a/src/plugins/abrt-journal.c
+++ b/src/plugins/abrt-journal.c
@@ -16,10 +16,10 @@
#include <signal.h>
#include <poll.h>
#include <stdlib.h>
-#include <abrt/libabrt.h>
#include <stdio.h>
#include "abrt-journal.h"
+#include "libabrt.h"
#include <systemd/sd-journal.h>
--
1.9.3

View File

@ -1,28 +0,0 @@
From 4d548cdc3b82d5b6af92e63b0d90f6e5bb9496cb Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <jfilak@redhat.com>
---
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 @@
<event>
<name>Analyze C/C++ Crash</name>
<_description>Send core dump to remote retrace server for analysis or perform local analysis if the remote analysis fails</_description>
- <_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.
</_long-description>
--
2.1.0

View File

@ -1,185 +0,0 @@
From ed4889a23a436cc6db3e753f25a9fc9f8ffa537b Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <jfilak@redhat.com>
---
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

View File

@ -1,42 +0,0 @@
From 5dd86951db386391442a35f19f72939f4af0c2e1 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <hwoarang@gentoo.org>
Signed-off-by: Martin Milata <mmilata@redhat.com>
libreport commit commit 07a33e562e99fa68332925c402538341d8cd82e2
Author: Markos Chandras <hwoarang@gentoo.org>
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
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

View File

@ -1,60 +0,0 @@
From 6dfa20921a88453718d1e4642e109f6d1be69861 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Fri, 1 Aug 2014 09:31:53 +0200
Subject: [PATCH 14/24] oops: add man page
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
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

View File

@ -1,34 +0,0 @@
From e563de7f55036ec4a036161157f172beea15010a Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <json/json.h>. The
proper way to include the json-c header is to include <json.h>.
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 <jfilak@redhat.com>
---
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 <json/json.h>
+#include <json.h>
#include <rpm/rpmts.h>
#include <rpm/rpmcli.h>
#include <rpm/rpmdb.h>
--
2.1.0

View File

@ -1,35 +0,0 @@
From cdb507ed336fa30151eefa6510d20c9271e7fc82 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <mtoman@redhat.com> (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 <jfilak@redhat.com>
---
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

View File

@ -1,34 +0,0 @@
From 522d6892557c5f35571834ca5a925104d486dd28 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <jfilak@redhat.com>
---
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

View File

@ -1,35 +0,0 @@
From b36d22b022e00ddeb26499f285282b94d118a64c Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <jfilak@redhat.com>
---
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 <X11/Xlib.h>
#include <X11/SM/SMlib.h>
+
+#define GDK_DISABLE_DEPRECATION_WARNINGS
+/* https://bugzilla.gnome.org/show_bug.cgi?id=734826 */
#include <gtk/gtk.h>
+
#include <libnotify/notify.h>
#include <dbus/dbus-shared.h>
#include <dbus/dbus-glib.h>
--
2.1.0

View File

@ -1,39 +0,0 @@
From 88cd0ba3d8bcbe597d777895952a3867fd789f12 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <jfilak@redhat.com>
---
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

View File

@ -1,53 +0,0 @@
From 3829489cd5f74f4b9f7e1567fee941123aa77987 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <jfilak@redhat.com>
---
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

View File

@ -1,32 +0,0 @@
From 8cab3b03f23e0516a4abf32e0721411c2301bbd8 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <jfilak@redhat.com>
---
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

View File

@ -1,60 +0,0 @@
From c542dcd6d620ceb3f896b6016e95172db81bddab Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
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 <jfilak@redhat.com>
---
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

View File

@ -1,26 +0,0 @@
From 3b7b9dd093e38473f796efeb724a1334d4041ea2 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Thu, 28 Aug 2014 15:02:38 +0200
Subject: [PATCH 24/24] retrace: respect Bugzilla event preferences
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
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 @@
<gui-review-elements>no</gui-review-elements>
<sending-sensitive-data>yes</sending-sensitive-data>
<options>
+ <import-event-options event="report_Bugzilla"/>
+
<option type="text" name="RETRACE_SERVER_URL">
<_label>Retrace server URL</_label>
<default-value>retrace.fedoraproject.org</default-value>
--
2.1.0

View File

@ -1,115 +0,0 @@
From b99e470af23347332e7c941ed88536959e92b8a8 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@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

View File

@ -1,70 +0,0 @@
From 592b7e19a20b38547c5b3c5d81add27ed79e05a9 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@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@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

View File

@ -1,49 +0,0 @@
From 119fb61675555c049ce9251b4ee0e3c72caf0b0f Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@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@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

View File

@ -1,98 +0,0 @@
From 5d019a12fde3c94200aca369b77d7fe0f444971f Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@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@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

View File

@ -1,115 +0,0 @@
From dbdeb7f7d862d5fd29db10eaa330241837872163 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@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@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

View File

@ -1,47 +0,0 @@
From 542b9c8916ca1b6c0ce68a13b9daef5941417ab9 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@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@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, &timestamp_from, &timestamp_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", &timestamp_from);
+ g_variant_get_child(parameters, 3, "x", &timestamp_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

View File

@ -1,261 +0,0 @@
From a744f2e96c79f44a7d856f01766a933fa9b1504a Mon Sep 17 00:00:00 2001
From: Marcin Juszkiewicz <mjuszkiewicz@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@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

View File

@ -40,13 +40,13 @@
%define docdirversion -%{version}
%endif
%define libreport_ver 2.2.3
%define satyr_ver 0.14
%define libreport_ver 2.3.0
%define satyr_ver 0.15
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: 2.2.2
Release: 9%{?dist}
Version: 2.3.0
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://fedorahosted.org/abrt/
@ -54,45 +54,8 @@ Source: https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.gz
# don't remove this patch, packages in rawhide are not signed!
Patch0: disable-OpenGPGCheck-in-Fedora-Rawhide.patch
#Patch1: 0001-update-.gitignore.patch
Patch2: 0002-python-support-exceptions-without-traceback.patch
#Patch3: 0003-use-satyr-with-native-unwider.patch
Patch4: 0004-koops-dump-oopses-from-systemd-journal.patch
#Patch5: 0005-spec-add-the-journal-oops-stuff.patch
#Patch6: 0006-testsuite-add-tests-for-abrt-dump-journal-oops.patch
#Patch7: 0007-spec-add-a-build-require-item-for-systemd-journal.patch
Patch8: 0008-abrt-journal-fix-includes.patch
#Patch9: 0009-spec-don-t-use-native-unwinder-on-arm-arch.patch
#Patch10: 0010-testsuite-ureport-comments.patch
Patch11: 0011-xml-fix-a-typo-in-analyze_CCpp.patch
Patch12: 0012-gettext-fix-the-initialization-in-python-scripts.patch
Patch13: 0013-configure.ac-Fix-json-c-detection-for-json-c-0.11.patch
Patch14: 0014-oops-add-man-page.patch
#Patch15: 0015-spec-hook-abrt-oops.conf.5.patch
Patch16: 0016-json-include-json.h-accordingly-to-json-c-CFLAGS.patch
Patch17: 0017-Revert-Support-handling-crashes-in-lxc-containers.patch
Patch18: 0018-koops-fix-a-use-after-free-bug-uncoverd-by-coverity.patch
Patch19: 0019-applet-disable-GDK-deprecation-warnings.patch
Patch20: 0020-a-h-event-don-t-spam-system-logs.patch
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
#Patch0001: 0001-testsuite-added-missing-test-for-abrt-cli-option-pro.patch
Patch0002: 0002-Translation-updates.patch
# '%%autosetup -S git' -> git
BuildRequires: git
@ -1003,6 +966,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
%changelog
* Wed Oct 08 2014 Jakub Filak <jfilak@redhat.com> - 2.3.0-1
- applet: confirm ignoring of notifications
- cli: batch reporting in abrt-cli
- cli: add option remove crash dirs after reporting
* Thu Oct 02 2014 Jakub Filak <jfilak@redhat.com> - 2.2.2-9
- disable addon-vmcore on AArch64

View File

@ -1 +1 @@
5133980911a7d841d073c61a75a490a1 abrt-2.2.2.tar.gz
faa666301f4512723486300212cd7e58 abrt-2.3.0.tar.gz