Blame SOURCES/0076-workflow-add-new-workflows.patch

4b6aa8
From 23116ec906199af1106edcc70fa8280730416d0f Mon Sep 17 00:00:00 2001
4b6aa8
From: Matej Habrnal <mhabrnal@redhat.com>
4b6aa8
Date: Wed, 17 Sep 2014 05:54:30 +0200
4b6aa8
Subject: [LIBREPORT PATCH 76/93] workflow: add new workflows
4b6aa8
4b6aa8
Add workflow for logger, mailx and reportuploader. These workflows are disabled
4b6aa8
because the plugins that ships these workflows are installed by default but we
4b6aa8
don't want to offer users these workflows in report-cli/report-gtk by default.
4b6aa8
4b6aa8
Resolves rhbz#1094203
4b6aa8
4b6aa8
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
4b6aa8
Signed-off-by: Jakub Filak <jfilak@redhat.com>
4b6aa8
---
4b6aa8
 doc/Makefile.am                          |  3 ++
4b6aa8
 doc/report_logger.conf.txt               | 47 ++++++++++++++++++++++++++++++++
4b6aa8
 doc/report_mailx.conf.txt                | 46 +++++++++++++++++++++++++++++++
4b6aa8
 doc/report_uploader.conf.txt             | 46 +++++++++++++++++++++++++++++++
4b6aa8
 po/POTFILES.in                           |  5 ++++
4b6aa8
 src/workflows/Makefile.am                | 24 ++++++++++++----
4b6aa8
 src/workflows/report_logger.conf         |  6 ++++
4b6aa8
 src/workflows/report_mailx.conf          |  6 ++++
4b6aa8
 src/workflows/report_uploader.conf       |  6 ++++
4b6aa8
 src/workflows/workflow_Logger.xml.in     | 11 ++++++++
4b6aa8
 src/workflows/workflow_LoggerCCpp.xml.in | 12 ++++++++
4b6aa8
 src/workflows/workflow_Mailx.xml.in      | 11 ++++++++
4b6aa8
 src/workflows/workflow_MailxCCpp.xml.in  | 12 ++++++++
4b6aa8
 src/workflows/workflow_Upload.xml.in     |  3 +-
4b6aa8
 src/workflows/workflow_UploadCCpp.xml.in | 12 ++++++++
4b6aa8
 15 files changed, 243 insertions(+), 7 deletions(-)
4b6aa8
 create mode 100644 doc/report_logger.conf.txt
4b6aa8
 create mode 100644 doc/report_mailx.conf.txt
4b6aa8
 create mode 100644 doc/report_uploader.conf.txt
4b6aa8
 create mode 100644 src/workflows/report_logger.conf
4b6aa8
 create mode 100644 src/workflows/report_mailx.conf
4b6aa8
 create mode 100644 src/workflows/report_uploader.conf
4b6aa8
 create mode 100644 src/workflows/workflow_Logger.xml.in
4b6aa8
 create mode 100644 src/workflows/workflow_LoggerCCpp.xml.in
4b6aa8
 create mode 100644 src/workflows/workflow_Mailx.xml.in
4b6aa8
 create mode 100644 src/workflows/workflow_MailxCCpp.xml.in
4b6aa8
 create mode 100644 src/workflows/workflow_UploadCCpp.xml.in
4b6aa8
4b6aa8
diff --git a/doc/Makefile.am b/doc/Makefile.am
4b6aa8
index 7eb3065..da4785e 100644
4b6aa8
--- a/doc/Makefile.am
4b6aa8
+++ b/doc/Makefile.am
4b6aa8
@@ -48,6 +48,9 @@ MAN5_TXT += report_fedora.conf.txt
4b6aa8
 MAN5_TXT += report_Logger.conf.txt
4b6aa8
 MAN5_TXT += report_rhel.conf.txt
4b6aa8
 MAN5_TXT += report_rhel_bugzilla.conf.txt
4b6aa8
+MAN5_TXT += report_logger.conf.txt
4b6aa8
+MAN5_TXT += report_mailx.conf.txt
4b6aa8
+MAN5_TXT += report_uploader.conf.txt
4b6aa8
 MAN5_TXT += rhtsupport.conf.txt
4b6aa8
 MAN5_TXT += rhtsupport_event.conf.txt
4b6aa8
 MAN5_TXT += uploader_event.conf.txt
4b6aa8
diff --git a/doc/report_logger.conf.txt b/doc/report_logger.conf.txt
4b6aa8
new file mode 100644
4b6aa8
index 0000000..7912e2c
4b6aa8
--- /dev/null
4b6aa8
+++ b/doc/report_logger.conf.txt
4b6aa8
@@ -0,0 +1,47 @@
4b6aa8
+report_logger.conf(5)
4b6aa8
+=====================
4b6aa8
+
4b6aa8
+NAME
4b6aa8
+----
4b6aa8
+report_logger.conf - configuration file for libreport.
4b6aa8
+
4b6aa8
+DESCRIPTION
4b6aa8
+-----------
4b6aa8
+This configuration file specifies which of the work flow definitions
4b6aa8
+are applicable to analyzing problems and export the problem data information to
4b6aa8
+a text file.
4b6aa8
+
4b6aa8
+All applicable work flows are presented to users in User Interface as
4b6aa8
+possibilities for processing of any problems. A particular work flow becomes
4b6aa8
+applicable if its conditions are satisfied.
4b6aa8
+
4b6aa8
+This configuration file consists from condition lines. Each condition line must
4b6aa8
+start with EVENT=workflow_NAME where "workflow_" is constant prefix and
4b6aa8
+"workflow_NAME" is base name of path to reporting work flow configuration file.
4b6aa8
+
4b6aa8
+The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR
4b6aa8
+is a name of problem directory element to be checked (for example,
4b6aa8
+"executable", "package", hostname" etc). The condition may consists from as
4b6aa8
+many element checks as it is necessary.
4b6aa8
+
4b6aa8
+All condition lines in this configuration file are commented out by default.
4b6aa8
+Therefore all applicable work flows from this file are not presented to users in
4b6aa8
+User Interface. For enable this extension uncomment all condition line in this
4b6aa8
+configuration file.
4b6aa8
+
4b6aa8
+EXAMPLES
4b6aa8
+--------
4b6aa8
+Condition line::
4b6aa8
+    EVENT=workflow_LoggerCCpp analyzer=CCpp
4b6aa8
+
4b6aa8
+The condition line above expects existence of
4b6aa8
+/usr/share/libreport/workflows/workflow_LoggerCCpp.xml
4b6aa8
+
4b6aa8
+SEE ALSO
4b6aa8
+--------
4b6aa8
+report-gtk(1)
4b6aa8
+
4b6aa8
+AUTHOR
4b6aa8
+------
4b6aa8
+* ABRT team
4b6aa8
+
4b6aa8
diff --git a/doc/report_mailx.conf.txt b/doc/report_mailx.conf.txt
4b6aa8
new file mode 100644
4b6aa8
index 0000000..9a5e8cb
4b6aa8
--- /dev/null
4b6aa8
+++ b/doc/report_mailx.conf.txt
4b6aa8
@@ -0,0 +1,46 @@
4b6aa8
+report_mailx.conf(5)
4b6aa8
+====================
4b6aa8
+
4b6aa8
+NAME
4b6aa8
+----
4b6aa8
+report_mailx.conf - configuration file for libreport.
4b6aa8
+
4b6aa8
+DESCRIPTION
4b6aa8
+-----------
4b6aa8
+This configuration file specifies which of the work flow definitions
4b6aa8
+are applicable to analyzing problems and send information via email.
4b6aa8
+
4b6aa8
+All applicable work flows are presented to users in User Interface as
4b6aa8
+possibilities for processing of any problems. A particular work flow becomes
4b6aa8
+applicable if its conditions are satisfied.
4b6aa8
+
4b6aa8
+This configuration file consists from condition lines. Each condition line must
4b6aa8
+start with EVENT=workflow_NAME where "workflow_" is constant prefix and
4b6aa8
+"workflow_NAME" is base name of path to reporting work flow configuration file.
4b6aa8
+
4b6aa8
+The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR
4b6aa8
+is a name of problem directory element to be checked (for example,
4b6aa8
+"executable", "package", hostname" etc). The condition may consists
4b6aa8
+from as many element checks as it is necessary.
4b6aa8
+
4b6aa8
+All condition lines in this configuration file are commented out by default.
4b6aa8
+Therefore all applicable work flows from this file are not presented to users in
4b6aa8
+User Interface. For enable this extension uncomment all condition line in this
4b6aa8
+configuration file.
4b6aa8
+
4b6aa8
+EXAMPLES
4b6aa8
+--------
4b6aa8
+Condition line::
4b6aa8
+    EVENT=workflow_MailxCCpp analyzer=CCpp
4b6aa8
+
4b6aa8
+The condition line above expects existence of
4b6aa8
+/usr/share/libreport/workflows/workflow_MailxCCpp.xml
4b6aa8
+
4b6aa8
+SEE ALSO
4b6aa8
+--------
4b6aa8
+report-gtk(1)
4b6aa8
+
4b6aa8
+AUTHOR
4b6aa8
+------
4b6aa8
+* ABRT team
4b6aa8
+
4b6aa8
diff --git a/doc/report_uploader.conf.txt b/doc/report_uploader.conf.txt
4b6aa8
new file mode 100644
4b6aa8
index 0000000..975ea02
4b6aa8
--- /dev/null
4b6aa8
+++ b/doc/report_uploader.conf.txt
4b6aa8
@@ -0,0 +1,46 @@
4b6aa8
+report_uploader.conf(5)
4b6aa8
+=======================
4b6aa8
+
4b6aa8
+NAME
4b6aa8
+----
4b6aa8
+report_uploader.conf - configuration file for libreport.
4b6aa8
+
4b6aa8
+DESCRIPTION
4b6aa8
+-----------
4b6aa8
+This configuration file specifies which of the work flow definitions
4b6aa8
+are applicable to analyzing problems and upload the data via scp or ftp.
4b6aa8
+
4b6aa8
+All applicable work flows are presented to users in User Interface as
4b6aa8
+possibilities for processing of any problems. A particular work flow becomes
4b6aa8
+applicable if its conditions are satisfied.
4b6aa8
+
4b6aa8
+This configuration file consists from condition lines. Each condition line must
4b6aa8
+start with EVENT=workflow_NAME where "workflow_" is constant prefix and
4b6aa8
+"workflow_NAME" is base name of path to reporting work flow configuration file.
4b6aa8
+
4b6aa8
+The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR
4b6aa8
+is a name of problem directory element to be checked (for example,
4b6aa8
+"executable", "package", hostname" etc). The condition may consists
4b6aa8
+from as many element checks as it is necessary.
4b6aa8
+
4b6aa8
+All condition lines in this configuration file are commented out by default.
4b6aa8
+Therefore all applicable work flows from this file are not presented to users in
4b6aa8
+User Interface. For enable this extension uncomment all condition line in this
4b6aa8
+configuration file.
4b6aa8
+
4b6aa8
+EXAMPLES
4b6aa8
+--------
4b6aa8
+Condition line::
4b6aa8
+    EVENT=workflow_UploadCCpp analyzer=CCpp
4b6aa8
+
4b6aa8
+The condition line above expects existence of
4b6aa8
+/usr/share/libreport/workflows/workflow_UploadCCpp.xml
4b6aa8
+
4b6aa8
+SEE ALSO
4b6aa8
+--------
4b6aa8
+report-gtk(1)
4b6aa8
+
4b6aa8
+AUTHOR
4b6aa8
+------
4b6aa8
+* ABRT team
4b6aa8
+
4b6aa8
diff --git a/po/POTFILES.in b/po/POTFILES.in
4b6aa8
index 26acba1..7ba080c 100644
4b6aa8
--- a/po/POTFILES.in
4b6aa8
+++ b/po/POTFILES.in
4b6aa8
@@ -55,6 +55,11 @@ src/workflows/workflow_FedoraVmcore.xml.in
4b6aa8
 src/workflows/workflow_FedoraXorg.xml.in
4b6aa8
 src/workflows/workflow_FedoraLibreport.xml.in
4b6aa8
 src/workflows/workflow_FedoraJava.xml.in
4b6aa8
+src/workflows/workflow_LoggerCCpp.xml.in
4b6aa8
+src/workflows/workflow_Logger.xml.in
4b6aa8
+src/workflows/workflow_MailxCCpp.xml.in
4b6aa8
+src/workflows/workflow_Mailx.xml.in
4b6aa8
+src/workflows/workflow_UploadCCpp.xml.in
4b6aa8
 src/workflows/workflow_Upload.xml.in
4b6aa8
 src/workflows/workflow_RHELCCpp.xml.in
4b6aa8
 src/workflows/workflow_RHELKerneloops.xml.in
4b6aa8
diff --git a/src/workflows/Makefile.am b/src/workflows/Makefile.am
4b6aa8
index 54a6f31..0fc1019 100644
4b6aa8
--- a/src/workflows/Makefile.am
4b6aa8
+++ b/src/workflows/Makefile.am
4b6aa8
@@ -8,14 +8,19 @@ dist_workflows_DATA = \
4b6aa8
     workflow_FedoraXorg.xml \
4b6aa8
     workflow_FedoraLibreport.xml \
4b6aa8
     workflow_FedoraJava.xml \
4b6aa8
-    workflow_Upload.xml \
4b6aa8
     workflow_RHELCCpp.xml \
4b6aa8
     workflow_RHELKerneloops.xml \
4b6aa8
     workflow_RHELPython.xml \
4b6aa8
     workflow_RHELvmcore.xml \
4b6aa8
     workflow_RHELxorg.xml \
4b6aa8
     workflow_RHELLibreport.xml \
4b6aa8
-    workflow_RHELJava.xml
4b6aa8
+    workflow_RHELJava.xml \
4b6aa8
+    workflow_Mailx.xml \
4b6aa8
+    workflow_MailxCCpp.xml \
4b6aa8
+    workflow_Upload.xml \
4b6aa8
+    workflow_UploadCCpp.xml \
4b6aa8
+    workflow_Logger.xml \
4b6aa8
+    workflow_LoggerCCpp.xml
4b6aa8
 
4b6aa8
 if BUILD_BUGZILLA
4b6aa8
 dist_workflows_DATA += \
4b6aa8
@@ -36,7 +41,10 @@ workflowsdefdir = $(WORKFLOWS_DEFINITION_DIR)
4b6aa8
 
4b6aa8
 dist_workflowsdef_DATA =\
4b6aa8
     report_fedora.conf \
4b6aa8
-    report_rhel.conf
4b6aa8
+    report_rhel.conf \
4b6aa8
+    report_mailx.conf \
4b6aa8
+    report_logger.conf \
4b6aa8
+    report_uploader.conf
4b6aa8
 
4b6aa8
 if BUILD_BUGZILLA
4b6aa8
 dist_workflowsdef_DATA += \
4b6aa8
@@ -54,14 +62,20 @@ EXTRA_DIST = \
4b6aa8
     workflow_FedoraXorg.xml.in \
4b6aa8
     workflow_FedoraLibreport.xml.in \
4b6aa8
     workflow_FedoraJava.xml.in \
4b6aa8
-    workflow_Upload.xml.in \
4b6aa8
     workflow_RHELCCpp.xml.in \
4b6aa8
     workflow_RHELKerneloops.xml.in \
4b6aa8
     workflow_RHELPython.xml.in \
4b6aa8
     workflow_RHELvmcore.xml.in \
4b6aa8
     workflow_RHELxorg.xml.in \
4b6aa8
     workflow_RHELLibreport.xml.in \
4b6aa8
-    workflow_RHELJava.xml.in
4b6aa8
+    workflow_RHELJava.xml.in \
4b6aa8
+    workflow_Mailx.xml.in \
4b6aa8
+    workflow_MailxCCpp.xml.in \
4b6aa8
+    workflow_Upload.xml.in \
4b6aa8
+    workflow_UploadCCpp.xml.in \
4b6aa8
+    workflow_Logger.xml.in \
4b6aa8
+    workflow_LoggerCCpp.xml.in
4b6aa8
+
4b6aa8
 
4b6aa8
 if BUILD_BUGZILLA
4b6aa8
 EXTRA_DIST += \
4b6aa8
diff --git a/src/workflows/report_logger.conf b/src/workflows/report_logger.conf
4b6aa8
new file mode 100644
4b6aa8
index 0000000..15b9e65
4b6aa8
--- /dev/null
4b6aa8
+++ b/src/workflows/report_logger.conf
4b6aa8
@@ -0,0 +1,6 @@
4b6aa8
+# EVENT=workflow_LoggerCCpp analyzer=CCpp
4b6aa8
+# this is just a meta event which consists of other events
4b6aa8
+# the list is defined in the xml file
4b6aa8
+
4b6aa8
+# EVENT=workflow_Logger analyzer!=CCpp
4b6aa8
+# this must be changed with new workflow
4b6aa8
diff --git a/src/workflows/report_mailx.conf b/src/workflows/report_mailx.conf
4b6aa8
new file mode 100644
4b6aa8
index 0000000..fef2192
4b6aa8
--- /dev/null
4b6aa8
+++ b/src/workflows/report_mailx.conf
4b6aa8
@@ -0,0 +1,6 @@
4b6aa8
+# EVENT=workflow_MailxCCpp analyzer=CCpp
4b6aa8
+# this is just a meta event which consists of other events
4b6aa8
+# the list is defined in the xml file
4b6aa8
+
4b6aa8
+# EVENT=workflow_Mailx analyzer!=CCpp
4b6aa8
+# this must be changed with new workflow
4b6aa8
diff --git a/src/workflows/report_uploader.conf b/src/workflows/report_uploader.conf
4b6aa8
new file mode 100644
4b6aa8
index 0000000..7f17f52
4b6aa8
--- /dev/null
4b6aa8
+++ b/src/workflows/report_uploader.conf
4b6aa8
@@ -0,0 +1,6 @@
4b6aa8
+# EVENT=workflow_UploadCCpp analyzer=CCpp
4b6aa8
+# this is just a meta event which consists of other events
4b6aa8
+# the list is defined in the xml file
4b6aa8
+
4b6aa8
+# EVENT=workflow_Upload analyzer!=CCpp
4b6aa8
+# this must be changed with new workflow
4b6aa8
diff --git a/src/workflows/workflow_Logger.xml.in b/src/workflows/workflow_Logger.xml.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..3ffe878
4b6aa8
--- /dev/null
4b6aa8
+++ b/src/workflows/workflow_Logger.xml.in
4b6aa8
@@ -0,0 +1,11 @@
4b6aa8
+
4b6aa8
+<workflow>
4b6aa8
+    <_name>Export the problem data information to a text file</_name>
4b6aa8
+    <_description>Analyze the problem locally and export the problem data information to a text file</_description>
4b6aa8
+    <priority>-99</priority>
4b6aa8
+
4b6aa8
+    <events>
4b6aa8
+        <event>collect_*</event>
4b6aa8
+        <event>report_Logger</event>
4b6aa8
+    </events>
4b6aa8
+</workflow>
4b6aa8
diff --git a/src/workflows/workflow_LoggerCCpp.xml.in b/src/workflows/workflow_LoggerCCpp.xml.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..5dce9f0
4b6aa8
--- /dev/null
4b6aa8
+++ b/src/workflows/workflow_LoggerCCpp.xml.in
4b6aa8
@@ -0,0 +1,12 @@
4b6aa8
+
4b6aa8
+<workflow>
4b6aa8
+    <_name>Export the problem data information to a text file</_name>
4b6aa8
+    <_description>Analyze the problem locally and export the problem data information to a text file</_description>
4b6aa8
+    <priority>-99</priority>
4b6aa8
+
4b6aa8
+    <events>
4b6aa8
+        <event>collect_*</event>
4b6aa8
+        <event>analyze_CCpp</event>
4b6aa8
+        <event>report_Logger</event>
4b6aa8
+    </events>
4b6aa8
+</workflow>
4b6aa8
diff --git a/src/workflows/workflow_Mailx.xml.in b/src/workflows/workflow_Mailx.xml.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..63bd576
4b6aa8
--- /dev/null
4b6aa8
+++ b/src/workflows/workflow_Mailx.xml.in
4b6aa8
@@ -0,0 +1,11 @@
4b6aa8
+
4b6aa8
+<workflow>
4b6aa8
+    <_name>Send the problem data via email</_name>
4b6aa8
+    <_description>Analyze the problem locally and send information via email</_description>
4b6aa8
+    <priority>-99</priority>
4b6aa8
+
4b6aa8
+    <events>
4b6aa8
+        <event>collect_*</event>
4b6aa8
+        <event>report_Mailx</event>
4b6aa8
+    </events>
4b6aa8
+</workflow>
4b6aa8
diff --git a/src/workflows/workflow_MailxCCpp.xml.in b/src/workflows/workflow_MailxCCpp.xml.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..3dd3bba
4b6aa8
--- /dev/null
4b6aa8
+++ b/src/workflows/workflow_MailxCCpp.xml.in
4b6aa8
@@ -0,0 +1,12 @@
4b6aa8
+
4b6aa8
+<workflow>
4b6aa8
+    <_name>Send the problem data via email</_name>
4b6aa8
+    <_description>Analyze the problem locally and send information via email</_description>
4b6aa8
+    <priority>-99</priority>
4b6aa8
+
4b6aa8
+    <events>
4b6aa8
+        <event>collect_*</event>
4b6aa8
+        <event>analyze_CCpp</event>
4b6aa8
+        <event>report_Mailx</event>
4b6aa8
+    </events>
4b6aa8
+</workflow>
4b6aa8
diff --git a/src/workflows/workflow_Upload.xml.in b/src/workflows/workflow_Upload.xml.in
4b6aa8
index 3965f99..a0bc658 100644
4b6aa8
--- a/src/workflows/workflow_Upload.xml.in
4b6aa8
+++ b/src/workflows/workflow_Upload.xml.in
4b6aa8
@@ -5,7 +5,6 @@
4b6aa8
 
4b6aa8
     <events>
4b6aa8
         <event>collect_*</event>
4b6aa8
-        <event>analyze_CCpp</event>
4b6aa8
         <event>report_Uploader</event>
4b6aa8
     </events>
4b6aa8
-</workflow>
4b6aa8
\ No newline at end of file
4b6aa8
+</workflow>
4b6aa8
diff --git a/src/workflows/workflow_UploadCCpp.xml.in b/src/workflows/workflow_UploadCCpp.xml.in
4b6aa8
new file mode 100644
4b6aa8
index 0000000..7f22cb8
4b6aa8
--- /dev/null
4b6aa8
+++ b/src/workflows/workflow_UploadCCpp.xml.in
4b6aa8
@@ -0,0 +1,12 @@
4b6aa8
+
4b6aa8
+<workflow>
4b6aa8
+    <_name>Upload the problem data to a server</_name>
4b6aa8
+    <_description>Analyze the problem locally and upload the data via scp or ftp</_description>
4b6aa8
+    <priority>-99</priority>
4b6aa8
+
4b6aa8
+    <events>
4b6aa8
+        <event>collect_*</event>
4b6aa8
+        <event>analyze_CCpp</event>
4b6aa8
+        <event>report_Uploader</event>
4b6aa8
+    </events>
4b6aa8
+</workflow>
4b6aa8
-- 
4b6aa8
1.8.3.1
4b6aa8