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.

526 lines
16 KiB

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