|
|
4b6aa8 |
From 70a804d6988a99ff85e4ca6e33ccc3de362cb74d Mon Sep 17 00:00:00 2001
|
|
|
4b6aa8 |
From: Jakub Filak <jfilak@redhat.com>
|
|
|
4b6aa8 |
Date: Thu, 6 Feb 2014 10:38:51 +0100
|
|
|
4b6aa8 |
Subject: [LIBREPORT PATCH 19/24] event configuration: load default values from
|
|
|
4b6aa8 |
configuration directory
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
Load event configuration files from EVENT_CONF_DIR, where the files are
|
|
|
4b6aa8 |
actually placed, instead of EVENT_DIR, which contains on XML event
|
|
|
4b6aa8 |
definition files.
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
Closes rhbz#1062135
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
|
4b6aa8 |
---
|
|
|
4b6aa8 |
augeas/libreport.aug | 3 +++
|
|
|
4b6aa8 |
src/lib/Makefile.am | 1 +
|
|
|
4b6aa8 |
src/lib/event_config.c | 10 +++++++++-
|
|
|
4b6aa8 |
3 files changed, 13 insertions(+), 1 deletion(-)
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
diff --git a/augeas/libreport.aug b/augeas/libreport.aug
|
|
|
4b6aa8 |
index 431d3d2..3eba157 100644
|
|
|
4b6aa8 |
--- a/augeas/libreport.aug
|
|
|
4b6aa8 |
+++ b/augeas/libreport.aug
|
|
|
4b6aa8 |
@@ -20,7 +20,10 @@ module Libreport =
|
|
|
4b6aa8 |
let lns = ( comment | empty | option )*
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
let filter = (incl "/etc/libreport/plugins/*")
|
|
|
4b6aa8 |
+ . (incl "/etc/libreport/events/*")
|
|
|
4b6aa8 |
. (incl (Sys.getenv("HOME") . "/.config/abrt/settings/*"))
|
|
|
4b6aa8 |
+ . (incl (Sys.getenv("XDG_CACHE_HOME") . "/abrt/events/*"))
|
|
|
4b6aa8 |
+ . (incl (Sys.getenv("HOME") . "/.cache/abrt/events/*"))
|
|
|
4b6aa8 |
. Util.stdexcl
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
let xfm = transform lns filter
|
|
|
4b6aa8 |
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
|
|
|
4b6aa8 |
index a8ae75c..ac173f6 100644
|
|
|
4b6aa8 |
--- a/src/lib/Makefile.am
|
|
|
4b6aa8 |
+++ b/src/lib/Makefile.am
|
|
|
4b6aa8 |
@@ -64,6 +64,7 @@ libreport_la_CPPFLAGS = \
|
|
|
4b6aa8 |
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
|
|
|
4b6aa8 |
-DCONF_DIR=\"$(CONF_DIR)\" \
|
|
|
4b6aa8 |
-DEVENTS_DIR=\"$(EVENTS_DIR)\" \
|
|
|
4b6aa8 |
+ -DEVENTS_CONF_DIR=\"$(EVENTS_CONF_DIR)\" \
|
|
|
4b6aa8 |
-DWORKFLOWS_DIR=\"$(WORKFLOWS_DIR)\" \
|
|
|
4b6aa8 |
-DBIN_DIR=\"$(bindir)\" \
|
|
|
4b6aa8 |
-DDEFAULT_DUMP_DIR_MODE=$(DEFAULT_DUMP_DIR_MODE) \
|
|
|
4b6aa8 |
diff --git a/src/lib/event_config.c b/src/lib/event_config.c
|
|
|
4b6aa8 |
index 169dd78..6d12695 100644
|
|
|
4b6aa8 |
--- a/src/lib/event_config.c
|
|
|
4b6aa8 |
+++ b/src/lib/event_config.c
|
|
|
4b6aa8 |
@@ -229,7 +229,15 @@ GHashTable *load_event_config_data(void)
|
|
|
4b6aa8 |
event_files = g_list_delete_link(event_files, event_files);
|
|
|
4b6aa8 |
}
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
- load_config_files(EVENTS_DIR);
|
|
|
4b6aa8 |
+ /* EVENTS_DIR -> /usr/share/libreport/events/$EVENT_NAME.xml
|
|
|
4b6aa8 |
+ * - event xml definition files
|
|
|
4b6aa8 |
+ *
|
|
|
4b6aa8 |
+ * EVENTS_CONF_DIR -> /etc/libreport/events/$EVENT_NAME.conf
|
|
|
4b6aa8 |
+ * - default values for xml definitions
|
|
|
4b6aa8 |
+ *
|
|
|
4b6aa8 |
+ * https://fedorahosted.org/abrt/wiki/AbrtConfiguration#Adjustingpluginconfiguration
|
|
|
4b6aa8 |
+ */
|
|
|
4b6aa8 |
+ load_config_files(EVENTS_CONF_DIR);
|
|
|
4b6aa8 |
|
|
|
4b6aa8 |
char *cachedir;
|
|
|
4b6aa8 |
cachedir = concat_path_file(g_get_user_cache_dir(), "abrt/events");
|
|
|
4b6aa8 |
--
|
|
|
4b6aa8 |
1.8.3.1
|
|
|
4b6aa8 |
|