Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
This commit is contained in:
Nikola Pajkovsky 2011-09-05 16:50:17 +02:00
commit 8750f036b9
9 changed files with 1577 additions and 2 deletions

View file

@ -0,0 +1,69 @@
From bfa4775f38291b9cbd3248de3a47675f81dcad35 Mon Sep 17 00:00:00 2001
From: Michal Toman <mtoman@redhat.com>
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

View file

@ -0,0 +1,24 @@
From 30c43b8f1ef08afbad106ae43dbea903431228f8 Mon Sep 17 00:00:00 2001
From: Michal Toman <mtoman@redhat.com>
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

View file

@ -0,0 +1,37 @@
From 5ebb242262de0a9d19434f1ab5d881ee2b95627b Mon Sep 17 00:00:00 2001
From: Nikola Pajkovsky <npajkovs@redhat.com>
Date: Mon, 27 Jun 2011 16:42:19 +0200
Subject: [PATCH] Revert "remove bashism from ccpp-hook"
This reverts commit 859c130bf6e1ad927b32068162b07b510599990e.
(cherry picked from commit 71139fc041bb89891c45b4a96872489306c99946)
diff --git a/src/hooks/abrt-install-ccpp-hook.in b/src/hooks/abrt-install-ccpp-hook.in
index b5fac3d..9c7df75 100755
--- a/src/hooks/abrt-install-ccpp-hook.in
+++ b/src/hooks/abrt-install-ccpp-hook.in
@@ -8,17 +8,12 @@ verbose=false
DEFAULT_LOCATION=/var/spool/abrt
-wspace='[ ]*'
-DUMP_LOCATION=`grep "^${wspace}DumpLocation${wspace}=" @sysconfdir@/abrt/abrt.conf \
- | sed -e "s/^${wspace}DumpLocation${wspace}=${wspace}//" -e "s/${wspace}\$//"`
+DUMP_LOCATION=`cat @sysconfdir@/abrt/abrt.conf | grep '^[ ]*DumpLocation'`
+DUMP_LOCATION=${DUMP_LOCATION#*DumpLocation*=}
+DUMP_LOCATION=${DUMP_LOCATION// /}
-if [ x"$DUMP_LOCATION" = x"" ]; then
+if [ "$DUMP_LOCATION" = "" ]; then
DUMP_LOCATION=$DEFAULT_LOCATION
-else
- if [ x"${DUMP_LOCATION#* }" != x"$DUMP_LOCATION" ]; then
- # DUMP_LOCATION has a space.
- DUMP_LOCATION=$DEFAULT_LOCATION
- fi
fi
PATTERN_FILE="/proc/sys/kernel/core_pattern"
--
1.7.6

View file

@ -0,0 +1,263 @@
From a2afee1970cc9bf4f7563a8002741a8f07e58bb2 Mon Sep 17 00:00:00 2001
From: Nikola Pajkovsky <npajkovs@redhat.com>
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/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/<pid> 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/<pid>).
+#
+# 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/<pid>
+ # 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/<pid> 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/<pid>).
-#
-# 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/<pid>
- # 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

View file

@ -0,0 +1,275 @@
From a2afee1970cc9bf4f7563a8002741a8f07e58bb2 Mon Sep 17 00:00:00 2001
From: Nikola Pajkovsky <npajkovs@redhat.com>
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/<pid> 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/<pid>).
+#
+# 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/<pid>
+ # 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/<pid> 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/<pid>).
-#
-# 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/<pid>
- # 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

View file

@ -0,0 +1,82 @@
From 4f9e8ee289be1061b0fa3cf558b3057522f31bdb Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <dvlasenk@redhat.com>
Date: Sun, 17 Jul 2011 11:46:45 +0200
Subject: [PATCH] abrt-server/ccpp_hook: enlarge spool dir pruning threshold.
Closes bz#692474
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
(cherry picked from commit c20d967744f1dbbc7d747d8f5d50886f3aefe2bd)
diff --git a/src/daemon/abrt-server.c b/src/daemon/abrt-server.c
index 20caaae..8153ad6 100644
--- a/src/daemon/abrt-server.c
+++ b/src/daemon/abrt-server.c
@@ -143,14 +143,15 @@ static int create_debug_dump()
/* Trim old crash dumps if necessary */
load_abrt_conf();
free_abrt_conf_data(); /* can do this because we need only g_settings_nMaxCrashReportsSize */
- /* x1.25: go a bit up, so that usual in-daemon trimming
- * kicks in first, and we don't "fight" with it:
- */
- g_settings_nMaxCrashReportsSize += g_settings_nMaxCrashReportsSize / 4;
if (g_settings_nMaxCrashReportsSize > 0)
{
- check_free_space(g_settings_nMaxCrashReportsSize);
- trim_debug_dumps(DEBUG_DUMPS_DIR, g_settings_nMaxCrashReportsSize * (double)(1024*1024), path);
+ /* x1.25 and round up to 64m: go a bit up, so that usual in-daemon trimming
+ * kicks in first, and we don't "fight" with it:
+ */
+ unsigned maxsize = g_settings_nMaxCrashReportsSize + g_settings_nMaxCrashReportsSize / 4;
+ maxsize |= 63;
+ check_free_space(maxsize);
+ trim_debug_dumps(DEBUG_DUMPS_DIR, maxsize * (double)(1024*1024), path);
}
free(path);
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
index f9a72a6..da3b337 100644
--- a/src/hooks/abrt-hook-ccpp.c
+++ b/src/hooks/abrt-hook-ccpp.c
@@ -406,10 +406,6 @@ int main(int argc, char** argv)
/* Parse abrt.conf */
load_abrt_conf();
free_abrt_conf_data(); /* can do this because we need only g_settings_nMaxCrashReportsSize */
- /* x1.25: go a bit up, so that usual in-daemon trimming
- * kicks in first, and we don't "fight" with it:
- */
- g_settings_nMaxCrashReportsSize += g_settings_nMaxCrashReportsSize / 4;
/* ... and plugins/CCpp.conf */
bool setting_MakeCompatCore;
bool setting_SaveBinaryImage;
@@ -474,8 +470,12 @@ int main(int argc, char** argv)
if (g_settings_nMaxCrashReportsSize > 0)
{
- g_settings_nMaxCrashReportsSize += g_settings_nMaxCrashReportsSize / 4;
- check_free_space(g_settings_nMaxCrashReportsSize);
+ /* x1.25 and round up to 64m: go a bit up, so that usual in-daemon trimming
+ * kicks in first, and we don't "fight" with it:
+ */
+ unsigned maxsize = g_settings_nMaxCrashReportsSize + g_settings_nMaxCrashReportsSize / 4;
+ maxsize |= 63;
+ check_free_space(maxsize);
}
char path[PATH_MAX];
@@ -662,7 +662,12 @@ int main(int argc, char** argv)
/* rhbz#539551: "abrt going crazy when crashing process is respawned" */
if (g_settings_nMaxCrashReportsSize > 0)
{
- trim_debug_dumps(DEBUG_DUMPS_DIR, g_settings_nMaxCrashReportsSize * (double)(1024*1024), path);
+ /* x1.25 and round up to 64m: go a bit up, so that usual in-daemon trimming
+ * kicks in first, and we don't "fight" with it:
+ */
+ unsigned maxsize = g_settings_nMaxCrashReportsSize + g_settings_nMaxCrashReportsSize / 4;
+ maxsize |= 63;
+ trim_debug_dumps(DEBUG_DUMPS_DIR, maxsize * (double)(1024*1024), path);
}
return 0;
--
1.7.6

View file

@ -0,0 +1,731 @@
From 9bbdff4c7e766743a74e204f464f75936656fae7 Mon Sep 17 00:00:00 2001
From: Nikola Pajkovsky <npajkovs@redhat.com>
Date: Wed, 20 Jul 2011 14:45:42 +0200
Subject: [PATCH] rhbz#671354 - [RFE] Configurable core dump location
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
(cherry picked from commit 6c1e469bb663bde9501ed62dbec68fbff65aadbf)
Conflicts:
src/cli/Makefile.am
src/cli/list.c
src/hooks/abrt-hook-ccpp.c
src/lib/Makefile.am
src/lib/abrt_conf.c
diff --git a/configure.ac b/configure.ac
index d53bcd1..21cc302 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,14 +100,8 @@ PLUGINS_LIB_DIR='${libdir}/${PACKAGE_NAME}'
ENABLE_SOCKET_OR_DBUS='-DENABLE_DBUS=1'
LIBEXEC_DIR='${libexecdir}'
-DEBUG_DUMPS_DIR='${localstatedir}/spool/${PACKAGE_NAME}'
DEBUG_INFO_DIR='${localstatedir}/cache/${PACKAGE_NAME}-di'
-AC_ARG_WITH(debugdumpsdir,
- [AS_HELP_STRING([--with-debugdumpdir=DIR],
- [Directory where debugdumps are created])],
- [DEBUG_DUMPS_DIR="$withval"])
-
AC_ARG_WITH(debuginfosdir,
[AS_HELP_STRING([--with-debuginfodir=DIR],
[Directory where debuginfo is stored])],
@@ -120,7 +114,6 @@ AC_SUBST(REPORT_PLUGINS_CONF_DIR)
AC_SUBST(EVENTS_CONF_DIR)
AC_SUBST(EVENTS_DIR)
AC_SUBST(PLUGINS_LIB_DIR)
-AC_SUBST(DEBUG_DUMPS_DIR)
AC_SUBST(DEBUG_INFO_DIR)
AC_SUBST(LIBEXEC_DIR)
diff --git a/src/applet/Makefile.am b/src/applet/Makefile.am
index db5266d..247bee2 100644
--- a/src/applet/Makefile.am
+++ b/src/applet/Makefile.am
@@ -9,7 +9,6 @@ abrt_applet_CPPFLAGS = \
-DBIN_DIR=\"$(bindir)\" \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-DICON_DIR=\"${datadir}/abrt/icons/hicolor/48x48/status\" \
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index 9f4db01..70a1641 100644
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
@@ -23,7 +23,6 @@ abrtd_CPPFLAGS = \
-DBIN_DIR=\"$(bindir)\" \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
@@ -47,7 +46,6 @@ abrt_server_CPPFLAGS = \
-DBIN_DIR=\"$(bindir)\" \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
@@ -69,7 +67,6 @@ abrt_action_save_package_data_CPPFLAGS = \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DLOCALSTATEDIR='"$(localstatedir)"' \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
diff --git a/src/daemon/abrt-server.c b/src/daemon/abrt-server.c
index 8153ad6..78e4ebd 100644
--- a/src/daemon/abrt-server.c
+++ b/src/daemon/abrt-server.c
@@ -100,7 +100,8 @@ static int create_debug_dump()
This directory is renamed to final directory name after
all files have been stored into it.
*/
- char *path = xasprintf(DEBUG_DUMPS_DIR"/%s-%s-%u.new",
+ char *path = xasprintf("%s/%s-%s-%u.new",
+ g_settings_dump_location,
dir_basename,
iso_date_string(NULL),
pid);
@@ -150,8 +151,8 @@ static int create_debug_dump()
*/
unsigned maxsize = g_settings_nMaxCrashReportsSize + g_settings_nMaxCrashReportsSize / 4;
maxsize |= 63;
- check_free_space(maxsize);
- trim_debug_dumps(DEBUG_DUMPS_DIR, maxsize * (double)(1024*1024), path);
+ check_free_space(maxsize, g_settings_dump_location);
+ trim_debug_dumps(g_settings_dump_location, maxsize * (double)(1024*1024), path);
}
free(path);
@@ -162,15 +163,19 @@ static int create_debug_dump()
/* Remove dump dir */
static int delete_path(const char *dump_dir_name)
{
- /* If doesn't start with "DEBUG_DUMPS_DIR/"... */
- if (strncmp(dump_dir_name, DEBUG_DUMPS_DIR"/", strlen(DEBUG_DUMPS_DIR"/")) != 0
+ /* If doesn't start with "g_settings_dump_location/"... */
+ char *dump_location = xasprintf("%s/", g_settings_dump_location);
+ log("%s", dump_location);
+ if (strncmp(dump_dir_name, dump_location, strlen(dump_location)) != 0
/* or contains "/." anywhere (-> might contain ".." component) */
- || strstr(dump_dir_name + strlen(DEBUG_DUMPS_DIR), "/.")
+ || strstr(dump_dir_name + strlen(g_settings_dump_location), "/.")
) {
/* Then refuse to operate on it (someone is attacking us??) */
error_msg("Bad dump directory name '%s', not deleting", dump_dir_name);
+ free(dump_location);
return 400; /* Bad Request */
}
+ free(dump_location);
struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
if (!dd)
@@ -491,10 +496,14 @@ int main(int argc, char **argv)
client_uid = cr.uid;
}
+ load_abrt_conf();
+
int r = perform_http_xact();
if (r == 0)
r = 200;
+ free_abrt_conf_data();
+
printf("HTTP/1.1 %u \r\n\r\n", r);
return (r >= 400); /* Error if 400+ */
diff --git a/src/daemon/abrt.conf b/src/daemon/abrt.conf
index cb0dbbb..58a7019 100644
--- a/src/daemon/abrt.conf
+++ b/src/daemon/abrt.conf
@@ -27,3 +27,8 @@ BlackListedPaths = /usr/share/doc/*,*/example*
# Max size for crash storage [MiB] or 0 for unlimited
#
MaxCrashReportsSize = 1000
+
+# Specify where you want to store coredumps and all files which are needed for
+# reporting. (default:/var/spool/abrt)
+#
+#DumpLocation = /var/spool/abrt
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
index 8a22ab8..3da3130 100644
--- a/src/daemon/abrtd.c
+++ b/src/daemon/abrtd.c
@@ -290,7 +290,7 @@ static int is_crash_a_dup(const char *dump_dir_name, void *param)
/* Scan crash dumps looking for a dup */
//TODO: explain why this is safe wrt concurrent runs
- DIR *dir = opendir(DEBUG_DUMPS_DIR);
+ DIR *dir = opendir(g_settings_dump_location);
if (dir != NULL)
{
struct dirent *dent;
@@ -301,7 +301,7 @@ static int is_crash_a_dup(const char *dump_dir_name, void *param)
int different;
char *uid, *uuid;
- char *dump_dir_name2 = concat_path_file(DEBUG_DUMPS_DIR, dent->d_name);
+ char *dump_dir_name2 = concat_path_file(g_settings_dump_location, dent->d_name);
if (strcmp(dump_dir_name, dump_dir_name2) == 0)
goto next; /* we are never a dup of ourself */
@@ -518,7 +518,8 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
if (fork() == 0)
{
xchdir(dir);
- execlp("abrt-handle-upload", "abrt-handle-upload", DEBUG_DUMPS_DIR, dir, name, (char*)NULL);
+ execlp("abrt-handle-upload", "abrt-handle-upload",
+ g_settings_dump_location, dir, name, (char*)NULL);
error_msg_and_die("Can't execute '%s'", "abrt-handle-upload");
}
}
@@ -543,13 +544,14 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
{
char *worst_dir = NULL;
while (g_settings_nMaxCrashReportsSize > 0
- && get_dirsize_find_largest_dir(DEBUG_DUMPS_DIR, &worst_dir, name) / (1024*1024) >= g_settings_nMaxCrashReportsSize
+ && get_dirsize_find_largest_dir(g_settings_dump_location, &worst_dir, name) / (1024*1024) >= g_settings_nMaxCrashReportsSize
&& worst_dir
) {
- log("Size of '%s' >= %u MB, deleting '%s'", DEBUG_DUMPS_DIR, g_settings_nMaxCrashReportsSize, worst_dir);
+ log("Size of '%s' >= %u MB, deleting '%s'",
+ g_settings_dump_location, g_settings_nMaxCrashReportsSize, worst_dir);
send_dbus_sig_QuotaExceeded(_("The size of the report exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."));
/* deletes both directory and DB record */
- char *d = concat_path_file(DEBUG_DUMPS_DIR, worst_dir);
+ char *d = concat_path_file(g_settings_dump_location, worst_dir);
free(worst_dir);
worst_dir = NULL;
delete_dump_dir(d);
@@ -559,7 +561,7 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
char *fullname = NULL;
problem_data_t *problem_data = NULL;
- fullname = concat_path_file(DEBUG_DUMPS_DIR, name);
+ fullname = concat_path_file(g_settings_dump_location, name);
mw_result_t res = LoadDebugDump(fullname, &problem_data);
const char *first = problem_data ? get_problem_item_content_or_NULL(problem_data, CD_DUMPDIR) : NULL;
switch (res)
@@ -693,7 +695,7 @@ static void sanitize_dump_dir_rights()
* us with thousands of bogus or malicious dumps */
/* 07000 bits are setuid, setgit, and sticky, and they must be unset */
/* 00777 bits are usual "rwxrwxrwx" access rights */
- ensure_writable_dir(DEBUG_DUMPS_DIR, 0755, "abrt");
+ ensure_writable_dir(g_settings_dump_location, 0755, "abrt");
/* debuginfo cache */
ensure_writable_dir(DEBUG_INFO_DIR, 0775, "abrt");
/* temp dir */
@@ -823,10 +825,10 @@ int main(int argc, char** argv)
perror_msg_and_die("inotify_init failed");
close_on_exec_on(inotify_fd);
- /* Watching DEBUG_DUMPS_DIR for new files... */
- if (inotify_add_watch(inotify_fd, DEBUG_DUMPS_DIR, IN_CREATE | IN_MOVED_TO) < 0)
+ /* Watching 'g_settings_dump_location' for new files... */
+ if (inotify_add_watch(inotify_fd, g_settings_dump_location, IN_CREATE | IN_MOVED_TO) < 0)
{
- perror_msg("inotify_add_watch failed on '%s'", DEBUG_DUMPS_DIR);
+ perror_msg("inotify_add_watch failed on '%s'", g_settings_dump_location);
goto init_error;
}
if (g_settings_sWatchCrashdumpArchiveDir)
diff --git a/src/gui-gtk/Makefile.am b/src/gui-gtk/Makefile.am
index 5025082..a2bb755 100644
--- a/src/gui-gtk/Makefile.am
+++ b/src/gui-gtk/Makefile.am
@@ -9,7 +9,6 @@ abrt_gui_CFLAGS = \
-DBIN_DIR=\"$(bindir)\" \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-DICON_DIR=\"${datadir}/abrt/icons/hicolor/48x48/status\" \
@@ -25,7 +24,8 @@ abrt_gui_LDADD = \
-lglib-2.0 \
-lgthread-2.0 \
$(GTK_LIBS) \
- $(LIBREPORT_GTK_LIBS)
+ $(LIBREPORT_GTK_LIBS) \
+ ../lib/libabrt.la
# $(LIBNOTIFY_LIBS)
#test_report_SOURCES = \
diff --git a/src/gui-gtk/main.c b/src/gui-gtk/main.c
index e465d7b..2e45090 100644
--- a/src/gui-gtk/main.c
+++ b/src/gui-gtk/main.c
@@ -721,7 +721,6 @@ int main(int argc, char **argv)
"\b [-vp] [DIR]...\n"
"\n"
"Shows list of ABRT dump directories in specified DIR(s)\n"
- "(default DIRs: "DEBUG_DUMPS_DIR" $HOME/.abrt/spool)"
);
enum {
OPT_v = 1 << 0,
@@ -739,8 +738,9 @@ int main(int argc, char **argv)
GtkWidget *main_window = create_main_window();
+ load_abrt_conf();
const char *default_dirs[] = {
- "/var/spool/abrt",
+ g_settings_dump_location,
NULL,
NULL,
};
@@ -777,5 +777,6 @@ int main(int argc, char **argv)
/* Enter main loop */
gtk_main();
+ free_abrt_conf_data();
return 0;
}
diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am
index 95cd363..f202776 100644
--- a/src/hooks/Makefile.am
+++ b/src/hooks/Makefile.am
@@ -14,7 +14,6 @@ abrt_hook_ccpp_SOURCES = \
abrt_hook_ccpp_CPPFLAGS = \
-I$(srcdir)/../include \
-I$(srcdir)/../lib \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
index da3b337..5d837c3 100644
--- a/src/hooks/abrt-hook-ccpp.c
+++ b/src/hooks/abrt-hook-ccpp.c
@@ -309,13 +309,11 @@ int main(int argc, char** argv)
{
struct stat sb;
- if (argc < 9) /* no argv[8]? */
+ if (argc < 8)
{
- /* percent specifier: %s %c %p %u %g %t %e %h */
- /* argv: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] */
- // [OLD_PATTERN] is deprecated, so removing it from help:
- //error_msg_and_die("Usage: %s DUMPDIR SIGNO CORE_SIZE_LIMIT PID UID GID TIME BINARY_NAME [HOSTNAME [OLD_PATTERN]]", argv[0]);
- error_msg_and_die("Usage: %s DUMPDIR SIGNO CORE_SIZE_LIMIT PID UID GID TIME BINARY_NAME [HOSTNAME]", argv[0]);
+ /* percent specifier: %s %c %p %u %g %t %e %h */
+ /* argv: [0] [1] [2] [3] [4] [5] [6] [7] [8]*/
+ error_msg_and_die("Usage: %s SIGNO CORE_SIZE_LIMIT PID UID GID TIME BINARY_NAME [HOSTNAME]", argv[0]);
}
/* Not needed on 2.6.30.
@@ -337,20 +335,23 @@ int main(int argc, char** argv)
logmode = LOGMODE_SYSLOG;
errno = 0;
- const char* dddir = argv[1];
- const char* signal_str = argv[2];
+ /* Parse abrt.conf */
+ load_abrt_conf();
+
+ const char* signal_str = argv[1];
int signal_no = xatoi_positive(signal_str);
- off_t ulimit_c = strtoull(argv[3], NULL, 10);
+ off_t ulimit_c = strtoull(argv[2], NULL, 10);
if (ulimit_c < 0) /* unlimited? */
{
/* set to max possible >0 value */
ulimit_c = ~((off_t)1 << (sizeof(off_t)*8-1));
}
- pid_t pid = xatoi_positive(argv[4]);
- uid_t uid = xatoi_positive(argv[5]);
+ pid_t pid = xatoi_positive(argv[3]);
+ uid_t uid = xatoi_positive(argv[4]);
if (errno || pid <= 0)
{
- perror_msg_and_die("pid '%s' or limit '%s' is bogus", argv[4], argv[3]);
+ free_abrt_conf_data();
+ perror_msg_and_die("pid '%s' or limit '%s' is bogus", argv[3], argv[2]);
}
FILE *saved_core_pattern = fopen(VAR_RUN"/abrt/saved_core_pattern", "r");
@@ -360,52 +361,27 @@ int main(int argc, char** argv)
fclose(saved_core_pattern);
/* If we have a saved pattern and it's not a "|PROG ARGS" thing... */
if (s && s[0] != '|')
- {
core_basename = s;
- argv[10] = NULL; /* don't use old way to pass OLD_PATTERN */
- }
}
struct utsname uts;
- if (!argv[9]) /* no HOSTNAME? */
+ if (!argv[8]) /* no HOSTNAME? */
{
uname(&uts);
- argv[9] = uts.nodename;
- }
- else /* argv[9]=HOSTNAME exists.*/
- if (argv[10]) /* OLD_PATTERN? (deprecated) */
- {
- char *buf = (char*) xzalloc(strlen(argv[10]) / 2 + 2);
- char *end = hex2bin(buf, argv[10], strlen(argv[10]));
- if (end && end > buf && end[-1] == '\0')
- {
- core_basename = buf;
- //log("core_basename:'%s'", core_basename);
- }
- else
- {
- /* Until recently, kernels were truncating expanded core pattern.
- * In this case, we end up here...
- */
- error_msg("bad old pattern '%s', ignoring and using 'core'", argv[10]);
- /* core_basename = "core"; - already is */
- free(buf);
- }
+ argv[8] = uts.nodename;
}
int src_fd_binary;
char *executable = get_executable(pid, &src_fd_binary);
if (executable && strstr(executable, "/abrt-hook-ccpp"))
{
+ free_abrt_conf_data();
error_msg_and_die("pid %lu is '%s', not dumping it to avoid recursion",
(long)pid, executable);
}
char *user_pwd = get_cwd(pid); /* may be NULL on error */
- /* Parse abrt.conf */
- load_abrt_conf();
- free_abrt_conf_data(); /* can do this because we need only g_settings_nMaxCrashReportsSize */
/* ... and plugins/CCpp.conf */
bool setting_MakeCompatCore;
bool setting_SaveBinaryImage;
@@ -430,7 +406,7 @@ int main(int argc, char** argv)
int user_core_fd = -1;
if (setting_MakeCompatCore && ulimit_c != 0)
/* note: checks "user_pwd == NULL" inside; updates core_basename */
- user_core_fd = open_user_core(user_pwd, uid, pid, &argv[2]);
+ user_core_fd = open_user_core(user_pwd, uid, pid, &argv[1]);
if (executable == NULL)
{
@@ -475,7 +451,7 @@ int main(int argc, char** argv)
*/
unsigned maxsize = g_settings_nMaxCrashReportsSize + g_settings_nMaxCrashReportsSize / 4;
maxsize |= 63;
- check_free_space(maxsize);
+ check_free_space(maxsize, g_settings_dump_location);
}
char path[PATH_MAX];
@@ -483,7 +459,7 @@ int main(int argc, char** argv)
/* Check /var/spool/abrt/last-ccpp marker, do not dump repeated crashes
* if they happen too often. Else, write new marker value.
*/
- snprintf(path, sizeof(path), "%s/last-ccpp", dddir);
+ snprintf(path, sizeof(path), "%s/last-ccpp", g_settings_dump_location);
int fd = open(path, O_RDWR | O_CREAT, 0600);
if (fd >= 0)
{
@@ -502,6 +478,7 @@ int main(int argc, char** argv)
error_msg("not dumping repeating crash in '%s'", executable);
if (setting_MakeCompatCore)
goto create_user_core;
+ free_abrt_conf_data();
return 1;
}
}
@@ -521,7 +498,7 @@ int main(int argc, char** argv)
* and maybe crash again...
* Unlike dirs, mere files are ignored by abrtd.
*/
- snprintf(path, sizeof(path), "%s/%s-coredump", dddir, last_slash);
+ snprintf(path, sizeof(path), "%s/%s-coredump", g_settings_dump_location, last_slash);
int abrt_core_fd = xopen3(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
off_t core_size = copyfd_eof(STDIN_FILENO, abrt_core_fd, COPYFD_SPARSE);
if (core_size < 0 || fsync(abrt_core_fd) != 0)
@@ -529,16 +506,21 @@ int main(int argc, char** argv)
unlink(path);
/* copyfd_eof logs the error including errno string,
* but it does not log file name */
+ free_abrt_conf_data();
error_msg_and_die("error saving coredump to %s", path);
}
log("saved core dump of pid %lu (%s) to %s (%llu bytes)", (long)pid, executable, path, (long long)core_size);
+ free_abrt_conf_data();
return 0;
}
unsigned path_len = snprintf(path, sizeof(path), "%s/ccpp-%s-%lu.new",
- dddir, iso_date_string(NULL), (long)pid);
+ g_settings_dump_location, iso_date_string(NULL), (long)pid);
if (path_len >= (sizeof(path) - sizeof("/"FILENAME_COREDUMP)))
+ {
+ free_abrt_conf_data();
return 1;
+ }
struct dump_dir *dd = dd_create(path, uid, 0640);
if (dd)
@@ -588,6 +570,7 @@ int main(int argc, char** argv)
if (sz < 0 || fsync(dst_fd_binary) != 0)
{
unlink(path);
+ free_abrt_conf_data();
error_msg_and_die("error saving binary image to %s", path);
}
close(dst_fd_binary);
@@ -606,7 +589,8 @@ int main(int argc, char** argv)
unlink(core_basename);
}
errno = sv_errno;
- perror_msg_and_die("can't open '%s'", path);
+ free_abrt_conf_data();
+ perror_msg_and_die("Can't open '%s'", path);
}
fchown(abrt_core_fd, dd->dd_uid, dd->dd_gid);
@@ -636,6 +620,7 @@ int main(int argc, char** argv)
}
/* copyfd_sparse logs the error including errno string,
* but it does not log file name */
+ free_abrt_conf_data();
error_msg_and_die("error writing %s", path);
}
log("saved core dump of pid %lu (%s) to %s (%llu bytes)", (long)pid, executable, path, (long long)core_size);
@@ -667,16 +652,20 @@ int main(int argc, char** argv)
*/
unsigned maxsize = g_settings_nMaxCrashReportsSize + g_settings_nMaxCrashReportsSize / 4;
maxsize |= 63;
- trim_debug_dumps(DEBUG_DUMPS_DIR, maxsize * (double)(1024*1024), path);
+ trim_debug_dumps(g_settings_dump_location, maxsize * (double)(1024*1024), path);
}
+ free_abrt_conf_data();
return 0;
}
/* We didn't create abrt dump, but may need to create compat coredump */
create_user_core:
if (user_core_fd < 0)
+ {
+ free_abrt_conf_data();
return 0;
+ }
off_t core_size = copyfd_size(STDIN_FILENO, user_core_fd, ulimit_c, COPYFD_SPARSE);
if (core_size < 0 || fsync(user_core_fd) != 0) {
@@ -684,15 +673,17 @@ int main(int argc, char** argv)
perror_msg("error writing %s/%s", user_pwd, core_basename);
xchdir(user_pwd);
unlink(core_basename);
+ free_abrt_conf_data();
return 1;
}
if (ulimit_c == 0 || core_size > ulimit_c)
{
xchdir(user_pwd);
unlink(core_basename);
+ free_abrt_conf_data();
return 1;
}
log("saved core dump of pid %lu to %s/%s (%llu bytes)", (long)pid, user_pwd, core_basename, (long long)core_size);
-
+ free_abrt_conf_data();
return 0;
}
diff --git a/src/hooks/abrt-install-ccpp-hook b/src/hooks/abrt-install-ccpp-hook
index 12a443f..2450eba 100755
--- a/src/hooks/abrt-install-ccpp-hook
+++ b/src/hooks/abrt-install-ccpp-hook
@@ -11,9 +11,9 @@ 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"
+PATTERN="|$HOOK_BIN %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"
+PATTERN1="|$HOOK_BIN %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/<pid> of crashing
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 163e7c3..43364dc 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -20,7 +20,6 @@ libabrt_la_CPPFLAGS = \
-I$(srcdir)/../lib \
-DLOCALSTATEDIR='"$(localstatedir)"' \
-DVAR_RUN=\"$(VAR_RUN)\" \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
diff --git a/src/lib/abrt_conf.c b/src/lib/abrt_conf.c
index 2a1cf36..2e13f2d 100644
--- a/src/lib/abrt_conf.c
+++ b/src/lib/abrt_conf.c
@@ -26,6 +26,7 @@ char * g_settings_sWatchCrashdumpArchiveDir = NULL;
unsigned int g_settings_nMaxCrashReportsSize = 1000;
bool g_settings_bProcessUnpackaged = false;
+char * g_settings_dump_location = NULL;
void free_abrt_conf_data()
{
@@ -40,6 +41,9 @@ void free_abrt_conf_data()
free(g_settings_sWatchCrashdumpArchiveDir);
g_settings_sWatchCrashdumpArchiveDir = NULL;
+
+ free(g_settings_dump_location);
+ g_settings_dump_location = NULL;
}
static GList *parse_list(const char* list)
@@ -118,6 +122,14 @@ static void ParseCommon(map_string_h *settings, const char *conf_filename)
g_settings_bProcessUnpackaged = string_to_bool(value);
g_hash_table_remove(settings, "ProcessUnpackaged");
}
+ value = g_hash_table_lookup(settings, "DumpLocation");
+ if (value)
+ {
+ g_settings_dump_location = xstrdup(value);
+ g_hash_table_remove(settings, "DumpLocation");
+ }
+ else
+ g_settings_dump_location = xstrdup("/var/spool/abrt");
GHashTableIter iter;
char *name;
diff --git a/src/lib/abrt_conf.h b/src/lib/abrt_conf.h
index 2ca7542..f45972e 100644
--- a/src/lib/abrt_conf.h
+++ b/src/lib/abrt_conf.h
@@ -37,6 +37,8 @@ extern bool g_settings_bOpenGPGCheck;
extern bool g_settings_bProcessUnpackaged;
#define g_settings_sWatchCrashdumpArchiveDir abrt_g_settings_sWatchCrashdumpArchiveDir
extern char * g_settings_sWatchCrashdumpArchiveDir;
+#define g_settings_dump_location abrt_g_settings_dump_location
+extern char * g_settings_dump_location;
#define load_abrt_conf abrt_load_abrt_conf
int load_abrt_conf();
diff --git a/src/lib/hooklib.c b/src/lib/hooklib.c
index b5fcec2..5ebec97 100644
--- a/src/lib/hooklib.c
+++ b/src/lib/hooklib.c
@@ -19,12 +19,12 @@
#include "internal_libreport.h"
#include "hooklib.h"
-void check_free_space(unsigned setting_MaxCrashReportsSize)
+void check_free_space(unsigned setting_MaxCrashReportsSize, const char *dump_location)
{
struct statvfs vfs;
- if (statvfs(DEBUG_DUMPS_DIR, &vfs) != 0)
+ if (statvfs(dump_location, &vfs) != 0)
{
- perror_msg_and_die("statvfs('%s')", DEBUG_DUMPS_DIR);
+ perror_msg_and_die("statvfs('%s')", dump_location);
}
/* Check that at least MaxCrashReportsSize/4 MBs are free */
@@ -34,7 +34,8 @@ void check_free_space(unsigned setting_MaxCrashReportsSize)
unsigned long fs_free_mb_x4 = ((unsigned long long)vfs.f_bfree / (1024/4)) * vfs.f_bsize / 1024;
if (fs_free_mb_x4 < setting_MaxCrashReportsSize)
{
- error_msg_and_die("aborting dump: only %luMiB is available on %s", fs_free_mb_x4 / 4, DEBUG_DUMPS_DIR);
+ error_msg_and_die("aborting dump: only %luMiB is available on %s",
+ fs_free_mb_x4 / 4, dump_location);
}
}
diff --git a/src/lib/hooklib.h b/src/lib/hooklib.h
index 1add7d0..0cb3f60 100644
--- a/src/lib/hooklib.h
+++ b/src/lib/hooklib.h
@@ -23,7 +23,7 @@ extern "C" {
#endif
#define check_free_space abrt_check_free_space
-void check_free_space(unsigned setting_MaxCrashReportsSize);
+void check_free_space(unsigned setting_MaxCrashReportsSize, const char *dump_location);
#define trim_debug_dumps abrt_trim_debug_dumps
void trim_debug_dumps(const char *dirname, double cap_size, const char *exclude_path);
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 543b424..de75c70 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -119,7 +119,6 @@ abrt_dump_oops_CPPFLAGS = \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DLOCALSTATEDIR='"$(localstatedir)"' \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
@@ -140,7 +139,6 @@ abrt_action_analyze_c_CPPFLAGS = \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DLOCALSTATEDIR='"$(localstatedir)"' \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
@@ -160,7 +158,6 @@ abrt_action_analyze_python_CPPFLAGS = \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DLOCALSTATEDIR='"$(localstatedir)"' \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
@@ -181,7 +178,6 @@ abrt_action_analyze_oops_CPPFLAGS = \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DLOCALSTATEDIR='"$(localstatedir)"' \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
@@ -201,7 +197,6 @@ abrt_action_trim_files_CPPFLAGS = \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DLOCALSTATEDIR='"$(localstatedir)"' \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
@@ -222,7 +217,6 @@ abrt_action_generate_backtrace_CPPFLAGS = \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DLOCALSTATEDIR='"$(localstatedir)"' \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
@@ -242,7 +236,6 @@ abrt_action_analyze_backtrace_CPPFLAGS = \
-DVAR_RUN=\"$(VAR_RUN)\" \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DLOCALSTATEDIR='"$(localstatedir)"' \
- -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
-DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
--
1.7.6

View file

@ -0,0 +1,71 @@
From 36f80f06119888a2fa5403fdb57102378343bc9b Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <dvlasenk@redhat.com>
Date: Sun, 17 Jul 2011 11:00:44 +0200
Subject: [PATCH] abrtd: pipe post-create output to log. Closes bz#699152
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
(cherry picked from commit 92a230c7f996c67f32106f906dec0dd8e9996aca)
Conflicts:
src/lib/abrt_conf.c
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
index 3da3130..d7b3f0e 100644
--- a/src/daemon/abrtd.c
+++ b/src/daemon/abrtd.c
@@ -334,8 +334,11 @@ static int is_crash_a_dup(const char *dump_dir_name, void *param)
static char *do_log(char *log_line, void *param)
{
- VERB1 log("%s", log_line);
- //update_client("%s", log_line);
+ /* We pipe output of post-create events to our log (which usually
+ * includes syslog). Otherwise, errors on post-create result in
+ * "Corrupted or bad dump DIR, deleting" without adequate explanation why.
+ */
+ log("%s", log_line);
return log_line;
}
diff --git a/src/lib/abrt_conf.c b/src/lib/abrt_conf.c
index 2e13f2d..b978854 100644
--- a/src/lib/abrt_conf.c
+++ b/src/lib/abrt_conf.c
@@ -111,8 +111,13 @@ static void ParseCommon(map_string_h *settings, const char *conf_filename)
value = g_hash_table_lookup(settings, "MaxCrashReportsSize");
if (value)
{
-//FIXME: dont die
- g_settings_nMaxCrashReportsSize = xatoi_positive(value);
+ char *end;
+ errno = 0;
+ unsigned long ul = strtoul(value, &end, 10);
+ if (errno || end == value || *end != '\0' || ul > INT_MAX)
+ error_msg("Error parsing %s setting: '%s'", "MaxCrashReportsSize", value);
+ else
+ g_settings_nMaxCrashReportsSize = ul;
g_hash_table_remove(settings, "MaxCrashReportsSize");
}
diff --git a/src/plugins/ccpp_events.conf b/src/plugins/ccpp_events.conf
index 53dc806..c202ba9 100644
--- a/src/plugins/ccpp_events.conf
+++ b/src/plugins/ccpp_events.conf
@@ -9,8 +9,11 @@ EVENT=post-create analyzer=CCpp
test -r /var/log/messages || exit 0
executable=`cat executable` &&
base_executable=${executable##*/} &&
- grep -F -e "$base_executable" /var/log/messages | tail -999 >var_log_messages &&
- echo "Element 'var_log_messages' saved"
+ log=`grep -F -e "$base_executable" /var/log/messages | tail -99` &&
+ if test -n "$log"; then
+ prinf "%s\n" "$log" >var_log_messages
+ # echo "Element 'var_log_messages' saved"
+ fi
)
EVENT=analyze_xsession_errors analyzer=CCpp dso_list~=.*/libX11.*
--
1.7.6

View file

@ -10,7 +10,7 @@
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: 2.0.3
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://fedorahosted.org/abrt/
@ -20,6 +20,13 @@ 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
Patch7: 0006-rhbz-671354-RFE-Configurable-core-dump-location.patch
Patch8: 0007-abrtd-pipe-post-create-output-to-log.-Closes-bz-6991.patch
BuildRequires: dbus-devel
BuildRequires: gtk2-devel
BuildRequires: curl-devel
@ -211,14 +218,24 @@ Virtual package to make easy default installation on desktop environments.
%prep
%setup -q
%patch0 -p1 -b .blacklist
%patch1 -p1 -b bz_for_oops
%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
%build
autoconf
mkdir -p m4
%configure
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
CFLAGS="-fno-strict-aliasing"
make %{?_smp_mflags}
%install
@ -511,6 +528,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%defattr(-,root,root,-)
%changelog
* Mon Sep 05 2011 Nikola Pajkovsky <npajkovs@redhat.com> 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
- #699152 - not logged: "Package 'shotwell' isn't signed with proper key\n"
- #692474 - ABRT2: Exceeded quota is not reported
* Mon Jun 20 2011 Jiri Moskovcak <jmoskovc@redhat.com> - 2.0.3-1
- new upstream release