- Remove broken instructions for installing GNATS on your local machine

- Add information about useful GNATS tools (change-pr and friends)
- Clean up mirroring instructions a bit

Approved by:	miwi
This commit is contained in:
Eitan Adler 2012-03-20 02:53:54 +00:00
parent 3876c71463
commit 671d3cc419
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=38611

View file

@ -2715,16 +2715,14 @@ $target - head/$source:$P,$Q,$R</screen>
This lets you query the PR database without needing to be connected to
the Internet.</para>
<procedure>
<title>Using a local GNATS tree</title>
<sect2>
<title>Mirroring the GNATS Tree</title>
<step>
<para>If you are not already downloading the GNATS tree, add this line
to your <filename>supfile</filename>, 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 <filename>supfile</filename> it should appear
before any <quote>tag=</quote> entry as these remain active once set.
</para>
<para>It is possible to mirror the GNATS database by adding this line
to your <filename>supfile</filename>. Note that since
GNATS is not under CVS control it has no tag, so if you are adding
it to your existing <filename>supfile</filename> it should appear
before any <quote>tag=</quote> entry as these remain active once set.</para>
<programlisting>gnats release=current prefix=/usr</programlisting>
@ -2738,75 +2736,34 @@ $target - head/$source:$P,$Q,$R</screen>
base</literal> setting in your
<filename>supfile</filename>.</para>
</footnote>.</para>
</sect2>
<programlisting>gnats/[a-ce-z]*</programlisting>
<sect2 id="gnatstools">
<title>Useful Tools</title>
<para>The rest of these examples assume you have only supped the
<literal>docs</literal> category. Adjust them as necessary,
depending on the categories you are syncing.</para>
</step>
<para>Other than <command>edit-pr</command> there are a
collection of tools in <filename>~gnats/tools/</filename>
on <hostid>freefall</hostid> which can make
working with PRs much easier.</para>
<step>
<para>Install the GNATS port from
<filename>ports/databases/gnats</filename>. This will place the
various GNATS directories under
<filename>$PREFIX/share/gnats</filename>.</para>
</step>
<para><command>open-pr</command>, <command>close-pr</command>,
<command>take-pr</command>, and <command>feedback-pr</command>
take PR numbers as arguments and then ask you to select from a
preexisting list of change reasons or let you type in your
own.</para>
<step>
<para>Symlink the GNATS directories you are supping under the version
of GNATS you have installed.</para>
<para><command>change-pr</command> is a multi purpose tool
that lets you make multiple changes at the same time with one
command.</para>
<screen>&prompt.root; <userinput>cd /usr/local/share/gnats/gnats-db</userinput>
&prompt.root; <userinput>ln -s /usr/gnats/docs</userinput></screen>
<para>Repeat as necessary, depending on how many GNATS categories you
are syncing.</para>
</step>
<step>
<para>Update the GNATS <filename>categories</filename> file with these
categories. The file is
<filename>$PREFIX/share/gnats/gnats-db/gnats-adm/categories</filename>.</para>
<programlisting># This category is mandatory
pending:Category for faulty PRs:gnats-admin:
#
# FreeBSD categories
#
docs:Documentation Bug:freebsd-doc:</programlisting>
</step>
<step>
<para>Run <filename>$PREFIX/libexec/gnats/gen-index</filename> to
recreate the GNATS index. The output has to be redirected to
<filename>$PREFIX/share/gnats/gnats-db/gnats-adm/index</filename>.
You can do this periodically from &man.cron.8;, or run &man.cvsup.1;
from a shell script that does this as well.</para>
<screen>&prompt.root; <userinput>/usr/local/libexec/gnats/gen-index \
> /usr/local/share/gnats/gnats-db/gnats-adm/index</userinput></screen>
</step>
<step>
<para>Test the configuration by querying the PR database. This
command shows open <literal>docs</literal> PRs.</para>
<screen>&prompt.root; <userinput>query-pr -c docs -s open</userinput></screen>
</step>
<step>
<para>Pick a PR and close it.</para>
</step>
</procedure>
<note>
<para>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
<hostid>freefall</hostid> and do it from there.</para>
</note>
</sect1>
<para>For example, to assign PR 123456 to yourself type
<command>take-pr <replaceable>123456</replaceable></command>.
If you want to set the PR to patched awaiting an MFC at
the same time use:
<command>change-pr -t -p -m "awaiting MFC"
<replaceable>123456</replaceable></command></para>
</sect2>
</sect1>
<sect1 id="people">
<title>Who's Who</title>