How To Create Your Own GNATS Mirror
This is the procedure MarkLinimon uses for mirroring GNATS via cvsup for portsmon.
Notes
This is preliminary. Let me know what I left out.
- The version of GNATS currently on Freefall is databases/gnats (GNATS 3). The version of the index file that is pushed via cvsup is that version. I strongly recommend that you install GNATS 4 and do the conversion process locally. (At some point I will do the upgrade on freefall).
- The procedure I use does not use the default recommended directories. It makes more sense for me, however.
Procedure
- Install databases/gnats4. This should add user 61:1.
- I have the following /etc/passwd entries for cvsup:
cvsup:*:1004:1005:CVSup Daemon:/nonexistent:/nonexistent
cvsupin:*:1005:1006:CVSup Client:/home/cvsupin:/nonexistent
- Create /home/gnats 775 cvsupin:daemon
- Create /home/sup 755 root:wheel
- Create /var/sup 755 root:wheel
- Create /var/sup/gnats 755 cvsup:daemon
Create /var/sup/gnats/refuse 644 cvsup:daemon. The minimum entries you will want:
- gnats/backup
- gnats/gnats-adm/index
- gnats/gnats-queue
- gnats/junk
- gnats/pending
- gnats/spam
- gnats/test gnats/tools contains all our addons to GNATS, including the web query driver, the index-regeneration file reindex.sh, the freefall cronjobs, and other script additions by various FreeBSD contributors. You will want this. You will get all the GNATS categories by default, unless you add them to the above.
- Create /home/sup/gnats-supfile 644 cvsup:cvsup:
- *default base=/var
- *default prefix=/home
- *default release=current
- *default delete use-rel-suffix
- gnats
- In file /usr/local/etc/gnats/databases: s@/var/db/gnats/gnatsdb@/home/gnats@
- Create a crontab for gnats:
- 5 * * * * /usr/local/bin/dognats
- Create /usr/local/bin/dognats 555 root:wheel:
- BIN_HOME=/usr/gnats/tools
- SUPFILE_HOME=/home/sup
- SUPFILE_TMP=/var/sup/tmp
- TMP=/tmp
umask 0002 && cvsup -g -l ${SUPFILE_TMP}/cvsup.gnats.lockfile -L 1 -r 0 ${SUPFILE_HOME}/gnats-supfile
- ${BIN_HOME}/reindex.sh reindex.sh is only needed for GNATS 4.
You should now be able to do queries. NOTE: any changes you make to your local db will be wiped out on the next cvsup operation.
Also see: LocalGnatsTree