From 896186cc9cc3843e0b747f11721a613b4461de3d Mon Sep 17 00:00:00 2001 From: dugsong Date: Fri, 12 Jan 2001 17:14:51 +0000 Subject: [PATCH] GNATS, the GNU Problem Report Management System. FLAVOR=www adds the gnatsweb CGI interface. --- databases/gnats/Makefile | 48 ++++++ databases/gnats/files/README.OpenBSD | 51 ++++++ databases/gnats/files/md5 | 3 + .../gnats/patches/patch-gnats_Makefile.in | 150 ++++++++++++++++++ databases/gnats/patches/patch-gnats_cmds.c | 43 +++++ .../gnats/patches/patch-gnats_internal.c | 40 +++++ .../gnats/patches/patch-gnats_queue-pr.c | 37 +++++ .../gnats/patches/patch-send-pr_Makefile.in | 23 +++ databases/gnats/pkg/COMMENT | 1 + databases/gnats/pkg/DEINSTALL | 55 +++++++ databases/gnats/pkg/DESCR | 16 ++ databases/gnats/pkg/INSTALL | 80 ++++++++++ databases/gnats/pkg/PFRAG.www | 2 + databases/gnats/pkg/PLIST | 97 +++++++++++ 14 files changed, 646 insertions(+) create mode 100644 databases/gnats/Makefile create mode 100644 databases/gnats/files/README.OpenBSD create mode 100644 databases/gnats/files/md5 create mode 100644 databases/gnats/patches/patch-gnats_Makefile.in create mode 100644 databases/gnats/patches/patch-gnats_cmds.c create mode 100644 databases/gnats/patches/patch-gnats_internal.c create mode 100644 databases/gnats/patches/patch-gnats_queue-pr.c create mode 100644 databases/gnats/patches/patch-send-pr_Makefile.in create mode 100644 databases/gnats/pkg/COMMENT create mode 100644 databases/gnats/pkg/DEINSTALL create mode 100644 databases/gnats/pkg/DESCR create mode 100644 databases/gnats/pkg/INSTALL create mode 100644 databases/gnats/pkg/PFRAG.www create mode 100644 databases/gnats/pkg/PLIST diff --git a/databases/gnats/Makefile b/databases/gnats/Makefile new file mode 100644 index 00000000000..80cc07ea3d4 --- /dev/null +++ b/databases/gnats/Makefile @@ -0,0 +1,48 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2001/01/12 17:14:51 dugsong Exp $ + +DISTNAME= gnats-3.113 + +CATEGORIES= databases devel + +MASTER_SITES= ftp://ftp://sourceware.cygnus.com/pub/gnats/snapshots/ \ + ftp://ftp.freesoftware.com/pub/sourceware/gnats/snapshots/ \ + ftp://gd.tuwien.ac.at/gnu/sourceware/gnats/snapshots/ \ + ftp://ftp.chg.ru/pub/sourceware/gnats/snapshots/ + +HOMEPAGE= http://sources.redhat.com/gnats/ + +MAINTAINER= Dug Song + +FLAVORS= www +FLAVOR?= + +.if ${FLAVOR:L:Mwww} +RUN_DEPENDS+= ${PREFIX}/libdata/perl5/site_perl/${ARCH}-openbsd/MIME/Base64.pm::converters/p5-MIME-Base64 +.endif + +# GPL +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes + +CONFIGURE_STYLE= gnu dest +CONFIGURE_ARGS+=--with-full-gnats --with-release-based +CONFIGURE_ENV+= SEND_PR=/usr/bin/false + +INSTALL_TARGET= install-gnats install-send-pr install-info + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/gnats/ + sed "s%y0y0y0%${TRUEPREFIX}%g" ${FILESDIR}/README.OpenBSD > \ + ${PREFIX}/share/doc/gnats/README.OpenBSD + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/gnats/ + sed "s%/var/lib%${TRUEPREFIX}/share%g" \ + ${WRKDIST}/gnats/gnats-db.conf > \ + ${PREFIX}/share/examples/gnats/gnats-db.conf +.if ${FLAVOR:L:Mwww} + ${INSTALL_PROGRAM} ${WRKDIST}/contrib/gnatsweb/gnatsweb.pl \ + ${PREFIX}/lib/gnatsweb +.endif + +.include diff --git a/databases/gnats/files/README.OpenBSD b/databases/gnats/files/README.OpenBSD new file mode 100644 index 00000000000..ede1e28f391 --- /dev/null +++ b/databases/gnats/files/README.OpenBSD @@ -0,0 +1,51 @@ + +Post-installation +----------------- + +1. Add the following to /etc/services: + +support 1529/tcp # GNATS + +2. Add the following to /etc/inetd.conf and HUP inetd: + +support stream tcp nowait gnats y0y0y0/libexec/gnats/gnatsd gnatsd + +3. Edit the config files in y0y0y0/share/gnats/gnats-db/gnats-adm + (see the GNATS info documentation, HTML'ized at + http://sunsite.ualberta.ca/Documentation/Gnu/gnats-3.113/) + to your liking, then run (as root): + + su -m gnats -c 'GNATS_ROOT=y0y0y0/share/gnats/gnats-db y0y0y0/libexec/gnats/mkcat' + +4. As root, do + + su -m gnats -c 'crontab -e' + + and add the following entry: + +0,10,20,30,40,50 * * * * y0y0y0/libexec/gnats/queue-pr --run + +5. Add the following lines to /etc/aliases and run 'newaliases': + +# GNATS support +gnats-admin: root +bugs: "|y0y0y0/libexec/gnats/queue-pr -q" +monkey-gnats: bugs + + where 'monkey' is replaced with the configured value of GNATS_SITE in + y0y0y0/share/gnats/gnats-db/config. + +6. If you built with FLAVOR=www, and want to run gnatsweb, add + +127.0.0.1:view: + +to y0y0y0/share/gnats/gnats-db/gnats-adm/gnatsd.access. You may +increase priveleges for all users of gnatsweb by changing 'view' to +'edit', or for individual users by adding rules to +y0y0y0/share/gnats/gnats-db/gnats-adm/gnatsd.access. + +Post-deinstallation +------------------- + +Reverse all of the above! :-) + diff --git a/databases/gnats/files/md5 b/databases/gnats/files/md5 new file mode 100644 index 00000000000..92e812cc53e --- /dev/null +++ b/databases/gnats/files/md5 @@ -0,0 +1,3 @@ +MD5 (gnats-3.113.tar.gz) = cb1f3424c4372665b6204783dcc6984f +RMD160 (gnats-3.113.tar.gz) = b516c79efb5166b56322ccc8e25aff247c70575f +SHA1 (gnats-3.113.tar.gz) = 7a5146a0e326426fa0115980f18586f3caccd196 diff --git a/databases/gnats/patches/patch-gnats_Makefile.in b/databases/gnats/patches/patch-gnats_Makefile.in new file mode 100644 index 00000000000..396e9284dc8 --- /dev/null +++ b/databases/gnats/patches/patch-gnats_Makefile.in @@ -0,0 +1,150 @@ +--- gnats/Makefile.in.orig Wed Jan 10 15:30:59 2001 ++++ gnats/Makefile.in Wed Jan 10 16:00:52 2001 +@@ -256,7 +256,7 @@ + + all-tools: libgnats.a query-pr nquery-pr pr-addr npr-addr pr-age pr-edit \ + npr-edit pr-mail sub-type gnats-edit-pr edit-pr nedit-pr getclose \ +- gnats.elc config-send-pr tools-man-pages ++ config-send-pr tools-man-pages + + libgnats.a: $(LIBOBJS) + -rm -f tmplibgnats.a libgnats.a +@@ -489,14 +489,12 @@ + # Create $(datadir)/gnats so that mkcat can find it + install-tools-arch-indep: all-tools + $(SHELL) $(srcdir)/../mkinstalldirs $(datadir)/gnats +- @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ ++ @if false; then \ + echo "chown $(GNATS_USER) $(datadir)/gnats" ; \ + chown $(GNATS_USER) $(datadir)/gnats ; \ + else \ + echo "*** Warning: Must chown $(GNATS_USER) $(datadir)/gnats" ; \ + fi +- $(INSTALL_DATA) gnats.el $(lispdir)/gnats.el +- test -f gnats.elc && $(INSTALL_DATA) gnats.elc $(lispdir)/gnats.elc + + install-tools-bin: all-tools + $(INSTALL_PROGRAM) query-pr $(bindir)/query-pr +@@ -512,13 +510,14 @@ + $(INSTALL_PROGRAM) npr-edit $(libexecdir)/gnats/npr-edit + $(INSTALL_PROGRAM) pr-mail $(libexecdir)/gnats/pr-mail + $(INSTALL_PROGRAM) sub-type $(bindir)/sub-type +- @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ ++ @if false; then \ + echo "chown $(GNATS_USER) $(libexecdir)/gnats/pr-edit" ; \ + echo "chmod 4555 $(libexecdir)/gnats/pr-edit" ; \ + chown $(GNATS_USER) $(libexecdir)/gnats/pr-edit ; \ + chmod 4555 $(libexecdir)/gnats/pr-edit ; \ + else \ + echo "*** Warning: Must make pr-edit suid $(GNATS_USER)" ; \ ++ chmod 555 $(libexecdir)/gnats/pr-edit ; \ + fi + + EXTRA_INSTALL = +@@ -533,7 +532,7 @@ + $(SHELL) $(srcdir)/../mkinstalldirs $(GNATS_ROOT)/gnats-adm/locks + $(SHELL) $(srcdir)/../mkinstalldirs $(GNATS_ROOT)/gnats-queue + $(SHELL) $(srcdir)/../mkinstalldirs $(GNATS_ROOT)/pending +- @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ ++ @if false; then \ + echo "chown $(GNATS_USER) $(GNATS_ROOT) $(GNATS_ROOT)/gnats-adm $(GNATS_ROOT)/pending"; \ + echo "chown $(GNATS_USER) $(GNATS_ROOT)/gnats-adm/locks $(GNATS_ROOT)/gnats-queue" ; \ + chown $(GNATS_USER) $(GNATS_ROOT) $(GNATS_ROOT)/gnats-adm $(GNATS_ROOT)/pending ; \ +@@ -545,33 +544,34 @@ + echo "Not putting categories file in gnats-adm, it's already there." ; \ + true ; \ + else \ +- $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/categories \ ++ $(INSTALL_DATA) $(srcdir)/categories \ + $(GNATS_ROOT)/gnats-adm/categories ; \ + fi + @if [ -f $(GNATS_ROOT)/gnats-adm/responsible ]; then \ + echo "Not putting responsible file in gnats-adm, it's already there." ; \ + true ; \ + else \ +- $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/responsible \ ++ $(INSTALL_DATA) $(srcdir)/responsible \ + $(GNATS_ROOT)/gnats-adm/responsible ; \ + fi + @if [ -f $(GNATS_ROOT)/gnats-adm/submitters ]; then \ + echo "Not putting submitters file in gnats-adm, it's already there." ; \ + true ; \ + else \ +- $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/submitters \ ++ $(INSTALL_DATA) $(srcdir)/submitters \ + $(GNATS_ROOT)/gnats-adm/submitters ; \ + fi + @if [ -f $(GNATS_ROOT)/gnats-adm/gnatsd.access ]; then \ + echo "Not putting gnatsd.access file in gnats-adm, it's already there." ; \ + true ; \ + else \ +- $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/gnatsd.access \ ++ $(INSTALL_DATA) $(srcdir)/gnatsd.access \ + $(GNATS_ROOT)/gnats-adm/gnatsd.access ; \ + fi +- @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ ++ @if false; then \ + echo "chown $(GNATS_USER) $(GNATS_ROOT)/gnats-adm/gnatsd.access" ; \ + chown $(GNATS_USER) $(GNATS_ROOT)/gnats-adm/gnatsd.access ; \ ++ else \ + echo "chmod 600 $(GNATS_ROOT)/gnats-adm/gnatsd.access" ; \ + chmod 600 $(GNATS_ROOT)/gnats-adm/gnatsd.access ; \ + fi +@@ -579,35 +579,35 @@ + echo "Not putting gnatsd.conf file in gnats-adm, it's already there." ; \ + true ; \ + else \ +- $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/gnatsd.conf \ ++ $(INSTALL_DATA) $(srcdir)/gnatsd.conf \ + $(GNATS_ROOT)/gnats-adm/gnatsd.conf ; \ + fi + @if [ -f $(GNATS_ROOT)/gnats-adm/addresses ]; then \ + echo "Not putting addresses file in gnats-adm, it's already there." ; \ + true ; \ + else \ +- $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/addresses \ ++ $(INSTALL_DATA) $(srcdir)/addresses \ + $(GNATS_ROOT)/gnats-adm/addresses ; \ + fi + @if [ -f $(GNATS_ROOT)/gnats-adm/config ]; then \ + echo "Not putting config file in gnats-adm, it's already there." ; \ + true ; \ + else \ +- $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/config \ ++ $(INSTALL_DATA) $(srcdir)/config \ + $(GNATS_ROOT)/gnats-adm/config ; \ + fi + @if [ -f $(GNATS_ROOT)/gnats-adm/states ]; then \ + echo "Not putting states file in gnats-adm, it's already there." ; \ + true ; \ + else \ +- $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/states \ ++ $(INSTALL_DATA) $(srcdir)/states \ + $(GNATS_ROOT)/gnats-adm/states ; \ + fi + @if [ -f $(GNATS_ROOT)/gnats-adm/classes ]; then \ + echo "Not putting classes file in gnats-adm, it's already there." ; \ + true ; \ + else \ +- $(INSTALL_DATA) -o $(GNATS_USER) $(srcdir)/classes \ ++ $(INSTALL_DATA) $(srcdir)/classes \ + $(GNATS_ROOT)/gnats-adm/classes ; \ + fi + @echo "*** Don't forget to run $(libexecdir)/gnats/mkcat as $(GNATS_USER)." +@@ -625,7 +625,7 @@ + $(INSTALL_PROGRAM) queue-pr $(libexecdir)/gnats/queue-pr + $(INSTALL_PROGRAM) gen-index $(libexecdir)/gnats/gen-index + $(INSTALL_SCRIPT) mail-query $(libexecdir)/gnats/mail-query +- @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ ++ @if false; then \ + echo "chown $(GNATS_USER) $(libexecdir)/gnats/queue-pr $(libexecdir)/gnats/file-pr $(libexecdir)/gnats/gen-index" ; \ + echo "chmod 4555 $(libexecdir)/gnats/queue-pr $(libexecdir)/gnats/file-pr $(libexecdir)/gnats/gen-index" ; \ + echo "chown $(GNATS_USER) $(libexecdir)/gnats/gnatsd" ; \ +@@ -636,6 +636,7 @@ + chmod 555 $(libexecdir)/gnats/gnatsd ; \ + else \ + echo "*** Warning: must make queue-pr and gen-index suid gnats." ; \ ++ chmod 555 $(libexecdir)/gnats/queue-pr $(libexecdir)/gnats/gen-index $(libexecdir)/gnats/gnatsd ; \ + fi + + install-info: gnats.info diff --git a/databases/gnats/patches/patch-gnats_cmds.c b/databases/gnats/patches/patch-gnats_cmds.c new file mode 100644 index 00000000000..13e308b90ab --- /dev/null +++ b/databases/gnats/patches/patch-gnats_cmds.c @@ -0,0 +1,43 @@ +--- gnats/cmds.c.orig Wed Mar 17 18:45:36 1999 ++++ gnats/cmds.c Thu Jan 11 11:06:54 2001 +@@ -115,28 +115,26 @@ + { + register FILE *tf; + char *path = (char *) xmalloc (PATH_MAX); +-#ifndef HAVE_MKTEMP +- char name[L_tmpnam]; +-#endif + char *buf, *tmpdir; + MsgType r; +- int i; ++ int i, fd; + + tmpdir = getenv ("TMPDIR"); + if (tmpdir == NULL) + tmpdir = "/tmp"; /* XXX */ +-#ifdef HAVE_MKTEMP +- sprintf (path, "%s/gnatsXXXXXX", tmpdir); +- mktemp (path); +-#else +- tmpnam (name); +- strcpy (path, name); +-#endif +- +- if ((tf = fopen (path, "w")) == (FILE *) NULL) ++ ++ snprintf (path, PATH_MAX, "%s/gnatsXXXXXX", tmpdir); ++ if ((fd = mkstemp (path)) < 0) ++ { ++ xfree(path); ++ return (NULL); ++ } ++ ++ if ((tf = fdopen (fd, "w")) == (FILE *) NULL) + { + /* give error that we can't create the temp and leave. */ +- xfree (path); ++ close(fd); ++ xfree(path); + return NULL; + } + diff --git a/databases/gnats/patches/patch-gnats_internal.c b/databases/gnats/patches/patch-gnats_internal.c new file mode 100644 index 00000000000..8fd568d3ae1 --- /dev/null +++ b/databases/gnats/patches/patch-gnats_internal.c @@ -0,0 +1,40 @@ +--- gnats/internal.c.orig Tue Mar 2 19:18:53 1999 ++++ gnats/internal.c Thu Jan 11 10:56:08 2001 +@@ -32,28 +32,25 @@ + + FILE *fp; + char *path, *workfile; +-#ifndef HAVE_MKTEMP +- char name[L_tmpnam]; +-#endif ++ int fd; + Index *i; + +-#ifdef HAVE_MKTEMP + workfile = (char *) xmalloc (strlen (gnats_root) + + strlen ("/gnats-adm/indXXXXXX") + + 1 /* null */ ); + sprintf (workfile, "%s/gnats-adm/indXXXXXX", gnats_root); +- mktemp (workfile); +-#else +- workfile = (char *) xmalloc (L_tmpnam); +- tmpnam (name); +- strcpy (workfile, name); +-#endif + +- fp = fopen (workfile, "w"); +- if (fp == NULL) ++ if ((fd = mkstemp (workfile)) < 0) { ++ fprintf (stderr, "%s: can't open the temporary file %s\n", ++ program_name, workfile); ++ xfree (workfile); ++ return; ++ } ++ if ((fp = fdopen (fd, "w")) == NULL) + { + fprintf (stderr, "%s: can't open the temporary file %s\n", + program_name, workfile); ++ close(fd); + xfree (workfile); + return; + } diff --git a/databases/gnats/patches/patch-gnats_queue-pr.c b/databases/gnats/patches/patch-gnats_queue-pr.c new file mode 100644 index 00000000000..4775e6b5d3c --- /dev/null +++ b/databases/gnats/patches/patch-gnats_queue-pr.c @@ -0,0 +1,37 @@ +--- gnats/queue-pr.c.orig Wed Nov 25 09:15:20 1998 ++++ gnats/queue-pr.c Thu Jan 11 11:04:37 2001 +@@ -226,13 +226,10 @@ + { + int fd[2]; + char *tmpdir; +- char *bug_file = (char *) xmalloc (PATH_MAX); ++ char bug_file[MAXPATHLEN]; + int r; /* XXX ssize_t */ + char *buf = (char *) xmalloc (MAXBSIZE); + char *base, *new_name; +-#ifndef HAVE_MKTEMP +- char name[L_tmpnam]; +-#endif + + if (queue_file) + { +@@ -247,16 +244,10 @@ + tmpdir = getenv ("TMPDIR"); + if (tmpdir == NULL) + tmpdir = "/tmp"; /* FIXME */ +-#ifdef HAVE_MKTEMP +- sprintf (bug_file, "%s/gnatsXXXXXX", tmpdir); +- mktemp (bug_file); +-#else +- tmpnam (name); +- strcpy (bug_file, name); +-#endif ++ ++ snprintf (bug_file, sizeof(bug_file), "%s/gnatsXXXXXX", tmpdir); + +- fd[1] = open (bug_file, O_WRONLY|O_CREAT, 0664); +- if (fd[1] < 0) ++ if ((fd[1] = mkstemp (bug_file)) < 0) + punt (1, "%s: can't open queue file %s for writing: %s\n", + program_name, bug_file, strerror (errno)); + diff --git a/databases/gnats/patches/patch-send-pr_Makefile.in b/databases/gnats/patches/patch-send-pr_Makefile.in new file mode 100644 index 00000000000..bf66e5398ca --- /dev/null +++ b/databases/gnats/patches/patch-send-pr_Makefile.in @@ -0,0 +1,23 @@ +--- send-pr/Makefile.in.orig Sun Nov 7 23:18:19 1999 ++++ send-pr/Makefile.in Thu Jan 11 10:34:35 2001 +@@ -174,10 +174,7 @@ + install-norm all-gnats: install-norm-arch-indep install-norm-arch-dep + + install-norm-arch-indep: +- $(INSTALL_DATA) send-pr.el $(lispdir)/send-pr.el +- if [ -f send-pr.elc ]; then \ +- $(INSTALL_DATA) send-pr.elc $(lispdir)/send-pr.elc; \ +- else true; fi ++ true + + install-norm-arch-dep: + $(INSTALL_SCRIPT) send-pr $(bindir)/send-pr +@@ -190,7 +187,7 @@ + + install-gnats-dist: + $(SHELL) $(srcdir)/../mkinstalldirs $(datadir)/gnats/dist +- @if [ `whoami` = root -o `whoami` = $(GNATS_USER) ] ; then \ ++ @if false; then \ + echo "chown $(GNATS_USER) $(datadir)/gnats/dist" ; \ + chown $(GNATS_USER) $(datadir)/gnats/dist ; \ + else \ diff --git a/databases/gnats/pkg/COMMENT b/databases/gnats/pkg/COMMENT new file mode 100644 index 00000000000..e47835b9ffa --- /dev/null +++ b/databases/gnats/pkg/COMMENT @@ -0,0 +1 @@ +GNU Problem Report Management System diff --git a/databases/gnats/pkg/DEINSTALL b/databases/gnats/pkg/DEINSTALL new file mode 100644 index 00000000000..bc9c1b1cf58 --- /dev/null +++ b/databases/gnats/pkg/DEINSTALL @@ -0,0 +1,55 @@ +#!/bin/sh +# $OpenBSD: DEINSTALL,v 1.1.1.1 2001/01/12 17:14:51 dugsong Exp $ +# +# De-installation setup of gnats + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} + +# Function: remove gnats user account. +# +do_accts() +{ + echo "" + echo "+---------------" + echo "| Delete the 'gnats' user account for a full de-installation." + echo "| To do this: execute 'user del gnats' as root." + echo "| You can also remove any crontab entries for 'gnats' by" + echo "| executing 'crontab -u gnats -r' as root." + echo "+---------------" + echo "" +} + +do_configs() +{ + echo "" + echo "+---------------" + echo "| The existing /etc/gnats-db.conf configuration file" + echo "| has NOT been deleted. To do this: execute" + echo "| 'rm /etc/gnats-db.conf' as root." + echo "+---------------" + echo "" +} + +# verify proper execution +# +if [ $# -ne 2 ]; then + echo "usage: $0 distname { DEINSTALL }" >&2 + exit 1 +fi + +# Verify/process the command +# +case $2 in + DEINSTALL) + do_accts + do_configs + rm -f /var/www/cgi-bin/gnatsweb + ;; + *) + echo "Usage: `basename $0` distname DEINSTALL" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/databases/gnats/pkg/DESCR b/databases/gnats/pkg/DESCR new file mode 100644 index 00000000000..961d3151c50 --- /dev/null +++ b/databases/gnats/pkg/DESCR @@ -0,0 +1,16 @@ + +GNATS is a bug-tracking tool designed for use at a central support +site. Software users who experience problems use electronic mail to +communicate these problems to the the maintainers of that software; +GNATS partially automates the tracking of these problems by: + +- organizing problem reports into a database and notifying responsible + parties of suspected bugs; + +- allowing support personnel and their managers to edit, query and + report on accumulated bugs; and + +- providing a reliable archive of problems with a given program and a + history of the life of the program by preserving its reported + problems and their subsequent solutions. + diff --git a/databases/gnats/pkg/INSTALL b/databases/gnats/pkg/INSTALL new file mode 100644 index 00000000000..71b9619d8ce --- /dev/null +++ b/databases/gnats/pkg/INSTALL @@ -0,0 +1,80 @@ +#!/bin/sh +# $OpenBSD: INSTALL,v 1.1.1.1 2001/01/12 17:14:51 dugsong Exp $ +# +# Pre/post-installation setup of gnats + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +PREFIX=${PKG_PREFIX:-/usr/local} + +# Function: set up gnats user account. +# +do_accts() +{ + userinfo -e gnats + if [ $? -eq 0 ]; then + echo "===> Using account 'gnats' for gnats" + else + echo "===> Creating gnats user" + useradd \ + -g daemon \ + -c "GNATS database owner" \ + -d $PREFIX/share/gnats \ + -s /sbin/nologin \ + -p \* \ + gnats + fi +} + +# Function: install the gnats configuration file from the samples +# +do_configs() +{ + if [ -f /etc/gnats-db.conf ]; then + echo "" + echo "+---------------" + echo "| The existing /etc/gnats-db.conf configuration file" + echo "| has NOT been changed. You may want to compare it to the" + echo "| current sample file, ${PREFIX}/share/examples/gnats/gnats-db.conf" + echo "| and update your configuration as needed." + echo "+---------------" + echo "" + else + # Install config files. + install -o root -g wheel -m 644 ${PREFIX}/share/examples/gnats/gnats-db.conf /etc/gnats-db.conf + + echo "" + echo "+---------------" + echo "| The /etc/gnats-db.conf configuration file has been" + echo "| installed. Please view this file and change" + echo "| the configuration to meet your needs." + echo "+---------------" + echo "" + fi +} + +# verify proper execution +# +if [ $# -ne 2 ]; then + echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 + exit 1 +fi + +# Verify/process the command +# +case $2 in + PRE-INSTALL) + do_accts + ;; + POST-INSTALL) + do_configs + echo "===> See ${PREFIX}/share/doc/gnats/README.OpenBSD for further configuration" + test -f ${PREFIX}/lib/gnatsweb && \ + install -c -m 555 ${PREFIX}/lib/gnatsweb /var/www/cgi-bin + ;; + *) + echo "Usage: `basename $0` distname " >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/databases/gnats/pkg/PFRAG.www b/databases/gnats/pkg/PFRAG.www new file mode 100644 index 00000000000..d6b8fcb02d2 --- /dev/null +++ b/databases/gnats/pkg/PFRAG.www @@ -0,0 +1,2 @@ +@comment $OpenBSD: PFRAG.www,v 1.1.1.1 2001/01/12 17:14:51 dugsong Exp $ +lib/gnatsweb diff --git a/databases/gnats/pkg/PLIST b/databases/gnats/pkg/PLIST new file mode 100644 index 00000000000..f6fb57b4f19 --- /dev/null +++ b/databases/gnats/pkg/PLIST @@ -0,0 +1,97 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2001/01/12 17:14:51 dugsong Exp $ +@unexec install-info --delete --info-dir=%D/info %D/info/gnats.info +@unexec install-info --delete --info-dir=%D/info %D/info/send-pr.info +@unexec install-info --delete --info-dir=%D/info %D/info/standards.info +bin/edit-pr +bin/getclose +bin/install-sid +bin/nedit-pr +bin/nquery-pr +bin/query-pr +bin/send-pr +bin/sub-type +info/gnats.info +info/gnats.info-1 +info/gnats.info-2 +info/gnats.info-3 +info/gnats.info-4 +info/send-pr.info +info/standards.info +info/standards.info-1 +info/standards.info-2 +info/standards.info-3 +%%www%% +libexec/gnats/at-pr +libexec/gnats/check-db +libexec/gnats/delete-pr +libexec/gnats/file-pr +libexec/gnats/gen-index +libexec/gnats/gnats-edit-pr +libexec/gnats/gnatsd +libexec/gnats/mail-query +libexec/gnats/mkcat +libexec/gnats/mkdist +libexec/gnats/npr-addr +libexec/gnats/npr-edit +libexec/gnats/pr-addr +libexec/gnats/pr-age +libexec/gnats/pr-edit +libexec/gnats/pr-mail +libexec/gnats/queue-pr +libexec/gnats/rmcat +@exec chown gnats %D/libexec/gnats/gen-index %D/libexec/gnats/pr-edit %D/libexec/gnats/queue-pr +@exec chmod 4555 %D/libexec/gnats/gen-index %D/libexec/gnats/pr-edit %D/libexec/gnats/queue-pr +man/man1/edit-pr.1 +man/man1/query-pr.1 +man/man1/send-pr.1 +man/man7/gnats.7 +man/man8/file-pr.8 +man/man8/gen-index.8 +man/man8/mkcat.8 +man/man8/mkdist.8 +man/man8/queue-pr.8 +man/man8/rmcat.8 +share/doc/gnats/README.OpenBSD +share/examples/gnats/gnats-db.conf +share/gnats/cygnus +share/gnats/dist/COPYING +share/gnats/dist/INSTALL +share/gnats/dist/MANIFEST +share/gnats/dist/README +share/gnats/dist/categ.texi +share/gnats/dist/fields.texi +share/gnats/dist/install-sid.sh +share/gnats/dist/s-usage.texi +share/gnats/dist/send-pr-el.in +share/gnats/dist/send-pr.1 +share/gnats/dist/send-pr.info +share/gnats/dist/send-pr.sh +share/gnats/dist/send-pr.texi +share/gnats/dist/states.texi +share/gnats/dist/texinfo.tex +share/gnats/dist/version.texi +share/gnats/gnats-db/gnats-adm/addresses +share/gnats/gnats-db/gnats-adm/categories +share/gnats/gnats-db/gnats-adm/classes +share/gnats/gnats-db/gnats-adm/config +share/gnats/gnats-db/gnats-adm/gnatsd.access +share/gnats/gnats-db/gnats-adm/gnatsd.conf +share/gnats/gnats-db/gnats-adm/responsible +share/gnats/gnats-db/gnats-adm/states +share/gnats/gnats-db/gnats-adm/submitters +@exec mkdir -p %D/share/gnats/gnats-db/pending +@exec mkdir -p %D/share/gnats/gnats-db/gnats-queue +@exec mkdir -p %D/share/gnats/gnats-db/gnats-adm/locks +@exec chown -R gnats %D/share/gnats +@dirrm share/gnats/gnats-db/pending +@dirrm share/gnats/gnats-db/gnats-queue +@dirrm share/gnats/gnats-db/gnats-adm/locks +@dirrm share/gnats/gnats-db/gnats-adm +@dirrm share/gnats/gnats-db +@dirrm share/gnats/dist +@dirrm share/gnats +@dirrm share/doc/gnats +@dirrm libexec/gnats +@exec install-info --info-dir=%D/info %D/info/gnats.info +@exec install-info --info-dir=%D/info %D/info/send-pr.info +@exec install-info --info-dir=%D/info %D/info/standards.info