REPORTER-MANTISBT(1)

πŸ“¦
version 2.17.15 Β· 3 versions
, in opensuse-leap 16.0

✨ NAME ✨

okay bestie, meet reporter-mantisbt β€” this is the LIBREPORT MANUAL page for the tool that reports a problem to Mantis Bug Tracker. iconic behavior, honestly πŸ’…


πŸ¦‹ 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 πŸ’…

so the tool reads the problem directory DIR. then it logs in to MantisBT and tries to find an issue with the same duphash HEXSTRING in the abrt_hash field. lowkey detective mode πŸ”

if such an issue is not found, then a new issue is created. elements of DIR are stored in the issue as part of the issue description or as attachments, depending on their type and size. it's giving β€œfile it properly” energy πŸŽ€

otherwise, if such an 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 the found issue. chain-chasing queen behavior πŸ‘‘

the URL to the new or modified issue is printed to stdout and recorded in the reported_to element in DIR. slay, traceability ✨

option -t uploads FILEs to the already created issue on the MantisBT site. the issue ID is retrieved from the directory specified by -d DIR. if problem data in DIR was never reported to MantisBT, upload will fail. no cap, it will not work around it πŸ’€

option -tID uploads FILEs to the issue with the specified ID on the MantisBT site. -d DIR is ignored. different mode, different rules, periodt πŸ¦‹

option -r sets the last url from the reporter_to element which is prefixed with TRACKER_NAME to the URL field. this option is applied only when a new issue is to be filed. the default value is ABRT Server. iykyk 🌸

πŸŽ€ Configuration file πŸŽ€

if not specified, CONFFILE defaults to /etc/libreport/plugins/mantisbt.conf. and to user’s local ~/.config/libreport/mantisbt.conf. configuration file lines should have PARAM = VALUE format. the parameters are below, and user’s local configuration overrides the system wide configuration. bestie, local wins πŸ’–

  • 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. env vars stay flexing 🫢

✨ Formatting configuration files ✨

lines starting with # are ignored. comment out and chill πŸ’œ

lines can be continued on the next line using a 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!) do not skip the empty-line warning, bestie 😭

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. nesting? we love a structured moment πŸŽ€

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.

MantisBT’s fields for Description and Additional information work like this: 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. field mapping tea β˜• πŸ¦‹

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 the given element from all wildcards

nonexistent elements are silently ignored. ghosted, but politely πŸ™ˆ

if none of the elements exists, the section will not be created. no elements, no section, no drama πŸ’…

πŸ”₯ 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. force it, bestie πŸ’…
  • -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 the 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 the URL field in MantisBT.

🌈 ENVIRONMENT VARIABLES 🌈

environment variables take precedence over values provided in the configuration file. env vars said β€œI’m the main character” πŸ‘‘

  • 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.
  • ~/.config/libreport/mantisbt.conf β€” User’s local 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) go read the friends, bestie 🫢


πŸ’œ AUTHORS πŸ’œ

  • ABRT team

mwah πŸ’‹ β€” this page is from LIBREPORT 2.17.15, dated 07/15/2024. stay slay, bestie πŸŽ€βœ¨