If the currently reported application is linked against libgconf, this
event extracts application's configuration from GConf.
---
abrt.spec.in | 2 ++
src/plugins/Makefile.am | 7 +++++--
src/plugins/collect_GConf.xml.in | 7 +++++++
src/plugins/gconf_event.conf | 12 ++++++++++++
4 files changed, 26 insertions(+), 2 deletions(-)
create mode 100644 src/plugins/collect_GConf.xml.in
create mode 100644 src/plugins/gconf_event.conf
diff --git a/abrt.spec.in b/abrt.spec.in
index 5f1eec5..93286bd 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -402,9 +402,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null ||
:
%{_bindir}/abrt-action-list-dsos
%{_sbindir}/abrt-install-ccpp-hook
%{_sysconfdir}/libreport/events.d/ccpp_event.conf
+%{_sysconfdir}/libreport/events.d/gconf_event.conf
%{_sysconfdir}/libreport/events/analyze_LocalGDB.xml
%{_sysconfdir}/libreport/events/collect_xsession_errors.xml
%{_sysconfdir}/libreport/events/collect_Smolt.xml
+%{_sysconfdir}/libreport/events/collect_GConf.xml
%{_mandir}/man*/abrt-action-trim-files.*
%{_mandir}/man*/abrt-action-generate-backtrace.*
%{_mandir}/man*/abrt-action-analyze-backtrace.*
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 42e6c42..c887574 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -28,7 +28,8 @@ dist_events_DATA = \
analyze_LocalGDB.xml \
analyze_RetraceServer.xml \
collect_xsession_errors.xml \
- collect_Smolt.xml
+ collect_Smolt.xml \
+ collect_GConf.xml
@INTLTOOL_XML_RULE@
@@ -40,7 +41,8 @@ dist_eventsconf_DATA = \
koops_event.conf \
python_event.conf \
smart_event.conf \
- smolt_event.conf
+ smolt_event.conf \
+ gconf_event.conf
man_MANS = \
abrt-plugins.7
@@ -77,6 +79,7 @@ EXTRA_DIST = \
$(man1_MANS) \
collect_Smolt.xml.in \
collect_xsession_errors.xml.in \
+ collect_GConf.xml.in \
analyze_LocalGDB.xml.in \
analyze_RetraceServer.xml.in
diff --git a/src/plugins/collect_GConf.xml.in b/src/plugins/collect_GConf.xml.in
new file mode 100644
index 0000000..b30ec97
--- /dev/null
+++ b/src/plugins/collect_GConf.xml.in
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<event>
+ <_name>Collect GConf configuration</_name>
+ <_description>Save configuration from application's GConf
directory</_description>
+ <_long-description>Runs gconftool-2 --recursive-list /apps/executable and saves
it as 'gconf_subtree' element.</_long-description>
+ <creates-items>gconf_subtree</creates-items>
+</event>
diff --git a/src/plugins/gconf_event.conf b/src/plugins/gconf_event.conf
new file mode 100644
index 0000000..4bb7369
--- /dev/null
+++ b/src/plugins/gconf_event.conf
@@ -0,0 +1,12 @@
+EVENT=collect_GConf analyzer=CCpp dso_list~=.*/libgconf-2.*
+ # assumption: gconftool-2 is present because libgconf is
+ executable=`cat executable` &&
+ gconfdir="/apps/${executable##*/}" &&
+ {
+ gconftool-2 --dir-exists=$gconfdir ||
+ { echo "GConf directory $gconfdir does not exist"; exit 1; }
+ } &&
+ gconftool-2 --recursive-list $gconfdir >gconf_subtree &&
+ echo "Element 'gconf_subtree' saved"
+
+
--
1.7.6