What is the configuration file for saving Bugzilla API key for abrt-cli (or report-cli) usage?

I’m using abrt-cli to report crashes from command line, but since the requirement to use a Bugzilla API key, abrt-cli (and report-cli) ask each time for the API key. I would like to know where to store the API key for abrt-cli to use it.

It should be noted that the abrt’s GUI knows to use the Bugzilla API key defined in its configuration.
But abrt-cli doesn’t seems to use the GUI’s configuration (or there’s a bug).

3 Likes

Hi @ydroneaud and welcome to :fedora:

I believe this is stored in /etc/libreport/plugins/bugzilla.conf or ~/.config/libreport/bugzilla.conf

man reporter-bugzilla provides additional info.

edit:
you can also run reporter-bugzilla and it will prompt you to enter the api key

Thanks

1 Like

Thanks for the links. With this help, I was able to confirm there’s a bug somewhere in abrt / libreport: reporter-bugzilla -v shows the configuration file is not searched in $HOME/.config/libreport/bugzilla.conf

Loading settings from ‘/.config/libreport/bugzilla.conf’
Loaded ‘/.config/libreport/bugzilla.conf’

I opened a bug 2175415 – reporter-bugzilla doesn't read user's bugzilla.conf

2 Likes

@ydroneaud are you on Fedora Linux 38?

@alciregi I’m on Fedora Rawhide (39)

Ok.
Good catch.
/usr/bin/reporter-bugzilla is a Python script. If you have some basic knowledge of it, you could explore the issue and report the bug (or also submit a patch!). I suspect that there is an issue at line 459 with the os.path.join method and the content of const.USER_HOME_CONFIG_PATH.

I see you have already filed a bug 2175415 – reporter-bugzilla doesn't read user's bugzilla.conf :+1:
If you are willing to submit a patch, you can start from here: Overview - rpms/libreport - src.fedoraproject.org (and look where the upstream project is developed).

2 Likes

@alciregi you found the culprit: const.USER_HOME_CONFIG_PATH starts with a slash, so os.path.join assumes the path is absolute, and discard the home path …

1 Like

@alciregi Patch submitted use $XDG_CONFIG_HOME to access user's configuration files (fix #782) by ydroneaud · Pull Request #783 · abrt/libreport · GitHub

3 Likes