GNATS is an issue tracking system that has important advantages when compared to other alternatives. This howto is a simple step by step guide for setting-up and using the GNATS issue tracker.
The advantage of GNATS over several other issue tracking system are : (1) GNATS offers client/server interface through the gnatsd,send-pr,query-pr,edit-pr these allow the interaction with GNATS database from the command line which is great. (2) GNATS allows 'relocation' of issues or bugs and moving them freely between categories/modules. If in a hurry, the user can just post an issue to an un-undefined category. GNATS will associate the default 'pending' category to the new issue until the administrator or the user himself assigns the correct category to the new issue. (3) GNATS uses a file-based back-end database which makes it easy to backup and.
GNATS can be installed through packages system in most linux/unix systems. Under FreeBSD using the ports collection, you can install gnats and gnats web as follows
cd /usr/ports/databases/gnats4 make install cd /usr/ports/databases/gnatsweb4 make install
The installation will add a user gnats in the system. All the files used by the GNATS system must be owned by the gnats user.
Add the following
gnats-admin: address bugs: "| /usr/local/libexec/gnats/queue-pr -q"
Add the following
support stream tcp nowait gnats /usr/local/libexec/gnats/gnatsdgnatsd
Then restart inetd as follows
As root type
crontab -u gnats -e 0,10,20,30,40,50 * * * * /usr/local/libexec/gnats/queue-pr --run
To add a database, the following steps are required :
Add an entry as follows :
Host based access control :
Edit /var/db/gnats/databasename/gnats-adm/gnatsd.host_access, and add lines such as
User based access control :
Edit /var/db/gnats/databasename/gnats-adm/gnatsd.user_access, and add lines such as
Add a new category or module :
Edit the file /var/db/gnats/databasename/gnats-adm/categories, and add a line such as
modulename:Some Project or Module:joe:
Where joe is a responsible.
Edit /var/db/gnats/databasename/gnats-adm/responsibles, and add a line such as
joe:Joe Foe:joe bill:Mister Bill:firstname.lastname@example.org
Edit /var/db/gnats/databasename/gnats-adm/submitters, and add a line such as
dod:Department of Defense:DARPA:4:bill:al
The gnatsweb will install cgi scripts in the default cgi-bin directory (/usr/local/www/cgi-bin). Edit the gnatsweb.pl file to customize some variables, then put these files in a location where they can be accessed and executed as cg-scripts. You can access the GNATS database using the web interface by pointing the browser to the gnatsweb.pl script (e.g. http://www.example.com/cgi-bin/gnatsweb).
To use the GNATS system from remote locations, the users can access databases through the web interface or using the client/server interface. The latter alternative requires installing client side scripts. Under Debian/Ubuntu, you can do this by issuing the following command :
apt-get install gnats-user
The programs send-pr,query-pr,edit-pr will all be installed. To use them, it is preferable that the environment variable GNATSDB points to the GNATS database. Set it as follows (assuming bash shell)
Now the user can access the database using the client tools. The following is a list of examples
|query-pr -q||List summary of all issues|
|query-pr –list-fields||List all fields|
|query-pr –valid-values class||List all classes/projects|
|query-pr –category somecategory||Lists all issues in the category somecategory|
|edit-pr 2||Edits issue number 2|
|send-pr||Presents the user with fields to fill in and creates a new issue report based on the provided information|
See the manuals of send-pr,query-pr and edit-pr to get more information.