Blame SOURCES/1009-reporter-mantisbt-adds-man-pages-for-reporter-mantis.patch

d21897
From 9c819b8c77ea5c05e3a37117a2174162160b1c57 Mon Sep 17 00:00:00 2001
d21897
From: Matej Habrnal <mhabrnal@redhat.com>
d21897
Date: Fri, 20 Feb 2015 03:14:54 +0100
d21897
Subject: [PATCH 1009/1015] reporter-mantisbt: adds man pages for
d21897
 reporter-mantisbt
d21897
d21897
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
d21897
d21897
Conflicts:
d21897
	doc/Makefile.am
d21897
---
d21897
 doc/Makefile.am                      |  13 ++-
d21897
 doc/centos_report_event.conf.5       |   1 +
d21897
 doc/mantisbt.conf.txt                |  18 +++
d21897
 doc/mantisbt_format.conf.txt         |  18 +++
d21897
 doc/mantisbt_formatdup.conf.txt      |  18 +++
d21897
 doc/report_CentOSBugTracker.conf.txt |  45 +++++++
d21897
 doc/report_centos.conf.txt           |  41 +++++++
d21897
 doc/reporter-mantisbt.txt            | 219 +++++++++++++++++++++++++++++++++++
d21897
 src/plugins/Makefile.am              |   4 +
d21897
 src/workflows/Makefile.am            |  12 ++
d21897
 10 files changed, 387 insertions(+), 2 deletions(-)
d21897
 create mode 100644 doc/centos_report_event.conf.5
d21897
 create mode 100644 doc/mantisbt.conf.txt
d21897
 create mode 100644 doc/mantisbt_format.conf.txt
d21897
 create mode 100644 doc/mantisbt_formatdup.conf.txt
d21897
 create mode 100644 doc/report_CentOSBugTracker.conf.txt
d21897
 create mode 100644 doc/report_centos.conf.txt
d21897
 create mode 100644 doc/reporter-mantisbt.txt
d21897
d21897
diff --git a/doc/Makefile.am b/doc/Makefile.am
d21897
index 83a41d9..e437388 100644
d21897
--- a/doc/Makefile.am
d21897
+++ b/doc/Makefile.am
d21897
@@ -25,6 +25,7 @@ MAN1_TXT += reporter-print.txt
d21897
 MAN1_TXT += reporter-rhtsupport.txt
d21897
 MAN1_TXT += reporter-upload.txt
d21897
 MAN1_TXT += reporter-ureport.txt
d21897
+MAN1_TXT += reporter-mantisbt.txt
d21897
 
d21897
 MAN5_TXT =
d21897
 MAN5_TXT += anaconda_event.conf.txt
d21897
@@ -37,6 +38,9 @@ MAN5_TXT += bugzilla_formatdup_anaconda.conf.txt
d21897
 MAN5_TXT += bugzilla_formatdup.conf.txt
d21897
 MAN5_TXT += bugzilla_format_kernel.conf.txt
d21897
 MAN5_TXT += bugzilla_format_libreport.conf.txt
d21897
+MAN5_TXT += mantisbt.conf.txt
d21897
+MAN5_TXT += mantisbt_format.conf.txt
d21897
+MAN5_TXT += mantisbt_formatdup.conf.txt
d21897
 MAN5_TXT += emergencyanalysis_event.conf.txt
d21897
 MAN5_TXT += forbidden_words.conf.txt
d21897
 MAN5_TXT += mailx.conf.txt
d21897
@@ -45,6 +49,7 @@ MAN5_TXT += print_event.conf.txt
d21897
 MAN5_TXT += report_Bugzilla.conf.txt
d21897
 MAN5_TXT += report_event.conf.txt
d21897
 MAN5_TXT += report_fedora.conf.txt
d21897
+MAN5_TXT += report_centos.conf.txt
d21897
 MAN5_TXT += report_Logger.conf.txt
d21897
 MAN5_TXT += report_rhel.conf.txt
d21897
 MAN5_TXT += report_rhel_bugzilla.conf.txt
d21897
@@ -53,15 +58,19 @@ MAN5_TXT += report_logger.conf.txt
d21897
 MAN5_TXT += report_mailx.conf.txt
d21897
 MAN5_TXT += report_uploader.conf.txt
d21897
 MAN5_TXT += report_Uploader.conf.txt
d21897
+MAN5_TXT += report_CentOSBugTracker.conf.txt
d21897
 MAN5_TXT += rhtsupport.conf.txt
d21897
 MAN5_TXT += rhtsupport_event.conf.txt
d21897
 MAN5_TXT += uploader_event.conf.txt
d21897
 MAN5_TXT += ureport.conf.txt
d21897
 MAN5_TXT += upload.conf.txt
d21897
 
d21897
+MAN5_PREFORMATTED =
d21897
+MAN5_PREFORMATTED += centos_report_event.conf.5
d21897
+
d21897
 # Manual pages are generated from .txt via Docbook
d21897
 man1_MANS = ${MAN1_TXT:%.txt=%.1}
d21897
-man5_MANS = ${MAN5_TXT:%.txt=%.5}
d21897
+man5_MANS = ${MAN5_TXT:%.txt=%.5} ${MAN5_PREFORMATTED}
d21897
 
d21897
 SUFFIXES = .1 .5
d21897
 
d21897
@@ -76,5 +85,5 @@ SUFFIXES = .1 .5
d21897
                                     --conf-file ../asciidoc.conf \
d21897
                                     -alibreport_version=$(PACKAGE_VERSION) -o $@ $<
d21897
 
d21897
-EXTRA_DIST = $(MAN1_TXT) $(MAN5_TXT)
d21897
+EXTRA_DIST = $(MAN1_TXT) $(MAN5_TXT) $(MAN5_PREFORMATTED)
d21897
 CLEANFILES = $(man1_MANS)
d21897
diff --git a/doc/centos_report_event.conf.5 b/doc/centos_report_event.conf.5
d21897
new file mode 100644
d21897
index 0000000..71c3fcb
d21897
--- /dev/null
d21897
+++ b/doc/centos_report_event.conf.5
d21897
@@ -0,0 +1 @@
d21897
+.so man5/report_event.conf.5
d21897
diff --git a/doc/mantisbt.conf.txt b/doc/mantisbt.conf.txt
d21897
new file mode 100644
d21897
index 0000000..d4ba605
d21897
--- /dev/null
d21897
+++ b/doc/mantisbt.conf.txt
d21897
@@ -0,0 +1,18 @@
d21897
+mantisbt.conf(5)
d21897
+===============
d21897
+
d21897
+NAME
d21897
+----
d21897
+mantisbt.conf - configuration file for libreport.
d21897
+
d21897
+DESCRIPTION
d21897
+-----------
d21897
+This configuration file provides default configuration for 'reporter-mantisbt'.
d21897
+
d21897
+SEE ALSO
d21897
+--------
d21897
+reporter-mantisbt(1)
d21897
+
d21897
+AUTHOR
d21897
+------
d21897
+* ABRT team
d21897
diff --git a/doc/mantisbt_format.conf.txt b/doc/mantisbt_format.conf.txt
d21897
new file mode 100644
d21897
index 0000000..860d911
d21897
--- /dev/null
d21897
+++ b/doc/mantisbt_format.conf.txt
d21897
@@ -0,0 +1,18 @@
d21897
+mantisbt_format.conf(5)
d21897
+=======================
d21897
+
d21897
+NAME
d21897
+----
d21897
+mantisbt_format.conf - configuration file for libreport.
d21897
+
d21897
+DESCRIPTION
d21897
+-----------
d21897
+This configuration file provides definition of general formatting for new MantisBT issues.
d21897
+
d21897
+SEE ALSO
d21897
+--------
d21897
+reporter-mantisbt(1)
d21897
+
d21897
+AUTHOR
d21897
+------
d21897
+* ABRT Team
d21897
diff --git a/doc/mantisbt_formatdup.conf.txt b/doc/mantisbt_formatdup.conf.txt
d21897
new file mode 100644
d21897
index 0000000..a617226
d21897
--- /dev/null
d21897
+++ b/doc/mantisbt_formatdup.conf.txt
d21897
@@ -0,0 +1,18 @@
d21897
+mantisbt_formatdup.conf(5)
d21897
+==========================
d21897
+
d21897
+NAME
d21897
+----
d21897
+mantisbt_formatdup.conf - configuration file for libreport.
d21897
+
d21897
+DESCRIPTION
d21897
+-----------
d21897
+This configuration file provides definition of general formatting for duplicate MantisBT issues.
d21897
+
d21897
+SEE ALSO
d21897
+--------
d21897
+reporter-mantisbt(1)
d21897
+
d21897
+AUTHOR
d21897
+------
d21897
+* ABRT Team
d21897
diff --git a/doc/report_CentOSBugTracker.conf.txt b/doc/report_CentOSBugTracker.conf.txt
d21897
new file mode 100644
d21897
index 0000000..6ba35d3
d21897
--- /dev/null
d21897
+++ b/doc/report_CentOSBugTracker.conf.txt
d21897
@@ -0,0 +1,45 @@
d21897
+report_CentOSBugTracker.conf(5)
d21897
+===============================
d21897
+
d21897
+NAME
d21897
+----
d21897
+report_CentOSBugTracker.conf - libreport's configuration file for 'report_CentOSBugTracker' events.
d21897
+
d21897
+DESCRIPTION
d21897
+-----------
d21897
+This configuration file contains values for options defined in
d21897
+/usr/share/libreport/events/report_CentOSBugTracker.xml
d21897
+
d21897
+Configuration file lines should have 'PARAM = VALUE' format. The parameters are:
d21897
+
d21897
+'Mantisbt_Login'::
d21897
+	Login to MantisBT account.
d21897
+
d21897
+'Mantisbt_Password'::
d21897
+	Password to MantisBT account.
d21897
+
d21897
+'Mantisbt_MantisbtURL'::
d21897
+	MantisBT HTTP(S) address. (default: https://bugs.centos.org)
d21897
+
d21897
+'Mantisbt_SSLVerify'::
d21897
+	Use yes/true/on/1 to verify server's SSL certificate. (default: yes)
d21897
+
d21897
+'Mantisbt_Project'::
d21897
+	Project issue field value. Useful if you needed different project than specified in /etc/os-release
d21897
+
d21897
+'Mantisbt_ProjectVersion'::
d21897
+	Version issue field value. Useful if you needed different project version than specified in /etc/os-release
d21897
+
d21897
+'http_proxy'::
d21897
+	the proxy server to use for HTTP
d21897
+
d21897
+'HTTPS_PROXY'::
d21897
+	the proxy server to use for HTTPS
d21897
+
d21897
+SEE ALSO
d21897
+--------
d21897
+report_event.conf(5), reporter-mantisbt(1)
d21897
+
d21897
+AUTHOR
d21897
+------
d21897
+* ABRT team
d21897
diff --git a/doc/report_centos.conf.txt b/doc/report_centos.conf.txt
d21897
new file mode 100644
d21897
index 0000000..23a5fde
d21897
--- /dev/null
d21897
+++ b/doc/report_centos.conf.txt
d21897
@@ -0,0 +1,41 @@
d21897
+report_centos.conf(5)
d21897
+=====================
d21897
+
d21897
+NAME
d21897
+----
d21897
+report_centos.conf - configuration file for libreport.
d21897
+
d21897
+DESCRIPTION
d21897
+-----------
d21897
+This configuration file specifies which of the reporting work flow definitions
d21897
+are applicable for all problems types on CentOS.
d21897
+
d21897
+All applicable work flows are presented to users in User Interface as
d21897
+possibilities for processing of any problems. A particular work flow becomes
d21897
+applicable if its conditions are satisfied.
d21897
+
d21897
+This configuration file consists from one condition per line.
d21897
+
d21897
+Each condition line must start with EVENT=workflow_NAME where "workflow_" is
d21897
+constant prefix and "workflow_NAME" is base name of path to reporting work flow
d21897
+configuration file.
d21897
+
d21897
+The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR
d21897
+is a name of problem directory element to be checked (for example,
d21897
+"executable", "package", hostname" etc). The condition may consists
d21897
+from as many element checks as it is necessary.
d21897
+
d21897
+EXAMPLES
d21897
+--------
d21897
+Condition line::
d21897
+    EVENT=workflow_CentOSCCpp analyzer=CCpp
d21897
+
d21897
+The condition line above expects existence of /usr/share/libreport/workflows/workflow_CentOSCCpp.xml
d21897
+
d21897
+SEE ALSO
d21897
+--------
d21897
+report-gtk(1)
d21897
+
d21897
+AUTHOR
d21897
+------
d21897
+* ABRT team
d21897
diff --git a/doc/reporter-mantisbt.txt b/doc/reporter-mantisbt.txt
d21897
new file mode 100644
d21897
index 0000000..92255b0
d21897
--- /dev/null
d21897
+++ b/doc/reporter-mantisbt.txt
d21897
@@ -0,0 +1,219 @@
d21897
+reporter-mantisbt(1)
d21897
+====================
d21897
+
d21897
+NAME
d21897
+----
d21897
+reporter-mantisbt - Reports problem to Mantis Bug Tracker.
d21897
+
d21897
+SYNOPSIS
d21897
+--------
d21897
+'reporter-mantisbt' [-vrf] [-c CONFFILE]... [-F FMTFILE] [-A FMTFILE2] -d DIR
d21897
+
d21897
+Or:
d21897
+
d21897
+'reporter-mantisbt' [-v] [-c CONFFILE]... [-d DIR] -t[ID] FILE...
d21897
+
d21897
+Or:
d21897
+
d21897
+'reporter-mantisbt' [-v] [-c CONFFILE]... -h DUPHASH
d21897
+
d21897
+DESCRIPTION
d21897
+-----------
d21897
+The tool reads problem directory DIR. Then it logs in to MantisBT
d21897
+and tries to find an issue with the same duphash HEXSTRING in 'abrt_hash' field.
d21897
+
d21897
+If such issue is not found, then a new issue is created. Elements of DIR
d21897
+are stored in the issue as part of issue description or as attachments,
d21897
+depending on their type and size.
d21897
+
d21897
+Otherwise, if such issue is found and it is marked as CLOSED DUPLICATE,
d21897
+the tool follows the chain of duplicates until it finds a non-DUPLICATE issue.
d21897
+The tool adds a new note to found issue.
d21897
+
d21897
+The URL to new or modified issue is printed to stdout and recorded in
d21897
+'reported_to' element in DIR.
d21897
+
d21897
+Option -t uploads FILEs to the already created issue on MantisBT site.
d21897
+The issue ID is retrieved from directory specified by -d DIR.
d21897
+If problem data in DIR was never reported to MantisBT, upload will fail.
d21897
+
d21897
+Option -tID uploads FILEs to the issue with specified ID on MantisBT site.
d21897
+-d DIR is ignored.
d21897
+
d21897
+Option -r sets the last url from reporter_to element which is prefixed with
d21897
+TRACKER_NAME to URL field. This option is applied only when a new issue is to be
d21897
+filed. The default value is 'ABRT Server'"
d21897
+
d21897
+Configuration file
d21897
+~~~~~~~~~~~~~~~~~~
d21897
+If not specified, CONFFILE defaults to /etc/libreport/plugins/mantisbt.conf.
d21897
+Configuration file lines should have 'PARAM = VALUE' format. The parameters are:
d21897
+
d21897
+'Login'::
d21897
+	Login to MantisBT account.
d21897
+
d21897
+'Password'::
d21897
+	Password to MantisBT account.
d21897
+
d21897
+'MantisbtURL'::
d21897
+	MantisBT HTTP(S) address. (default: http://localhost/mantisbt)
d21897
+
d21897
+'SSLVerify'::
d21897
+	Use yes/true/on/1 to verify server's SSL certificate. (default: no)
d21897
+
d21897
+'Project'::
d21897
+	Project issue field value. Useful if you needed different project than specified in /etc/os-release
d21897
+
d21897
+'ProjectVersion'::
d21897
+	Version issue field value. Useful if you needed different project version than specified in /etc/os-release
d21897
+
d21897
+'CreatePrivate'::
d21897
+    Create private MantisBT issue. (default: no)
d21897
+
d21897
+Parameters can be overridden via $Mantisbt_PARAM environment variables.
d21897
+
d21897
+Formatting configuration files
d21897
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d21897
+Lines starting with # are ignored.
d21897
+
d21897
+Lines can be continued on the next line using trailing backslash.
d21897
+
d21897
+Format:
d21897
+
d21897
+   "%summary:: summary format"
d21897
+   "section:: element1[,element2]..."
d21897
+   The literal text line to be added to MantisBT Description or Additional information. Can be empty.
d21897
+   (Empty lines are NOT ignored!)
d21897
+
d21897
+   Summary format is a line of text, where %element% is replaced by
d21897
+   text element's content, and [[...%element%...]] block is used only if
d21897
+   %element% exists. [[...]] blocks can nest.
d21897
+
d21897
+   Sections can be:
d21897
+   - %summary: issue Summary format string.
d21897
+   - %attach: a list of elements to attach.
d21897
+   - %Additional info: issue Additional Information content.
d21897
+   - text, double colon (::) and the list of comma-separated elements.
d21897
+
d21897
+   Description and Additional information MantisBT's fields:
d21897
+   All text, double colons (::) and lists of comma-separated elements which
d21897
+   are placed above the section '%Additional info::' in the configuration file are
d21897
+   stored in the 'Description' field in MantisBT. All text etc. which are placed
d21897
+   under the '%Additional info::' are stored in the 'Additional information' field.
d21897
+
d21897
+   For example:
d21897
+   |:: comment               |  (Description)
d21897
+   |                         |  (Description)
d21897
+   |Package:: package        |  (Description)
d21897
+   |                         |  (Description)
d21897
+   |%Additional_info::       |
d21897
+   |%reporter%               |  (Additional info)
d21897
+   |User:: user_name,uid     |  (Additional info)
d21897
+   |                         |  (Additional info)
d21897
+   |Directories:: root,cwd   |  (Additional info)
d21897
+
d21897
+   Elements can be:
d21897
+   - problem directory element names, which get formatted as
d21897
+     <element_name>: <contents>
d21897
+     or
d21897
+     <element_name>:
d21897
+     :<contents>
d21897
+     :<contents>
d21897
+     :<contents>
d21897
+   - problem directory element names prefixed by "%bare_",
d21897
+     which is formatted as-is, without "<element_name>:" and colons
d21897
+   - %oneline, %multiline, %text wildcards, which select all corresponding
d21897
+     elements for output or attachment
d21897
+   - %binary wildcard, valid only for %attach section, instructs to attach
d21897
+     binary elements
d21897
+   - problem directory element names prefixed by "-",
d21897
+     which excludes given element from all wildcards
d21897
+
d21897
+     Nonexistent elements are silently ignored.
d21897
+     If none of elements exists, the section will not be created.
d21897
+
d21897
+Integration with ABRT events
d21897
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d21897
+'reporter-mantisbt' can be used as an ABRT reporter. Example
d21897
+fragment for /etc/libreport/report_event.conf:
d21897
+
d21897
+------------
d21897
+# Report Python crashes
d21897
+EVENT=report_CentOSBugTracker analyzer=Python
d21897
+      reporter-mantisbt -d . -c /etc/libreport/plugins/mantisbt.conf
d21897
+------------
d21897
+
d21897
+OPTIONS
d21897
+-------
d21897
+-d DIR::
d21897
+   Path to problem directory.
d21897
+
d21897
+-c CONFFILE::
d21897
+   Path to configuration file.
d21897
+
d21897
+-f::
d21897
+   Force reporting even if this problem is already reported.
d21897
+
d21897
+-F CONF_FORMAT_FILE::
d21897
+   Formatting file for new issues. Default: /etc/libreport/plugins/mantisbt_format.conf
d21897
+
d21897
+-A CONF_FORMAT_FILE::
d21897
+   Formatting file for duplicates. Default: /etc/libreport/plugins/mantisbt_formatdup.conf
d21897
+
d21897
+-t[ID]::
d21897
+   Upload FILEs to the already created issue on MantisBT site.
d21897
+
d21897
+-h::
d21897
+--duphash DUPHASH::
d21897
+   Search in MantisBT by abrt's DUPHASH and print ISSUE_ID.
d21897
+
d21897
+-r TRACKER_NAME::
d21897
+   Set the last url from reporter_to element which is prefixed with TRACKER_NAME to URL field in MantisBT.
d21897
+
d21897
+ENVIRONMENT VARIABLES
d21897
+---------------------
d21897
+Environment variables take precedence over values provided in
d21897
+the configuration file.
d21897
+
d21897
+'Mantisbt_Login'::
d21897
+	Login to MantisBT account.
d21897
+
d21897
+'Mantisbt_Password'::
d21897
+	Password to MantisBT account.
d21897
+
d21897
+'Mantisbt_MantisbtURL'::
d21897
+	MantisBT HTTP(S) address. (default: http://localhost/mantisbt)
d21897
+
d21897
+'Mantisbt_SSLVerify'::
d21897
+	Use yes/true/on/1 to verify server's SSL certificate. (default: no)
d21897
+
d21897
+'Mantisbt_Project'::
d21897
+	Project issue field value. Useful if you needed different project than specified in /etc/os-release
d21897
+
d21897
+'Mantisbt_ProjectVersion'::
d21897
+	Version issue field value. Useful if you needed different project version than specified in /etc/os-release
d21897
+
d21897
+'Mantisbt_CreatePrivate'::
d21897
+    Create private MantisBT issue. (default: no)
d21897
+
d21897
+FILES
d21897
+-----
d21897
+/usr/share/libreport/conf.d/plugins/mantisbt.conf::
d21897
+    Readonly default configuration files.
d21897
+
d21897
+/etc/libreport/plugins/mantisbt.conf::
d21897
+    Configuration file.
d21897
+
d21897
+/etc/libreport/plugins/mantisbt_format.conf::
d21897
+    Configure formating for reporting.
d21897
+
d21897
+/etc/libreport/plugins/mantisbt_formatdup.conf::
d21897
+    Configure formating for reporting duplicates.
d21897
+
d21897
+SEE ALSO
d21897
+--------
d21897
+report_event.conf(5), mantisbt_format.conf(5), mantisbt_formatdup.conf(5)
d21897
+
d21897
+AUTHORS
d21897
+-------
d21897
+* ABRT team
d21897
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
d21897
index fd3f477..27194a4 100644
d21897
--- a/src/plugins/Makefile.am
d21897
+++ b/src/plugins/Makefile.am
d21897
@@ -109,6 +109,10 @@ if BUILD_UREPORT
d21897
 reporters_extra_dist += report_uReport.xml.in
d21897
 endif
d21897
 
d21897
+if BUILD_MANTISBT
d21897
+reporters_extra_dist += report_CentOSBugTracker.xml.in
d21897
+endif
d21897
+
d21897
 EXTRA_DIST = $(reporters_extra_dist) \
d21897
     report_Logger.conf \
d21897
     report_Logger.xml.in \
d21897
diff --git a/src/workflows/Makefile.am b/src/workflows/Makefile.am
d21897
index 7ecb34e..17127a0 100644
d21897
--- a/src/workflows/Makefile.am
d21897
+++ b/src/workflows/Makefile.am
d21897
@@ -107,3 +107,15 @@ EXTRA_DIST += \
d21897
     workflow_RHELBugzillaLibreport.xml.in \
d21897
     workflow_RHELBugzillaJava.xml.in
d21897
 endif
d21897
+
d21897
+if BUILD_MANTISBT
d21897
+EXTRA_DIST += \
d21897
+    workflow_CentOSCCpp.xml.in \
d21897
+    workflow_CentOSKerneloops.xml.in \
d21897
+    workflow_CentOSPython.xml.in \
d21897
+    workflow_CentOSPython3.xml.in \
d21897
+    workflow_CentOSVmcore.xml.in \
d21897
+    workflow_CentOSXorg.xml.in \
d21897
+    workflow_CentOSLibreport.xml.in \
d21897
+    workflow_CentOSJava.xml.in
d21897
+endif
d21897
-- 
d21897
1.8.3.1
d21897