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

d21897
From 9a7a376a236e24c448eb650328d0d4841026568b Mon Sep 17 00:00:00 2001
d21897
From: Matej Habrnal <mhabrnal@redhat.com>
d21897
Date: Wed, 13 May 2015 16:37:19 +0200
d21897
Subject: [PATCH 1012/1015] reporter-mantisbt: add event for reporting AVCs
d21897
d21897
Without this commit is not possible to report AVCs because there are not event
d21897
for 'report_CentOSBugTracker' with analyzer=libreport which is used for
d21897
reporting AVCs.
d21897
d21897
Related to bugs.centos#8422 and libreport#348
d21897
d21897
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
d21897
---
d21897
 doc/Makefile.am                                    |  2 +
d21897
 doc/mantisbt_format_analyzer_libreport.conf.txt    | 18 +++++++
d21897
 doc/mantisbt_formatdup_analyzer_libreport.conf.txt | 18 +++++++
d21897
 src/plugins/Makefile.am                            |  4 +-
d21897
 src/plugins/centos_report_event.conf               |  5 ++
d21897
 .../mantisbt_format_analyzer_libreport.conf        | 59 ++++++++++++++++++++++
d21897
 .../mantisbt_formatdup_analyzer_libreport.conf     | 56 ++++++++++++++++++++
d21897
 7 files changed, 161 insertions(+), 1 deletion(-)
d21897
 create mode 100644 doc/mantisbt_format_analyzer_libreport.conf.txt
d21897
 create mode 100644 doc/mantisbt_formatdup_analyzer_libreport.conf.txt
d21897
 create mode 100644 src/plugins/mantisbt_format_analyzer_libreport.conf
d21897
 create mode 100644 src/plugins/mantisbt_formatdup_analyzer_libreport.conf
d21897
d21897
diff --git a/doc/Makefile.am b/doc/Makefile.am
d21897
index e437388..c10deb4 100644
d21897
--- a/doc/Makefile.am
d21897
+++ b/doc/Makefile.am
d21897
@@ -41,6 +41,8 @@ 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 += mantisbt_format_analyzer_libreport.conf.txt
d21897
+MAN5_TXT += mantisbt_formatdup_analyzer_libreport.conf.txt
d21897
 MAN5_TXT += emergencyanalysis_event.conf.txt
d21897
 MAN5_TXT += forbidden_words.conf.txt
d21897
 MAN5_TXT += mailx.conf.txt
d21897
diff --git a/doc/mantisbt_format_analyzer_libreport.conf.txt b/doc/mantisbt_format_analyzer_libreport.conf.txt
d21897
new file mode 100644
d21897
index 0000000..8cbd327
d21897
--- /dev/null
d21897
+++ b/doc/mantisbt_format_analyzer_libreport.conf.txt
d21897
@@ -0,0 +1,18 @@
d21897
+mantisbt_format_analyzer_libreport.conf(5)
d21897
+==========================================
d21897
+
d21897
+NAME
d21897
+----
d21897
+mantisbt_format_analyzer_libreport.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/mantisbt_formatdup_analyzer_libreport.conf.txt b/doc/mantisbt_formatdup_analyzer_libreport.conf.txt
d21897
new file mode 100644
d21897
index 0000000..cd082de
d21897
--- /dev/null
d21897
+++ b/doc/mantisbt_formatdup_analyzer_libreport.conf.txt
d21897
@@ -0,0 +1,18 @@
d21897
+mantisbt_formatdup_analyzer_libreport.conf(5)
d21897
+=============================================
d21897
+
d21897
+NAME
d21897
+----
d21897
+mantisbt_formatdup_analyzer_libreport.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/src/plugins/Makefile.am b/src/plugins/Makefile.am
d21897
index f4f94ff..3c1dfff 100644
d21897
--- a/src/plugins/Makefile.am
d21897
+++ b/src/plugins/Makefile.am
d21897
@@ -42,7 +42,9 @@ endif
d21897
 if BUILD_MANTISBT
d21897
 reporters_plugin_conf += mantisbt.conf
d21897
 reporters_plugin_format_conf += mantisbt_format.conf \
d21897
-    mantisbt_formatdup.conf
d21897
+    mantisbt_formatdup.conf \
d21897
+    mantisbt_format_analyzer_libreport.conf \
d21897
+    mantisbt_formatdup_analyzer_libreport.conf
d21897
 endif
d21897
 
d21897
 defaultreportpluginsconfdir = $(DEFAULT_REPORT_PLUGINS_CONF_DIR)
d21897
diff --git a/src/plugins/centos_report_event.conf b/src/plugins/centos_report_event.conf
d21897
index 53f12d8..adbca93 100644
d21897
--- a/src/plugins/centos_report_event.conf
d21897
+++ b/src/plugins/centos_report_event.conf
d21897
@@ -35,3 +35,8 @@ EVENT=report_CentOSBugTracker analyzer=CCpp duphash!=
d21897
                 -F "/etc/libreport/plugins/$format" \
d21897
                 -A "/etc/libreport/plugins/$formatdup"
d21897
 
d21897
+EVENT=report_CentOSBugTracker analyzer=libreport
d21897
+    reporter-mantisbt \
d21897
+        -c /etc/libreport/plugins/mantisbt.conf \
d21897
+        -F /etc/libreport/plugins/mantisbt_format_analyzer_libreport.conf \
d21897
+        -A /etc/libreport/plugins/mantisbt_formatdup_analyzer_libreport.conf
d21897
diff --git a/src/plugins/mantisbt_format_analyzer_libreport.conf b/src/plugins/mantisbt_format_analyzer_libreport.conf
d21897
new file mode 100644
d21897
index 0000000..a514e38
d21897
--- /dev/null
d21897
+++ b/src/plugins/mantisbt_format_analyzer_libreport.conf
d21897
@@ -0,0 +1,59 @@
d21897
+# Lines starting with # are ignored.
d21897
+# Lines can be continued on the next line using trailing backslash.
d21897
+#
d21897
+# Format:
d21897
+# %summary:: summary format
d21897
+# section:: element1[,element2]...
d21897
+# The literal text line to be added to Bugzilla comment. Can be empty.
d21897
+# (IOW: 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: bug summary format string.
d21897
+# - %attach: a list of elements to attach.
d21897
+# - text, double colon (::) and the list of comma-separated elements.
d21897
+#   Text can be empty (":: elem1, elem2, elem3" works),
d21897
+#   in this case "Text:" header line will be omitted.
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
+%summary:: %reason%
d21897
+
d21897
+Description of problem:: %bare_comment, %bare_description
d21897
+
d21897
+Version-Release number of selected component:: %bare_package
d21897
+
d21897
+Truncated backtrace:: %bare_%short_backtrace
d21897
+
d21897
+%Additional info::
d21897
+:: -pkg_arch,-pkg_epoch,-pkg_name,-pkg_release,-pkg_version,\
d21897
+    -component,-architecture,\
d21897
+    -analyzer,-count,-duphash,-uuid,-abrt_version,\
d21897
+    -username,-hostname,-os_release,-os_info,\
d21897
+    -time,-pid,-pwd,-last_occurrence,-ureports_counter,\
d21897
+    %reporter,\
d21897
+    %oneline
d21897
+
d21897
+%attach:: -reported_to,-comment,-reason,-event_log,%multiline,\
d21897
+    -coredump,%binary
d21897
diff --git a/src/plugins/mantisbt_formatdup_analyzer_libreport.conf b/src/plugins/mantisbt_formatdup_analyzer_libreport.conf
d21897
new file mode 100644
d21897
index 0000000..d9ab0e3
d21897
--- /dev/null
d21897
+++ b/src/plugins/mantisbt_formatdup_analyzer_libreport.conf
d21897
@@ -0,0 +1,56 @@
d21897
+# Lines starting with # are ignored.
d21897
+# Lines can be continued on the next line using trailing backslash.
d21897
+#
d21897
+# Format:
d21897
+# %summary:: summary format
d21897
+# section:: element1[,element2]...
d21897
+# The literal text line to be added to Bugzilla comment. Can be empty.
d21897
+# (IOW: 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: bug summary format string.
d21897
+# - %attach: a list of elements to attach.
d21897
+# - text, double colon (::) and the list of comma-separated elements.
d21897
+#   Text can be empty (":: elem1, elem2, elem3" works),
d21897
+#   in this case "Text:" header line will be omitted.
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
+Another user experienced a similar problem:
d21897
+
d21897
+# If user filled out comment field, show it:
d21897
+:: %bare_comment
d21897
+
d21897
+# var_log_messages has too much variance (time/date),
d21897
+# we exclude it from message so that dup message elimination has more chances to work
d21897
+:: \
d21897
+    -pkg_arch,-pkg_epoch,-pkg_name,-pkg_release,-pkg_version,\
d21897
+        -component,-architecture,\
d21897
+    -analyzer,-count,-duphash,-uuid,-abrt_version,\
d21897
+    -username,-hostname,-os_release,-os_info,\
d21897
+    -time,-pid,-pwd,-last_occurrence,-ureports_counter,\
d21897
+    -var_log_messages,\
d21897
+    %reporter,\
d21897
+    %oneline
d21897
-- 
d21897
1.8.3.1
d21897