Translation updates + some bug fixes
- use findmnt to get mountpoint abrt_harvest_vmcore.py - correct handling of DebuginfoLocation in a-a-install-debuginfo - koops: do not assume version has 3 levels - a-dump-journal-xorg: add '_COMM=gnome-shell' to journal filter Resolves: #1334084, #1343826 Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
This commit is contained in:
parent
6036ecae87
commit
933436886c
16 changed files with 30493 additions and 3 deletions
350
0021-Merge-a-a-save-kernel-data-with-a-a-save-package-dat.patch
Normal file
350
0021-Merge-a-a-save-kernel-data-with-a-a-save-package-dat.patch
Normal file
|
|
@ -0,0 +1,350 @@
|
|||
From 193f2898d9bf3c7f971d2e37a846b61857e7eb77 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 5 Apr 2016 15:09:39 +0200
|
||||
Subject: [PATCH] Merge a-a-save-kernel-data with a-a-save-package-data
|
||||
|
||||
I forgot to do this while working on commit
|
||||
650822d0d2438825515c0e41f06cd9fb77a18334
|
||||
|
||||
I do not think creating another tool doing almost the same thing was a
|
||||
good idea. I believe we must keep relevant bits together and not to
|
||||
spread functionality among myriads of tools just because someone do not
|
||||
want to code in C.
|
||||
|
||||
I failed to find any justification for creating
|
||||
'abrt-action-save-kernel-data' instead of teaching
|
||||
'abrt-action-save-package-data' to do that job:
|
||||
130dee46d601f3af6bb196d99a5c911335506adf
|
||||
|
||||
This commit changes contents of 'package' file from 'kernel' to
|
||||
'kernel-$version' string. It should not break anything as I could not
|
||||
find any justification for the 'kernel' string except the original
|
||||
author's believe it should be like that (probably because of efficiency).
|
||||
|
||||
Just for the record, we do not need the version in 'package' file
|
||||
because the version is already included in 'kernel' file.
|
||||
|
||||
This commit enables GPGCheck and ProcessUnpackaged options for
|
||||
Kerneloopses and VMcores.
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
doc/Makefile.am | 1 -
|
||||
doc/abrt-action-save-kernel-data.txt | 33 -------------
|
||||
src/daemon/abrt-action-save-package-data.c | 63 ++++++++++++++++--------
|
||||
src/plugins/Makefile.am | 2 -
|
||||
src/plugins/abrt-action-save-kernel-data | 78 ------------------------------
|
||||
src/plugins/koops_event.conf | 3 +-
|
||||
src/plugins/vmcore_event.conf | 2 +-
|
||||
7 files changed, 46 insertions(+), 136 deletions(-)
|
||||
delete mode 100644 doc/abrt-action-save-kernel-data.txt
|
||||
delete mode 100755 src/plugins/abrt-action-save-kernel-data
|
||||
|
||||
diff --git a/doc/Makefile.am b/doc/Makefile.am
|
||||
index d3184c4..4a5d94c 100644
|
||||
--- a/doc/Makefile.am
|
||||
+++ b/doc/Makefile.am
|
||||
@@ -32,7 +32,6 @@ 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-ccpp-local.txt
|
||||
MAN1_TXT += abrt-watch-log.txt
|
||||
diff --git a/doc/abrt-action-save-kernel-data.txt b/doc/abrt-action-save-kernel-data.txt
|
||||
deleted file mode 100644
|
||||
index f82fa35..0000000
|
||||
--- a/doc/abrt-action-save-kernel-data.txt
|
||||
+++ /dev/null
|
||||
@@ -1,33 +0,0 @@
|
||||
-abrt-action-save-kernel-data(1)
|
||||
-================================
|
||||
-
|
||||
-NAME
|
||||
-----
|
||||
-abrt-action-save-kernel-data - Creates uReport mandatory files for kernel oopses.
|
||||
-
|
||||
-SYNOPSIS
|
||||
---------
|
||||
-'abrt-action-save-kernel-data'
|
||||
-
|
||||
-DESCRIPTION
|
||||
------------
|
||||
-The tool reads problem directory DIR. It analyzes contents of 'kernel' element,
|
||||
-checks database of installed packages, and creates new elements
|
||||
-'pkg_name', 'pkg_arch', 'pkg_version', 'pkg_release'.
|
||||
-
|
||||
-These files are required by reporter-ureporter (mandatory in uReport).
|
||||
-
|
||||
-Integration with ABRT events
|
||||
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
-This tool can be used as an ABRT reporter. Example
|
||||
-fragment for /etc/libreport/report_event.conf:
|
||||
-
|
||||
-------------
|
||||
-# Determine in which package/component the crash happened (if not yet done):
|
||||
-EVENT=post-create analyzer=Kerneloops
|
||||
- abrt-action-save-kernel-data
|
||||
-------------
|
||||
-
|
||||
-AUTHORS
|
||||
--------
|
||||
-* ABRT team
|
||||
diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c
|
||||
index 72c9878..6f8c80d 100644
|
||||
--- a/src/daemon/abrt-action-save-package-data.c
|
||||
+++ b/src/daemon/abrt-action-save-package-data.c
|
||||
@@ -217,14 +217,7 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch
|
||||
return 1;
|
||||
|
||||
char *type = dd_load_text(dd, FILENAME_TYPE);
|
||||
- if (!strcmp(type, "Kerneloops"))
|
||||
- {
|
||||
- dd_save_text(dd, FILENAME_PACKAGE, "kernel");
|
||||
- dd_save_text(dd, FILENAME_COMPONENT, "kernel");
|
||||
- dd_close(dd);
|
||||
- free(type);
|
||||
- return 0;
|
||||
- }
|
||||
+ bool kernel_oops = !strcmp(type, "Kerneloops") || !strcmp(type, "vmcore");
|
||||
free(type);
|
||||
|
||||
char *cmdline = NULL;
|
||||
@@ -233,12 +226,32 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch
|
||||
char *package_short_name = NULL;
|
||||
struct pkg_envra *pkg_name = NULL;
|
||||
char *component = NULL;
|
||||
+ char *kernel = NULL;
|
||||
int error = 1;
|
||||
/* note: "goto ret" statements below free all the above variables,
|
||||
* but they don't dd_close(dd) */
|
||||
|
||||
- cmdline = dd_load_text_ext(dd, FILENAME_CMDLINE, DD_FAIL_QUIETLY_ENOENT);
|
||||
- executable = dd_load_text(dd, FILENAME_EXECUTABLE);
|
||||
+ if (kernel_oops)
|
||||
+ {
|
||||
+ kernel = dd_load_text(dd, FILENAME_KERNEL);
|
||||
+ if (!kernel)
|
||||
+ {
|
||||
+ log("File 'kernel' containing kernel version not "
|
||||
+ "found in current directory");
|
||||
+ goto ret;
|
||||
+ }
|
||||
+ /* Trim trailing white-spaces. */
|
||||
+ strchrnul(kernel, ' ')[0] = '\0';
|
||||
+
|
||||
+ log_info("Looking for kernel package");
|
||||
+ executable = xasprintf("/boot/vmlinuz-%s", kernel);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ cmdline = dd_load_text_ext(dd, FILENAME_CMDLINE, DD_FAIL_QUIETLY_ENOENT);
|
||||
+ executable = dd_load_text(dd, FILENAME_EXECUTABLE);
|
||||
+ }
|
||||
+
|
||||
|
||||
/* Do not implicitly query rpm database in process's root dir, if
|
||||
* ExploreChroots is disabled. */
|
||||
@@ -249,8 +262,12 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch
|
||||
/* Close dd while we query package database. It can take some time,
|
||||
* don't want to keep dd locked longer than necessary */
|
||||
dd_close(dd);
|
||||
+ dd = NULL;
|
||||
|
||||
- if (is_path_blacklisted(executable))
|
||||
+ /* The check for kernel_oops is there because it could be an unexpected
|
||||
+ * behaviour. If one wants to ignore kernel oops, she/he should disable
|
||||
+ * the corresponding services. */
|
||||
+ if (!kernel_oops && is_path_blacklisted(executable))
|
||||
{
|
||||
log("Blacklisted executable '%s'", executable);
|
||||
goto ret; /* return 1 (failure) */
|
||||
@@ -265,13 +282,17 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch
|
||||
"proceeding without packaging information", executable);
|
||||
goto ret0; /* no error */
|
||||
}
|
||||
- log("Executable '%s' doesn't belong to any package"
|
||||
- " and ProcessUnpackaged is set to 'no'",
|
||||
- executable
|
||||
- );
|
||||
+ if (kernel_oops)
|
||||
+ log("Can't find kernel package corresponding to '%s'", kernel);
|
||||
+ else
|
||||
+ log("Executable '%s' doesn't belong to any package"
|
||||
+ " and ProcessUnpackaged is set to 'no'", executable);
|
||||
goto ret; /* return 1 (failure) */
|
||||
}
|
||||
|
||||
+ if (kernel_oops)
|
||||
+ goto skip_interperter;
|
||||
+
|
||||
/* Check well-known interpreter names */
|
||||
const char *basename = strrchr(executable, '/');
|
||||
if (basename)
|
||||
@@ -314,11 +335,14 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch
|
||||
pkg_name = script_pkg;
|
||||
}
|
||||
|
||||
+skip_interperter:
|
||||
package_short_name = xasprintf("%s", pkg_name->p_name);
|
||||
log_info("Package:'%s' short:'%s'", pkg_name->p_nvr, package_short_name);
|
||||
|
||||
-
|
||||
- if (g_list_find_custom(settings_setBlackListedPkgs, package_short_name, (GCompareFunc)g_strcmp0))
|
||||
+ /* The check for kernel_oops is there because it could be an unexpected
|
||||
+ * behaviour. If one wants to ignore kernel oops, she/he should disable
|
||||
+ * the corresponding services. */
|
||||
+ if (!kernel_oops && g_list_find_custom(settings_setBlackListedPkgs, package_short_name, (GCompareFunc)g_strcmp0))
|
||||
{
|
||||
log("Blacklisted package '%s'", package_short_name);
|
||||
goto ret; /* return 1 (failure) */
|
||||
@@ -358,11 +382,12 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch
|
||||
if (component)
|
||||
dd_save_text(dd, FILENAME_COMPONENT, component);
|
||||
|
||||
- dd_close(dd);
|
||||
-
|
||||
ret0:
|
||||
error = 0;
|
||||
ret:
|
||||
+ if (dd)
|
||||
+ dd_close(dd);
|
||||
+
|
||||
free(cmdline);
|
||||
free(executable);
|
||||
free(rootdir);
|
||||
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
|
||||
index 005cc9d..2c9028b 100644
|
||||
--- a/src/plugins/Makefile.am
|
||||
+++ b/src/plugins/Makefile.am
|
||||
@@ -6,7 +6,6 @@ bin_SCRIPTS = \
|
||||
abrt-action-analyze-vulnerability \
|
||||
abrt-action-list-dsos \
|
||||
abrt-action-perform-ccpp-analysis \
|
||||
- abrt-action-save-kernel-data \
|
||||
abrt-action-analyze-ccpp-local \
|
||||
abrt-action-notify
|
||||
|
||||
@@ -101,7 +100,6 @@ EXTRA_DIST = \
|
||||
analyze_RetraceServer.xml.in \
|
||||
abrt-action-analyze-core.in \
|
||||
abrt-action-generate-machine-id \
|
||||
- abrt-action-save-kernel-data \
|
||||
abrt-action-ureport \
|
||||
abrt-gdb-exploitable \
|
||||
https-utils.h \
|
||||
diff --git a/src/plugins/abrt-action-save-kernel-data b/src/plugins/abrt-action-save-kernel-data
|
||||
deleted file mode 100755
|
||||
index f8b18f0..0000000
|
||||
--- a/src/plugins/abrt-action-save-kernel-data
|
||||
+++ /dev/null
|
||||
@@ -1,78 +0,0 @@
|
||||
-#!/bin/bash
|
||||
-#
|
||||
-# Save pkg_{name, arch, version, release} for kernel oopses.
|
||||
-#
|
||||
-# These files are required by reporter-ureporter (mandatory
|
||||
-# in uReport).
|
||||
-#
|
||||
-
|
||||
-function print_usage
|
||||
-{
|
||||
- echo "Usage: abrt-action-save-package-data [OPTION]"
|
||||
- echo ""
|
||||
- echo " -r, --root ROOT use ROOT as top level directory"
|
||||
- echo " -h, --help Show this help message"
|
||||
-}
|
||||
-
|
||||
-ROOT="/"
|
||||
-
|
||||
-while [ $# -gt 0 ];
|
||||
-do
|
||||
- case "$1" in
|
||||
- "-r"|"--root")
|
||||
- if [ -z "$2" ]; then
|
||||
- >&2
|
||||
- echo "$1: requires argument"
|
||||
- print_usage
|
||||
- exit 1
|
||||
- fi
|
||||
-
|
||||
- ROOT=$2
|
||||
- shift
|
||||
- ;;
|
||||
-
|
||||
- "-h"|"--help")
|
||||
- echo "Save pkg_{name, arch, version, release} for kernel oopses."
|
||||
- echo ""
|
||||
- echo "These files are required by reporter-ureporter (mandatory"
|
||||
- echo "in uReport)."
|
||||
-
|
||||
- print_usage
|
||||
- exit 0
|
||||
- ;;
|
||||
-
|
||||
- *)
|
||||
- >&2
|
||||
- echo "$1: unknown option"
|
||||
- echo
|
||||
- print_usage
|
||||
- exit 1
|
||||
- ;;
|
||||
- esac
|
||||
-
|
||||
- shift
|
||||
-done
|
||||
-
|
||||
-if [ ! -f kernel ]; then
|
||||
- echo "File 'kernel' containing kernel version not found in current directory"
|
||||
- exit 1
|
||||
-fi
|
||||
-
|
||||
-echo "Looking for kernel package"
|
||||
-kernel_version="$( sed 's/ .*//' kernel )"
|
||||
-
|
||||
-package="$( rpm --root $ROOT -qf "/boot/vmlinuz-$kernel_version" )"
|
||||
-if [ $? != 0 ]; then
|
||||
- echo "Can't find kernel package corresponding to '$kernel_version'"
|
||||
- echo "Can't record package version data (pkg_version, pkg_release, ...)."
|
||||
- exit 1
|
||||
-fi
|
||||
-
|
||||
-echo "Kernel package $package found"
|
||||
-rpm --root $ROOT -q --qf "%{name}\n" "$package" > pkg_name
|
||||
-rpm --root $ROOT -q --qf "%{arch}\n" "$package" > pkg_arch
|
||||
-rpm --root $ROOT -q --qf "%{version}\n" "$package" > pkg_version
|
||||
-rpm --root $ROOT -q --qf "%{release}\n" "$package" > pkg_release
|
||||
-epoch="$( rpm --root $ROOT -q --qf "%{epoch}" "$package" )"
|
||||
-test "$epoch" = "(none)" && epoch=0
|
||||
-echo "$epoch" > pkg_epoch
|
||||
diff --git a/src/plugins/koops_event.conf b/src/plugins/koops_event.conf
|
||||
index df7e446..f273ba2 100644
|
||||
--- a/src/plugins/koops_event.conf
|
||||
+++ b/src/plugins/koops_event.conf
|
||||
@@ -16,8 +16,7 @@ EVENT=post-create type=Kerneloops remote!=1
|
||||
if test ! -f uuid -a ! -f duphash; then
|
||||
abrt-action-analyze-oops || exit 1
|
||||
fi
|
||||
- } &&
|
||||
- abrt-action-save-kernel-data
|
||||
+ }
|
||||
|
||||
|
||||
# If you want behavior similar to one provided by kerneloops daemon
|
||||
diff --git a/src/plugins/vmcore_event.conf b/src/plugins/vmcore_event.conf
|
||||
index ae4dc9f..61bc9d1 100644
|
||||
--- a/src/plugins/vmcore_event.conf
|
||||
+++ b/src/plugins/vmcore_event.conf
|
||||
@@ -34,7 +34,7 @@ EVENT=post-create type=vmcore remote!=1
|
||||
# analyze
|
||||
EVENT=analyze_VMcore type=vmcore
|
||||
abrt-action-analyze-oops &&
|
||||
- abrt-action-save-kernel-data
|
||||
+ abrt-action-save-package-data
|
||||
|
||||
# If you want behavior similar to one provided by kerneloops daemon
|
||||
# distributed by kerneloops.org - that is, if you want
|
||||
--
|
||||
2.7.4
|
||||
|
||||
28
0023-a-retrace-client-format-security.patch
Normal file
28
0023-a-retrace-client-format-security.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
From 293f42b82ef4ac23b8d5327d32697f7308c3f76b Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 26 Apr 2016 08:18:36 +0200
|
||||
Subject: [PATCH] a-retrace-client: format security
|
||||
|
||||
https://github.com/pld-linux/abrt/blob/d3f5b5cc7b5d86f4a4912d980a99d4c90024440d/format_security.patch
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/abrt-retrace-client.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/plugins/abrt-retrace-client.c b/src/plugins/abrt-retrace-client.c
|
||||
index 540cdc9..ae5ef83 100644
|
||||
--- a/src/plugins/abrt-retrace-client.c
|
||||
+++ b/src/plugins/abrt-retrace-client.c
|
||||
@@ -760,7 +760,7 @@ static int create(bool delete_temp_archive,
|
||||
if (response_code == 500 || response_code == 507)
|
||||
{
|
||||
alert_server_error(cfg.url);
|
||||
- error_msg_and_die(http_body);
|
||||
+ error_msg_and_die("%s", http_body);
|
||||
}
|
||||
else if (response_code == 403)
|
||||
{
|
||||
--
|
||||
2.7.4
|
||||
|
||||
25
0024-a-console-notification-do-not-leak-variables.patch
Normal file
25
0024-a-console-notification-do-not-leak-variables.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From 553bd2b7842a1f23510f4083b7a4762396381edb Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 26 Apr 2016 08:24:13 +0200
|
||||
Subject: [PATCH] a-console-notification: do not leak variables
|
||||
|
||||
https://github.com/pld-linux/abrt/blob/adb4721f7f60f7c00f7f5e4f5f382207636140f3/profile.sh.patch
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/cli/abrt-console-notification.sh | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/cli/abrt-console-notification.sh b/src/cli/abrt-console-notification.sh
|
||||
index a98f164..f1a79ff 100755
|
||||
--- a/src/cli/abrt-console-notification.sh
|
||||
+++ b/src/cli/abrt-console-notification.sh
|
||||
@@ -40,3 +40,5 @@ if [ -f "$TMPPATH" ]; then
|
||||
fi
|
||||
|
||||
timeout 10s abrt-cli status --since="$SINCE" 2>"$ABRT_DEBUG_LOG" || echo "'abrt-cli status' timed out"
|
||||
+
|
||||
+unset ABRT_DEBUG_LOG LPATHDIR SINCEFILE TMPPATH SINCE
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
From 16a8cbb75b69c36b7858004d605c24edc6806763 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 27 Apr 2016 09:36:10 +0200
|
||||
Subject: [PATCH] a-a-install-debuginfo: correct handling of DebuginfoLocation
|
||||
|
||||
DebuginfoLocation is a list of colon separated file systemd paths, where
|
||||
the first path is a directory for storing downloaded debuginfo data.
|
||||
|
||||
Related #1135
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/hooks/CCpp.conf | 10 +++++++++-
|
||||
src/plugins/abrt-action-install-debuginfo.in | 6 ++++--
|
||||
2 files changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/hooks/CCpp.conf b/src/hooks/CCpp.conf
|
||||
index 025189a..2466aff 100644
|
||||
--- a/src/hooks/CCpp.conf
|
||||
+++ b/src/hooks/CCpp.conf
|
||||
@@ -31,7 +31,15 @@ SaveFullCore = yes
|
||||
# Used for debugging the hook
|
||||
#VerboseLog = 2
|
||||
|
||||
-# Specify where you want to store debuginfos (default: /var/cache/abrt-di)
|
||||
+# Specify directories where ABRT should look for non-system debuginfos.
|
||||
+#
|
||||
+# Add a colon separated list of file system paths.
|
||||
+#
|
||||
+# Beware the first path in the list is used by ABRT to save downloaded
|
||||
+# debuginfos, therefore the first path in the list must be _writable_, the
|
||||
+# rest of the list can be read-only.
|
||||
+#
|
||||
+# (default: /var/cache/abrt-di)
|
||||
#
|
||||
#DebuginfoLocation = /var/cache/abrt-di
|
||||
|
||||
diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in
|
||||
index e4a7dfd..ad7a8d3 100644
|
||||
--- a/src/plugins/abrt-action-install-debuginfo.in
|
||||
+++ b/src/plugins/abrt-action-install-debuginfo.in
|
||||
@@ -100,7 +100,9 @@ if __name__ == "__main__":
|
||||
" -y Noninteractive, assume 'Yes' to all questions\n"
|
||||
" --ids Default: build_ids\n"
|
||||
" --tmpdir Default: @LARGE_DATA_TMP_DIR@/abrt-tmp-debuginfo-RANDOM_SUFFIX\n"
|
||||
- " --cache Default: /var/cache/abrt-di\n"
|
||||
+ " --cache Colon separated list of directories. The first one is used for\n"
|
||||
+ " saving installed debuginfos.\n"
|
||||
+ " Default: /var/cache/abrt-dir\n"
|
||||
" --size_mb Default: 4096\n"
|
||||
" --pkgmgr Default: PackageManager from CCpp.conf or 'dnf'\n"
|
||||
" -e,--exact Download only specified files\n"
|
||||
@@ -155,7 +157,7 @@ if __name__ == "__main__":
|
||||
except OSError as ex:
|
||||
print(ex)
|
||||
else:
|
||||
- cachedirs = conf.get("DebuginfoLocation", None)
|
||||
+ cachedirs = conf.get("DebuginfoLocation", None).split(":")
|
||||
|
||||
if not cachedirs:
|
||||
cachedirs = ["/var/cache/abrt-di"]
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
From 9cfcc3a1417e8d7730312ecd4f3d16a01cffe5ef Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||
Date: Fri, 29 Apr 2016 13:29:56 +0200
|
||||
Subject: [PATCH] doc: improve documentation of AllowedGroups, AllowedUsers and
|
||||
IgnoredPaths
|
||||
|
||||
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||
---
|
||||
doc/abrt-CCpp.conf.txt | 10 ++++++----
|
||||
src/hooks/CCpp.conf | 14 +++++++++++---
|
||||
2 files changed, 17 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/doc/abrt-CCpp.conf.txt b/doc/abrt-CCpp.conf.txt
|
||||
index b05aefc..bcefc4d 100644
|
||||
--- a/doc/abrt-CCpp.conf.txt
|
||||
+++ b/doc/abrt-CCpp.conf.txt
|
||||
@@ -42,18 +42,20 @@ SaveFullCore = 'yes' / 'no' ...::
|
||||
Default is 'yes'.
|
||||
|
||||
IgnoredPaths = /path/to/ignore/*, */another/ignored/path* ...::
|
||||
- ABRT will ignore crashes in executables whose absolute path matches one of
|
||||
- specified patterns.
|
||||
+ ABRT will ignore crashes in executables whose absolute path matches
|
||||
+ any of the glob patterns listed in the comma separated list.
|
||||
|
||||
-AllowedUsers = root, ...::
|
||||
+AllowedUsers = root, wheel, ...::
|
||||
ABRT will process only crashes of either allowed users 'AllowedUsers' or
|
||||
users who are members of allowed group 'AllowedGroups'. If no allowed users
|
||||
nor allowed group are specified ABRT will process crashes of all users.
|
||||
+ 'AllowedUsers' is a comma separated list.
|
||||
|
||||
-AllowedGroups = root, ...::
|
||||
+AllowedGroups = root, wheel, ...::
|
||||
ABRT will process only crashes of either allowed users 'AllowedUsers' or
|
||||
users who are members of allowed group 'AllowedGroups'. If no allowed users
|
||||
nor allowed group are specified ABRT will process crashes of all users.
|
||||
+ 'AllowedGroups' is a comma separated list.
|
||||
|
||||
VerboseLog = NUM::
|
||||
Used to make the hook more verbose
|
||||
diff --git a/src/hooks/CCpp.conf b/src/hooks/CCpp.conf
|
||||
index 2466aff..82c6b78 100644
|
||||
--- a/src/hooks/CCpp.conf
|
||||
+++ b/src/hooks/CCpp.conf
|
||||
@@ -58,14 +58,22 @@ SaveFullCore = yes
|
||||
#
|
||||
# StandaloneHook = yes
|
||||
|
||||
-# ABRT will ignore crashes in executables whose absolute path matches one of
|
||||
-# specified patterns.
|
||||
+# ABRT will ignore crashes in executables whose absolute path matches
|
||||
+# one of any of the glob patterns listed in the comma separated list.
|
||||
+#
|
||||
+# For example:
|
||||
+# IgnoredPaths = /path/to/ignore/*, */another/ignored/path*
|
||||
#
|
||||
#IgnoredPaths =
|
||||
|
||||
# ABRT will process only crashes of either allowed users or users who are
|
||||
# members of allowed group. If no allowed users nor allowed group are specified
|
||||
-# ABRT will process crashes of all users.
|
||||
+# ABRT will process crashes of all users. Both AllowedUsers and AllowedGroups
|
||||
+# are a comma sepparated list.
|
||||
+#
|
||||
+# For example:
|
||||
+# AllowedUsers = root, wheel, ...
|
||||
+# AllowedGroups = root, wheel, ...
|
||||
#
|
||||
#AllowedUsers =
|
||||
#AllowedGroups =
|
||||
--
|
||||
2.7.4
|
||||
|
||||
39
0027-a-a-install-debuginfo-do-not-try-to-split-None.patch
Normal file
39
0027-a-a-install-debuginfo-do-not-try-to-split-None.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
From ec20077b4a1ddc3fbd7c3d91c10712f15e312777 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Fri, 13 May 2016 13:31:35 +0200
|
||||
Subject: [PATCH] a-a-install-debuginfo: do not try to split None
|
||||
|
||||
Bug introduced in commit bb653b71a9261c0b58a9256761bf034b24c2e1ad
|
||||
|
||||
Related #1135
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/plugins/abrt-action-install-debuginfo.in | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in
|
||||
index ad7a8d3..a3ef3da 100644
|
||||
--- a/src/plugins/abrt-action-install-debuginfo.in
|
||||
+++ b/src/plugins/abrt-action-install-debuginfo.in
|
||||
@@ -152,15 +152,14 @@ if __name__ == "__main__":
|
||||
set_verbosity(verbose)
|
||||
|
||||
if not cachedirs:
|
||||
+ cachedirs = ["/var/cache/abrt-di"]
|
||||
try:
|
||||
conf = problem.load_plugin_conf_file("CCpp.conf")
|
||||
except OSError as ex:
|
||||
print(ex)
|
||||
else:
|
||||
- cachedirs = conf.get("DebuginfoLocation", None).split(":")
|
||||
+ cachedirs = conf.get("DebuginfoLocation", cachedirs[0]).split(":")
|
||||
|
||||
- if not cachedirs:
|
||||
- cachedirs = ["/var/cache/abrt-di"]
|
||||
if not TMPDIR:
|
||||
# security people prefer temp subdirs in app's private dir, like /var/run/abrt
|
||||
# and we switched to /tmp but Fedora feature tmp-on-tmpfs appeared, hence we must
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
From 8b0a7a0c8dd7df477c3408298aa1f7126799da65 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||
Date: Tue, 17 May 2016 12:13:00 +0200
|
||||
Subject: [PATCH] a-dump-journal-xorg: add '_COMM=gnome-shell' to journal
|
||||
filter
|
||||
|
||||
'/usr/bin/Xwayland' crashes from gnome-shell are logged to journal with
|
||||
'_COMM=gnome-shell'.
|
||||
|
||||
In case ABRT cannot get executable from journal backtrace (path to binary file
|
||||
containting substring "bin/X") the default one /usr/bin/X(org) is used instead.
|
||||
It means if wayland crashes and /usr/bin/Xwayland is not mentioned in
|
||||
backtrace, the executable is /usr/bin/X(org) even it is a wayland crash.
|
||||
|
||||
Tried to figure out how to find out if it is a wayland or xorg crash with
|
||||
wayland guys on irc and they said there is no easy and reasonable way how to
|
||||
achieve this.
|
||||
|
||||
Because the /usr/bin/Xwayland and the /usr/bin/Xorg executable are placed under
|
||||
the same xorg-x11-server bugzilla component I decided no to change the default
|
||||
executable. Also all wayland backtraces I've seen contained /usr/bin/Xwayland
|
||||
executable so the right executable was used.
|
||||
|
||||
Related to: #1336618
|
||||
|
||||
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||
---
|
||||
src/plugins/xorg-utils.c | 2 +-
|
||||
src/plugins/xorg.conf | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/xorg-utils.c b/src/plugins/xorg-utils.c
|
||||
index 8f121f8..6039acd 100644
|
||||
--- a/src/plugins/xorg-utils.c
|
||||
+++ b/src/plugins/xorg-utils.c
|
||||
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
#define IGNORE_RESULT(func_call) do { if (func_call) /* nothing */; } while (0)
|
||||
|
||||
-#define DEFAULT_XORG_CRASH_REASON "Xorg server crashed"
|
||||
+#define DEFAULT_XORG_CRASH_REASON "Display server crashed"
|
||||
|
||||
int abrt_xorg_signaled_sleep(int seconds)
|
||||
{
|
||||
diff --git a/src/plugins/xorg.conf b/src/plugins/xorg.conf
|
||||
index 28f3ee1..8834e23 100644
|
||||
--- a/src/plugins/xorg.conf
|
||||
+++ b/src/plugins/xorg.conf
|
||||
@@ -4,4 +4,4 @@
|
||||
BlacklistedXorgModules = nvidia, fglrx, vboxvideo
|
||||
|
||||
# List of filters which is used for searching Xorg crashes in jounral
|
||||
-JournalFilters = _COMM=gdm-x-session
|
||||
+JournalFilters = _COMM=gdm-x-session, _COMM=gnome-shell
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
From 19863406cee41c1f806397173d04701b21e65478 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||
Date: Fri, 20 May 2016 15:50:05 +0200
|
||||
Subject: [PATCH] a-dump-journal-xorg: allow *libexec/X* to be executable
|
||||
element
|
||||
|
||||
Analyzed lot of xorg backtraces extracted from journal by ABRT and figured out
|
||||
almost all crashes are from '/usr/libexec/Xorg' executable but default
|
||||
executable /usr/bin/X(org) is wrongly used instead.
|
||||
The rest of backtaces contain the substring 'bin/X' hence the
|
||||
executable is determined right.
|
||||
|
||||
Allow executable element with "libexec/X" substring should limit using the
|
||||
default executable wrongly.
|
||||
|
||||
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||
---
|
||||
src/plugins/xorg-utils.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/xorg-utils.c b/src/plugins/xorg-utils.c
|
||||
index 6039acd..a8dfc51 100644
|
||||
--- a/src/plugins/xorg-utils.c
|
||||
+++ b/src/plugins/xorg-utils.c
|
||||
@@ -224,8 +224,8 @@ struct xorg_crash_info *process_xorg_bt(char *(*get_next_line)(void *), void *da
|
||||
char *filename_end = skip_non_whitespace(filename);
|
||||
char sv = *filename_end;
|
||||
*filename_end = '\0';
|
||||
- /* Does it look like "[/usr]/[s]bin/Xfoo"? */
|
||||
- if (strstr(filename, "bin/X"))
|
||||
+ /* Does it look like "[/usr]/[s]bin/Xfoo" or [/usr]/libexec/Xfoo"? */
|
||||
+ if (strstr(filename, "bin/X") || strstr(filename, "libexec/X"))
|
||||
exe = xstrdup(filename);
|
||||
*filename_end = sv;
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
From 5c011b291a65f88036884bf388859e68fe7162a9 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||
Date: Thu, 26 May 2016 10:15:07 +0200
|
||||
Subject: [PATCH] abrt-hook-ccpp: save get_fsuid() return values in int
|
||||
variables
|
||||
|
||||
int because get_fsuid() returns negative values in case of error
|
||||
Revealed by coverity.
|
||||
|
||||
Related to: #1337186
|
||||
|
||||
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||
---
|
||||
src/hooks/abrt-hook-ccpp.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
|
||||
index dfe9526..10f137b 100644
|
||||
--- a/src/hooks/abrt-hook-ccpp.c
|
||||
+++ b/src/hooks/abrt-hook-ccpp.c
|
||||
@@ -725,7 +725,8 @@ int main(int argc, char** argv)
|
||||
char *proc_pid_status = xmalloc_xopen_read_close(path, /*maxsz:*/ NULL);
|
||||
|
||||
uid_t fsuid = uid;
|
||||
- uid_t tmp_fsuid = get_fsuid(proc_pid_status);
|
||||
+ /* int because get_fsuid() returns negative values in case of error */
|
||||
+ int tmp_fsuid = get_fsuid(proc_pid_status);
|
||||
if (tmp_fsuid < 0)
|
||||
{
|
||||
error_msg_ignore_crash(pid_str, NULL, (long unsigned)uid, signal_no,
|
||||
@@ -742,12 +743,12 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
int suid_policy = dump_suid_policy();
|
||||
- if (tmp_fsuid != uid)
|
||||
+ if ((uid_t)tmp_fsuid != uid)
|
||||
{
|
||||
/* use root for suided apps unless it's explicitly set to UNSAFE */
|
||||
fsuid = 0;
|
||||
if (suid_policy == DUMP_SUID_UNSAFE)
|
||||
- fsuid = tmp_fsuid;
|
||||
+ fsuid = (uid_t)tmp_fsuid;
|
||||
else
|
||||
{
|
||||
g_user_core_flags = O_EXCL;
|
||||
--
|
||||
2.7.4
|
||||
|
||||
65
0031-koops-do-not-assume-version-has-3-levels.patch
Normal file
65
0031-koops-do-not-assume-version-has-3-levels.patch
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
From f55250179f7ca74ae0a80ec0c4f6cf3bb341b5df Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Wed, 25 May 2016 13:35:28 +0200
|
||||
Subject: [PATCH] koops: do not assume version has 3 levels
|
||||
|
||||
Correct commit 9023d77ad5539433146b59e5ac80e3cefcb20cf7
|
||||
|
||||
Some ancient kernel versions have 4 levels. This commit allows version
|
||||
string to have any level equal or greater than 3. The first 3 levels
|
||||
must be numbers and the rest can be almost anything - it just must
|
||||
follow the logical structure of levels (i.e. dot something dot
|
||||
something) - this should allow a git hash in the version string.
|
||||
|
||||
In order to eliminate possible false positives introduced by the
|
||||
flexibility of version levels the commit adds checks for
|
||||
the prefixes ' ', '(' or 'kernel-' and the suffix ' #' or ') #'.
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/lib/kernel.c | 15 +++++++++++----
|
||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/lib/kernel.c b/src/lib/kernel.c
|
||||
index dde3d28..720dc7d 100644
|
||||
--- a/src/lib/kernel.c
|
||||
+++ b/src/lib/kernel.c
|
||||
@@ -571,7 +571,10 @@ char *koops_extract_version(const char *linepointer)
|
||||
|| strstr(linepointer, "REGS")
|
||||
|| strstr(linepointer, "EFLAGS")
|
||||
) {
|
||||
- const char *regexp = "([0-9]+\\.[0-9]+\\.[0-9]+-[^ \\)]+)[ \\)]";
|
||||
+ /* "(4.7.0-2.x86_64.fc25) #" */
|
||||
+ /* " 4.7.0-2.x86_64.fc25 #" */
|
||||
+ /* " 2.6.3.4.5-2.x86_64.fc22 #" */
|
||||
+ const char *regexp = "([ \\(]|kernel-)([0-9]+\\.[0-9]+\\.[0-9]+(\\.[^.-]+)*-[^ \\)]+)\\)? #";
|
||||
regex_t re;
|
||||
int r = regcomp(&re, regexp, REG_EXTENDED);
|
||||
if (r != 0)
|
||||
@@ -582,8 +585,8 @@ char *koops_extract_version(const char *linepointer)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- regmatch_t matchptr[2];
|
||||
- r = regexec(&re, linepointer, 2, matchptr, 0);
|
||||
+ regmatch_t matchptr[3];
|
||||
+ r = regexec(&re, linepointer, sizeof(matchptr)/sizeof(matchptr[0]), matchptr, 0);
|
||||
if (r != 0)
|
||||
{
|
||||
if (r != REG_NOMATCH)
|
||||
@@ -602,7 +605,11 @@ char *koops_extract_version(const char *linepointer)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- char *ret = xstrndup(linepointer + matchptr[1].rm_so, matchptr[1].rm_eo - matchptr[1].rm_so);
|
||||
+ /* 0: entire string */
|
||||
+ /* 1: version prefix */
|
||||
+ /* 2: version string */
|
||||
+ const regmatch_t *const ver = matchptr + 2;
|
||||
+ char *ret = xstrndup(linepointer + ver->rm_so, ver->rm_eo - ver->rm_so);
|
||||
|
||||
regfree(&re);
|
||||
return ret;
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
From a2bdf944c8855dd53b4df5f6829442f9f2f6bd14 Mon Sep 17 00:00:00 2001
|
||||
From: Matej Habrnal <mhabrnal@redhat.com>
|
||||
Date: Wed, 8 Jun 2016 17:50:18 +0200
|
||||
Subject: [PATCH] a-a-install-debuginfo: Exception may not have an argument
|
||||
errno
|
||||
|
||||
Also BrokenPipe error can appear even in download_class(), moving it to try
|
||||
block.
|
||||
|
||||
Related to #1343826, #1343664
|
||||
|
||||
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
||||
---
|
||||
src/plugins/abrt-action-install-debuginfo.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in
|
||||
index a3ef3da..be45bc6 100644
|
||||
--- a/src/plugins/abrt-action-install-debuginfo.in
|
||||
+++ b/src/plugins/abrt-action-install-debuginfo.in
|
||||
@@ -236,12 +236,12 @@ if __name__ == "__main__":
|
||||
sys.exit(RETURN_FAILURE)
|
||||
|
||||
# TODO: should we pass keep_rpms=keeprpms to DebugInfoDownload here??
|
||||
- downloader = download_class(cache=cachedirs[0], tmp=TMPDIR,
|
||||
+ try:
|
||||
+ downloader = download_class(cache=cachedirs[0], tmp=TMPDIR,
|
||||
noninteractive=noninteractive,
|
||||
repo_pattern=repo_pattern)
|
||||
- try:
|
||||
result = downloader.download(missing, download_exact_files=exact_fls)
|
||||
- except Exception as ex:
|
||||
+ except OSError as ex:
|
||||
if ex.errno == errno.EPIPE:
|
||||
clean_up(TMPDIR, silent=True)
|
||||
exit(RETURN_FAILURE)
|
||||
--
|
||||
2.7.4
|
||||
|
||||
91
0033-vmcore-fix-finding-partitions-by-UUID-and-LABEL.patch
Normal file
91
0033-vmcore-fix-finding-partitions-by-UUID-and-LABEL.patch
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
From 57c975dfda165098502cdb9e2525bc7877301a12 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Mon, 13 Jun 2016 09:43:21 +0200
|
||||
Subject: [PATCH] vmcore: fix finding partitions by UUID and LABEL
|
||||
|
||||
In kdump.conf fs partition can be specified by UUID or LABEL but mtab
|
||||
uses only file system node path. Hence, we need to translate the ID to
|
||||
its node path.
|
||||
|
||||
Related: rhbz#1147053
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
configure.ac | 2 ++
|
||||
src/hooks/Makefile.am | 1 +
|
||||
src/hooks/abrt_harvest_vmcore.py.in | 27 +++++++++++++++++++++++++++
|
||||
3 files changed, 30 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 98e2564..8e13524 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -263,6 +263,8 @@ AC_ARG_ENABLE(doxygen-docs,
|
||||
[enable_doxygen_docs=no]
|
||||
)
|
||||
|
||||
+AC_PATH_PROG([BLKID], [BLKID], [/usr/sbin/blkid], [$PATH:/usr/sbin:/sbin])
|
||||
+
|
||||
# Doxygen Documentation
|
||||
|
||||
AC_PATH_PROG(DOXYGEN, doxygen, no)
|
||||
diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am
|
||||
index bf68994..c0255d9 100644
|
||||
--- a/src/hooks/Makefile.am
|
||||
+++ b/src/hooks/Makefile.am
|
||||
@@ -119,6 +119,7 @@ abrt-install-ccpp-hook: abrt-install-ccpp-hook.in
|
||||
abrt-harvest-vmcore: abrt_harvest_vmcore.py.in
|
||||
sed -e s,\@CONF_DIR\@,\$(CONF_DIR)\,g \
|
||||
-e s,\@DEFAULT_DUMP_LOCATION\@,$(DEFAULT_DUMP_LOCATION),g \
|
||||
+ -e s,\@BLKID\@,$(BLKID),g \
|
||||
$< >$@
|
||||
|
||||
abrt-harvest-pstoreoops: abrt-harvest-pstoreoops.in
|
||||
diff --git a/src/hooks/abrt_harvest_vmcore.py.in b/src/hooks/abrt_harvest_vmcore.py.in
|
||||
index 61a6e57..ab976dc 100644
|
||||
--- a/src/hooks/abrt_harvest_vmcore.py.in
|
||||
+++ b/src/hooks/abrt_harvest_vmcore.py.in
|
||||
@@ -13,6 +13,7 @@ import shutil
|
||||
import time
|
||||
import hashlib
|
||||
import augeas
|
||||
+from subprocess import Popen, PIPE
|
||||
|
||||
import problem
|
||||
import report
|
||||
@@ -38,6 +39,32 @@ def get_mount_point(part_id):
|
||||
part_id - device node, label or uuid
|
||||
"""
|
||||
|
||||
+ idtypes = {"UUID=":"-U", "PARTUUID=":"-U", "LABEL=":"-L", "PARTLABEL=":"-L"}
|
||||
+
|
||||
+ for typ, switch in idtypes.items():
|
||||
+ if not part_id.startswith(typ):
|
||||
+ continue
|
||||
+
|
||||
+ idf = part_id[len(typ):]
|
||||
+ try:
|
||||
+ proc = Popen(["@BLKID@", switch, idf], stdout=PIPE, stderr=PIPE)
|
||||
+ out, err = proc.communicate()
|
||||
+ if err:
|
||||
+ sys.stderr.write("Failed 'blkid {0} {1}': {2}\n"
|
||||
+ .format(switch, idf, err))
|
||||
+ sys.exit(1)
|
||||
+ if not out:
|
||||
+ sys.stderr.write("No results from 'blkid {0} {1}'\n"
|
||||
+ .format(switch, idf))
|
||||
+ sys.exit(1)
|
||||
+
|
||||
+ part_id = out.decode().strip()
|
||||
+ break
|
||||
+ except OSError as ex:
|
||||
+ sys.stderr.write("Cannot run 'blkid {0} {1}': {2}\n"
|
||||
+ .format(switch, idf, str(ex)))
|
||||
+ sys.exit(1)
|
||||
+
|
||||
# look up the identifier in /etc/mtab
|
||||
result = get_augeas("Fstab", "/etc/mtab").get("/files/etc/mtab/*"
|
||||
"[spec=\"" + part_id + "\"]/file")
|
||||
--
|
||||
2.7.4
|
||||
|
||||
130
0035-vmcore-use-findmnt-to-get-mountpoint.patch
Normal file
130
0035-vmcore-use-findmnt-to-get-mountpoint.patch
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
From 0fcf4fdd56970ca333f36d7fcfda2d6ecb14c8f2 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Thu, 16 Jun 2016 14:21:28 +0200
|
||||
Subject: [PATCH] vmcore: use findmnt to get mountpoint
|
||||
|
||||
findmnt solves both problems:
|
||||
* UUID=/LABEL=
|
||||
* different device links
|
||||
|
||||
Related: rhbz#1147053
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
src/hooks/Makefile.am | 2 +-
|
||||
src/hooks/abrt_harvest_vmcore.py.in | 59 ++++++++++++++-----------------------
|
||||
3 files changed, 24 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8e13524..98fbebc 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -263,7 +263,7 @@ AC_ARG_ENABLE(doxygen-docs,
|
||||
[enable_doxygen_docs=no]
|
||||
)
|
||||
|
||||
-AC_PATH_PROG([BLKID], [BLKID], [/usr/sbin/blkid], [$PATH:/usr/sbin:/sbin])
|
||||
+AC_PATH_PROG([FINDMNT], [findmnt], [/usr/bin/findmnt], [$PATH:/usr/sbin:/sbin])
|
||||
|
||||
# Doxygen Documentation
|
||||
|
||||
diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am
|
||||
index c0255d9..8e73bdc 100644
|
||||
--- a/src/hooks/Makefile.am
|
||||
+++ b/src/hooks/Makefile.am
|
||||
@@ -119,7 +119,7 @@ abrt-install-ccpp-hook: abrt-install-ccpp-hook.in
|
||||
abrt-harvest-vmcore: abrt_harvest_vmcore.py.in
|
||||
sed -e s,\@CONF_DIR\@,\$(CONF_DIR)\,g \
|
||||
-e s,\@DEFAULT_DUMP_LOCATION\@,$(DEFAULT_DUMP_LOCATION),g \
|
||||
- -e s,\@BLKID\@,$(BLKID),g \
|
||||
+ -e s,\@FINDMNT\@,$(FINDMNT),g \
|
||||
$< >$@
|
||||
|
||||
abrt-harvest-pstoreoops: abrt-harvest-pstoreoops.in
|
||||
diff --git a/src/hooks/abrt_harvest_vmcore.py.in b/src/hooks/abrt_harvest_vmcore.py.in
|
||||
index ab976dc..1cceea7 100644
|
||||
--- a/src/hooks/abrt_harvest_vmcore.py.in
|
||||
+++ b/src/hooks/abrt_harvest_vmcore.py.in
|
||||
@@ -19,6 +19,12 @@ import problem
|
||||
import report
|
||||
|
||||
|
||||
+def errx(message, code=1):
|
||||
+ sys.stderr.write(message)
|
||||
+ sys.stderr.write("\n")
|
||||
+ sys.stderr.flush()
|
||||
+ sys.exit(code)
|
||||
+
|
||||
def get_augeas(module, file_path):
|
||||
"""
|
||||
A function for efficient configuration of Augeas.
|
||||
@@ -33,49 +39,28 @@ def get_augeas(module, file_path):
|
||||
|
||||
def get_mount_point(part_id):
|
||||
"""
|
||||
- A function used to look up a mount point in mtab using
|
||||
- the provided identifier.
|
||||
+ A function used to look up a mount point of the provided identifier
|
||||
+ using 'findmnt' system utility.
|
||||
|
||||
part_id - device node, label or uuid
|
||||
"""
|
||||
|
||||
- idtypes = {"UUID=":"-U", "PARTUUID=":"-U", "LABEL=":"-L", "PARTLABEL=":"-L"}
|
||||
-
|
||||
- for typ, switch in idtypes.items():
|
||||
- if not part_id.startswith(typ):
|
||||
- continue
|
||||
-
|
||||
- idf = part_id[len(typ):]
|
||||
- try:
|
||||
- proc = Popen(["@BLKID@", switch, idf], stdout=PIPE, stderr=PIPE)
|
||||
- out, err = proc.communicate()
|
||||
- if err:
|
||||
- sys.stderr.write("Failed 'blkid {0} {1}': {2}\n"
|
||||
- .format(switch, idf, err))
|
||||
- sys.exit(1)
|
||||
- if not out:
|
||||
- sys.stderr.write("No results from 'blkid {0} {1}'\n"
|
||||
- .format(switch, idf))
|
||||
- sys.exit(1)
|
||||
-
|
||||
- part_id = out.decode().strip()
|
||||
- break
|
||||
- except OSError as ex:
|
||||
- sys.stderr.write("Cannot run 'blkid {0} {1}': {2}\n"
|
||||
- .format(switch, idf, str(ex)))
|
||||
- sys.exit(1)
|
||||
+ try:
|
||||
+ proc = Popen(["@FINDMNT@", "--noheadings", "--first-only", "--raw",
|
||||
+ "--evaluate", "--output", "TARGET", part_id],
|
||||
+ stdout=PIPE, stderr=PIPE)
|
||||
+ out, err = proc.communicate()
|
||||
+ if err:
|
||||
+ errx("Error finding mountpoint of '{0}': {1}"
|
||||
+ .format(devpath, err.decode()))
|
||||
+
|
||||
+ result = out.decode().strip()
|
||||
+ if proc.returncode != 0 or not result:
|
||||
+ errx("Cannot find mountpoint of '{0}'".format(part_id))
|
||||
|
||||
- # look up the identifier in /etc/mtab
|
||||
- result = get_augeas("Fstab", "/etc/mtab").get("/files/etc/mtab/*"
|
||||
- "[spec=\"" + part_id + "\"]/file")
|
||||
- if result:
|
||||
return result
|
||||
- else:
|
||||
- # identifier not in the table
|
||||
- sys.stderr.write("Error: Cannot access partition '" + part_id +
|
||||
- "', mount point not found in /etc/mtab!\n")
|
||||
- sys.exit(1)
|
||||
-
|
||||
+ except OSError as ex:
|
||||
+ errx("Cannot run 'findmnt': {1}".format(str(ex)))
|
||||
|
||||
def parse_kdump():
|
||||
"""
|
||||
--
|
||||
2.7.4
|
||||
|
||||
28
0036-abrt-hook-ccpp-Fix-mismatching-argument.patch
Normal file
28
0036-abrt-hook-ccpp-Fix-mismatching-argument.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
From 5122aef69fb303022609dc6ca53a11e30842ad6e Mon Sep 17 00:00:00 2001
|
||||
From: Wes Lindauer <wesley.lindauer@gmail.com>
|
||||
Date: Wed, 13 Jul 2016 16:20:51 -0400
|
||||
Subject: [PATCH] abrt-hook-ccpp: Fix mismatching argument
|
||||
|
||||
The calling code in abrt-install-ccpp-hook was passing in --test-config.
|
||||
This was only working due to the misuse of strcmp, so it was accepting
|
||||
any string other than --config-test.
|
||||
---
|
||||
src/hooks/abrt-hook-ccpp.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
|
||||
index 10f137b..9e82ff9 100644
|
||||
--- a/src/hooks/abrt-hook-ccpp.c
|
||||
+++ b/src/hooks/abrt-hook-ccpp.c
|
||||
@@ -656,7 +656,7 @@ int main(int argc, char** argv)
|
||||
free_map_string(settings);
|
||||
}
|
||||
|
||||
- if (argc == 2 && strcmp(argv[1], "--config-test"))
|
||||
+ if (argc == 2 && !strcmp(argv[1], "--test-config"))
|
||||
return test_configuration(setting_SaveFullCore, setting_CreateCoreBacktrace);
|
||||
|
||||
if (argc < 8)
|
||||
--
|
||||
2.7.4
|
||||
|
||||
29384
0037-Translation-updates.patch
Normal file
29384
0037-Translation-updates.patch
Normal file
File diff suppressed because it is too large
Load diff
36
abrt.spec
36
abrt.spec
|
|
@ -49,7 +49,7 @@
|
|||
Summary: Automatic bug detection and reporting tool
|
||||
Name: abrt
|
||||
Version: 2.8.0
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/System
|
||||
URL: https://abrt.readthedocs.org/
|
||||
|
|
@ -77,6 +77,23 @@ Patch0011: 0011-Add-basic-documentation.patch
|
|||
#Patch0018: 0018-testsuite-avoid-unintentional-removal-of-package-man.patch
|
||||
#Patch0019: 0019-testsuite-tell-the-runner-about-problem-sub-director.patch
|
||||
#Patch0020: 0020-testsuite-add-a-per-test-timeout-for-15m.patch
|
||||
Patch0021: 0021-Merge-a-a-save-kernel-data-with-a-a-save-package-dat.patch
|
||||
#Patch0022: 0022-spec-drop-abrt-action-save-kernel-data-bits.patch
|
||||
Patch0023: 0023-a-retrace-client-format-security.patch
|
||||
Patch0024: 0024-a-console-notification-do-not-leak-variables.patch
|
||||
Patch0025: 0025-a-a-install-debuginfo-correct-handling-of-DebuginfoL.patch
|
||||
Patch0026: 0026-doc-improve-documentation-of-AllowedGroups-AllowedUs.patch
|
||||
Patch0027: 0027-a-a-install-debuginfo-do-not-try-to-split-None.patch
|
||||
Patch0028: 0028-a-dump-journal-xorg-add-_COMM-gnome-shell-to-journal.patch
|
||||
Patch0029: 0029-a-dump-journal-xorg-allow-libexec-X-to-be-executable.patch
|
||||
Patch0030: 0030-abrt-hook-ccpp-save-get_fsuid-return-values-in-int-v.patch
|
||||
Patch0031: 0031-koops-do-not-assume-version-has-3-levels.patch
|
||||
Patch0032: 0032-a-a-install-debuginfo-Exception-may-not-have-an-argu.patch
|
||||
Patch0033: 0033-vmcore-fix-finding-partitions-by-UUID-and-LABEL.patch
|
||||
#Patch0034: 0034-spec-add-utils-linux-to-vmcore-s-Require.patch
|
||||
Patch0035: 0035-vmcore-use-findmnt-to-get-mountpoint.patch
|
||||
Patch0036: 0036-abrt-hook-ccpp-Fix-mismatching-argument.patch
|
||||
Patch0037: 0037-Translation-updates.patch
|
||||
|
||||
# '%%autosetup -S git' -> git
|
||||
BuildRequires: git
|
||||
|
|
@ -264,6 +281,7 @@ Requires: abrt-addon-kerneloops
|
|||
Requires: kexec-tools
|
||||
Requires: abrt-python3
|
||||
Requires: python3-augeas
|
||||
Requires: util-linux
|
||||
|
||||
%description addon-vmcore
|
||||
This package contains plugin for collecting kernel crash information from
|
||||
|
|
@ -941,11 +959,9 @@ killall abrt-dbus >/dev/null 2>&1 || :
|
|||
%{_bindir}/abrt-dump-oops
|
||||
%{_bindir}/abrt-dump-journal-oops
|
||||
%{_bindir}/abrt-action-analyze-oops
|
||||
%{_bindir}/abrt-action-save-kernel-data
|
||||
%{_mandir}/man1/abrt-dump-oops.1*
|
||||
%{_mandir}/man1/abrt-dump-journal-oops.1*
|
||||
%{_mandir}/man1/abrt-action-analyze-oops.1*
|
||||
%{_mandir}/man1/abrt-action-save-kernel-data.1*
|
||||
%{_mandir}/man5/abrt-oops.conf.5*
|
||||
|
||||
%files addon-xorg
|
||||
|
|
@ -1098,6 +1114,20 @@ killall abrt-dbus >/dev/null 2>&1 || :
|
|||
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
|
||||
|
||||
%changelog
|
||||
* Mon Jul 18 2016 Matej Habrnal <mhabrnal@redhat.com> 2.8.0.6
|
||||
- Translation updates
|
||||
- vmcore: use findmnt to get mountpoint
|
||||
- vmcore: fix finding partitions by UUID and LABEL
|
||||
- a-a-install-debuginfo: Exception may not have an argument errno
|
||||
- koops: do not assume version has 3 levels
|
||||
- a-dump-journal-xorg: allow *libexec/X* to be executable element
|
||||
- a-dump-journal-xorg: add '_COMM=gnome-shell' to journal filter
|
||||
- doc: improve documentation of AllowedGroups, AllowedUsers and IgnoredPaths
|
||||
- a-a-install-debuginfo: correct handling of DebuginfoLocation
|
||||
- a-console-notification: do not leak variables
|
||||
- Merge a-a-save-kernel-data with a-a-save-package-data
|
||||
- Resolves: #1334084, #1343826
|
||||
|
||||
* Wed Apr 27 2016 Matej Habrnal <mhabrnal@redhat.com> 2.8.0.5
|
||||
- revert: turn off compat cores
|
||||
- Resolves: #1330734
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue