diff --git a/0052-a-a-install-debuginfo-make-tmpdir-variable-global.patch b/0052-a-a-install-debuginfo-make-tmpdir-variable-global.patch new file mode 100644 index 0000000..c4f5c1c --- /dev/null +++ b/0052-a-a-install-debuginfo-make-tmpdir-variable-global.patch @@ -0,0 +1,85 @@ +From 894ced59cc43dfda99a393154026181b0bf61784 Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +Date: Tue, 8 Mar 2016 16:42:31 +0100 +Subject: [PATCH] a-a-install-debuginfo: make tmpdir variable global + +Function clean_up() has one required parameter tmpdir. +Without this commit clean_up() function raises an exception because it was +called without the parameter. + +Signed-off-by: Matej Habrnal +--- + src/plugins/abrt-action-install-debuginfo.in | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in +index 73ff82f..bb72695 100644 +--- a/src/plugins/abrt-action-install-debuginfo.in ++++ b/src/plugins/abrt-action-install-debuginfo.in +@@ -20,7 +20,8 @@ import problem + RETURN_OK = 0 + # serious problem, should be logged somewhere + RETURN_FAILURE = 2 +- ++# path to tmp directory has to be global because of clean_up() ++TMPDIR = None + + GETTEXT_PROGNAME = "abrt" + import locale +@@ -43,11 +44,11 @@ def init_gettext(): + gettext.textdomain(GETTEXT_PROGNAME) + + def sigterm_handler(signum, frame): +- clean_up() ++ clean_up(TMPDIR) + exit(RETURN_OK) + + def sigint_handler(signum, frame): +- clean_up() ++ clean_up(TMPDIR) + print("\n{0}".format(_("Exiting on user command"))) + sys.stdout.flush() + # ??! without "sys.", I am getting segv! +@@ -63,7 +64,6 @@ if __name__ == "__main__": + fbuild_ids = "build_ids" + cachedirs = [] + size_mb = 4096 +- tmpdir = None + keeprpms = False + noninteractive = False + b_ids = [] +@@ -135,7 +135,7 @@ if __name__ == "__main__": + except: + pass + elif opt == "--tmpdir": +- tmpdir = arg ++ TMPDIR = arg + elif opt == "--keeprpms": + keeprpms = True + # --exact takes precendece over --ids +@@ -159,11 +159,11 @@ if __name__ == "__main__": + + if not cachedirs: + cachedirs = ["/var/cache/abrt-di"] +- if not tmpdir: ++ 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 + # not use /tmp for potential big data anymore +- tmpdir = "@LARGE_DATA_TMP_DIR@/abrt-tmp-debuginfo-%s.%u" % (time.strftime("%Y-%m-%d-%H:%M:%S"), os.getpid()) ++ TMPDIR = "@LARGE_DATA_TMP_DIR@/abrt-tmp-debuginfo-%s.%u" % (time.strftime("%Y-%m-%d-%H:%M:%S"), os.getpid()) + + + if missing == None: +@@ -235,7 +235,7 @@ 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, ++ downloader = download_class(cache=cachedirs[0], tmp=TMPDIR, + noninteractive=noninteractive, + repo_pattern=repo_pattern) + try: +-- +2.5.5 + diff --git a/0053-a-a-install-debuginfo-fix-BrokenPipe-error.patch b/0053-a-a-install-debuginfo-fix-BrokenPipe-error.patch new file mode 100644 index 0000000..e792d42 --- /dev/null +++ b/0053-a-a-install-debuginfo-fix-BrokenPipe-error.patch @@ -0,0 +1,49 @@ +From 9c58a7bbd6def445ba1d1faaf7a3c2960ba2819e Mon Sep 17 00:00:00 2001 +From: Matej Habrnal +Date: Tue, 8 Mar 2016 16:45:36 +0100 +Subject: [PATCH] a-a-install-debuginfo: fix BrokenPipe error + +While debug info is downloading and stop button is pressed the BrokenPipe +error appears. + +If the stop button is pressed, gui wizard sends SIGTERM to all +processes with the same group ID so abrt-action-install-debuginfo got SIGTERM +as well. It has its own SIGTERM handler which calls clean_up() function and it +takes a while before the tool is terminated. +abrt-action-install-debuginfo tries to write some messages to the closed socket +during the clean_up process and it raises a BrokenPipe exception. We must +ensure that no message will be printed after SIGTERM is recieved. + +Related to: #1255259 + +Signed-off-by: Matej Habrnal +--- + src/plugins/abrt-action-install-debuginfo.in | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in +index bb72695..f9eb596 100644 +--- a/src/plugins/abrt-action-install-debuginfo.in ++++ b/src/plugins/abrt-action-install-debuginfo.in +@@ -44,7 +44,7 @@ def init_gettext(): + gettext.textdomain(GETTEXT_PROGNAME) + + def sigterm_handler(signum, frame): +- clean_up(TMPDIR) ++ clean_up(TMPDIR, silent=True) + exit(RETURN_OK) + + def sigint_handler(signum, frame): +@@ -241,6 +241,9 @@ if __name__ == "__main__": + try: + result = downloader.download(missing, download_exact_files=exact_fls) + except Exception as ex: ++ if ex.errno == errno.EPIPE: ++ clean_up(TMPDIR, silent=True) ++ exit(RETURN_FAILURE) + error_msg_and_die("Can't download debuginfos: %s", ex) + + if exact_fls: +-- +2.5.5 + diff --git a/abrt.spec b/abrt.spec index 6eb22f9..f809ebd 100644 --- a/abrt.spec +++ b/abrt.spec @@ -43,13 +43,13 @@ %define docdirversion -%{version} %endif -%define libreport_ver 2.6.2-3 +%define libreport_ver 2.6.4-2 %define satyr_ver 0.19 Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.6.1 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2+ Group: Applications/System URL: https://abrt.readthedocs.org/ @@ -110,6 +110,8 @@ Patch0048: 0048-Translation-updates.patch Patch0049: 0049-translations-add-missing-new-line.patch Patch0050: 0050-a-a-save-package-data-blacklist-usr-lib-64-firefox-p.patch #Patch0051: 0051-testsuite-add-concurrent-processing-test-for-abrtd.patch +Patch0052: 0052-a-a-install-debuginfo-make-tmpdir-variable-global.patch +Patch0053: 0053-a-a-install-debuginfo-fix-BrokenPipe-error.patch # '%%autosetup -S git' -> git @@ -1100,6 +1102,9 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Tue Apr 12 2016 Matej Habrnal 2.6.1-11 +- a-a-install-debuginfo: fix BrokenPipe error + * Tue Feb 23 2016 Matej Habrnal 2.6.1-10 - translation updates - blacklist Firefox's plugin-container