You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

219 lines
9.4 KiB

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