[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
See also Where the tools and utilities reside.
There are several steps you need to follow to fully configure and
install GNATS on your system. You need root
access in order
to create a new account for gnats
and to install the GNATS
utilities. You may need root
access on some systems in order to
set up mail aliases and to allow this new account access to
cron
and at
.
If you are updating an older version of GNATS rather than installing from scratch, see Upgrading from older versions.
GNATS installation relies on two other freely available software
packages, which should be installed before you go on to configure and
build GNATS. These are GNU make
and Texinfo
.
Both are available from the GNU FTP site at
http://ftp.gnu.org.
To build GNATS, you must:
configure
, with correct options if the defaults are
unsuitable for your site. See section Configuring and compiling the software. Default installation locations are in
Where GNATS lives.
mkdb
command.
See section 3.3 Installing the default database.
query-pr
, edit-pr
, send-pr
) on every machine
in your local network. See section Installing the user tools.
dbconfig categories submitters responsible gnatsd.access states classes addresses |
in `DATABASEDIR/gnats-adm', as well as the files
gnatsd.host_access databases |
in `SYSCONFDIR/gnats' (usually `/usr/local/etc/gnats').
query-pr
,
edit-pr
and send-pr
for their systems. However, for many
sites, setting up a remote access interface to GNATS, such as Gnatsweb
is a better solution since this requires no configuration on the remote
side.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
tar
file which was compressed using gzip
. The code can be extracted
into a directory unpackdir using
cd unpackdir gunzip gnats-4.0-beta1.tar.gz tar xvf gnats-4.0-beta1.tar |
The sources reside in a directory called `gnats-4.0-beta1' when unpacked. We call this the top level of the source directory, or srcdir. The sources for the GNATS tools are in the subdirectory `gnats-4.0-beta1/gnats/*'. Lists of files included in the distribution are in each directory in the file `MANIFEST'.
You may wish to alter the installation directory for the Emacs lisp
files. If your Emacs lisp library is not in
`prefix/share/emacs/site-lisp', edit the file
srcdir/gnats/Makefile.in
. Change the variable
lispdir
from `prefix/emacs/site-lisp' to the
directory containing your Emacs lisp library. For information on
prefix, see prefix.
gnats
user. You can actually name this
user whatever you want to, as long as it is a valid username on your
system, but we strongly recommend that you call the user gnats
.
If you do decide to give it some other name, remember to use the option
--with-gnats-user
when running configure
below. Below, we
will anyway refer to this user by the name gnats
.
This user must have an entry in the file `/etc/passwd'. As for
ordinary users, create a standard home directory for the gnats
user. The default PATH
for this user should contain
`exec-prefix/bin' and
`exec-prefix/libexec/gnats'. The exec-prefix value
is configurable with the --exec-prefix
configure option described
below, but for standard installations, these two directories correspond
to `/usr/local/bin' and `/usr/local/libexec/gnats'.
configure
. You can nearly always run configure
with
the simple command
./configure |
and the "Right Thing" happens:
-d
databasename or --directory=
databasename, or
set the GNATSDB environment variable to point to some other database.
The most common options to configure
are listed below:
configure [ --prefix=prefix ] [ --exec-prefix=exec-prefix ] [ --with-gnats-service=service-name ] [ --with-gnats-user=username ] [ --with-gnatsd-user-access-file=path ] [ --with-gnatsd-host-access-file=path ] [ --with-gnats-dblist-file=path ] [ --with-gnats-default-db=path ] [ --with-kerberos ] [ --with-krb4 ] [ --verbose ] |
--prefix=prefix
--exec-prefix=exec-prefix
--with-gnats-service=service-name
--with-gnats-user=username
--with-gnatsd-user-access-file=path
--with-gnatsd-host-access-file=path
--with-gnats-dblist-file=path
Default is `prefix/etc/gnats/databases'.
--with-gnats-default-db=path
-d
or --databasename
option, and when the
GNATSDB envrionment variable hasn't been set. Default is
`/prefix/com/gnatsdb'.
--with-kerberos
--with-krb4
--verbose
configure
runs.
configure
supports several more options which allow you to
specify in great detail where files are installed. For a complete list
of options, run ./configure --help
in the source directory.
You can build GNATS in a different directory (objdir) from the
source code by calling the configure
program from the new
directory, as in
mkdir objdir cd objdir srcdir/configure ... |
By default, make
compiles the programs in the same directory
as the sources (srcdir).
make
, then run
make all info |
from the directory where configure
created a `Makefile'
(this is objdir if you used it, otherwise srcdir.) These
targets indicate:
all
info
makeinfo
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following steps are necessary for a complete installation. You may
need root
access for these.
make install install-info |
These targets indicate:
install
install-info
After you have installed GNATS, you can remove the object files with
make clean |
Place the following lines in the file `default.el' in your Emacs lisp library, or instruct your local responsible parties to place the lines in their `.emacs':
(autoload 'send-pr "gnats" "Command to create and send a problem report." t) (autoload 'edit-pr "gnats" "Command to edit a problem report." t) (autoload 'view-pr "gnats" "Command to view a problem report." t) (autoload 'query-pr "gnats" "Command to query information about problem reports." t) (autoload 'unlock-pr "gnats" "Unlock a problem report." t) (autoload 'gnats-dbconfig-mode "gnats" "Major mode for editing the `dbconfig' GNATS configuration file." t) (add-to-list 'auto-mode-alist '("\\ |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
For the following steps, log in as the user gnats
.
We are now going to initialize the default GNATS database. Run the following command:
mkdb default |
This creates a database named default
, with all its data stored
below the directory `prefix/com/gnatsdb', in a default
installation this corresponds to `/usr/local/com/gnatsdb'. If
you specified the --with-gnats-default-db
option when running
configure, the default database will be created under the directory you
specified instead. mkdb
creates the database directory itself,
together with three different subdirectories(2):
file-pr
.
The next configuration step is to edit the default files copied to the
database's `gnats-adm' directory by mkdb
.
The default `dbconfig' file installed by mkdb
provides a
good basis for many GNATS databases. The default file causes
similar behaviour to the 3.x versions of GNATS. However, even if
this might be precisely what you want, you should still go through the
file and check that the default settings suit your needs.
See section The `dbconfig' file.
Then edit the files `categories', `responsible', and `submitters' in the `gnats-adm' directory (see section Other database-specific config files) to reflect your local needs. For special configurations, you may also have to edit the `states' and `classes' files.
If you used the --with-gnats-default-db
option in the pre-build
configure to change the location of the default database, you need to
edit the `databases' config file, see The `databases file'. This file is by default located in the
`prefix/etc/gnats' directory, but may have been changed
by the option --with-gnats-dblist-file
option during configure.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Allow the new user gnats
access to cron
and at
. To
do this, add the name gnats
to the files `cron.allow' and
`at.allow', which normally reside in the directory
`/var/spool/cron'. If these files do not exist, make sure
gnats
does not appear in either of the files `cron.deny'
and `at.deny' (in the same directory). If you changed the name
of the GNATS user during configure, remember to substitute as
appropriate in the previous steps.
Create a crontab
entry that periodically runs the program
queue-pr
with the `--run' option
(see section queue-pr
). For example, to run
`queue-pr --run' every ten minutes, create a file called
`.mycron' in the home directory of the user gnats
which
contains the line:
0,10,20,30,40,50 * * * * exec-prefix/libexec/gnats/queue-pr --run |
(Specify the full path name for queue-pr
.) Then run
crontab .mycron |
See the man
pages for cron
and crontab
for details
on using cron
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following mail aliases must be added on the machine where the GNATS server is installed. The instructions below are for Sendmail or Sendmail-like mail systems. If these instructions don't fit your system, particularly if you do not have an `aliases' file, ask your mail administrator for advice.
The following aliases should be placed in the file
`/etc/aliases'. Yoy may need root
access to add these
aliases:
gnats-admin: address |
bugs: "| exec-prefix/libexec/gnats/queue-pr -q" |
This places incoming Problem Reports in
the `gnats-queue' directory of your database. Remember to
fill in the full path of the queue-pr
command as appropriate for
your installation.
bug-q: "| exec-prefix/libexec/gnats/queue-pr -q" bug-log: /some/path/bugs.log bugs: bug-q, bug-log |
This configuration archives incoming Problem Reports in the file
`bug.log', and also feeds them to the program queue-pr
.
(Remember, `bug.log' needs to be world-writable, and should be
pruned regularly; see section GNATS Administration.) In
order for the log file to protect fully against data loss in case a disk
runs full, try to place it on a different disk volume than the
GNATS database.
query-pr: "| exec-prefix/libexec/gnats/mail-query" |
The mail-query
program uses `--restricted' to search on the
database, and by default only searches for PRs that aren't closed
(see section Querying the database).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
By default, the daemon and clients are set to use port 1529. Add the line
support 1529/tcp # GNATS |
to your `/etc/services' file. If you want a different service name, configure GNATS with
--with-gnats-service=servicename |
In your `inetd.conf' file, add the line
support stream tcp nowait gnats /usr/local/libexec/gnats/gnatsd gnatsd |
adjusting the path accordingly if you used configure options to make
changes to the defaults. To make inetd
start spawning the
GNATS daemon when connected on that port, send it a hangup signal
(HUP
).
Some operating systems have replaced inetd
with the more modern
xinetd
. Instead of editing `inetd.conf', you should create
the file `/etc/xinetd.d/support', containing something like the
following:
service support { disable=no socket_type=stream protocol=tcp wait=no user=gnats server=/usr/local/libexec/gnats/gnatsd server_args=gnatsd } |
If you specified a different service name when running configure
,
you need to give the file the same name as the service name, and you
need to adjust the service
line above. If the --prefix
or
--exec-prefix
options were passed to configure
, adjust the
server
line above, and if you used the --with-gnats-user
option, adjust the user
line.
Then restart xinetd
to make the new configuration current.
If you use an Internet superserver different from inetd
or
xinetd
, please refer to its documentation for information how
to configure it.
At this point, you will probably want to set the access permissions of the different hosts that are going to be accessing your databases. The access permissions can currently only be set on a global scale (that is, across all the databases on a GNATS server). The location and name of the global host access configuration file can be set during the pre-build configure as shown above, but by default the file is `/usr/local/etc/gnats/gnatsd_host.access'. It lists the hosts allowed to access your server, and what their default access levels are. Each line in the file denotes one server, or one part of a network domain. There are three fields on each line, but only two are currently used. To grant all hosts from the domain site.com edit access, use this line:
site.com:edit
If you run a GNATS web interface or similar tool on the same machine as the server is running on, you probably want to grant localhost edit access:
localhost:edit
If you are using Kerberos, the `gnatsd_host.access' file shows the sites that don't require Kerberos authentication.
The third field might in the future be used for things like controlling what categories, submitter-id's PRs, etc., can be accessed from that site. Access attempts that are denied are logged to the syslog messages file (`/var/adm/messages' on many systems).
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
When you install the GNATS utilities, the user tools are installed
by default on the host machine. If your machine is part of a network,
however, you may wish to install the user tools on each machine in the
network so that responsible parties on those machines can submit new
Problem Reports, query the database, and edit existing PRs. To do this,
follow these steps on each new host. You may need root
access on
each machine.
(still to be written...)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The following procedure covers an upgrade from all GNATS 3 versions newer than 3.108. If your installation is an older 3.10x version, or even the ancient 3.2 version, you need to review the `UPGRADING.old' file in the GNATS distribution before carrying out the steps detailed here.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Although almost all of the GNATS internals have been redesigned and
rewritten for GNATS 4, little has changed in the format and
structure of the database data. The only change that needs to be taken
into account when upgrading is the fact that the database index format
is binary in a default installation of GNATS 4. Thus, you will
need to regenerate your database index by using the gen-index
tool.
Apart from building and installing new binaries, the major changes which impinge on the upgrade procedure are all on the configuration side. The main database configuration file, `dbconfig', is far more complex and powerful than the old `config' file, and while the installation process creates a sensible set of default values which are similar to GNATS 3.11x's defaults, you still need to migrate any changes you may have made to your own local configuration.
Another aspect which needs consideration are remote submitter sites.
Such sites either need to be instructed to upgrade their locally
installed copies of the GNATS user tools (send-pr
,
edit-pr
and query-pr
), or they should be given access
through interfaces such as Gnatsweb.
Since the GNATS network daemon has been completely reworked, with an entirely new command set, all network-based interfaces, such as Gnatsweb and TkGnats need to be upgraded to versions that support GNATS 4. The `contrib' directory of this distribution contains some third-party interfaces, and the `README' file contains pointers to where you can obtain the newest versions of these tools.
This document only deals with upgrading GNATS itself. Third-party tools should have separate upgrading instructions in their distributions.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
send-pr
, query-pr
etc.) The
locations of these may vary, but in a default GNATS 3 installation,
the database(s) reside under `/usr/local/share/gnats', the
executables are located in `/usr/local/libexec/gnats' and the
user tools reside in `/usr/local/bin'.
--with-gnats-default-db
option when running configure
,
in order to set the default database to be one of your already existing
GNATS 3 databases.
gnatsd
. There is one `gnatsd.conf' for each database. In
GNATS 4, these files have been replaced by a single file named
`gnatsd.host_access' which contains settings that apply across all
the databases on the server. This file is located in the same directory
as the `databases' file. You need to combine the host access
settings from all your GNATS 3 databases and add them to the
`gnatsd.host_access' file. Note that you are no longer able to
control host access on a per-database basis. Optionally, you may delete
the old `gnatsd.conf' files. See section Controlling access to GNATS databases.
--with-gnats-default-db
configure option
got a default `dbconfig' installed. This default file contains
field definitions etc. which makes this version of GNATS behave
almost exactly like older versions. Copy this default file to the
`gnats-adm' directories of any other GNATS databases that
you may have on your host before you proceed to migrate your old
configuration settings.
The following is a list of the configuration directives that may be present in a `config' file and their counterparts (if any) in GNATS 4.
default
keyword in these sections. See section The `dbconfig' file.
notify-about-expired-prs
setting in the
`dbconfig' file.
send-submitter-ack
setting in the
`dbconfig' file.
keep-all-received-headers
setting in the
`dbconfig' file.
debug-mode
setting in the `dbconfig' file.
business-day-hours
and
business-week-days
in the `dbconfig' file.
After your are done migrating the settings, you may optionally delete the old `config' files. Since there are many more configuration settings available in the GNATS 4 `dbconfig' file, you should take some time to review them all before proceeding. See section The `dbconfig' file.
crypt()
and MD5 passwords (see section Controlling access to GNATS databases). You need to translate your old
`gnatsd.access' files to the new format by using the
gnats-pwconv
tool which was installed in the
`EXEC-PREFIX/libexec/gnats' directory, typically
`/usr/local/libexec/gnats'. See section Managing user passwords.
gnats
. Then run the gen-index
command for each of your databases. See Administrative Utilities for details on how to use
gen-index
.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |