如何使用 reportbug 在 Debian 中報告 bug

我們強烈建議您在 Debian 中報告問題、缺陷與錯誤時使用 reportbug 程序。如需安裝並啟動它,您僅需運行:

# apt-get install reportbug
$ reportbug

該程序將引導您一步一步完成缺陷報告流程。

如果您對 reportbug 提供的交互式功能有疑問或者其功能無法滿足您的需求的話,請參考本文後面敍述的文件內容,或者在 Debian 用户通信論壇(英文)Debian 中文通信論壇詢問。

如何使用電子郵件向 Debian 報告 bug(reportbug 的高級用法)

在您發送缺陷報告之前需要了解的東西

您的報告應當歸屬哪個套件之下?

您需要知道您的缺陷報告應該針對哪一個套件進行提交。請查看這個例子以瞭解您該如何獲取這類信息。 (您還可以透過這些信息瞭解到您的缺陷報告是否已經被其他人提交過了。

如果您無法確定您的報告應該針對哪一個套件提交,請向 Debian 用户通信論壇發送郵件詢問以得到建議。

如果您遇到的問題並不僅僅和某個單一的套件相關,而是和某些一般的 Debian 服務有關的話,我們有一些 pseudo-packages (即“偽套件”)以及 通信論壇。這些設施可以幫助您將相關的信息轉遞給我們。

您的缺陷報告是否已被提交過了?

在提交報告之前,您應該檢查您的缺陷報告是否已被他人提交過了。即,其他人已經提交了一份報告描述了相同的問題。 如需查找某個套件中已經被提交的問題報告列表,您可以使用缺陷搜尋表格中的“package”(套件)選項進行查找。 如果已經存在一個編號為“#<number>”且與您遇到的問題相同的報告的話,您應該以向收件人為“<number>@bugs.debian.org” 的電子郵件地址發送電子郵件以附加您的評論。此時請不要提交一個新的缺陷報告以避免重複。

請為不同的問題各自提交報告

請不要在單一的缺陷報告中描述多個不相關的問題。當這些問題分屬不同的套件時更是如此。請為每個問題提交各自獨立的報告。

避免直接向上遊提交報告

如果您已經在 Debian 中提交了一份報告,請不要將其副本原封不動地向上遊再報告一份,因為這個問題很可能只在 Debian 中出現。如果真的必要的話,套件維護者會幫忙將報告 轉發給上游。

使用電子郵件發送缺陷報告

您可以使用發送電子郵件的方式向 Debian 提交一份新的缺陷報告,下文將具體描述操作方法。您的電子郵件應當發往 submit@bugs.debian.org,並採取後文中描述的特殊文本格式。 reportbug 工具(參見前文)實質上是自動幫助您撰寫了合適格式的電子郵件並進行提交。可能的話,請儘量使用它!

信頭

和其它電子郵件一樣,您應該在您的郵件中寫上一個明晰、描述性的Subject (主題、標題)行。這個標題將為作為追蹤系統中報告的初始標題,所以請儘可能地在標題中提供有用的信息!

如果您想要將這份缺陷報告的副本發送給其它的接收者(如通信論壇)的話,您不應該在電子郵件頭部寫上收件人(即不應該使用標準的抄送、密送方式)。 此時您應該採用一種特殊的方式進行,詳見下文

偽信頭(Pseudo-Headers)

您的缺陷報告正文的第一部分是偽信頭(pseudo-headers),其中應該包含一些與報告相關的信息,如這個報告所針對的套件名稱、對應套件的版本等等。 郵件正文的第一行必須是一個偽信頭信息。它的內容應該是:

Package: <packagename>

請將 <packagename> 替換為 套件的名稱,這個套件應該存在您正在報告的問題或缺陷。

郵件正文信息的第二行應該是:

Version: <packageversion>

請將 <packageversion> 替換為套件的版本。除了版本字符串以外,這裏請不要填入其它任何文本; 因為缺陷追蹤系統需要使用該信息推斷出哪些 Debian 發行版本受到該問題的影響。

為了讓缺陷追蹤系統能夠將您的信息正確地轉發到套件維護者處,您需要在偽信頭部分提供正確的 Package(套件名稱)一行內容。 請參考 這個例子 以瞭解如何找到套件名稱的信息。

如需瞭解其它可用的偽信頭,請見額外的偽信頭

報告正文

請考慮在您的報告中提供以下信息:

請在報告中包含任何看起來會有點關係的細節——簡單來説,報告提供的信息多多益善,您不用擔心內容過多過長會有什麼問題。如果內容不多的話, 不妨考慮一下順帶提供能夠重現問題的任何相關文件。(如果報告真的已經很長的話,可以考慮將這些文件放在互聯網上其它的地方,並在報告中給出指向的鏈接。)

如需瞭解更多能夠幫助開發者解決問題的做法的建議,請閲讀 如果有效地報告 Bug 一文。

一份示例缺陷報告

一份擁有信頭和偽信頭的缺陷報告的原文一般長得像這樣:

  To: submit@bugs.debian.org
  From: diligent@testing.linux.org
  Subject: Hello says `goodbye'

  Package: hello
  Version: 1.3-16

  When I invoke `hello' without arguments from an ordinary shell
  prompt it prints `goodbye', rather than the expected `hello, world'.
  Here is a transcript:

  $ hello
  goodbye
  $ /usr/bin/hello
  goodbye
  $

  I suggest that the output string, in hello.c, be corrected.

  I am using Debian GNU/Linux 2.2, kernel 2.2.17-pre-patch-13
  and libc6 2.1.3-10.

如何將缺陷報告的副本抄送到其它電子郵件地址

有時候需要將缺陷報告的副本發送到除 debian-bugs-dist 列表和套件維護者之外的地方。默認情況下,該報告僅會發送給對應套件的維護者和上述的通信論壇。

當然,您可以將報告使用電子郵件抄送的功能發送給其它收件人。然而,這麼做的問題在於這樣的副本在 Subject(標題) 和 Reply-To(回覆地址)部分不會包含缺陷報告編號的信息。當那位收件人打算對郵件進行回覆時,他們很可能會回覆到 submit@bugs.debian.org 這個地址,從而錯誤地產生一個新缺陷報告。這樣最終會產生許多重複的報告。

真正正確的做法是使用名為 X-Debbugs-CC 的偽信頭。請在您的郵件正文偽信頭部分添加這樣內容:

 X-Debbugs-CC: other-list@cosmic.edu

這樣會指示缺陷追蹤系統將報告的一份副本發送至您在 X-Debbugs-CC 偽信頭一行中給出的地址。當然,該報告同樣會發送至 debian-bugs-dist 通信論壇。

如果您想指定多個抄送的電子郵件地址,請把它們寫入同一行 X-Debbugs-CC 中,並使用英文逗號分隔各個地址。

Avoid sending such copies to the addresses of other bug reports, as they will be caught by the checks that prevent mail loops. There is relatively little point in using X-Debbugs-CC for this anyway, as the bug number added by that mechanism will just be replaced by a new one; use an ordinary CC header instead.

This feature can often be combined usefully with mailing quiet — see below.

其它偽信頭

問題嚴重性

如果您瞭解所報告問題的嚴重程度,您可以在提交報告時對其進行設置。這麼做並不是必須的,而且套件維護者會在您未給出嚴重性信息 (或者選擇的嚴重性等級有誤)時賦予該報告正確的嚴重性等級。

如需對報告賦予嚴重性等級,請在偽信頭部分添加如下面一行這樣的信息:

Severity: <severity>

請將 <severity> 替換為某個可用的嚴重性等級。具體可用的等級列表可以在 進階文件中找到。

Assigning tags

You can set tags on a bug as you are reporting it. For example, if you are including a patch with your bug report, you may wish to set the patch tag. This is not required, however, and the developers will set tags on your report as and when it is appropriate.

To set tags, put a line like this one in the pseudo-header:

Tags: <tags>

Replace <tags> with one or more of the available tags, as described in the advanced documentation. Separate multiple tags with commas, spaces, or both.

User: <username>
Usertags: <usertags>

Replace <usertags> with one or more usertags. Separate multiple tags with commas, spaces, or both. If you specify a <username>, that user's tags will be set. Otherwise, the e-mail address of the sender will be used as the username.

Setting Forwarded

Forwarded: foo@example.com

will mark the newly submitted bug as forwarded to foo@example.com. See Recording that you have passed on a bug report in the developers' documentation for details.

Claiming ownership

Owner: foo@example.com

will indicate that foo@example.com is now responsible for fixing this bug. See Changing bug ownership in the developers' documentation for details.

源碼包

Source: foopackage

the equivalent of Package: for bugs present in the source package of foopackage; for most bugs in most packages you don't want to use this option.

Control Commands

Control: control commands

Allows for any of the commands which must be sent to control@bugs.debian.org to work when sent to submit@bugs.debian.org or nnn@bugs.debian.org. -1 initially refers to the current bug (that is, the bug created by a mail to submit@ or the bug messaged with nnn@). Please see the server control documentation for more information on the control commands which are valid.

For example, the following pseudoheader in a message sent to 12345@bugs.debian.org:

Control: retitle -1 this is the title
Control: severity -1 normal
Control: summary -1 0
Control: forward -1 https://bugs.debian.org/nnn

would cause 12345 to be retitled, its severity changed, summary set, and marked as forwarded.

X-Debbugs- headers

Finally, if your MUA doesn't allow you to edit the headers, you can set the various X-Debbugs- headers in the pseudo-headers.

額外信息

Different submission addresses (minor or mass bug reports)

If a bug report is minor, for example, a documentation typo or a trivial build problem, please adjust the severity appropriately and send it to maintonly@bugs.debian.org instead of submit@bugs.debian.org. maintonly will forward the report to the package maintainer only, it won't forward it to the BTS mailing lists.

If you're submitting many reports at once, you should definitely use maintonly@bugs.debian.org so that you don't cause too much redundant traffic on the BTS mailing lists. Before submitting many similar bugs you may also want to post a summary on debian-bugs-dist.

If wish to report a bug to the bug tracking system that's already been sent to the maintainer, you can use quiet@bugs.debian.org. Bugs sent to quiet@bugs.debian.org will not be forwarded anywhere, only filed.

When you use different submission addresses, the bug tracking system will set the Reply-To of any forwarded message so that the replies will by default be processed in the same way as the original report. That means that, for example, replies to maintonly will go to nnn-maintonly@bugs.debian.org instead of nnn@bugs.debian.org, unless of course one overrides this manually.

Acknowledgements

Normally, the bug tracking system will return an acknowledgement to you by e-mail when you report a new bug or submit additional information to an existing bug. If you want to suppress this acknowledgement, include an X-Debbugs-No-Ack header or pseudoheader in your e-mail (the contents of this header do not matter). If you report a new bug with this header, you will need to check the web interface yourself to find the bug number.

Note that this header will not suppress acknowledgements from the control@bugs.debian.org mailserver, since those acknowledgements may contain error messages which should be read and acted upon.

Spamfighting and missing mail

The bug tracking system implements a rather extensive set of rules designed to make sure that spam does not make it through the BTS. While we try to minimize the number of false positives, they do occur. If you suspect your mail has triggered a false positive, feel free to contact owner@bugs.debian.org for assistance. Another common cause of mail not making it through to the BTS is utilizing addresses which match procmail's FROM_DAEMON, which includes mail from addresses like mail@foobar.com. If you suspect your mail matches FROM_DAEMON, see procmailrc(5) to verify, and then resend the mail using an address which does not match FROM_DAEMON.

Bug reports against unknown packages

If the bug tracking system doesn't know who the maintainer of the relevant package is it will forward the report to debian-bugs-dist even if maintonly was used.

When sending to maintonly@bugs.debian.org or nnn-maintonly@bugs.debian.org you should make sure that the bug report is assigned to the right package, by putting a correct Package at the top of an original submission of a report, or by using the control@bugs.debian.org service to (re)assign the report appropriately.

Using dpkg to find the package and version for the report

When using reportbug to report a bug in a command, say grep, the following will automatically select the right package and let you write the report right away: reportbug --file $(which grep)

You can also find out which package installed it by using dpkg --search. You can find out which version of a package you have installed by using dpkg --list or dpkg --status.

For example:

$ which apt-get
/usr/bin/apt-get
$ type apt-get
apt-get is /usr/bin/apt-get
$ dpkg --search /usr/bin/apt-get
apt: /usr/bin/apt-get
$ dpkg --list apt
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  apt            0.3.19         Advanced front-end for dpkg
$ dpkg --status apt
Package: apt
Status: install ok installed
Priority: standard
Section: base
Installed-Size: 1391
Maintainer: APT Development Team <deity@lists.debian.org>
Version: 0.3.19
Replaces: deity, libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7)
Provides: libapt-pkg2.7
Depends: libapt-pkg2.7, libc6 (>= 2.1.2), libstdc++2.10
Suggests: dpkg-dev
Conflicts: deity
Description: Advanced front-end for dpkg
 This is Debian's next generation front-end for the dpkg package manager.
 It provides the apt-get utility and APT dselect method that provides a
 simpler, safer way to install and upgrade packages.
 .
 APT features complete installation ordering, multiple source capability
 and several other unique features, see the Users Guide in
 /usr/doc/apt/guide.text.gz

其它有用的命令和套件

The querybts tool, available from the same package as reportbug, provides a convenient text-based interface to the bug tracking system.

Emacs users can also use the debian-bug command provided by the debian-el package. When called with M-x debian-bug, it will ask for all necessary information in a similar way to reportbug.


其他錯誤追蹤系統網頁:


Debian BTS administrators <owner@bugs.debian.org>

Debian bug tracking system
Copyright © 1999 Darren O. Benham, 1997, 2003 nCipher Corporation Ltd, 1994-1997 Ian Jackson.