Committer's Guide
Prev |  | Next

# 7 GNATS

The FreeBSD Project utilizes GNATS for tracking bugs and change requests. Be sure that if you commit a fix or suggestion found in a GNATS PR, you use `edit-pr `pr-number`` on `freefall` to close it. It is also considered nice if you take time to close any PRs associated with your commits, if appropriate. You can also make use of send-pr(1) yourself for proposing any change which you feel should probably be made, pending a more extensive peer-review first.

You can find out more about GNATS at:

- FreeBSD Problem Report Handling Guidelines

- http://www.cs.utah.edu/csinfo/texinfo/gnats/gnats.html

- http://www.FreeBSD.org/support.html

- send-pr(1)

You can run a local copy of GNATS, and then integrate the FreeBSD GNATS tree in to it using CVSup. Then you can run GNATS commands locally. This lets you query the PR database without needing to be connected to the Internet.

Using a local GNATS tree

1. If you are not already downloading the GNATS tree, add this line to your `supfile`, and re-sup. Note that since GNATS is not under CVS control it has no tag, so if you are adding it to your existing `supfile` it should appear before any “tag=” entry as these remain active once set.

       gnats release=current prefix=/usr

   This will place the FreeBSD GNATS tree in `/usr/gnats`. You can use a refuse file to control which categories to receive. For example, to only receive `docs` PRs, put this line in `/usr/local/etc/cvsup/sup/refuse`[1].

       gnats/[a-ce-z]*

   The rest of these examples assume you have only supped the `docs` category. Adjust them as necessary, depending on the categories you are syncing.

2. Install the GNATS port from `ports/databases/gnats`. This will place the various GNATS directories under `$PREFIX/share/gnats`.

3. Symlink the GNATS directories you are supping under the version of GNATS you have installed.

       # cd /usr/local/share/gnats/gnats-db
       # ln -s /usr/gnats/docs

   Repeat as necessary, depending on how many GNATS categories you are syncing.

4. Update the GNATS `categories` file with these categories. The file is `$PREFIX/share/gnats/gnats-db/gnats-adm/categories`.

       # This category is mandatory
       pending:Category for faulty PRs:gnats-admin:
       #
       # FreeBSD categories
       #
       docs:Documentation Bug:freebsd-doc:

5. Run `$PREFIX/libexec/gnats/gen-index` to recreate the GNATS index. The output has to be redirected to `$PREFIX/share/gnats/gnats-db/gnats-adm/index`. You can do this periodically from cron(8), or run cvsup(1) from a shell script that does this as well.

       # /usr/local/libexec/gnats/gen-index \
           > /usr/local/share/gnats/gnats-db/gnats-adm/index

6. Test the configuration by querying the PR database. This command shows open `docs` PRs.

       # query-pr -c docs -s open

7. Pick a PR and close it.

> Note: This procedure only works to allow you to view and query the PRs locally. To edit or close them you will still have to log in to `freefall` and do it from there.

### Notes

[1] | The precise path depends on the `*default base` setting in your `supfile`.

Prev | Home | Next
Developer Relations |  | Who's Who

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.