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