From edc52336f30642da3fd27fd2c444a9857d9b0b08 Mon Sep 17 00:00:00 2001 From: Nikola Pajkovsky Date: Sep 09 2011 12:41:37 +0000 Subject: #726192 - fix traceback introduced in previous update Signed-off-by: Nikola Pajkovsky --- diff --git a/0001-install-debuginfo-ask-before-downloading.patch b/0001-install-debuginfo-ask-before-downloading.patch deleted file mode 100644 index 85ae019..0000000 --- a/0001-install-debuginfo-ask-before-downloading.patch +++ /dev/null @@ -1,69 +0,0 @@ -From bfa4775f38291b9cbd3248de3a47675f81dcad35 Mon Sep 17 00:00:00 2001 -From: Michal Toman -Date: Thu, 21 Jul 2011 16:48:08 +0200 -Subject: [PATCH] install-debuginfo: ask before downloading (cherry picked - from commit 90893a0c84a594337ca22fa83f364f5b4a7fb1b2) - - -diff --git a/src/plugins/abrt-action-install-debuginfo b/src/plugins/abrt-action-install-debuginfo -index 2ad0790..31aab2c 100644 ---- a/src/plugins/abrt-action-install-debuginfo -+++ b/src/plugins/abrt-action-install-debuginfo -@@ -11,6 +11,7 @@ import errno - import time - import getopt - import shutil -+import reportclient - from subprocess import Popen, PIPE - from yum import _, YumBase - from yum.callbacks import DownloadBaseCallback -@@ -74,22 +75,6 @@ def unmute_stdout(): - else: - print "ERR: unmute called without mute?" - --def ask_yes_no(prompt, retries=4): -- while True: -- try: -- response = raw_input(prompt) -- except EOFError: -- log1("got eof, probably executed from helper, assuming - yes") -- return True -- if response in (_("y")): # for translators -> y/Y as yes -- return True -- if response in ("", _("n")): # for translators -> N/n as no -- return False -- retries = retries - 1 -- if retries < 0: -- break -- return False -- - # TODO: unpack just required debuginfo and not entire rpm? - # ..that can lead to: foo.c No such file and directory - # files is not used... -@@ -286,16 +271,13 @@ class DebugInfoDownload(YumBase): - print _("Can't find packages for %u debuginfo files") % len(not_found) - if verbose != 0 or total_pkgs != 0: - print _("Packages to download: %u") % total_pkgs -- print _("Downloading %.2fMb, installed size: %.2fMb") % ( -- todownload_size / (1024**2), -- installed_size / (1024**2) -- ) -- -- # ask only if we have terminal, because for now we don't have a way -- # how to pass the question to gui and the response back -- if noninteractive == False and sys.stdout.isatty(): -- if not ask_yes_no(_("Is this ok? [y/N] ")): -- return RETURN_OK -+ question = _("Downloading %.2fMb, installed size: %.2fMb. Continue?") % ( -+ todownload_size / (1024**2), -+ installed_size / (1024**2) -+ ) -+ if not reportclient.ask_yes_no(question): -+ print _("Download cancelled by user") -+ return RETURN_OK - - for pkg, files in package_files_dict.iteritems(): - dnlcb.downloaded_pkgs = downloaded_pkgs --- -1.7.6 - diff --git a/0002-install-debuginfo-do-not-ask-when-y-is-specified.patch b/0002-install-debuginfo-do-not-ask-when-y-is-specified.patch deleted file mode 100644 index 38f2a22..0000000 --- a/0002-install-debuginfo-do-not-ask-when-y-is-specified.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 30c43b8f1ef08afbad106ae43dbea903431228f8 Mon Sep 17 00:00:00 2001 -From: Michal Toman -Date: Thu, 28 Jul 2011 09:41:16 +0200 -Subject: [PATCH] install-debuginfo: do not ask when -y is specified (cherry - picked from commit - e740a9bc55d132c4b1a7e33bfbc1a477eb895dc9) - - -diff --git a/src/plugins/abrt-action-install-debuginfo b/src/plugins/abrt-action-install-debuginfo -index 31aab2c..786112d 100644 ---- a/src/plugins/abrt-action-install-debuginfo -+++ b/src/plugins/abrt-action-install-debuginfo -@@ -275,7 +275,7 @@ class DebugInfoDownload(YumBase): - todownload_size / (1024**2), - installed_size / (1024**2) - ) -- if not reportclient.ask_yes_no(question): -+ if noninteractive == False and not reportclient.ask_yes_no(question): - print _("Download cancelled by user") - return RETURN_OK - --- -1.7.6 - diff --git a/0004-Revert-Merge-branch-daemon-dump-location.patch~ b/0004-Revert-Merge-branch-daemon-dump-location.patch~ deleted file mode 100644 index 7232ee2..0000000 --- a/0004-Revert-Merge-branch-daemon-dump-location.patch~ +++ /dev/null @@ -1,275 +0,0 @@ -From a2afee1970cc9bf4f7563a8002741a8f07e58bb2 Mon Sep 17 00:00:00 2001 -From: Nikola Pajkovsky -Date: Mon, 27 Jun 2011 16:45:50 +0200 -Subject: [PATCH] Revert "Merge branch 'daemon/dump-location'" - -This reverts commit b4e0ff6fadd6bfcb2915a544747d0b09d53dbada, reversing -changes made to c7197324b1e9e33260a1d9fd7e26528d9d562abc. -(cherry picked from commit 35f05af76aab482f834cb2ebd28888899def7259) - -diff --git a/.gitignore b/.gitignore -index f73aef0..2bd423a 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -34,7 +34,6 @@ src/applet/abrt-applet - - src/hooks/abrt_exception_handler.py - src/hooks/abrt-hook-ccpp --src/hooks/abrt-install-ccpp-hook - - src/applet/abrt-applet.desktop - src/gui-gtk/abrt.desktop -diff --git a/configure.ac b/configure.ac -index baf0f01..d53bcd1 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -142,7 +142,6 @@ AC_CONFIG_FILES([ - src/Makefile - src/daemon/Makefile - src/hooks/Makefile -- src/hooks/abrt-install-ccpp-hook - src/applet/Makefile - src/gui-gtk/Makefile - po/Makefile.in -diff --git a/src/daemon/abrt.conf b/src/daemon/abrt.conf -index 0946d7c..cb0dbbb 100644 ---- a/src/daemon/abrt.conf -+++ b/src/daemon/abrt.conf -@@ -27,5 +27,3 @@ BlackListedPaths = /usr/share/doc/*,*/example* - # Max size for crash storage [MiB] or 0 for unlimited - # - MaxCrashReportsSize = 1000 -- --DumpLocation = /var/spool/abrt -diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am -index 962e326..95cd363 100644 ---- a/src/hooks/Makefile.am -+++ b/src/hooks/Makefile.am -@@ -27,7 +27,7 @@ abrt_hook_ccpp_LDADD = \ - $(LIBREPORT_LIBS) - - python_PYTHON = abrt.pth abrt_exception_handler.py --EXTRA_DIST = abrt_exception_handler.py.in abrt-install-ccpp-hook.in $(man_MANS) -+EXTRA_DIST = abrt_exception_handler.py.in abrt-install-ccpp-hook $(man_MANS) - - CLEANFILES := $(notdir $(wildcard *~)) $(notdir $(wildcard *\#)) $(notdir $(wildcard \.\#*)) $(notdir $(wildcard *.pyc)) - -diff --git a/src/hooks/abrt-install-ccpp-hook b/src/hooks/abrt-install-ccpp-hook -new file mode 100755 -index 0000000..12a443f ---- /dev/null -+++ b/src/hooks/abrt-install-ccpp-hook -@@ -0,0 +1,97 @@ -+#!/bin/bash -+# Install coredump handler which saves segfault data -+ -+# For debugging -+ -+dry_run=false -+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/libexec/abrt-hook-ccpp" -+# Must match percent_specifiers[] order in abrt-hook-ccpp.c: -+PATTERN="|$HOOK_BIN /var/spool/abrt %s %c %p %u %g %t %e" -+# Same, but with bogus "executable name" parameter -+PATTERN1="|$HOOK_BIN /var/spool/abrt %s %c %p %u %g %t e" -+ -+# 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 -+# process will be available for dump_helper. -+# 4 - means that 4 dump_helpers can run at the same time (the rest will also -+# run, but they will fail to read /proc/). -+# -+# This should be enough for ABRT, we can miss some crashes, but what are -+# the odds that more processes crash at the same time? And moreover, -+# do people want to save EVERY ONE of the crashes when they have -+# a crash storm? I don't think so. -+# The value of 4 has been recommended by nhorman. -+# -+CORE_PIPE_LIMIT_FILE="/proc/sys/kernel/core_pipe_limit" -+CORE_PIPE_LIMIT="4" -+ -+start() { -+ cur=`cat "$PATTERN_FILE"` -+ cur_first=`printf "%s" "$cur" | sed 's/ .*//'` -+ -+ # Is there a %e (executable name) in old pattern anywhere? -+ if test x"${cur#.*%e}" = x"${cur}"; then -+ # No. Can use PATTERN with less risk of overflow -+ # on expansion (executable names can be LONG). -+ # Overflow would cause kernel to abort coredump. BAD. -+ PATTERN="$PATTERN1" -+ fi -+ -+ $verbose && printf "cur:'%s'\n" "$cur" -+ # Is it already installed? -+ if test x"$cur_first" != x"|$HOOK_BIN"; then # no -+ # It is not installed -+ mkdir -p -- "$SAVED_PATTERN_DIR" -+ printf "%s\n" "$cur" >"$SAVED_PATTERN_FILE" -+ # Install new handler -+ $verbose && printf "Installing to %s:'%s'\n" "$PATTERN_FILE" "$PATTERN" -+ $dry_run || echo "$PATTERN" >"$PATTERN_FILE" -+ -+ # Check core_pipe_limit and change it if it's 0, -+ # otherwise the abrt-hook-ccpp won't be able to read /proc/ -+ # of the crashing process -+ if test x"`cat "$CORE_PIPE_LIMIT_FILE"`" = x"0"; then -+ echo "$CORE_PIPE_LIMIT" >"$CORE_PIPE_LIMIT_FILE" -+ fi -+ fi -+} -+ -+stop() { -+ if test -f "$SAVED_PATTERN_FILE"; then -+ $verbose && printf "Restoring to %s:'%s'\n" "$PATTERN_FILE" "`cat "$SAVED_PATTERN_FILE"`" -+ $dry_run || cat "$SAVED_PATTERN_FILE" >"$PATTERN_FILE" -+ fi -+} -+ -+status() { -+ cur=`cat "$PATTERN_FILE"` -+ cur_first=`printf "%s" "$cur" | sed 's/ .*//'` -+ # Is it already installed? -+ if test x"$cur_first" = x"|$HOOK_BIN"; then # yes -+ $verbose && printf "Installed\n" -+ return 0 -+ else -+ $verbose && printf "Not installed\n" -+ return 1 -+ fi -+} -+ -+case "$1" in -+install) -+ start -+ ;; -+uninstall) -+ stop -+ ;; -+is-installed) -+ status -+ ;; -+*) -+ echo $"Usage: $0 {install|uninstall|is-installed}" -+ return 2 -+esac -diff --git a/src/hooks/abrt-install-ccpp-hook.in b/src/hooks/abrt-install-ccpp-hook.in -deleted file mode 100755 -index 9c7df75..0000000 ---- a/src/hooks/abrt-install-ccpp-hook.in -+++ /dev/null -@@ -1,107 +0,0 @@ --#!/bin/bash --# Install coredump handler which saves segfault data -- --# For debugging -- --dry_run=false --verbose=false -- --DEFAULT_LOCATION=/var/spool/abrt -- --DUMP_LOCATION=`cat @sysconfdir@/abrt/abrt.conf | grep '^[ ]*DumpLocation'` --DUMP_LOCATION=${DUMP_LOCATION#*DumpLocation*=} --DUMP_LOCATION=${DUMP_LOCATION// /} -- --if [ "$DUMP_LOCATION" = "" ]; then -- DUMP_LOCATION=$DEFAULT_LOCATION --fi -- --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/libexec/abrt-hook-ccpp" --# Must match percent_specifiers[] order in abrt-hook-ccpp.c: --PATTERN="|$HOOK_BIN $DUMP_LOCATION %s %c %p %u %g %t %e" --# Same, but with bogus "executable name" parameter --PATTERN1="|$HOOK_BIN $DUMP_LOCATION %s %c %p %u %g %t e" -- --# 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 --# process will be available for dump_helper. --# 4 - means that 4 dump_helpers can run at the same time (the rest will also --# run, but they will fail to read /proc/). --# --# This should be enough for ABRT, we can miss some crashes, but what are --# the odds that more processes crash at the same time? And moreover, --# do people want to save EVERY ONE of the crashes when they have --# a crash storm? I don't think so. --# The value of 4 has been recommended by nhorman. --# --CORE_PIPE_LIMIT_FILE="/proc/sys/kernel/core_pipe_limit" --CORE_PIPE_LIMIT="4" -- --start() { -- cur=`cat "$PATTERN_FILE"` -- cur_first=`printf "%s" "$cur" | sed 's/ .*//'` -- -- # Is there a %e (executable name) in old pattern anywhere? -- if test x"${cur#.*%e}" = x"${cur}"; then -- # No. Can use PATTERN with less risk of overflow -- # on expansion (executable names can be LONG). -- # Overflow would cause kernel to abort coredump. BAD. -- PATTERN="$PATTERN1" -- fi -- -- $verbose && printf "cur:'%s'\n" "$cur" -- # Is it already installed? -- if test x"$cur_first" != x"|$HOOK_BIN"; then # no -- # It is not installed -- mkdir -p -- "$SAVED_PATTERN_DIR" -- printf "%s\n" "$cur" >"$SAVED_PATTERN_FILE" -- # Install new handler -- $verbose && printf "Installing to %s:'%s'\n" "$PATTERN_FILE" "$PATTERN" -- $dry_run || echo "$PATTERN" >"$PATTERN_FILE" -- -- # Check core_pipe_limit and change it if it's 0, -- # otherwise the abrt-hook-ccpp won't be able to read /proc/ -- # of the crashing process -- if test x"`cat "$CORE_PIPE_LIMIT_FILE"`" = x"0"; then -- echo "$CORE_PIPE_LIMIT" >"$CORE_PIPE_LIMIT_FILE" -- fi -- fi --} -- --stop() { -- if test -f "$SAVED_PATTERN_FILE"; then -- $verbose && printf "Restoring to %s:'%s'\n" "$PATTERN_FILE" "`cat "$SAVED_PATTERN_FILE"`" -- $dry_run || cat "$SAVED_PATTERN_FILE" >"$PATTERN_FILE" -- fi --} -- --status() { -- cur=`cat "$PATTERN_FILE"` -- cur_first=`printf "%s" "$cur" | sed 's/ .*//'` -- # Is it already installed? -- if test x"$cur_first" = x"|$HOOK_BIN"; then # yes -- $verbose && printf "Installed\n" -- return 0 -- else -- $verbose && printf "Not installed\n" -- return 1 -- fi --} -- --case "$1" in --install) -- start -- ;; --uninstall) -- stop -- ;; --is-installed) -- status -- ;; --*) -- echo $"Usage: $0 {install|uninstall|is-installed}" -- return 2 --esac --- -1.7.6 - diff --git a/abrt.spec b/abrt.spec index e3fce5a..97c1f69 100644 --- a/abrt.spec +++ b/abrt.spec @@ -10,7 +10,7 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.0.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/System URL: https://fedorahosted.org/abrt/ @@ -20,8 +20,6 @@ Source2: abrt-ccpp.init Source3: abrt-oops.init Patch0: blacklist.patch Patch1: allow_bz_for_koops.patch -Patch2: 0001-install-debuginfo-ask-before-downloading.patch -Patch3: 0002-install-debuginfo-do-not-ask-when-y-is-specified.patch Patch4: 0003-Revert-remove-bashism-from-ccpp-hook.patch Patch5: 0004-Revert-Merge-branch-daemon-dump-location.patch Patch6: 0005-abrt-server-ccpp_hook-enlarge-spool-dir-pruning-thre.patch @@ -219,13 +217,11 @@ Virtual package to make easy default installation on desktop environments. %setup -q %patch0 -p1 -b .blacklist %patch1 -p1 -b .bz_for_oops -%patch2 -p1 -b .install-debuginfo-ask-before-downloading -%patch3 -p1 -b .install-debuginfo-do-not-ask-when-y-is-specified %patch4 -p1 -b .Revert-remove-bashism-from-ccpp-hook %patch5 -p1 -b .Revert-Merge-branch-daemon-dump-location -# patch6 -p1 -b .abrt-server-ccpp_hook-enlarge-spool-dir-pruning-thre -# patch7 -p1 -b .rhbz-671354-RFE-Configurable-core-dump-location.patch -# patch8 -p1 -b .abrtd-pipe-post-create-output-to-log.-Closes-bz-6991.patch +%patch6 -p1 -b .abrt-server-ccpp_hook-enlarge-spool-dir-pruning-thre +%patch7 -p1 -b .rhbz-671354-RFE-Configurable-core-dump-location.patch +%patch8 -p1 -b .abrtd-pipe-post-create-output-to-log.-Closes-bz-6991.patch %build @@ -528,6 +524,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %defattr(-,root,root,-) %changelog +* Fri Sep 09 2011 Nikola Pajkovsky 2.0.3-3 +- #726192 - fix traceback introduced in previous update + * Mon Sep 05 2011 Nikola Pajkovsky 2.0.3-2 - #715456 - Unrecognized variable 'DumpLocation' in '/etc/abrt/abrt.conf' - #726192 - -y does not work with abrt-action-install-debuginfo-to-abrt-cache