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

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