4. 問題回報(PR)的種類

While handling problem reports, either as a developer who has direct access to the GNATS database or as a contributor who browses the database and submits followups with patches, comments, suggestions or change requests, you will come across several different types of PRs.

The following sections describe what each different type of PRs is used for, when a PR belongs to one of these types, and what treatment each different type receives.

4.1. Unassigned PRs

When PRs arrive, they are initially assigned to a generic (placeholder) assignee. These are always prepended with freebsd-. The exact value for this default depends on the category; in most cases, it corresponds to a specific FreeBSD mailing list. Here is the current list, with the most common ones listed first:

表格 1. Default Assignees —— most common

Type Categories Default Assignee
base system bin, conf, gnu, kern, misc freebsd-bugs
architecture-specific alpha, i386, ia64, powerpc, sparc64 freebsd-arch
ports collection ports freebsd-ports-bugs
documentation shipped with the system docs freebsd-doc
FreeBSD web pages (not including docs) www freebsd-www

表格 2. Default Assignees —— other

Type Categories Default Assignee
advocacy efforts advocacy freebsd-advocacy
Java Virtual Machine™ problems java freebsd-java
standards compliance standards freebsd-standards
threading libraries threads freebsd-threads
usb(4) subsystem usb freebsd-usb

Do not be surprised to find that the submitter of the PR has assigned it to the wrong category. If you fix the category, do not forget to fix the assignment as well. (In particular, our submitters seem to have a hard time understanding that just because their problem manifested on an i386 system, that it might be generic to all of FreeBSD, and thus be more appropriate for kern. The converse is also true, of course.)

Certain PRs may be reassigned away from these generic assignees by anyone. For assignees which are mailing lists, please use the long form when making the assignment (e.g., freebsd-foo instead of foo); this will avoid duplicate emails sent to the mailing list.

注: Here is a sample list of such entities; it is probably not complete. In some cases, entries that have the short form are aliases, not mailing lists.

表格 3. Common Assignees —— base system

Type Suggested Category Suggested Assignee
problem specific to the ARM® architecture kern freebsd-arm
problem specific to the MIPS® architecture kern freebsd-mips
problem specific to the PowerPC® architecture kern freebsd-ppc
problem with Advanced Configuration and Power Management (acpi(4)) kern freebsd-acpi
problem with Asynchronous Transfer Mode (ATM) drivers kern freebsd-atm
problem with FireWire® drivers kern freebsd-firewire
problem with the filesystem code kern freebsd-fs
problem with the geom(4) subsystem kern freebsd-geom
problem with the ipfw(4) subsystem kern freebsd-ipfw
problem with Integrated Services Digital Network (ISDN) drivers kern freebsd-isdn
problem with Linux® or SVR4 emulation kern freebsd-emulation
problem with the networking stack kern freebsd-net
problem with PicoBSD kern freebsd-small
problem with the pf(4) subsystem kern freebsd-pf
problem with the scsi(4) subsystem kern freebsd-scsi
problem with the sound(4) subsystem kern freebsd-multimedia
problem with sysinstall(8) bin freebsd-qa
problem with the system startup scripts (rc(8)) kern freebsd-rc

表格 4. Common Assignees —— Ports Collection

Type Suggested Category Suggested Assignee
problem with the ports framework (not with an individual port!) ports portmgr
port which is maintained by apache@FreeBSD.org ports apache
port which is maintained by eclipse@FreeBSD.org ports freebsd-eclipse
port which is maintained by gnome@FreeBSD.org ports gnome
port which is maintained by haskell@FreeBSD.org ports haskell
port which is maintained by java@FreeBSD.org ports freebsd-java
port which is maintained by kde@FreeBSD.org ports kde
port which is maintained by openoffice@FreeBSD.org ports freebsd-openoffice
port which is maintained by perl@FreeBSD.org ports perl
port which is maintained by python@FreeBSD.org ports freebsd-python
port which is maintained by x11@FreeBSD.org ports freebsd-x11

Ports PRs which have a maintainer who is a ports committer may be reassigned by anyone (but note that not every FreeBSD committer is necessarily a ports committer, so you cannot simply go by the email address alone.)

For other PRs, please do not reassign them to individuals (other than yourself) unless you are certain that the assignee really wants to track the PR. This will help to avoid the case where no one looks at fixing a particular problem because everyone assumes that the assignee is already working on it.

4.2. Assigned PRs

If a PR has the responsible field set to the username of a FreeBSD developer, it means that the PR has been handed over to that particular person for further work.

Assigned PRs should not be touched by anyone but the assignee. If you have comments, submit a followup. If for some reason you think the PR should change state or be reassigned, send a message to the assignee. If the assignee does not respond within two weeks, unassign the PR and do as you please.

4.3. 重複的 PR

If you find more than one PR that describe the same issue, choose the one that contains the largest amount of useful information and close the others, stating clearly the number of the superseding PR. If several PRs contain non-overlapping useful information, submit all the missing information to one in a followup, including references to the others; then close the other PRs (which are now completely superseded).

4.4. Stale PRs

A PR is considered stale if it has not been modified in more than six months. Apply the following procedure to deal with stale PRs:

4.5. Misfiled PRs

GNATS is picky about the format of a submitted bug report. This is why a lot of PRs end up being “misfiled” if the submitter forgets to fill in a field or puts the wrong sort of data in some of the PR fields. This section aims to provide most of the necessary details for FreeBSD developers that can help them to close or refile these PRs.

When GNATS cannot deduce what to do with a problem report that reaches the database, it sets the responsible of the PR to gnats-admin and files it under the pending category. This is now a “misfiled” PR and will not appear in bug report listings, unless someone explicitly asks for a list of all the misfiled PRs. If you have access to the FreeBSD cluster machines, you can use query-pr to view a listing of PRs that have been misfiled:

% query-pr -x -q -r gnats-admin
   52458 gnats-ad   open      serious   medium    Re: declaration clash f
   52510 gnats-ad   open      serious   medium    Re: lots of sockets in
   52557 gnats-ad   open      serious   medium
   52570 gnats-ad   open      serious   medium    Jigdo maintainer update

Commonly PRs like the ones shown above are misfiled for one of the following reasons:

4.5.1. Followups misfiled as new PRs

The first category of misfiled PRs, the one with the wrong subject header, is actually the one that requires the greatest amount of work from developers. These are not real PRs, describing separate problem reports. When a reply is received for an existing PR at one of the addresses that GNATS “listens” to for incoming messages, the subject of the reply should always be of the form:

Subject: Re: category/number: old synopsis text

Most mailers will add the “Re: ” part when you reply to the original mail message of a PR. The “category/number: ” part is a GNATS-specific convention that you have to manually insert to the subject of your followup reports.

Any FreeBSD developer, who has direct access to the GNATS database, can periodically check for PRs of this sort and move interesting bits of the misfiled PR into the audit trail of the original PR (by posting a proper followup to a bug report to the address ). Then the misfiled PR can be closed with a message similar to:

Your problem report was misfiled.  Please use the format
"Subject: category/number: original text" when following
up to older, existing PRs.  I've added the relevant bits
from the body of this PR to kern/12345

Searching with query-pr for the original PR, of which a misfiled followup is a reply, is as easy as running:

% query-pr -q -y "some text"

After you locate the original PR and the misfiled followups, use the -F option of query-pr to save the full text of all the relevant PRs in a UNIX® mailbox file, i.e.:

% query-pr -F 52458 52474 > mbox

Now you can use any mail user agent to view all the PRs you saved in mbox. Copy the text of all the misfiled PRs in a followup to the original PR and make sure you include the proper Subject: header. Then close the misfiled PRs. When you close the misfiled PRs remember that the submitter receives a mail notification that his PR changed state to “closed”. Make sure you provide enough details in the log about the reason of this state change. Typically something like the following is ok:

Followup to ports/45364 misfiled as a new PR.
This was misfiled because the subject did not have the format:

	Re: ports/45364: ...

This way the submitter of the misfiled PR will know what to avoid the next time a followup to an existing PR is sent.

4.5.2. PRs misfiled because of missing fields

The second type of misfiled PRs is usually the result of a submitter forgetting to fill all the necessary fields when writing the original PR.

Missing or bogus “category” or “class” fields can result in a misfiled report. Developers can use edit-pr(1) to change the category or class of these misfiled PRs to a more appropriate value and save the PR.

Another common cause of misfiled PRs because of formatting issues is quoting, changes or removal of the send-pr template, either by the user who edits the template or by mailers which do strange things to plain text messages. This does not happen a lot of the time, but it can be fixed with edit-pr too; it does require a bit of work from the developer who refiles the PR, but it is relatively easy to do most of the time.

4.5.3. Misfiled PRs that are not really problem reports

Sometimes a user wants to submit a report for a problem and sends a simple email message to GNATS. The GNATS scripts will recognize bug reports that are formatted using the send-pr(1) template. They cannot parse any sort of email though. This is why submissions of bug reports that are sent to have to follow the template of send-pr, but email reports can be sent to FreeBSD problem reports 郵遞論壇.

Developers that come across PRs that look like they should have been posted to freebsd-bugs or some other list should close the PR, informing the submitter in their state-change log why this is not really a PR and where the message should be posted.

The email addresses that GNATS listens to for incoming PRs have been published as part of the FreeBSD documentation, have been announced and listed on the web-site. This means that spammers found them. Spam messages that reach GNATS are promptly filed under the “pending” category until someone looks at them. Closing one of these with edit-pr(1) is very annoying though, because GNATS replies to the submitter and the sender's address of spam mail is never valid these days. Bounces will come back for each PR that is closed.

Currently, with the installation of some antispam filters that check all submissions to the GNATS database, the amount of spam that reaches the “pending” state is very small.

All developers who have access to the FreeBSD.org cluster machines are encouraged to check for misfiled PRs and immediately close those that are spam mail. Whenever you close one of these PRs, please do the following:

  • Set Category to junk.

  • Set Confidential to no.

  • Set Responsible to yourself (and not, e.g., freebsd-bugs, which merely sends more mail).

  • Set State to closed.

Junk PRs are not backed up, so filing spam mail under this category makes it obvious that we do not care to keep it around or waste disk space for it. If you merely close them without changing the category, they remain both in the master database and in any copies of the database mirrored through cvsup.

本文及其他文件,可由此下載:ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/

若有 FreeBSD 方面疑問,請先閱讀 FreeBSD 相關文件,如不能解決的話,再洽詢 <questions@FreeBSD.org>。
關於本文件的問題,請洽詢 <doc@FreeBSD.org>。