Blame SOURCES/1006-reporter-mantisbt-add-event-for-reporting-AVCs.patch

6d61e3
From 08cfb6977c9d88744e48f4294de7cbb6142ff766 Mon Sep 17 00:00:00 2001
6d61e3
From: Matej Habrnal <mhabrnal@redhat.com>
6d61e3
Date: Wed, 13 May 2015 16:37:19 +0200
6d61e3
Subject: [PATCH 1006/1007] reporter-mantisbt: add event for reporting AVCs
6d61e3
6d61e3
Without this commit is not possible to report AVCs because there are not event
6d61e3
for 'report_CentOSBugTracker' with analyzer=libreport which is used for
6d61e3
reporting AVCs.
6d61e3
6d61e3
Related to bugs.centos#8422 and libreport#348
6d61e3
6d61e3
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
6d61e3
---
6d61e3
 doc/Makefile.am                                    |  2 +
6d61e3
 doc/mantisbt_format_analyzer_libreport.conf.txt    | 18 +++++++
6d61e3
 doc/mantisbt_formatdup_analyzer_libreport.conf.txt | 18 +++++++
6d61e3
 src/plugins/Makefile.am                            |  4 +-
6d61e3
 src/plugins/centos_report_event.conf               |  5 ++
6d61e3
 .../mantisbt_format_analyzer_libreport.conf        | 59 ++++++++++++++++++++++
6d61e3
 .../mantisbt_formatdup_analyzer_libreport.conf     | 56 ++++++++++++++++++++
6d61e3
 7 files changed, 161 insertions(+), 1 deletion(-)
6d61e3
 create mode 100644 doc/mantisbt_format_analyzer_libreport.conf.txt
6d61e3
 create mode 100644 doc/mantisbt_formatdup_analyzer_libreport.conf.txt
6d61e3
 create mode 100644 src/plugins/mantisbt_format_analyzer_libreport.conf
6d61e3
 create mode 100644 src/plugins/mantisbt_formatdup_analyzer_libreport.conf
6d61e3
6d61e3
diff --git a/doc/Makefile.am b/doc/Makefile.am
6d61e3
index b574a41..aaacf7d 100644
6d61e3
--- a/doc/Makefile.am
6d61e3
+++ b/doc/Makefile.am
6d61e3
@@ -41,6 +41,8 @@ MAN5_TXT += bugzilla_format_libreport.conf.txt
6d61e3
 MAN5_TXT += mantisbt.conf.txt
6d61e3
 MAN5_TXT += mantisbt_format.conf.txt
6d61e3
 MAN5_TXT += mantisbt_formatdup.conf.txt
6d61e3
+MAN5_TXT += mantisbt_format_analyzer_libreport.conf.txt
6d61e3
+MAN5_TXT += mantisbt_formatdup_analyzer_libreport.conf.txt
6d61e3
 MAN5_TXT += emergencyanalysis_event.conf.txt
6d61e3
 MAN5_TXT += forbidden_words.conf.txt
6d61e3
 MAN5_TXT += mailx.conf.txt
6d61e3
diff --git a/doc/mantisbt_format_analyzer_libreport.conf.txt b/doc/mantisbt_format_analyzer_libreport.conf.txt
6d61e3
new file mode 100644
6d61e3
index 0000000..8cbd327
6d61e3
--- /dev/null
6d61e3
+++ b/doc/mantisbt_format_analyzer_libreport.conf.txt
6d61e3
@@ -0,0 +1,18 @@
6d61e3
+mantisbt_format_analyzer_libreport.conf(5)
6d61e3
+==========================================
6d61e3
+
6d61e3
+NAME
6d61e3
+----
6d61e3
+mantisbt_format_analyzer_libreport.conf - configuration file for libreport.
6d61e3
+
6d61e3
+DESCRIPTION
6d61e3
+-----------
6d61e3
+This configuration file provides definition of general formatting for duplicate MantisBT issues.
6d61e3
+
6d61e3
+SEE ALSO
6d61e3
+--------
6d61e3
+reporter-mantisbt(1)
6d61e3
+
6d61e3
+AUTHOR
6d61e3
+------
6d61e3
+* ABRT Team
6d61e3
diff --git a/doc/mantisbt_formatdup_analyzer_libreport.conf.txt b/doc/mantisbt_formatdup_analyzer_libreport.conf.txt
6d61e3
new file mode 100644
6d61e3
index 0000000..cd082de
6d61e3
--- /dev/null
6d61e3
+++ b/doc/mantisbt_formatdup_analyzer_libreport.conf.txt
6d61e3
@@ -0,0 +1,18 @@
6d61e3
+mantisbt_formatdup_analyzer_libreport.conf(5)
6d61e3
+=============================================
6d61e3
+
6d61e3
+NAME
6d61e3
+----
6d61e3
+mantisbt_formatdup_analyzer_libreport.conf - configuration file for libreport.
6d61e3
+
6d61e3
+DESCRIPTION
6d61e3
+-----------
6d61e3
+This configuration file provides definition of general formatting for duplicate MantisBT issues.
6d61e3
+
6d61e3
+SEE ALSO
6d61e3
+--------
6d61e3
+reporter-mantisbt(1)
6d61e3
+
6d61e3
+AUTHOR
6d61e3
+------
6d61e3
+* ABRT Team
6d61e3
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
6d61e3
index fc2fd46..41716b3 100644
6d61e3
--- a/src/plugins/Makefile.am
6d61e3
+++ b/src/plugins/Makefile.am
6d61e3
@@ -42,7 +42,9 @@ endif
6d61e3
 if BUILD_MANTISBT
6d61e3
 reporters_plugin_conf += mantisbt.conf
6d61e3
 reporters_plugin_format_conf += mantisbt_format.conf \
6d61e3
-    mantisbt_formatdup.conf
6d61e3
+    mantisbt_formatdup.conf \
6d61e3
+    mantisbt_format_analyzer_libreport.conf \
6d61e3
+    mantisbt_formatdup_analyzer_libreport.conf
6d61e3
 endif
6d61e3
 
6d61e3
 defaultreportpluginsconfdir = $(DEFAULT_REPORT_PLUGINS_CONF_DIR)
6d61e3
diff --git a/src/plugins/centos_report_event.conf b/src/plugins/centos_report_event.conf
6d61e3
index 53f12d8..adbca93 100644
6d61e3
--- a/src/plugins/centos_report_event.conf
6d61e3
+++ b/src/plugins/centos_report_event.conf
6d61e3
@@ -35,3 +35,8 @@ EVENT=report_CentOSBugTracker analyzer=CCpp duphash!=
6d61e3
                 -F "/etc/libreport/plugins/$format" \
6d61e3
                 -A "/etc/libreport/plugins/$formatdup"
6d61e3
 
6d61e3
+EVENT=report_CentOSBugTracker analyzer=libreport
6d61e3
+    reporter-mantisbt \
6d61e3
+        -c /etc/libreport/plugins/mantisbt.conf \
6d61e3
+        -F /etc/libreport/plugins/mantisbt_format_analyzer_libreport.conf \
6d61e3
+        -A /etc/libreport/plugins/mantisbt_formatdup_analyzer_libreport.conf
6d61e3
diff --git a/src/plugins/mantisbt_format_analyzer_libreport.conf b/src/plugins/mantisbt_format_analyzer_libreport.conf
6d61e3
new file mode 100644
6d61e3
index 0000000..a514e38
6d61e3
--- /dev/null
6d61e3
+++ b/src/plugins/mantisbt_format_analyzer_libreport.conf
6d61e3
@@ -0,0 +1,59 @@
6d61e3
+# Lines starting with # are ignored.
6d61e3
+# Lines can be continued on the next line using trailing backslash.
6d61e3
+#
6d61e3
+# Format:
6d61e3
+# %summary:: summary format
6d61e3
+# section:: element1[,element2]...
6d61e3
+# The literal text line to be added to Bugzilla comment. Can be empty.
6d61e3
+# (IOW: empty lines are NOT ignored!)
6d61e3
+#
6d61e3
+# Summary format is a line of text, where %element% is replaced by
6d61e3
+# text element's content, and [[...%element%...]] block is used only if
6d61e3
+# %element% exists. [[...]] blocks can nest.
6d61e3
+#
6d61e3
+# Sections can be:
6d61e3
+# - %summary: bug summary format string.
6d61e3
+# - %attach: a list of elements to attach.
6d61e3
+# - text, double colon (::) and the list of comma-separated elements.
6d61e3
+#   Text can be empty (":: elem1, elem2, elem3" works),
6d61e3
+#   in this case "Text:" header line will be omitted.
6d61e3
+#
6d61e3
+# Elements can be:
6d61e3
+# - problem directory element names, which get formatted as
6d61e3
+#   <element_name>: <contents>
6d61e3
+#   or
6d61e3
+#   <element_name>:
6d61e3
+#   :<contents>
6d61e3
+#   :<contents>
6d61e3
+#   :<contents>
6d61e3
+# - problem directory element names prefixed by "%bare_",
6d61e3
+#   which is formatted as-is, without "<element_name>:" and colons
6d61e3
+# - %oneline, %multiline, %text wildcards, which select all corresponding
6d61e3
+#   elements for output or attachment
6d61e3
+# - %binary wildcard, valid only for %attach section, instructs to attach
6d61e3
+#   binary elements
6d61e3
+# - problem directory element names prefixed by "-",
6d61e3
+#   which excludes given element from all wildcards
6d61e3
+#
6d61e3
+#   Nonexistent elements are silently ignored.
6d61e3
+#   If none of elements exists, the section will not be created.
6d61e3
+
6d61e3
+%summary:: %reason%
6d61e3
+
6d61e3
+Description of problem:: %bare_comment, %bare_description
6d61e3
+
6d61e3
+Version-Release number of selected component:: %bare_package
6d61e3
+
6d61e3
+Truncated backtrace:: %bare_%short_backtrace
6d61e3
+
6d61e3
+%Additional info::
6d61e3
+:: -pkg_arch,-pkg_epoch,-pkg_name,-pkg_release,-pkg_version,\
6d61e3
+    -component,-architecture,\
6d61e3
+    -analyzer,-count,-duphash,-uuid,-abrt_version,\
6d61e3
+    -username,-hostname,-os_release,-os_info,\
6d61e3
+    -time,-pid,-pwd,-last_occurrence,-ureports_counter,\
6d61e3
+    %reporter,\
6d61e3
+    %oneline
6d61e3
+
6d61e3
+%attach:: -reported_to,-comment,-reason,-event_log,%multiline,\
6d61e3
+    -coredump,%binary
6d61e3
diff --git a/src/plugins/mantisbt_formatdup_analyzer_libreport.conf b/src/plugins/mantisbt_formatdup_analyzer_libreport.conf
6d61e3
new file mode 100644
6d61e3
index 0000000..d9ab0e3
6d61e3
--- /dev/null
6d61e3
+++ b/src/plugins/mantisbt_formatdup_analyzer_libreport.conf
6d61e3
@@ -0,0 +1,56 @@
6d61e3
+# Lines starting with # are ignored.
6d61e3
+# Lines can be continued on the next line using trailing backslash.
6d61e3
+#
6d61e3
+# Format:
6d61e3
+# %summary:: summary format
6d61e3
+# section:: element1[,element2]...
6d61e3
+# The literal text line to be added to Bugzilla comment. Can be empty.
6d61e3
+# (IOW: empty lines are NOT ignored!)
6d61e3
+#
6d61e3
+# Summary format is a line of text, where %element% is replaced by
6d61e3
+# text element's content, and [[...%element%...]] block is used only if
6d61e3
+# %element% exists. [[...]] blocks can nest.
6d61e3
+#
6d61e3
+# Sections can be:
6d61e3
+# - %summary: bug summary format string.
6d61e3
+# - %attach: a list of elements to attach.
6d61e3
+# - text, double colon (::) and the list of comma-separated elements.
6d61e3
+#   Text can be empty (":: elem1, elem2, elem3" works),
6d61e3
+#   in this case "Text:" header line will be omitted.
6d61e3
+#
6d61e3
+# Elements can be:
6d61e3
+# - problem directory element names, which get formatted as
6d61e3
+#   <element_name>: <contents>
6d61e3
+#   or
6d61e3
+#   <element_name>:
6d61e3
+#   :<contents>
6d61e3
+#   :<contents>
6d61e3
+#   :<contents>
6d61e3
+# - problem directory element names prefixed by "%bare_",
6d61e3
+#   which is formatted as-is, without "<element_name>:" and colons
6d61e3
+# - %oneline, %multiline, %text wildcards, which select all corresponding
6d61e3
+#   elements for output or attachment
6d61e3
+# - %binary wildcard, valid only for %attach section, instructs to attach
6d61e3
+#   binary elements
6d61e3
+# - problem directory element names prefixed by "-",
6d61e3
+#   which excludes given element from all wildcards
6d61e3
+#
6d61e3
+#   Nonexistent elements are silently ignored.
6d61e3
+#   If none of elements exists, the section will not be created.
6d61e3
+
6d61e3
+Another user experienced a similar problem:
6d61e3
+
6d61e3
+# If user filled out comment field, show it:
6d61e3
+:: %bare_comment
6d61e3
+
6d61e3
+# var_log_messages has too much variance (time/date),
6d61e3
+# we exclude it from message so that dup message elimination has more chances to work
6d61e3
+:: \
6d61e3
+    -pkg_arch,-pkg_epoch,-pkg_name,-pkg_release,-pkg_version,\
6d61e3
+        -component,-architecture,\
6d61e3
+    -analyzer,-count,-duphash,-uuid,-abrt_version,\
6d61e3
+    -username,-hostname,-os_release,-os_info,\
6d61e3
+    -time,-pid,-pwd,-last_occurrence,-ureports_counter,\
6d61e3
+    -var_log_messages,\
6d61e3
+    %reporter,\
6d61e3
+    %oneline
6d61e3
-- 
6d61e3
1.8.3.1
6d61e3