diff options
author | wennmach <wennmach@pkgsrc.org> | 1999-10-05 12:37:18 +0000 |
---|---|---|
committer | wennmach <wennmach@pkgsrc.org> | 1999-10-05 12:37:18 +0000 |
commit | 7964798b55c8b6e9323e8d66bccba276aa3e1cb8 (patch) | |
tree | 7d2a6e31d11fda9321e0ecfaa9015885c686b730 /misc/jitterbug | |
parent | 22d4a43f07e3cba35840f49d4edf192624bb8e9f (diff) | |
download | pkgsrc-7964798b55c8b6e9323e8d66bccba276aa3e1cb8.tar.gz |
Initial import of jitterbug-1.6.2: a web-oriented bug-tracking tool
Diffstat (limited to 'misc/jitterbug')
-rw-r--r-- | misc/jitterbug/Makefile | 228 | ||||
-rw-r--r-- | misc/jitterbug/files/NEWPACKAGE | 42 | ||||
-rw-r--r-- | misc/jitterbug/files/POSTINSTALL | 15 | ||||
-rw-r--r-- | misc/jitterbug/files/httpd.conf | 11 | ||||
-rw-r--r-- | misc/jitterbug/files/jitterbug.auth | 1 | ||||
-rw-r--r-- | misc/jitterbug/files/jitterbug.config | 7 | ||||
-rw-r--r-- | misc/jitterbug/files/md5 | 3 | ||||
-rw-r--r-- | misc/jitterbug/files/patch-sum | 3 | ||||
-rw-r--r-- | misc/jitterbug/patches/patch-aa | 12 | ||||
-rw-r--r-- | misc/jitterbug/pkg/COMMENT | 1 | ||||
-rw-r--r-- | misc/jitterbug/pkg/DESCR | 5 | ||||
-rw-r--r-- | misc/jitterbug/pkg/PLIST | 37 | ||||
-rw-r--r-- | misc/jitterbug/pkg/REQ | 79 |
13 files changed, 444 insertions, 0 deletions
diff --git a/misc/jitterbug/Makefile b/misc/jitterbug/Makefile new file mode 100644 index 00000000000..193a7cf1a47 --- /dev/null +++ b/misc/jitterbug/Makefile @@ -0,0 +1,228 @@ +# $NetBSD: Makefile,v 1.1.1.1 1999/10/05 12:37:18 wennmach Exp $ + +DISTNAME= jitterbug-1.6.2 +WRKSRC= ${WRKDIR}/${PKGNAME}/source +CATEGORIES= misc +MASTER_SITES= ftp://jitterbug.samba.org/pub/jitterbug/ + +MAINTAINER= wennmach@netbsd.org +HOMEPAGE= http://jitterbug.samba.org/ + +DEPENDS+= addnerd:../../sysutils/addnerd +DEPENDS+= apache-1.3.*:../../www/apache + +PLIST_SRC= ${WRKDIR}/PLIST.tmp +REQ_FILE= ${WRKDIR}/REQ +CONFIGDIR= ${WRKDIR}/${PKGNAME}/config +DOCSDIR= ${WRKDIR}/${PKGNAME}/docs +CGIBINDIR= libexec/cgi-bin + +JB_USER?= jitter + +JB_USERID?= 509 + +JB_GROUP?= jitter + +JB_GROUPID?= 509 + +JB_DATADIR= ${JB_USER}/${JB_PACKAGE}/bug_tracking +JB_CONFIGDIR= ${JB_USER}/config + +JB_LOCALMAIL?= ${JB_PACKAGE}-bugs +.if !defined(JB_FQHOSTNAME) +JB_FQHOSTNAME!= hostname +.endif +JB_HOSTNAME!= hostname -s +JB_EMAIL?= ${JB_LOCALMAIL}@${JB_FQHOSTNAME} + +HAS_CONFIGURE= yes +CONFIGURE_ARGS= --prefix=${PREFIX} + +.include "../../mk/bsd.prefs.mk" + +fetch-depends: +.if !defined(JB_PACKAGE) + @${ECHO} + @${ECHO} "You must define the following environment variable:" + @${ECHO} "JB_PACKAGE -- the name of your bug category" + @${ECHO} + @${ECHO} "You may override the following environment variables:" + @${ECHO} "JB_USER -- jitterbug user (default 'jitter')" + @${ECHO} "JB_USERID -- jitterbug user id (default 509)" + @${ECHO} "JB_GROUP -- jitterbug group name (default 'jitter')" + @${ECHO} "JB_GROUPID -- jitterbug group id (default 509)" + @${ECHO} "JB_FQHOSTNAME -- fully qualified host name" + @${ECHO} "JB_LOCALMAIL -- local mail alias for \$$JB_PACKAGE category." + @${ECHO} "jitterbug will send and receive e-mail for \$$JB_PACKAGE" + @${ECHO} "as \$$JB_LOCALMAIL@\$$JB_FQHOSTNAME" + @${ECHO} + @${FALSE} +.endif +.if (${JB_FQHOSTNAME} == ${JB_HOSTNAME}) + @${ECHO} "Warning: Could not determine your fully qualified hostname." + @${ECHO} "You must set the JB_FQHOSTNAME environment variable." + @${ECHO} + @${FALSE} +.endif + +pre-extract: + @(case "X${JB_USER}" in \ + Xbin|Xetc|Xinclude|Xinfo|Xlib|Xlibdata|Xlibexec|Xman|Xsbin|Xshare) \ + gooduser=no; \ + ;; \ + *) \ + gooduser=yes; \ + ;; \ + esac; \ + if [ $$gooduser = "no" ]; then \ + ${ECHO} "You have choosen JB_USER=${JB_USER} which"; \ + ${ECHO} "will cause trouble, because gnats would get"; \ + ${ECHO} "installed to ${PREFIX}/share ${JB_USER}. So"; \ + ${ECHO} "please set JB_USER to something more reasonable"; \ + ${ECHO} "like 'jitter'."; \ + ${ECHO} ""; \ + ${FALSE}; \ + fi) + +post-patch: + @${SED} -e 's|@PREFIX@|${PREFIX}|g' \ + < ${WRKSRC}/jconfig.h \ + > ${WRKSRC}/jconfig.h.tmp + @${MV} -f ${WRKSRC}/jconfig.h.tmp ${WRKSRC}/jconfig.h + +pre-install: +.if !defined(JB_USER) + @${ECHO} "Arrrgggghhh. JB_USER not defined. Send-pr!" + @${FALSE} +.endif + @${SED} \ + -e 's|@JB_USER@|${JB_USER}|g' \ + -e 's|@JB_USERID@|${JB_USERID}|g' \ + -e 's|@JB_GROUP@|${JB_GROUP}|g' \ + -e 's|@JB_GROUPID@|${JB_GROUPID}|g' \ + -e 's|@JB_LOCALMAIL@|${JB_LOCALMAIL}|g' \ + -e 's|@JB_PACKAGE@|${JB_PACKAGE}|g' \ + -e 's|@PREFIX@|${PREFIX}|g' \ + -e 's|@LOCALBASE@|${LOCALBASE}|g' \ + -e 's|@FILESDIR@|${FILESDIR}|g' \ + <${PKGDIR}/REQ \ + >${REQ_FILE} + @${SED} \ + -e 's|@JB_DATADIR@|${JB_DATADIR}|g' \ + -e 's|@CGIBINDIR@|${CGIBINDIR}|g' \ + -e 's|@JB_PACKAGE@|${JB_PACKAGE}|g' \ + -e 's|@JB_USER@|${JB_USER}|g' \ + -e 's|@JB_GROUP@|${JB_GROUP}|g' \ + <${PKGDIR}/PLIST \ + >${PLIST_SRC} + @${SED} \ + -e 's|@JB_USER@|${JB_USER}|g' \ + <${FILESDIR}/jitterbug.auth \ + >${WRKDIR}/jitterbug.auth + @${SED} \ + -e 's|@JB_USER@|${JB_USER}|g' \ + -e 's|@JB_PACKAGE@|${JB_PACKAGE}|g' \ + -e 's|@PREFIX@|${PREFIX}|g' \ + <${FILESDIR}/NEWPACKAGE \ + >${WRKDIR}/NEWPACKAGE + @${SED} \ + -e 's|@JB_USER@|${JB_USER}|g' \ + -e 's|@JB_PACKAGE@|${JB_PACKAGE}|g' \ + -e 's|@PREFIX@|${PREFIX}|g' \ + <${FILESDIR}/POSTINSTALL \ + >${WRKDIR}/POSTINSTALL + ${SH} ${REQ_FILE} ${PKGNAME} INSTALL + +do-install: + ${MKDIR} ${PREFIX}/${JB_CONFIGDIR} + -${MKDIR} ${PREFIX}/${JB_DATADIR} + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/footer.html ${PREFIX}/${JB_CONFIGDIR} + [ -f ${PREFIX}/${JB_DATADIR}/footer.html ] || \ + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/footer.html ${PREFIX}/${JB_DATADIR} + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/guest.prefs ${PREFIX}/${JB_CONFIGDIR} + [ -f ${PREFIX}/${JB_DATADIR}/guest.prefs ] || \ + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/guest.prefs ${PREFIX}/${JB_DATADIR} + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/guestintro.html ${PREFIX}/${JB_CONFIGDIR} + [ -f ${PREFIX}/${JB_DATADIR}/guestintro.html ] || \ + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/guestintro.html ${PREFIX}/${JB_DATADIR} + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/intro.html ${PREFIX}/${JB_CONFIGDIR} + [ -f ${PREFIX}/${JB_DATADIR}/intro.html ] || \ + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/intro.html ${PREFIX}/${JB_DATADIR} + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/reportform.html ${PREFIX}/${JB_CONFIGDIR} + [ -f ${PREFIX}/${JB_DATADIR}/reportform.html ] || \ + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/reportform.html ${PREFIX}/${JB_DATADIR} + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/users ${PREFIX}/${JB_CONFIGDIR} + [ -f ${PREFIX}/${JB_DATADIR}/users ] || \ + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${CONFIGDIR}/users ${PREFIX}/${JB_DATADIR} + ${INSTALL} -c -o root -g nobody -m 4710 \ + ${WRKSRC}/jitterbug ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE} + ${LN} -f ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE} ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private + ${CHOWN} root ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private + ${CHGRP} nobody ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private + ${CHMOD} 4710 ${PREFIX}/${CGIBINDIR}/${JB_PACKAGE}.private + ${MKDIR} ${PREFIX}/${JB_USER}/bin + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 755 \ + ${WRKSRC}/new_message ${PREFIX}/${JB_USER}/bin + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${WRKSRC}/jitterbug ${PREFIX}/${JB_USER}/bin + ${MKDIR} ${PREFIX}/${JB_USER}/etc + [ -f ${PREFIX}/${JB_USER}/etc ] || \ + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 755 \ + ${WRKDIR}/jitterbug.auth ${PREFIX}/${JB_USER}/etc + ${MKDIR} ${PREFIX}/${JB_USER}/doc + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${WRKDIR}/POSTINSTALL ${PREFIX}/${JB_USER}/doc + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${WRKDIR}/NEWPACKAGE ${PREFIX}/${JB_USER}/doc + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${DOCSDIR}/CONFIG.txt ${PREFIX}/${JB_USER}/doc + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${DOCSDIR}/INSTALL ${PREFIX}/${JB_USER}/doc + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${DOCSDIR}/JitterBug.txt ${PREFIX}/${JB_USER}/doc + ${CHOWN} -R ${JB_USER} ${PREFIX}/${JB_USER} + ${CHGRP} -R ${JB_GROUP} ${PREFIX}/${JB_USER} + -${MKDIR} ${PREFIX}/etc/jitterbug + @${SED} \ + -e 's|@JB_EMAIL@|${JB_EMAIL}|g' \ + -e 's|@JB_DATADIR@|${JB_DATADIR}|g' \ + -e 's|@JB_USERID@|${JB_USERID}|g' \ + -e 's|@JB_GROUPID@|${JB_GROUPID}|g' \ + -e 's|@PREFIX@|${PREFIX}|g' \ + <${FILESDIR}/jitterbug.config \ + >${PREFIX}/${JB_CONFIGDIR}/jitterbug.config + [ -f ${PREFIX}/etc/jitterbug/${JB_PACKAGE} ] || \ + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${PREFIX}/${JB_CONFIGDIR}/jitterbug.config \ + ${PREFIX}/etc/jitterbug/${JB_PACKAGE} + [ -f ${PREFIX}/etc/jitterbug/${JB_PACKAGE}.private ] || \ + ${INSTALL} -c -o ${JB_USER} -g ${JB_GROUP} -m 644 \ + ${PREFIX}/${JB_CONFIGDIR}/jitterbug.config \ + ${PREFIX}/etc/jitterbug/${JB_PACKAGE}.private + +post-install: +.if !defined(BATCH) + @${ECHO} " " + @${ECHO} "Please observe the following POSTINSTALL notes:" + @${ECHO} "(POSTINSTALL is also installed in ${PREFIX}/${JB_USER}/doc)" + @${ECHO} " " + @${ECHO} "==============================================================================" + @${CAT} ${WRKDIR}/POSTINSTALL + @${ECHO} " " + @${ECHO} "==============================================================================" + @${ECHO} " " +.endif + +.include "../../mk/bsd.pkg.mk" diff --git a/misc/jitterbug/files/NEWPACKAGE b/misc/jitterbug/files/NEWPACKAGE new file mode 100644 index 00000000000..64ccdb1d3ce --- /dev/null +++ b/misc/jitterbug/files/NEWPACKAGE @@ -0,0 +1,42 @@ +Adding a new Package (Category) to jitterbug + +During the initial install, jitterbug already set up a package (category) +for you: package @JB_PACKAGE@. + +The jitterbug package has been set up such that you can add additional +categories. In the following, replace NEWPACKAGE by the name of your +new category. + +Here is a short overview about the required steps: + +(As @JB_USER@ user:) +o Create a directory @PREFIX@/@JB_USER@/NEWPACKAGE/bug_tracking + +o Copy the config files found under @PREFIX@/@JB_USER@/config to + @PREFIX@/@JB_USER@/NEWPACKAGE/bug_tracking + +o Customize these files + +(As root:) +o Copy the jitterbug binary (@PREFIX@/@JB_USER@/bin/jitterbug) to apache's + cgi-bin directory (@PREFIX@/libexec/cgi-bin); name it NEWPACKAGE + +o Make a hard link in the same directory to NEWPACKAGE.private + +o Set the right protections on these binaries: + chown root.nobody NEWPACKAGE NEWPACKAGE.private + chmod 4710 NEWPACKAGE NEWPACKAGE.private + +o Go to @PREFIX@/etc/jitterbug and copy @JB_PACKAGE@ to NEWPACKAGE and + customize NEWPACKAGE for your preferences + +o Copy NEWPACKAGE to NEWPACKAGE.private or make a symbolic link + +o Add an entry for NEWPACKAGE-bugs to the mail aliases (/etc/aliases) + and run newaliases + +o Add appropriate config lines for NEWPACKAGE (at the end) to + @PREFIX@/etc/httpd/httpd.conf + +o Have httpd rescan @PREFIX@/etc/httpd/httpd.conf by sending it SIGUSR1 + diff --git a/misc/jitterbug/files/POSTINSTALL b/misc/jitterbug/files/POSTINSTALL new file mode 100644 index 00000000000..4ccf764dbbe --- /dev/null +++ b/misc/jitterbug/files/POSTINSTALL @@ -0,0 +1,15 @@ +Jitterbug now has successfully been installed on your system. + +Before using jitterbug you should perform the following steps: + +o Set a system password for the @JB_USER@ user (as root) + +o Set a htpasswd for the @JB_USER@ user (using htpasswd): + htpasswd @PREFIX@/@JB_USER@/etc/jitterbug.auth @JB_USER@ + +o Customize (if necessary) + @PREFIX@/etc/jitterbug/@JB_PACKAGE@ and + @PREFIX@/etc/jitterbug/@JB_PACKAGE@.private + +o Customize the html documents in the project's bug tracking directory: + @PREFIX@/@JB_USER@/@JB_PACKAGE@/bug_tracking diff --git a/misc/jitterbug/files/httpd.conf b/misc/jitterbug/files/httpd.conf new file mode 100644 index 00000000000..d296f7878f2 --- /dev/null +++ b/misc/jitterbug/files/httpd.conf @@ -0,0 +1,11 @@ + +# jitterbug config for package %JB_PACKAGE% +ScriptAlias /%JB_PACKAGE% "%PREFIX%/libexec/cgi-bin/%JB_PACKAGE%" +<Location /cgi-bin/%JB_PACKAGE%.private> +AuthType Basic +AuthName %JB_USER% +AuthUserFile %PREFIX%/%JB_USER%/etc/jitterbug.auth +<Limit GET POST> +require user %JB_USER% +</Limit> +</Location> diff --git a/misc/jitterbug/files/jitterbug.auth b/misc/jitterbug/files/jitterbug.auth new file mode 100644 index 00000000000..24eff5f6727 --- /dev/null +++ b/misc/jitterbug/files/jitterbug.auth @@ -0,0 +1 @@ +@JB_USER@:************* diff --git a/misc/jitterbug/files/jitterbug.config b/misc/jitterbug/files/jitterbug.config new file mode 100644 index 00000000000..ddbe63a5032 --- /dev/null +++ b/misc/jitterbug/files/jitterbug.config @@ -0,0 +1,7 @@ +from address = @JB_EMAIL@ +chroot directory = @PREFIX@/@JB_DATADIR@ +base directory = / +guest gid = 9999 +guest uid = 32767 +uid = @JB_USERID@ +gid = @JB_GROUPID@ diff --git a/misc/jitterbug/files/md5 b/misc/jitterbug/files/md5 new file mode 100644 index 00000000000..fe6744f7706 --- /dev/null +++ b/misc/jitterbug/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 1999/10/05 12:37:18 wennmach Exp $ + +MD5 (jitterbug-1.6.2.tar.gz) = a01f5807ff53c2ebcf1915fa9c472236 diff --git a/misc/jitterbug/files/patch-sum b/misc/jitterbug/files/patch-sum new file mode 100644 index 00000000000..b35507f33e4 --- /dev/null +++ b/misc/jitterbug/files/patch-sum @@ -0,0 +1,3 @@ +$NetBSD: patch-sum,v 1.1.1.1 1999/10/05 12:37:18 wennmach Exp $ + +MD5 (patch-aa) = cd823bf0c5ca0f8603ed4cff0dd877aa diff --git a/misc/jitterbug/patches/patch-aa b/misc/jitterbug/patches/patch-aa new file mode 100644 index 00000000000..91c657121a4 --- /dev/null +++ b/misc/jitterbug/patches/patch-aa @@ -0,0 +1,12 @@ +$NetBSD: patch-aa,v 1.1.1.1 1999/10/05 12:37:19 wennmach Exp $ + +--- jconfig.h.orig Sat Oct 2 14:15:32 1999 ++++ jconfig.h Sat Oct 2 14:17:29 1999 +@@ -1,6 +1,6 @@ + /* jconfig.h for Jitterbug. */ + +-#define CONFIG_DIRECTORY "/etc/jitterbug" ++#define CONFIG_DIRECTORY "@PREFIX@/etc/jitterbug" + + /* you probably want to leave the rest of these alone */ + #define SYSTEMFILE "/system" diff --git a/misc/jitterbug/pkg/COMMENT b/misc/jitterbug/pkg/COMMENT new file mode 100644 index 00000000000..32ed1c41a0b --- /dev/null +++ b/misc/jitterbug/pkg/COMMENT @@ -0,0 +1 @@ +a web-oriented bug-tracking tool diff --git a/misc/jitterbug/pkg/DESCR b/misc/jitterbug/pkg/DESCR new file mode 100644 index 00000000000..79328560cf9 --- /dev/null +++ b/misc/jitterbug/pkg/DESCR @@ -0,0 +1,5 @@ +JitterBug is a cgi-bin tool for problem reporting and tracking developed +by Andrew Tridgell for the Samba Team. + +If you want to see some examples of what JitterBug can do then have a +look at http://samba.anu.edu.au/cgi-bin/jitterbug diff --git a/misc/jitterbug/pkg/PLIST b/misc/jitterbug/pkg/PLIST new file mode 100644 index 00000000000..7d9918b7794 --- /dev/null +++ b/misc/jitterbug/pkg/PLIST @@ -0,0 +1,37 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 1999/10/05 12:37:19 wennmach Exp $ +@JB_USER@/config/footer.html +@exec [ -f %D/@JB_DATADIR@/footer.html ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/footer.html +@JB_USER@/config/guest.prefs +@exec [ -f %D/@JB_DATADIR@/guest.prefs ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/guest.prefs +@JB_USER@/config/guestintro.html +@exec [ -f %D/@JB_DATADIR@/guestintro.html ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/guestintro.html +@JB_USER@/config/intro.html +@exec [ -f %D/@JB_DATADIR@/intro.html ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/intro.html +@JB_USER@/config/reportform.html +@exec [ -f %D/@JB_DATADIR@/reportform.html ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/reportform.html +@JB_USER@/config/users +@exec [ -f %D/@JB_DATADIR@/users ] || /bin/cp -p %D/%F %D/@JB_DATADIR@/users +@JB_USER@/config/jitterbug.config +@exec [ -f %D/etc/jitterbug/@JB_PACKAGE@ ] || /bin/cp -p %D/%F %D/etc/jitterbug/@JB_PACKAGE@ +@exec [ -f %D/etc/jitterbug/@JB_PACKAGE@.private ] || /bin/cp -p %D/%F %D/etc/jitterbug/@JB_PACKAGE@.private +@exec [ -f %D/@JB_USER@/etc/jitterbug.auth ] || /bin/echo "@JB_USER@:*************" > %D/@JB_USER@/etc/jitterbug.auth +@JB_USER@/bin/new_message +@JB_USER@/bin/jitterbug +@JB_USER@/doc/POSTINSTALL +@JB_USER@/doc/NEWPACKAGE +@JB_USER@/doc/CONFIG.txt +@JB_USER@/doc/INSTALL +@JB_USER@/doc/JitterBug.txt +@dirrm @JB_USER@/bin +@dirrm @JB_USER@/doc +@dirrm @JB_USER@/config +@CGIBINDIR@/@JB_PACKAGE@ +@CGIBINDIR@/@JB_PACKAGE@.private +@unexec echo "If you are removing jitterbug permanently, you may wish to" +@unexec echo " - remove user @JB_USER@" +@unexec echo " - remove group @JB_GROUP@" +@unexec echo " - rm -rf %D/@JB_USER@" +@unexec echo " - rm -rf %D/etc/jitterbug" +@unexec echo " - remove entries in %D/etc/httpd/httpd.conf" +@unexec echo " - remove mail alias for @JB_PACKAGE@-bugs in /etc/aliases" +@unexec echo " and run newaliases" diff --git a/misc/jitterbug/pkg/REQ b/misc/jitterbug/pkg/REQ new file mode 100644 index 00000000000..45e012a6077 --- /dev/null +++ b/misc/jitterbug/pkg/REQ @@ -0,0 +1,79 @@ +#!/bin/sh + +JB_USER=@JB_USER@ +JB_USERID=@JB_USERID@ +JB_GROUP=@JB_GROUP@ +JB_GROUPID=@JB_GROUPID@ +JB_LOCALMAIL=@JB_LOCALMAIL@ +JB_PACKAGE=@JB_PACKAGE@ +PREFIX=@PREFIX@ +ADDNERD=@LOCALBASE@/sbin/addnerd +FILESDIR=@FILESDIR@ + +PKG=$1 +STAGE=$2 + +if [ "$STAGE" != "INSTALL" ]; +then + exit 0 +fi + +# Add group first +# +# NB: Ahem, this will not work with NIS, kerberos or hesiod. +# Will have to rework this, e.g. using finger (wennmach) + +if grep "^${JB_GROUP}:" /etc/group 2>&1 >/dev/null +then + echo "Group '$JB_GROUP' already exists, proceeding." +else + if awk -F: '$3 == $JB_GROUPID {print "notfree"}' /etc/group | grep notfree >/dev/null +then + echo "Error: group id $JB_GROUPID already in use in /etc/group" + echo "Please add group '$JB_GROUP' to /etc/group manually, then restart." + exit 1 +else + echo "Adding group $JB_GROUP (gid $JB_GROUPID) to /etc/group ..." + echo "$JB_GROUP:*:$JB_GROUPID:" >> /etc/group +fi +fi + +# use finger to be able to use NIS, ... +if finger ${JB_USER} 2>&1 | grep >/dev/null "no such user" +then + echo "Creating '$JB_USER' user ..." + ${ADDNERD} -h ${PREFIX} -u ${JB_USERID} -g ${JB_GROUP} ${JB_USER} + echo Done. +else + echo "User '$JB_USER' already exists, proceeding." +fi + +if grep "^${JB_LOCALMAIL}:" /etc/aliases 2>&1 >/dev/null +then + echo "'${JB_LOCALMAIL}' alias already exists, proceeding." +else + echo "Adding alias ${JB_LOCALMAIL} to /etc/aliases ..." + echo "" >> /etc/aliases + echo "# entry for jitterbug" >> /etc/aliases + echo "${JB_LOCALMAIL}: \"|${PREFIX}/${JB_USER}/bin/new_message\"" >> /etc/aliases + echo "Running newaliases ..." + newaliases +fi + +if grep "^# jitterbug config for package ${JB_PACKAGE}" ${PREFIX}/etc/httpd/httpd.conf 2>&1 >/dev/null +then + echo "config lines for ${JB_PACKAGE} already in ${PREFIX}/etc/httpd/httpd.conf, proceeding." +else + echo "Adding config lines for ${JB_PACKAGE} to ${PREFIX}/etc/httpd/httpd.conf ..." + sed \ + -e 's|%JB_PACKAGE%|@JB_PACKAGE@|g' \ + -e 's|%JB_USER%|@JB_USER@|g' \ + -e 's|%PREFIX%|@PREFIX@|g' \ + < ${FILESDIR}/httpd.conf \ + >> ${PREFIX}/etc/httpd/httpd.conf + if [ -e /var/run/httpd.pid ]; then + echo -n "Restarting httpd ..." + kill -USR1 `cat /var/run/httpd.pid` 2>&1 >/dev/null || echo -n " failed." + echo " " + fi +fi |