See section Where GNATS lives.
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 section Upgrading from older versions.
In order to build GNATS, you will need to have GNU m4
installed; most systems ship with a version of m4
that is not able to
work with the `config.m4' file.
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
section Where GNATS lives.
query-pr
, nquery-pr
, edit-pr
,
send-pr
) around your network. See section Installing the user tools.
config categories submitters responsible gnatsd.conf gnatsd.access states classes addressesin `GNATS_ROOT/gnats-adm'. See section Changing your local configuration.
send-pr
for submitters outside your
organization. See section Configuring send-pr
for the outside world.
tar
file which was compressed using gzip
. The code can be extracted
into a directory unpackdir using
cd unpackdir tar zxvf gnats-3.113.tar.zThe sources reside in a directory called `gnats-3.113' 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-3.113/gnats/*'. Lists of files included in the distribution are in each directory in the file `MANIFEST'.
srcdir/gnats/Makefile.in and srcdir/send-pr/Makefile.inChange the variable `lispdir' from `$(datadir)/emacs/site-lisp' to the directory containing your Emacs lisp library. For information on prefix, see section prefix.
configure
. You can nearly always run configure
with
the command
./configure --with-full-gnatsand the "Right Thing" happens:
configure
is:
configure [ --with-full-gnats ] [ --prefix=prefix ] [ --exec-prefix=exec-prefix ] [ --with-gnats-root=GNATS_ROOT ] [ --with-gnats-server=hostname ] [ --with-gnats-service=service-name ] [ --with-gnats-user=username ] [ --with-gnats-port=port-number ] [ --verbose ]
--with-full-gnats
--prefix=prefix
--exec-prefix=exec-prefix
--with-gnats-root=GNATS_ROOT
--with-gnats-server=hostname
--with-gnats-service=service-name
--with-gnats-user=username
--with-gnats-port=port-number
--verbose
configure
runs.
configure
' in Cygnus configure.
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). Emacs lisp files are byte-compiled if
make
can find Emacs on your local system.
make all infofrom the directory where
configure
created a `Makefile'
(this is objdir if you used it, otherwise srcdir.) These
targets indicate:
all
info
makeinfo
.
The following steps are necessary for a complete installation. You may
need root
access for these.
gnats
. This user must have an
entry in the file `/etc/passwd'. The home directory for this
account should be the same directory you specified for GNATS_ROOT.
Also, the default PATH
for this
user should contain `exec-prefix/bin' and
`exec-prefix/libexec/gnats'.
make install install-infoThese targets indicate:
install
install-info
make clean
(autoload 'edit-pr "gnats" "Command to edit a problem report." t) (autoload 'view-pr "gnats" "Command to view a problem report." t) (autoload 'unlock-pr "gnats" "Unlock a problem report." t) (autoload 'query-pr "gnats" "Command to query information about problem reports." t) (autoload 'send-pr-mode "send-pr" "Major mode for sending problem reports." t) (autoload 'send-pr "send-pr" "Command to create and send a problem report." t)Emacs lisp files are byte-compiled if
make
can find Emacs on your
local system.
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).
For the following steps, log in as gnats
.
mkcat
after you update
the `categories' file (see section Adding a problem category). Note: these templates are not installed if they
already exist, i.e. if you are upgrading. See section Upgrading from older versions.
crontab
entry that periodically runs the program
queue-pr
with the `--run' option. 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 .mycronSee the
man
pages for cron
and crontab
for details
on using cron
.
The following mail aliases must be placed in the file
`/etc/aliases' on the same machine where the GNATS tools
are installed. You 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 `GNATS_ROOT/gnats-queue'.
config
file), with an added suffix `-gnats'. This alias,
`GNATS_SITE-gnats', should point toward the local
submission address. For instance, if your site is Tofu Technologies,
the presence of GNATS on your site would be aliased as the
following (the previous example is also shown):
bugs: "| exec-prefix/libexec/gnats/queue-pr -q" tofu-gnats: bugsThe report submission utility
send-pr
automatically appends the
`-gnats' to any arguments you specify (see section Submitting Problem Reports). The send-pr
which was installed when you
typed make install has a default argument of GNATS_SITE,
your site, so that when your local users simply type send-pr mail
is sent to your local GNATS. Part of the installation process a
Submitter Site follows when installing send-pr
is to set up an
alias for the Support Site from whom this submitter received
send-pr
. In other words, anyone you distribute send-pr
to
is instructed to make an alias
tofu-gnats: bugs@tofu.com
bug-q: "| exec-prefix/libexec/gnats/queue-pr -q" bug-log: GNATS_ROOT/gnats-adm/bugs.log bugs: bug-q, bug-logThis configuration archives incoming Problem Reports in the file `GNATS_ROOT/gnats-adm/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.)
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).
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 port, or a different service name or port, configure GNATS with
--with-gnats-service=servicename --with-gnats-port=portnumber
In your `inetd.conf' file, add the line
support stream tcp nowait gnats /usr/local/lib/gnats/gnatsd gnatsd
adjusting the path accordingly. To make inetd
start spawning the GNATS daemon
when connected on that port, send it a hangup signal (HUP
).
By default, the server for the GNATS daemon is assumed to be one with the name of `gnats'. If you'd like something else, use
--with-gnats-server=hostname
In the `gnats-adm' directory, you'll want to edit `gnatsd.conf'. It lists the hosts allowed to access your server and their default access level. Or, if you're using Kerberos, it shows the sites that don't require Kerberos authentication. The format is reserved for future revision; only the first two fields are actually used:
site.com:view:
The third field might in the future be used for things like controlling what categories, submitter-id'd PRs, etc., can be accessed from that site. In the file that logs syslog messages (`/var/adm/messages', for example) you'll find the notification of denied access.
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.
configure
, without specifying
`--with-full-gnats', and using the same argument (if any) for
the option
--with-gnats-root=GNATS_ROOTthat you specified when building the GNATS utilites (see section Configuring and compiling the software). You may use different values for the other options to
configure
.
Again, do not use `--with-full-gnats' at this point, as
that creates all the GNATS programs. Without this option,
configure
only instructs the resulting `Makefile' to create
the user utilities.
You may need root
access on each host for the following steps.
gnats
must be the same as on the main GNATS host.
make all info install install-infoThis builds and installs the
gnats
user tools query-pr
,
edit-pr
, and send-pr
on the new host, and installs
them in `exec-prefix/bin' on the new host (Note:
the value for exec-prefix on the new host may be different from
the value you used when building the GNATS utilities;
see section exec-prefix). The programs pr-edit
and pr-addr
are installed into
`exec-prefix/libexec/gnats'.
info
files are created as well, and are installed into
`prefix/info'. The Elisp files `gnats.el' and
`send-pr.el' (and possibly `gnats.elc'
if make
was able to compile them using Emacs) are installed into
`prefix/share/emacs/site-lisp' unless you change the
`lispdir' variable in `Makefile.in' (see section Configuring and compiling the software).
(autoload 'edit-pr "gnats" "Command to edit a problem report." t) (autoload 'view-pr "gnats" "Command to view a problem report." t) (autoload 'unlock-pr "gnats" "Unlock a problem report." t) (autoload 'query-pr "gnats" "Command to query information about problem reports." t) (autoload 'send-pr-mode "send-pr" "Major mode for sending problem reports." t) (autoload 'send-pr "send-pr" "Command to create and send a problem report." t)
send-pr
uses (see section Where GNATS lives).
site is your local site, the value of `GNATS_SITE' in the
`config' file (see section The config
file).
If you are upgrading from a previous release of GNATS, you probably do not want to delete your current configuration files or your current database. The new GNATS can be installed around the older version.
You need to:
configure
when you build the new tools, with
configure --with-full-gnats --with-gnats-root=GNATS_ROOT(See section Configuring and compiling the software.)
queue-pr
now
resides in `exec-prefix/libexec/gnats' rather than
`GNATS_ROOT/gnats-bin' (see section Where GNATS lives).
PATH
for the gnats
user to search the
directories `exec-prefix/bin' and
`exec-prefix/libexec/gnats'.
send-pr
to your Submitter Sites
(see section Configuring send-pr
for the outside world).
This is not absolutely necessary, as GNATS can read Problem Reports
generated by older versions of send-pr
. It should be done
eventually, however, as send-pr
is improved over older
verisons.
Go to the first, previous, next, last section, table of contents.