- related to trac#927
Signed-off-by: Jakub Filak jfilak@redhat.com --- configure.ac | 2 ++ src/hooks/Makefile.am | 1 + src/hooks/abrt-harvest-vmcore.in | 2 +- src/lib/Makefile.am | 1 + src/lib/abrt_conf.c | 2 +- 5 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac index 8d20b66..8de1a74 100644 --- a/configure.ac +++ b/configure.ac @@ -107,12 +107,14 @@ PLUGINS_CONF_DIR='${sysconfdir}/${PACKAGE_NAME}/plugins' EVENTS_DIR='${sysconfdir}/libreport/events' EVENTS_CONF_DIR='${sysconfdir}/libreport/events.d' ENABLE_SOCKET_OR_DBUS='-DENABLE_DBUS=1' +DEFAULT_DUMP_LOCATION='${localstatedir}/spool/abrt'
AC_SUBST(CONF_DIR) AC_SUBST(VAR_RUN) AC_SUBST(PLUGINS_CONF_DIR) AC_SUBST(EVENTS_CONF_DIR) AC_SUBST(EVENTS_DIR) +AC_SUBST(DEFAULT_DUMP_LOCATION)
# Initialize the test suite. AC_CONFIG_TESTDIR(tests) diff --git a/src/hooks/Makefile.am b/src/hooks/Makefile.am index fe0c8db..354dbfc 100644 --- a/src/hooks/Makefile.am +++ b/src/hooks/Makefile.am @@ -59,4 +59,5 @@ abrt-install-ccpp-hook: abrt-install-ccpp-hook.in
abrt-harvest-vmcore: abrt-harvest-vmcore.in sed -e s,@CONF_DIR@,$(CONF_DIR),g \ + -e s,@DEFAULT_DUMP_LOCATION@,$(DEFAULT_DUMP_LOCATION),g \ $< >$@ diff --git a/src/hooks/abrt-harvest-vmcore.in b/src/hooks/abrt-harvest-vmcore.in index 3c463df..60d3c43 100644 --- a/src/hooks/abrt-harvest-vmcore.in +++ b/src/hooks/abrt-harvest-vmcore.in @@ -25,7 +25,7 @@ CopyVMcore=`sed -n '/^CopyVMcore[ \t]*=/ s/.*=[ \t]*//p' @CONF_DIR@/abrt-harvest ABRTDumpDir=`sed -n '/^DumpLocation [ \t]*=/ s/.*=[ \t]*//p' @CONF_DIR@/abrt.conf 2>/dev/null`
if test -z "$ABRTDumpDir"; then - ABRTDumpDir="/var/spool/abrt" + ABRTDumpDir="@DEFAULT_DUMP_LOCATION@" fi
move_core=false diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index fbf784d..89ce517 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -20,6 +20,7 @@ libabrt_la_CPPFLAGS = \ -DVAR_RUN="$(VAR_RUN)" \ -DCONF_DIR="$(CONF_DIR)" \ -DEVENTS_DIR="$(EVENTS_DIR)" \ + -DDEFAULT_DUMP_LOCATION="$(DEFAULT_DUMP_LOCATION)" \ $(GLIB_CFLAGS) \ $(LIBREPORT_CFLAGS) \ $(GIO_CFLAGS) \ diff --git a/src/lib/abrt_conf.c b/src/lib/abrt_conf.c index 9774f6b..f9d11a2 100644 --- a/src/lib/abrt_conf.c +++ b/src/lib/abrt_conf.c @@ -65,7 +65,7 @@ static void ParseCommon(map_string_h *settings, const char *conf_filename) g_hash_table_remove(settings, "DumpLocation"); } else - g_settings_dump_location = xstrdup("/var/spool/abrt"); + g_settings_dump_location = xstrdup(DEFAULT_DUMP_LOCATION);
value = g_hash_table_lookup(settings, "DeleteUploaded"); if (value)