*banner
 
 

Gnats

Contents
  • Installation
  • Gnatsweb
  • Remote resources
  • Yahoo Gnats links
  • Gnats Web Resources
  • Redhat Gnats page
  • Local Resources Bug Handlers

    Installation

    A prebuilt installation can be found at ftp//ftp.sunfreeware.com/pub/freeware/sparc/8/gnats-3.113-sol8-sparc-local.gz

    The following files are installed:

    /usr/local/bin/edit-pr
    /usr/local/bin/getclose
    /usr/local/bin/install-sid
    /usr/local/bin/nedit-pr
    /usr/local/bin/nquery-pr
    /usr/local/bin/query-pr
    /usr/local/bin/send-pr
    /usr/local/bin/sub-type
    /usr/local/doc/gnats/COPYING
    /usr/local/doc/gnats/COPYING.LIB
    /usr/local/doc/gnats/CYGNUS
    /usr/local/doc/gnats/ChangeLog
    /usr/local/doc/gnats/README
    /usr/local/lib/libiberty.a 
    /usr/local/libexec/gnats/gnats-edit-pr
    /usr/local/libexec/gnats/npr-addr
    /usr/local/libexec/gnats/npr-edit
    /usr/local/libexec/gnats/pr-addr
    /usr/local/libexec/gnats/pr-age
    /usr/local/libexec/gnats/pr-edit
    /usr/local/libexec/gnats/pr-mail
    /usr/local/man/man1/edit-pr.1
    /usr/local/man/man1/query-pr.1
    /usr/local/man/man1/send-pr.1
    /usr/local/share/emacs/site-lisp/gnats.el
    /usr/local/share/emacs/site-lisp/gnats.elc
    /usr/local/share/emacs/site-lisp/send-pr.el
    /usr/local/share/gnats/cygnus
    
    However, gnatsd is not installed, and gnats web requires it so we have to rebuild

      Source can be found at ftp://ftp.freesoftware.com/sourceware/gnats/snapshots/gnats-3.113.tar.gz (11/8/99)

      But wait! Gnats 4 can be found at http://sources.redhat.com/gnats/gnats4inst.html

      cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/gnats login
      password: anoncvs
      cvs -z9 -d :pserver:anoncvs@sources.redhat.com:/cvs/gnats co -P gnats
      
      Note that you will need to install bison, flex and texinfo before compiling gnats, try: ftp://mirrors.xmission.com/sunfreeware/sparc/8
    1. ./configure
      make
      make install
      
      
    2. Set up the gnats user, /etc/passwd
      gnats:x:8647:20:GNU Bug Tracking System:/usr/local/com:/bin/csh
      
      Added the user to /etc/shadow, too
  • Created /usr/local/com/.cshrc and added /usr/local/bin and /usr/local/libexec/gnats to the gnats user's path.
  • As root, became the gnats user with su - gnats, and then ran
    mkdb /usr/local/com/gnatsdb
    
  • As root, added the following to /etc/aliases
    ## Gnats stuff, see /infrax/sysadmin/gnats.htm
    ## create 04-Apr-2001 cxh
    gnats-admin:    cxh
    bug-queue:      "| /usr/local/libexec/gnats/queue-pr -q"
    bug-log:        "/usr/local/com/adm/bugs.log
    bugs: bug-queue, bug-log
    query-pr:       "| /usr/local/libexec/gnats/mail-query"
    
    then ran newaliases
  • Set up the gnats cronjob by creating /usr/local/com/.mycron
    As root:
    echo "gnats" >> /etc/cron.d/cron.allow
    

    As gnats crontab .mycron
  • Added the following to /etc/services
    support         1529/tcp                        # GNATS
    
  • Added the following to /etc/inetd.conf
    #
    # Gnats bug handling system
    #
    support stream tcp nowait gnats /usr/local/lib/gnats/gnatsd gnatsd
    
    And then did kill -1 on the inetd process

    gnatsweb

    Gnatsweb can be found at gnats/contrib/gnatsweb. That directory contains an INSTALL file

    1. Run the tests
      cd /export/home/tools/gnats/contrib/gnatsweb
      make test USERNAME=gnats PASSWORD=password DATABASE=default
      
    2. Upgrade perl if necessary, see below
    3. Edit gnatsweb.pl and change /usr/bin/perl to /usr/local/bin/perl
    4. Copy the CGI scripts
      cp gnatsweb.pl /home/www/cgi-bin
      cp gnatsweb-site-sente.pl /home/www/cgi-bin/gnatsweb-site.pl
      
    5. Edit /home/www/cgi-bin/gnatsweb-site.pl and change the title and the location of the help file
    6. Try it out: cgi-bin/gnatsweb.pl

    Gnatsweb problems

    CGI version 2.56 required

    [Wed Apr  4 01:07:47 2001] test.pl: [Wed Apr  4 01:07:47 2001] test.pl: [Wed Ap\
    r  4 01:07:47 2001] test.pl: CGI version 2.56 required--this is only version 2.\
    46 at gnatsweb.pl line 96.
    
    Solution: upgrade to perl5.6.0 from ftp://mirrors.xmission.com/sunfreeware/sparc/8 Be sure to edit gnatsweb.pl and change /usr/bin/perl to /usr/local/bin/perl

    Can't telnet to the gnatsd port

    gnats %C2> telnet localhost 1529
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    Connection closed by foreign host.
    
    Solution:

    Set up /usr/local/share/gnats/gnatsd.access:

    adsl-63-197-18-103.dsl.snfc21.pacbell.net:edit
    mysite.eecs.berkeley.edu:edit
    www.mysite.org:edit
    .eecs.berkeley.edu:view
    *:deny:
    

    make test fails with no such database

    mysite:root: %C2> make test USERNAME=gnats PASSWORD=rock.sky DATABASE=gnatsdb
    perl test.pl
    <h2>Error: HCPRUN417E No such database as gnatsdb
    </h2>
    connect...........................................FAIL
    
    The fix is to use DATABASE=default. I figured this out by running truss:
    mysite:root: %C2> truss -o /tmp/tr /usr/local/libexec/gnats/gnatsd
    200 mysite.eecs.berkeley.edu GNATS server 4.0-alpha ready.
    chdb gnatsdb
    417 No such database as gnatsdb
    chdb default
    210-Now accessing GNATS database 'default'
    210 User access level set to 'none'
    
    The end of /tmp/tr contains
    open("/usr/local/etc/gnats/databases", O_RDONLY) = 3
    
    The file /usr/local/etc/gnats/databases contains:
    default:Bug database:/usr/local/com/gnatsdb
    

    Access denied

    mysite:root: contrib/gnatsweb> make test USERNAME=anon PASSWORD=pw DATABASE=default
    perl test.pl
    <h2>Error: HCPRUN422E Access denied
    </h2>
    connect...........................................FAIL
    mysite:root: contrib/gnatsweb>
    
    Solution:

    Run truss again, and realize that /usr/local/com/gnatsdb/gnats-adm/gnatsd.access is being accessed.

    gnats:password:edit
    *:deny:
    
    password is the actual password. Then try running
    make test USERNAME=gnats PASSWORD=password DATABASE=default
    
    If necessary, edit the makefile and change
    	$(PERL) test.pl
    
    	$(PERL) -d test.pl
    

    Software error, Can't locate MIME/Base64.pm

    The solution is to follow the Installation instructions and run
    perl -MCPAN -e 'install MIME::Base64'
    
    

    Setting up for a new workgroup

    If a workgroup wants to set up a bug database, below are the necessary steps. Some of this text comes from http://sources.redhat.com/gnats/gnats4inst.html
    1. Become the gnats user on mysite and create a database:
      mkdb /usr/local/com/ptolemy
      
      Note that mkdb will print a message about editing a database file, but it is the wrong file.
    2. Edit /usr/local/etc/gnats/databases and add a new line for the database:
      ptolemy:Ptolemy Bug Database:/usr/local/com/ptolemy
      
    3. This creates a database named ptolemy with data directory as specified. mkdb creates the data directory. Three subdirectories of the data directory are created:
    4. A directory for the mandatory gnats category "pending".
    5. A "gnats-queue" directory for queueing new messages to GNATS before they're processed by file-pr.
    6. The config directory "gnats-adm". "gnats-adm" is populated with default config files from the DATADIR/share/gnats/defaults directory.
    7. Then edit the database configuration files in /usr/local/com/ptolemy/gnats-adm
      Begin with the file 'dbconfig', then edit 'categories', 'responsible' and 'submitters' to match your desired config. You may also want to edit 'addresses'. The files 'classes' and 'states' have sensible defaults that should fit most installations.
      dbconfig
      Usually, this file does not need to be edited, but this is where the severity and priority settings are done.
      categories
      Add categories for the project FIXME: The admins should be able to edit these
      submitters
      Add each member of the group. FIXME: This should be updated automatically. Perhaps developers should be added automatically.
    8. Edit /usr/local/com/gnatsdb/gnats-adm/gnatsd.access and add a user and password for the new database:
      ptolemy:password:edit
      
    9. Mail aliases need to be set up
  • ©2002-2018 Chess