Blame SOURCES/0007-define-DBus-config-interfaces-for-all-plugins.patch

4b6aa8
From 3aa2a3446370dfade43f7b0e66769676edb3ef11 Mon Sep 17 00:00:00 2001
4b6aa8
From: Jakub Filak <jfilak@redhat.com>
4b6aa8
Date: Thu, 16 Jan 2014 16:03:19 +0100
4b6aa8
Subject: [LIBREPORT PATCH 07/11] define DBus config interfaces for all plugins
4b6aa8
4b6aa8
Closes #228
4b6aa8
Related to abrt/abrt#751
4b6aa8
Related to rhbz#1055610
4b6aa8
4b6aa8
Signed-off-by: Jakub Filak <jfilak@redhat.com>
4b6aa8
---
4b6aa8
 configure.ac                                            | 10 ++++++++++
4b6aa8
 doc/Makefile.am                                         |  2 ++
4b6aa8
 doc/plugins-dbus/Makefile.am                            | 13 +++++++++++++
4b6aa8
 .../com.redhat.problems.configuration.bugzilla.xml.in   | 17 +++++++++++++++++
4b6aa8
 .../com.redhat.problems.configuration.mailx.xml.in      | 14 ++++++++++++++
4b6aa8
 .../com.redhat.problems.configuration.rhtsupport.xml.in | 16 ++++++++++++++++
4b6aa8
 .../com.redhat.problems.configuration.ureport.xml.in    | 13 +++++++++++++
4b6aa8
 src/plugins/Makefile.am                                 | 12 ++++++++----
4b6aa8
 8 files changed, 93 insertions(+), 4 deletions(-)
4b6aa8
 create mode 100644 doc/plugins-dbus/Makefile.am
4b6aa8
 create mode 100644 doc/plugins-dbus/com.redhat.problems.configuration.bugzilla.xml.in
4b6aa8
 create mode 100644 doc/plugins-dbus/com.redhat.problems.configuration.mailx.xml.in
4b6aa8
 create mode 100644 doc/plugins-dbus/com.redhat.problems.configuration.rhtsupport.xml.in
4b6aa8
 create mode 100644 doc/plugins-dbus/com.redhat.problems.configuration.ureport.xml.in
4b6aa8
4b6aa8
diff --git a/configure.ac b/configure.ac
4b6aa8
index c372c7f..1c9c7ce 100644
4b6aa8
--- a/configure.ac
4b6aa8
+++ b/configure.ac
4b6aa8
@@ -211,6 +211,7 @@ CONF_DIR='${sysconfdir}/${PACKAGE_NAME}'
4b6aa8
 VAR_RUN='${localstatedir}/run'
4b6aa8
 PLUGINS_CONF_DIR='${sysconfdir}/${PACKAGE_NAME}/plugins'
4b6aa8
 REPORT_PLUGINS_CONF_DIR='${sysconfdir}/libreport/plugins'
4b6aa8
+DEFAULT_REPORT_PLUGINS_CONF_DIR='${datadir}/${PACKAGE_NAME}/conf.d/plugins'
4b6aa8
 EVENTS_DIR='${pkgdatadir}/events'
4b6aa8
 EVENTS_DEFINITION_DIR='${sysconfdir}/${PACKAGE_NAME}/events.d'
4b6aa8
 EVENTS_CONF_DIR='${sysconfdir}/${PACKAGE_NAME}/events'
4b6aa8
@@ -258,6 +259,13 @@ AC_ARG_ENABLE([userownsdumpdir],
4b6aa8
                               [Configure abrt to be owner of dump directories (default: user owns dump dir)])],
4b6aa8
               [DUMP_DIR_OWNED_BY_USER=0])
4b6aa8
 
4b6aa8
+
4b6aa8
+AC_ARG_WITH([dbusinterfacedir],
4b6aa8
+                AS_HELP_STRING([--with-dbusinterfacedir=DIR], [Directory for dbus interface files]),
4b6aa8
+                        [], [with_dbusinterfacedir=${datadir}/dbus-1/interfaces])
4b6aa8
+AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
4b6aa8
+
4b6aa8
+
4b6aa8
 AC_ARG_ENABLE(doxygen-docs,
4b6aa8
     AS_HELP_STRING([--enable-doxygen-docs],
4b6aa8
 	[build DOXYGEN documentation (requires Doxygen)]),
4b6aa8
@@ -292,6 +300,7 @@ AC_SUBST(CONF_DIR)
4b6aa8
 AC_SUBST(VAR_RUN)
4b6aa8
 AC_SUBST(PLUGINS_CONF_DIR)
4b6aa8
 AC_SUBST(REPORT_PLUGINS_CONF_DIR)
4b6aa8
+AC_SUBST(DEFAULT_REPORT_PLUGINS_CONF_DIR)
4b6aa8
 AC_SUBST(EVENTS_DEFINITION_DIR)
4b6aa8
 AC_SUBST(EVENTS_CONF_DIR)
4b6aa8
 AC_SUBST(EVENTS_DIR)
4b6aa8
@@ -331,6 +340,7 @@ AC_CONFIG_FILES([
4b6aa8
 	src/client-python/Makefile
4b6aa8
 	po/Makefile.in
4b6aa8
 	doc/Makefile
4b6aa8
+	doc/plugins-dbus/Makefile
4b6aa8
 	src/workflows/Makefile
4b6aa8
 ])
4b6aa8
 
4b6aa8
diff --git a/doc/Makefile.am b/doc/Makefile.am
4b6aa8
index 96964f0..7eb3065 100644
4b6aa8
--- a/doc/Makefile.am
4b6aa8
+++ b/doc/Makefile.am
4b6aa8
@@ -1,3 +1,5 @@
4b6aa8
+SUBDIRS = plugins-dbus
4b6aa8
+
4b6aa8
 # silent rules for ASCIIDOC and XMLTO
4b6aa8
 ASCIIDOC_SILENT = $(ASCIIDOC_SILENT_$(V))
4b6aa8
 ASCIIDOC_SILENT_ = $(ASCIIDOC_SILENT_$(AM_DEFAULT_VERBOSITY))
4b6aa8
diff --git a/doc/plugins-dbus/Makefile.am b/doc/plugins-dbus/Makefile.am
4b6aa8
new file mode 100644
4b6aa8
index 0000000..5624e81
4b6aa8
--- /dev/null
4b6aa8
+++ b/doc/plugins-dbus/Makefile.am
4b6aa8
@@ -0,0 +1,13 @@
4b6aa8
+INTERFACES_DIST_FILES=$(wildcard *.xml.in)
4b6aa8
+
4b6aa8
+%.xml: %.xml.in
4b6aa8
+	cp $< $@
4b6aa8
+
4b6aa8
+dbusplugininterfacesdir = ${dbusinterfacedir}
4b6aa8
+dist_dbusplugininterfaces_DATA = \
4b6aa8
+	com.redhat.problems.configuration.bugzilla.xml \
4b6aa8
+	com.redhat.problems.configuration.mailx.xml \
4b6aa8
+	com.redhat.problems.configuration.rhtsupport.xml \
4b6aa8
+	com.redhat.problems.configuration.ureport.xml
4b6aa8
+
4b6aa8
+EXTRA_DIST = ${INTERFACES_DIST_FILES}
4b6aa8
diff --git a/doc/plugins-dbus/com.redhat.problems.configuration.bugzilla.xml.in b/doc/plugins-dbus/com.redhat.problems.configuration.bugzilla.xml.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..e9302b7
4b6aa8
--- /dev/null
4b6aa8
+++ b/doc/plugins-dbus/com.redhat.problems.configuration.bugzilla.xml.in
4b6aa8
@@ -0,0 +1,17 @@
4b6aa8
+
4b6aa8
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
4b6aa8
+
4b6aa8
+<node name="/com/redhat/problems/configuration/bugzilla">
4b6aa8
+    <annotation name="com.redhat.problems.ConfFile" value="/etc/libreport/plugins/bugzilla.conf" />
4b6aa8
+    <annotation name="com.redhat.problems.DefaultConfFile" value="/usr/share/libreport/conf.d/plugins/bugzilla.conf" />
4b6aa8
+
4b6aa8
+    <interface name="com.redhat.problems.configuration.bugzilla">
4b6aa8
+        <property name="BugzillaURL" type="s" access="readwrite" />
4b6aa8
+        <property name="Login" type="s" access="readwrite" />
4b6aa8
+        <property name="Password" type="s" access="readwrite" />
4b6aa8
+        <property name="SSLVerify" type="b" access="readwrite" />
4b6aa8
+        <property name="DontMatchComponents" type="as" access="readwrite" />
4b6aa8
+        <property name="CreatePrivate" type="b" access="readwrite" />
4b6aa8
+        <property name="PrivateGroup" type="as" access="readwrite" />
4b6aa8
+    </interface>
4b6aa8
+</node>
4b6aa8
diff --git a/doc/plugins-dbus/com.redhat.problems.configuration.mailx.xml.in b/doc/plugins-dbus/com.redhat.problems.configuration.mailx.xml.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..80fd95f
4b6aa8
--- /dev/null
4b6aa8
+++ b/doc/plugins-dbus/com.redhat.problems.configuration.mailx.xml.in
4b6aa8
@@ -0,0 +1,14 @@
4b6aa8
+
4b6aa8
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
4b6aa8
+
4b6aa8
+<node name="/com/redhat/problems/configuration/mailx">
4b6aa8
+    <annotation name="com.redhat.problems.ConfFile" value="/etc/libreport/plugins/mailx.conf" />
4b6aa8
+    <annotation name="com.redhat.problems.DefaultConfFile" value="/usr/share/libreport/conf.d/plugins/mailx.conf" />
4b6aa8
+
4b6aa8
+    <interface name="com.redhat.problems.configuration.mailx">
4b6aa8
+        <property name="Subject" type="s" access="readwrite" />
4b6aa8
+        <property name="EmailFrom" type="s" access="readwrite" />
4b6aa8
+        <property name="EmailTo" type="s" access="readwrite" />
4b6aa8
+        <property name="SendBinaryData" type="b" access="readwrite" />
4b6aa8
+    </interface>
4b6aa8
+</node>
4b6aa8
diff --git a/doc/plugins-dbus/com.redhat.problems.configuration.rhtsupport.xml.in b/doc/plugins-dbus/com.redhat.problems.configuration.rhtsupport.xml.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..58d8084
4b6aa8
--- /dev/null
4b6aa8
+++ b/doc/plugins-dbus/com.redhat.problems.configuration.rhtsupport.xml.in
4b6aa8
@@ -0,0 +1,16 @@
4b6aa8
+
4b6aa8
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
4b6aa8
+
4b6aa8
+<node name="/com/redhat/problems/configuration/rhtsupport">
4b6aa8
+    <annotation name="com.redhat.problems.ConfFile" value="/etc/libreport/plugins/rhtsupport.conf" />
4b6aa8
+    <annotation name="com.redhat.problems.DefaultConfFile" value="/usr/share/libreport/conf.d/plugins/rhtsupport.conf" />
4b6aa8
+
4b6aa8
+    <interface name="com.redhat.problems.configuration.rhtsupport">
4b6aa8
+        <property name="URL" type="s" access="readwrite" />
4b6aa8
+        <property name="Login" type="s" access="readwrite" />
4b6aa8
+        <property name="Password" type="s" access="readwrite" />
4b6aa8
+        <property name="BigFileURL" type="s" access="readwrite" />
4b6aa8
+        <property name="BigSizeMB" type="i" access="readwrite" />
4b6aa8
+        <property name="SSLVerify" type="b" access="readwrite" />
4b6aa8
+    </interface>
4b6aa8
+</node>
4b6aa8
diff --git a/doc/plugins-dbus/com.redhat.problems.configuration.ureport.xml.in b/doc/plugins-dbus/com.redhat.problems.configuration.ureport.xml.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..58498c7
4b6aa8
--- /dev/null
4b6aa8
+++ b/doc/plugins-dbus/com.redhat.problems.configuration.ureport.xml.in
4b6aa8
@@ -0,0 +1,13 @@
4b6aa8
+
4b6aa8
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
4b6aa8
+
4b6aa8
+<node name="/com/redhat/problems/configuration/ureport">
4b6aa8
+    <annotation name="com.redhat.problems.ConfFile" value="/etc/libreport/plugins/ureport.conf" />
4b6aa8
+    <annotation name="com.redhat.problems.DefaultConfFile" value="/usr/share/libreport/conf.d/plugins/ureport.conf" />
4b6aa8
+
4b6aa8
+    <interface name="com.redhat.problems.configuration.ureport">
4b6aa8
+        <property name="URL" type="s" access="readwrite" />
4b6aa8
+        <property name="SSLVerify" type="b" access="readwrite" />
4b6aa8
+        
4b6aa8
+    </interface>
4b6aa8
+</node>
4b6aa8
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
4b6aa8
index 21d237e..7ec5219 100644
4b6aa8
--- a/src/plugins/Makefile.am
4b6aa8
+++ b/src/plugins/Makefile.am
4b6aa8
@@ -23,22 +23,26 @@ pluginsconfdir = $(PLUGINS_CONF_DIR)
4b6aa8
 reportpluginsconfdir = $(REPORT_PLUGINS_CONF_DIR)
4b6aa8
 
4b6aa8
 reporters_plugin_conf =
4b6aa8
+reporters_plugin_format_conf =
4b6aa8
 if BUILD_BUGZILLA
4b6aa8
-reporters_plugin_conf += bugzilla.conf \
4b6aa8
-    bugzilla_format.conf \
4b6aa8
+reporters_plugin_conf += bugzilla.conf
4b6aa8
+reporters_plugin_format_conf += bugzilla_format.conf \
4b6aa8
     bugzilla_formatdup.conf \
4b6aa8
     bugzilla_format_libreport.conf \
4b6aa8
     bugzilla_format_kernel.conf \
4b6aa8
     bugzilla_format_anaconda.conf \
4b6aa8
     bugzilla_formatdup_anaconda.conf
4b6aa8
-
4b6aa8
 endif
4b6aa8
 
4b6aa8
-dist_reportpluginsconf_DATA = $(reporters_plugin_conf) \
4b6aa8
+defaultreportpluginsconfdir = $(DEFAULT_REPORT_PLUGINS_CONF_DIR)
4b6aa8
+dist_defaultreportpluginsconf_DATA = $(reporters_plugin_conf) \
4b6aa8
     rhtsupport.conf \
4b6aa8
     mailx.conf \
4b6aa8
     ureport.conf
4b6aa8
 
4b6aa8
+dist_reportpluginsconf_DATA = $(reporters_plugin_format_conf) \
4b6aa8
+    $(dist_defaultreportpluginsconf_DATA)
4b6aa8
+
4b6aa8
 eventsdir = $(EVENTS_DIR)
4b6aa8
 eventsconfdir = $(EVENTS_CONF_DIR)
4b6aa8
 
4b6aa8
-- 
4b6aa8
1.8.3.1
4b6aa8