diff --git a/0117-a-dump-oops-allow-update-the-problem-if-more-then-on.patch b/0117-a-dump-oops-allow-update-the-problem-if-more-then-on.patch new file mode 100644 index 0000000..9f327d9 --- /dev/null +++ b/0117-a-dump-oops-allow-update-the-problem-if-more-then-on.patch @@ -0,0 +1,54 @@ +From 3e2b4131453ffb0c76660d717413de238590056b Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +Date: Mon, 13 Jul 2015 11:25:17 +0200 +Subject: [PATCH] a-dump-oops: allow update the problem, if more then one oops + found + +In case that found more than one oops process the first one. +Without this patch the script exits with error in this case because expects +only one oops. + +Related to rhbz#1170534 + +Signed-off-by: Matej Habrnal +--- + src/plugins/abrt-dump-oops.c | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +diff --git a/src/plugins/abrt-dump-oops.c b/src/plugins/abrt-dump-oops.c +index b1031ea..6f2f41b 100644 +--- a/src/plugins/abrt-dump-oops.c ++++ b/src/plugins/abrt-dump-oops.c +@@ -171,6 +171,17 @@ int main(int argc, char **argv) + log("Updating problem directory"); + switch (g_list_length(oops_list)) + { ++ case 0: ++ { ++ error_msg(_("Can't update the problem: no oops found")); ++ errors = 1; ++ break; ++ } ++ default: ++ { ++ log_notice(_("More oopses found: process only the first one")); ++ } ++ /* falls trought */ + case 1: + { + struct dump_dir *dd = dd_opendir(problem_dir, /*open for writing*/0); +@@ -180,11 +191,6 @@ int main(int argc, char **argv) + dd_close(dd); + } + } +- break; +- default: +- error_msg(_("Can't update the problem: more than one oops found")); +- errors = 1; +- break; + } + } + else +-- +2.4.3 + diff --git a/0118-ccpp-do-not-crash-if-generate_core_backtrace-fails.patch b/0118-ccpp-do-not-crash-if-generate_core_backtrace-fails.patch new file mode 100644 index 0000000..3c81312 --- /dev/null +++ b/0118-ccpp-do-not-crash-if-generate_core_backtrace-fails.patch @@ -0,0 +1,29 @@ +From f3f88f899e460d4cb27783027e0e1e87d5b50a7d Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Fri, 17 Jul 2015 10:25:50 +0200 +Subject: [PATCH] ccpp: do not crash if generate_core_backtrace fails + +Add a missing return statement in the error code execution path. + +Related: rhbz#1243791 + +Signed-off-by: Jakub Filak +--- + src/hooks/abrt-hook-ccpp.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c +index 06dd670..e285ff5 100644 +--- a/src/hooks/abrt-hook-ccpp.c ++++ b/src/hooks/abrt-hook-ccpp.c +@@ -425,6 +425,7 @@ static void create_core_backtrace(pid_t tid, const char *executable, int signal_ + { + log("Failed to create core_backtrace: %s", error_message); + free(error_message); ++ return; + } + + dd_save_text(dd, FILENAME_CORE_BACKTRACE, core_bt); +-- +2.4.3 + diff --git a/0119-abrt-merge-pstoreoops-merge-files-in-descending-orde.patch b/0119-abrt-merge-pstoreoops-merge-files-in-descending-orde.patch new file mode 100644 index 0000000..bc64c28 --- /dev/null +++ b/0119-abrt-merge-pstoreoops-merge-files-in-descending-orde.patch @@ -0,0 +1,35 @@ +From df5536bae9e0346085afb57ad6b6b0b41cd52f69 Mon Sep 17 00:00:00 2001 +From: "knoha@redhat.com" +Date: Fri, 24 Jul 2015 07:56:02 +0200 +Subject: [PATCH] abrt-merge-pstoreoops: merge files in descending order + +fs/pstore reads the data from kmsg_dump_get_buffer(), which starts at +the end of the kmsg buffer, in a while loop and increases Part no. in +each iteration. + +Related: rhbz#1233662 + +Signed-off-by: Jakub Filak +--- + src/hooks/abrt-merge-pstoreoops.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/hooks/abrt-merge-pstoreoops.c b/src/hooks/abrt-merge-pstoreoops.c +index 6fc3109..36f1e0b 100644 +--- a/src/hooks/abrt-merge-pstoreoops.c ++++ b/src/hooks/abrt-merge-pstoreoops.c +@@ -64,9 +64,9 @@ int compare_oops_texts(const void *a, const void *b) + return -1; + if (aa->panic_no > bb->panic_no) + return 1; +- if (aa->part_no < bb->part_no) ++ if (aa->part_no > bb->part_no) + return -1; +- return (aa->part_no > bb->part_no); ++ return (aa->part_no < bb->part_no); + } + + int main(int argc, char **argv) +-- +2.4.3 + diff --git a/0120-ccpp-fix-comment-related-to-MakeCompatCore-option-in.patch b/0120-ccpp-fix-comment-related-to-MakeCompatCore-option-in.patch new file mode 100644 index 0000000..f214fc0 --- /dev/null +++ b/0120-ccpp-fix-comment-related-to-MakeCompatCore-option-in.patch @@ -0,0 +1,59 @@ +From ca73b680ee3deaf3f5a476056848969c3433a537 Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +Date: Tue, 11 Aug 2015 16:17:40 +0200 +Subject: [PATCH] ccpp: fix comment related to 'MakeCompatCore' option in + CCpp.conf + +The comment fits only on the default core_pattern template. +If the core_pattern is not default, the comment does not fit. + +Related to rhbz#1252384 + +Signed-off-by: Matej Habrnal +--- + doc/abrt-CCpp.conf.txt | 9 +++++++-- + src/hooks/CCpp.conf | 9 +++++++-- + 2 files changed, 14 insertions(+), 4 deletions(-) + +diff --git a/doc/abrt-CCpp.conf.txt b/doc/abrt-CCpp.conf.txt +index 498d53d..cf9b213 100644 +--- a/doc/abrt-CCpp.conf.txt ++++ b/doc/abrt-CCpp.conf.txt +@@ -11,8 +11,13 @@ The configuration file consists of items in the format "Option = Value". + Ithe following items are recognized: + + MakeCompatCore = 'yes' / 'no' ...:: +- If you also want to dump file named "core" +- in crashed process' current dir, set to "yes". ++ CCpp hook writes its template to the "/proc/sys/kernel/core_pattern" file ++ and stores the original template in the "/var/run/abrt/saved_core_pattern" ++ file. If you want CCpp hook to create a core dump file named according to ++ the original template as well, set 'MakeCompatCore' to 'yes'. ++ If the original template string starts with "|", the string "core" is used ++ instead of the template. ++ For more information about naming core dump files see 'man 5 core'. + + SaveBinaryImage = 'yes' / 'no' ...:: + Do you want a copy of crashed binary be saved? +diff --git a/src/hooks/CCpp.conf b/src/hooks/CCpp.conf +index b1a0a22..b92b830 100644 +--- a/src/hooks/CCpp.conf ++++ b/src/hooks/CCpp.conf +@@ -1,7 +1,12 @@ + # Configuration file for CCpp hook + +-# If you also want to dump file named "core" +-# in crashed process' current dir, set to "yes" ++# CCpp hook writes its template to the "/proc/sys/kernel/core_pattern" file ++# and stores the original template in the "/var/run/abrt/saved_core_pattern" ++# file. If you want CCpp hook to create a core dump file named according to ++# the original template as well, set 'MakeCompatCore' to 'yes'. ++# If the original template string starts with "|", the string "core" is used ++# instead of the template. ++# For more information about naming core dump files see 'man 5 core'. + MakeCompatCore = yes + + # Do you want a copy of crashed binary be saved? +-- +2.4.3 + diff --git a/abrt.spec b/abrt.spec index 24f3a6f..fc6b5b8 100644 --- a/abrt.spec +++ b/abrt.spec @@ -46,7 +46,7 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.3.0 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2+ Group: Applications/System URL: https://github.com/abrt/abrt/wiki/ABRT-Project @@ -170,6 +170,10 @@ Patch0113: 0113-ccpp-correct-capitalization-of-log-labels.patch Patch0114: 0114-a-a-p-ccpp-analysis-use-ask_yes_no_save_result-inste.patch Patch0115: 0115-configui-add-option-always-generate-backtrace-locall.patch Patch0116: 0116-vmcore-fix-a-broken-merge-conflict.patch +Patch0117: 0117-a-dump-oops-allow-update-the-problem-if-more-then-on.patch +Patch0118: 0118-ccpp-do-not-crash-if-generate_core_backtrace-fails.patch +Patch0119: 0119-abrt-merge-pstoreoops-merge-files-in-descending-orde.patch +Patch0120: 0120-ccpp-fix-comment-related-to-MakeCompatCore-option-in.patch # '%%autosetup -S git' -> git @@ -1088,6 +1092,13 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Fri Aug 14 2015 Matej Habrnal - 2.3.0-9 +- fix comment related to 'MakeCompatCore' option in CCpp.conf +- abrt-merge-pstoreoops: merge files in descending order +- do not crash if generate_core_backtrace fails +- a-dump-oops: allow update the problem, if more then one oops found +- Resolves: #1170534 + * Wed Jul 01 2015 Jakub Filak - 2.3.0-8 - vmcore: fix an invalid syntax introduced by the CVE fixes - Resolves: #1237408