diff --git a/0008-abrt-auto-reporting-fix-related-to-conditional-compi.patch b/0008-abrt-auto-reporting-fix-related-to-conditional-compi.patch new file mode 100644 index 0000000..a738522 --- /dev/null +++ b/0008-abrt-auto-reporting-fix-related-to-conditional-compi.patch @@ -0,0 +1,33 @@ +From 6099fa38833e0679f32488770e59e10b6ac72b6d Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +Date: Tue, 28 Jul 2015 13:17:25 +0200 +Subject: [PATCH] abrt-auto-reporting: fix related to conditional compilation + +We discovered that conditional compilation in abrt-auto-reporting does not +work. We forgot add -DAUTHENTICATED_AUTOREPORTING=1 flag if +AUTHENTICATED_AUTOREPORTING is enabled. + +Related to rhbz#1191572 +--- + src/daemon/Makefile.am | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am +index a8f3fa2..563923a 100644 +--- a/src/daemon/Makefile.am ++++ b/src/daemon/Makefile.am +@@ -122,6 +122,11 @@ abrt_auto_reporting_CPPFLAGS = \ + -I$(srcdir)/../lib \ + $(LIBREPORT_CFLAGS) \ + -D_GNU_SOURCE ++ ++if AUTHENTICATED_AUTOREPORTING ++abrt_auto_reporting_CPPFLAGS += -DAUTHENTICATED_AUTOREPORTING=1 ++endif ++ + abrt_auto_reporting_LDADD = \ + ../lib/libabrt.la \ + $(LIBREPORT_LIBS) +-- +2.4.3 + diff --git a/0010-doc-fix-related-to-conditional-compilation-of-man-pa.patch b/0010-doc-fix-related-to-conditional-compilation-of-man-pa.patch new file mode 100644 index 0000000..e8ce118 --- /dev/null +++ b/0010-doc-fix-related-to-conditional-compilation-of-man-pa.patch @@ -0,0 +1,44 @@ +From 930d035e7a56ecb18414b56d1fa906f2948b2d9e Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +Date: Tue, 28 Jul 2015 16:20:47 +0200 +Subject: [PATCH] doc: fix related to conditional compilation of man page + +abrt-auto-reporting.txt is a copy of either +abrt-auto-reporting-authenticated.txt or +abrt-auto-reporting-unauthenticated.txt. abrt-auto-reporting.txt file always +exists because MAN1_TXT variable contains it and is distributed (the file is listed +in the EXTRA_DIST variable). It would be difficult to ensure +to have abrt-auto-reporting.txt in the MAN1_TXT and exclude it +from the EXTRA_DIST. So enforce copy, to get the right version of man page, seems +like the easiest way. + +Related to rhbz#1191572 + +Signed-off-by: Matej Habrnal +--- + doc/Makefile.am | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/doc/Makefile.am b/doc/Makefile.am +index f39c3bf..fdd08cf 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -82,6 +82,15 @@ MAN_SOURCE = + MAN_SOURCE += abrt-auto-reporting-authenticated.txt + MAN_SOURCE += abrt-auto-reporting-unauthenticated.txt + ++# abrt-auto-reporting.txt is a copy of either ++# abrt-auto-reporting-authenticated.txt or ++# abrt-auto-reporting-unauthenticated.txt. abrt-auto-reporting.txt file always ++# exists because MAN1_TXT variable contains it and is distributed (the file is listed ++# in the EXTRA_DIST variable). It would be difficult to ensure ++# to have abrt-auto-reporting.txt in the MAN1_TXT and exclude it ++# from the EXTRA_DIST. So enforce copy, to get the right version of man page, seems ++# like the easiest way. ++.PHONY: abrt-auto-reporting.txt + if AUTHENTICATED_AUTOREPORTING + abrt-auto-reporting.txt: abrt-auto-reporting-authenticated.txt + else +-- +2.4.3 + diff --git a/0018-dbus-api-unify-reporting-of-errors.patch b/0018-dbus-api-unify-reporting-of-errors.patch new file mode 100644 index 0000000..6faaa0b --- /dev/null +++ b/0018-dbus-api-unify-reporting-of-errors.patch @@ -0,0 +1,99 @@ +From e027392d560aa5f4cf11151bf8b53183502ac464 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 11 Aug 2015 09:54:55 +0200 +Subject: [PATCH] dbus-api: unify reporting of errors + +User ERR_PTR for failures in all functions because some of the functions +use NULL as a valid response (NULL is an empty GList). + +Related: rhbz#1224984 + +Signed-off-by: Jakub Filak +--- + src/include/libabrt.h | 16 +++++++++------- + src/lib/problem_api_dbus.c | 2 +- + 2 files changed, 10 insertions(+), 8 deletions(-) + +diff --git a/src/include/libabrt.h b/src/include/libabrt.h +index 4e73a0d..da565f9 100644 +--- a/src/include/libabrt.h ++++ b/src/include/libabrt.h +@@ -163,7 +163,7 @@ void koops_print_suspicious_strings_filtered(const regex_t **filterout); + + Requires authorization + +- @return 0 if successfull non-zeru on failure ++ @return 0 if successful; non-zero on failure + */ + int chown_dir_over_dbus(const char *problem_dir_path); + +@@ -181,7 +181,7 @@ int test_exist_over_dbus(const char *problem_id, const char *element_name); + + Might require authorization + +- @return Positive number if such the proble is complete, 0 if doesn't and negative number if an error occurs. ++ @return Positive number if the problem is complete, 0 if doesn't and negative number if an error occurs. + */ + int dbus_problem_is_complete(const char *problem_id); + +@@ -198,7 +198,8 @@ char *load_text_over_dbus(const char *problem_id, const char *element_name); + @brief Delets multiple problems specified by their id (as returned from problem_data_save) + + @param problem_dir_paths List of problem ids +- @return 0 if operation was successfull, non-zero on failure ++ ++ @return 0 if operation was successful, non-zero on failure + */ + + int delete_problem_dirs_over_dbus(const GList *problem_dir_paths); +@@ -206,21 +207,21 @@ int delete_problem_dirs_over_dbus(const GList *problem_dir_paths); + /** + @brief Fetches given problem elements for specified problem id + +- @return on failures returns non zero value and emits error message ++ @return returns non-zero value on failures and prints error message + */ + int fill_problem_data_over_dbus(const char *problem_dir_path, const char **elements, problem_data_t *problem_data); + + /** + @brief Fetches problem information for specified problem id + +- @return problem_data_t or NULL on failure ++ @return a valid pointer to problem_data_t or ERR_PTR on failure + */ + problem_data_t *get_problem_data_dbus(const char *problem_dir_path); + + /** + @brief Fetches full problem data for specified problem id + +- @return problem_data_t or ERR_PTR on failure ++ @return a valid pointer to problem_data_t or ERR_PTR on failure + */ + problem_data_t *get_full_problem_data_over_dbus(const char *problem_dir_path); + +@@ -228,7 +229,8 @@ problem_data_t *get_full_problem_data_over_dbus(const char *problem_dir_path); + @brief Fetches all problems from problem database + + @param authorize If set to true will try to fetch even problems owned by other users (will require root authorization over policy kit) +- @return List of problem ids or NULL on failure ++ ++ @return List of problem ids or ERR_PTR on failure (NULL is an empty list) + */ + GList *get_problems_over_dbus(bool authorize); + +diff --git a/src/lib/problem_api_dbus.c b/src/lib/problem_api_dbus.c +index ce5c47b..0bf86e2 100644 +--- a/src/lib/problem_api_dbus.c ++++ b/src/lib/problem_api_dbus.c +@@ -165,7 +165,7 @@ problem_data_t *get_problem_data_dbus(const char *problem_dir_path) + { + error_msg(_("Can't get problem data from abrt-dbus")); + problem_data_free(pd); +- return NULL; ++ return ERR_PTR; + } + + return pd; +-- +2.4.3 + diff --git a/0019-cli-fix-testing-of-DBus-API-return-codes.patch b/0019-cli-fix-testing-of-DBus-API-return-codes.patch new file mode 100644 index 0000000..a7b150d --- /dev/null +++ b/0019-cli-fix-testing-of-DBus-API-return-codes.patch @@ -0,0 +1,56 @@ +From de667f35fe7fd1d4a5fde8f5d0419387c33db9a2 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 11 Aug 2015 10:01:53 +0200 +Subject: [PATCH] cli: fix testing of DBus API return codes + +The DBus wrapper functions uses ERR_PTR to report an error, so the +callers has to test the returned pointers for NULL and for ERR_PTR. + +Related: rhbz#1224984 + +Signed-off-by: Jakub Filak +--- + src/cli/list.c | 3 +++ + src/cli/status.c | 5 ++++- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/cli/list.c b/src/cli/list.c +index 68dda47..d069695 100644 +--- a/src/cli/list.c ++++ b/src/cli/list.c +@@ -36,6 +36,9 @@ static problem_data_t *load_problem_data(const char *problem_id) + + /* First, check if there is a problem with the passed id */ + GList *problems = get_problems_over_dbus(g_cli_authenticate); ++ if (problems == ERR_PTR) ++ return NULL; ++ + GList *item = g_list_find_custom(problems, problem_id, (GCompareFunc)strcmp); + + /* (git requires at least 5 char hash prefix, we do the same) */ +diff --git a/src/cli/status.c b/src/cli/status.c +index 0635289..3620cea 100644 +--- a/src/cli/status.c ++++ b/src/cli/status.c +@@ -27,6 +27,9 @@ static unsigned int count_problem_dirs(unsigned long since) + unsigned count = 0; + + GList *problems = get_problems_over_dbus(g_cli_authenticate); ++ if (problems == ERR_PTR) ++ return count; ++ + for (GList *iter = problems; iter != NULL; iter = g_list_next(iter)) + { + const char *problem_id = (const char *)iter->data; +@@ -37,7 +40,7 @@ static unsigned int count_problem_dirs(unsigned long since) + } + + char *time_str = load_text_over_dbus(problem_id, FILENAME_LAST_OCCURRENCE); +- if (time_str == NULL) ++ if (time_str == ERR_PTR || time_str == NULL) + { + log_debug("Not counting problem %s: failed to get time element", problem_id); + continue; +-- +2.4.3 + diff --git a/0021-ccpp-fix-comment-related-to-MakeCompatCore-option-in.patch b/0021-ccpp-fix-comment-related-to-MakeCompatCore-option-in.patch new file mode 100644 index 0000000..de953aa --- /dev/null +++ b/0021-ccpp-fix-comment-related-to-MakeCompatCore-option-in.patch @@ -0,0 +1,59 @@ +From 452fd36a5eac35dff14dbaf3a128c2b0e562db41 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 92d7438..03b9b03 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/0023-ccpp-use-global-TID.patch b/0023-ccpp-use-global-TID.patch new file mode 100644 index 0000000..ff1f7d5 --- /dev/null +++ b/0023-ccpp-use-global-TID.patch @@ -0,0 +1,37 @@ +From d4758cf4c0c153ee41ddca06dcb213b210f4dd8b Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 12 Aug 2015 17:40:12 +0200 +Subject: [PATCH] ccpp: use global TID + +'%i' is TID of the thread from the crashed process's PID namespace but +abrt-hook-ccpp is run by kernel in the init PID namespace, so '%i' +is TID of a completely unrelated process. + +For mode details see 'man 5 core'. + +Related: rhbz#1252590 + +Signed-off-by: Jakub Filak +--- + src/hooks/abrt-install-ccpp-hook.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/hooks/abrt-install-ccpp-hook.in b/src/hooks/abrt-install-ccpp-hook.in +index 13832ab..707c57d 100755 +--- a/src/hooks/abrt-install-ccpp-hook.in ++++ b/src/hooks/abrt-install-ccpp-hook.in +@@ -11,9 +11,9 @@ SAVED_PATTERN_DIR="@VAR_RUN@/abrt" + SAVED_PATTERN_FILE="@VAR_RUN@/abrt/saved_core_pattern" + 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 %P %i" ++PATTERN="|$HOOK_BIN %s %c %p %u %g %t %e %P %I" + # Same, but with bogus "executable name" parameter +-PATTERN1="|$HOOK_BIN %s %c %p %u %g %t e %P %i" ++PATTERN1="|$HOOK_BIN %s %c %p %u %g %t e %P %I" + + # core_pipe_limit specifies how many dump_helpers can run at the same time + # 0 - means unlimited, but it's not guaranteed that /proc/ of crashing +-- +2.4.3 + diff --git a/0027-correct-usage-of-abrt-gdb-exploitable.patch b/0027-correct-usage-of-abrt-gdb-exploitable.patch new file mode 100644 index 0000000..ed88659 --- /dev/null +++ b/0027-correct-usage-of-abrt-gdb-exploitable.patch @@ -0,0 +1,46 @@ +From d3e01c97970b11d400aad2058bc215778da95513 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Mon, 17 Aug 2015 09:34:22 +0200 +Subject: [PATCH] correct usage of abrt-gdb-exploitable + +Fixes #988 +Related to bugzilla.redhat.com/1253590 + +Signed-off-by: Jakub Filak +--- + src/plugins/abrt-action-analyze-vulnerability | 2 +- + src/plugins/abrt-gdb-exploitable | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/plugins/abrt-action-analyze-vulnerability b/src/plugins/abrt-action-analyze-vulnerability +index aa63ff0..be5a492 100755 +--- a/src/plugins/abrt-action-analyze-vulnerability ++++ b/src/plugins/abrt-action-analyze-vulnerability +@@ -30,7 +30,7 @@ export SIGNO_OF_THE_COREDUMP + # with explanation if severity is >= 4 + GDBOUT=$( + gdb --batch \ +- -ex 'python execfile("/usr/libexec/abrt-gdb-exploitable")' \ ++ -ex 'python exec(open("/usr/libexec/abrt-gdb-exploitable").read())' \ + -ex 'core-file ./coredump' \ + -ex 'abrt-exploitable 4 ./exploitable' \ + 2>&1 \ +diff --git a/src/plugins/abrt-gdb-exploitable b/src/plugins/abrt-gdb-exploitable +index 758c4c5..ac19668 100755 +--- a/src/plugins/abrt-gdb-exploitable ++++ b/src/plugins/abrt-gdb-exploitable +@@ -1,9 +1,9 @@ + #!/usr/bin/python3 + # This is a GDB plugin. + # Usage: +-# gdb --batch -ex 'python execfile("THIS_FILE")' -ex run -ex abrt-exploitable PROG ++# gdb --batch -ex 'python exec(open("THIS_FILE").read())' -ex run -ex abrt-exploitable PROG + # or +-# gdb --batch -ex 'python execfile("THIS_FILE")' -ex 'core COREDUMP' -ex abrt-exploitable ++# gdb --batch -ex 'python exec(open("THIS_FILE").read())' -ex 'core COREDUMP' -ex abrt-exploitable + + import sys + import os +-- +2.4.3 + diff --git a/abrt.spec b/abrt.spec index f709e79..94a4081 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,7 +49,7 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.6.2 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/System URL: https://abrt.readthedocs.org/ @@ -66,6 +66,26 @@ Patch0002: 0002-abrt-merge-pstoreoops-merge-files-in-descending-orde.patch #Patch0005: 0005-testsuite-pstore-harvest-adapt-to-merging-in-descend.patch Patch0006: 0006-pass-encoded-Unicode-to-hashlib.sha1.update.patch Patch0007: 0007-vmcore-read-vmcore-by-chunks.patch +Patch0008: 0008-abrt-auto-reporting-fix-related-to-conditional-compi.patch +#Patch0009: 0009-testsuite-add-the-results-for-pstoreoops.patch +Patch0010: 0010-doc-fix-related-to-conditional-compilation-of-man-pa.patch +#Patch0011: 0011-testsuite-make-check_dump_dir_attributes-distro-spec.patch +#Patch0012: 0012-testsuite-make-kernel-vmcore-harvest-distro-specific.patch +#Patch0013: 0013-testsuite-make-oops-processing-distro-specific.patch +#Patch0014: 0014-testsuite-make-journald-integration-test-distro-spec.patch +#Patch0015: 0015-testsuite-fix-path-to-aux-lib.sh-in-distro_specific-.patch +#Patch0016: 0016-testsuite-add-a-test-checking-sanity-of-abrtd-logs.patch +#Patch0017: 0017-testsuite-make-the-meaningful-logs-test-working-for-.patch +Patch0018: 0018-dbus-api-unify-reporting-of-errors.patch +Patch0019: 0019-cli-fix-testing-of-DBus-API-return-codes.patch +#Patch0020: 0020-testsuite-dbus-configuration-read-option-values-from.patch +Patch0021: 0021-ccpp-fix-comment-related-to-MakeCompatCore-option-in.patch +#Patch0022: 0022-testsuite-abrt-auto-reporting-sanity-exclude-one-pha.patch +Patch0023: 0023-ccpp-use-global-TID.patch +#Patch0024: 0024-testsuite-generate-core-backtrace-in-new-PID-NS.patch +#Patch0025: 0025-testsutie-first-wait_for_hooks-then-get_crash_path.patch +#Patch0026: 0026-testsuite-make-ccpp-plugin-hook-unwind-more-robust.patch +Patch0027: 0027-correct-usage-of-abrt-gdb-exploitable.patch # '%%autosetup -S git' -> git @@ -1053,6 +1073,17 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Fri Aug 14 2015 Matej Habrnal 2.6.2-4 +- ccpp - use global TID +- fix comment related to 'MakeCompatCore' option in CCpp.conf +- fix testing of DBus API return codes +- dbus-api: unify reporting of errors +- fix related to conditional compilation of man page +- abrt-auto-reporting: fix related to conditional compilation +- correct usage of abrt-gdb-exploitable +- Resolves: #1245600, #1252590 + + * Fri Jul 24 2015 Matej Habrnal 2.6.2-3 - read vmcore by chunks - pass encoded Unicode to hashlib.sha1.update()