[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Attaching rocminfo to bug reports



Hi Debian ROCm Team,

Last year, Fred suggested that we should add functionality to our packages to make reportbug collect and attach extra information along with reports [1]. This reportbug feature is described in README.developers [2]:

> If /usr/share/bug/$package is executable, then bug executes it and
takes what comes out from the file descriptor 3 and puts it in the bug
template.

I created a very simple script and tested it by filing Bug #1110251 [3]:

$ cat /usr/share/bug/rocm-smi
#!/bin/bash

rocminfo_path="$(type -p rocminfo)"
if [ -n "$rocminfo_path" ]; then
  yesno "Attach output of 'rocminfo' to this bug report? (y/N) "
  if [ "$REPLY" = "yep" ]; then
    rocminfo >&3
  fi
fi

The result is not perfect and I'm sure it can be improved. If nothing else, the output of rocminfo includes a few terminal control codes, which is why I filed Bug #1110252 [4]. Nevertheless, this does seem useful. The information is probably not of much help for the -doc or -dev packages, but it would be helpful for typical bugs filed against the library and -tests packages.

The part that I'm most unsure about is how to add this script to all the relevant packages. It would quickly become a maintenance burden to copy/paste this script into every package and keep it up-to-date. I suppose we could just have one copy somewhere and each package could install a symlink to this script? Or is there a standard way of handling this?

Sincerely,
Cory Bloor

[1]: https://lists.debian.org/debian-ai/2024/09/msg00129.html
[2]: https://salsa.debian.org/reportbug-team/reportbug/-/blob/13.2.0/doc/README.developers?ref_type=tags#L10-43
[3]: https://bugs.debian.org/1110251
[4]: https://bugs.debian.org/1110252


Reply to: