From aw1@stade.co.uk Sat Apr 17 18:05:08 1999
Return-Path: <aw1@stade.co.uk>
Received: from stade.demon.co.uk (stade.demon.co.uk [158.152.29.164])
	by hub.freebsd.org (Postfix) with ESMTP id 87AC214E3C
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 Apr 1999 18:04:57 -0700 (PDT)
	(envelope-from aw1@stade.co.uk)
Received: (from aw1@localhost)
	by stade.demon.co.uk (8.9.3/8.9.3) id BAA74540;
	Sun, 18 Apr 1999 01:27:52 +0100 (BST)
	(envelope-from aw1)
Message-Id: <199904180027.BAA74540@stade.demon.co.uk>
Date: Sun, 18 Apr 1999 01:27:52 +0100 (BST)
From: Adrian Wontroba <aw1@stade.co.uk>
Reply-To: aw1@stade.co.uk
To: FreeBSD-gnats-submit@freebsd.org
Subject: Missing files for wwwoffle port
X-Send-Pr-Version: 3.2

>Number:         11195
>Category:       ports
>Synopsis:       Missing files for wwwoffle port
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 17 18:10:00 PDT 1999
>Closed-Date:    Sun Apr 18 21:10:14 PDT 1999
>Last-Modified:  Sun Apr 18 21:11:57 PDT 1999
>Originator:     Adrian Wontroba
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Yes, some would be nice!
>Environment:

	Tested under 4.0 current only

>Description:

	The wwwoffle port is missing a couple of files, and makes
	incorrect assumptions about the permissions on one file.

	The result is that the port fails to install.

>How-To-Repeat:

	cd /usr/ports/www/wwwoffle; make install

>Fix:
	
	Apply the following diffs.

	Changed files:
		Makefile

	New files
		files/wwwoffled.sh
		pkg/INSTALL

diff -ruN --exclude CVS /usr/ports/www/wwwoffle/Makefile wwwoffle/Makefile
--- /usr/ports/www/wwwoffle/Makefile	Tue Mar  9 09:16:54 1999
+++ wwwoffle/Makefile	Sun Apr 18 01:10:52 1999
@@ -81,7 +81,7 @@
 
 post-install:
 	# upgrade cache, convert cache, build additional files, configure html and wwwoffle.conf
-	$(PKGDIR)/INSTALL ${DISTNAME} POST-INSTALL
+	$(SH) $(PKGDIR)/INSTALL ${DISTNAME} POST-INSTALL
 
 # keep at end
 .include <bsd.port.mk>
diff -ruN --exclude CVS /usr/ports/www/wwwoffle/files/wwwoffled.sh wwwoffle/files/wwwoffled.sh
--- /usr/ports/www/wwwoffle/files/wwwoffled.sh	Thu Jan  1 01:00:00 1970
+++ wwwoffle/files/wwwoffled.sh	Sat Apr 17 23:59:42 1999
@@ -0,0 +1,2 @@
+#!/bin/sh
+[ -x %PREFIX%/sbin/wwwoffled ] && %PREFIX%/sbin/wwwoffled > /dev/null && echo -n ' wwwoffled'
diff -ruN --exclude CVS /usr/ports/www/wwwoffle/pkg/INSTALL wwwoffle/pkg/INSTALL
--- /usr/ports/www/wwwoffle/pkg/INSTALL	Thu Jan  1 01:00:00 1970
+++ wwwoffle/pkg/INSTALL	Sun Apr 18 00:07:12 1999
@@ -0,0 +1,85 @@
+#!/bin/sh
+#
+# installation script for wwwoffle2.4
+#
+
+set -e
+echo $0 $1 $2
+PREFIX=${PKG_PREFIX:-/usr/local}
+SPOOLDIR=/var/spool/wwwoffle
+CONFDIR=${SPOOLDIR}
+LOCALHOST=localhost:8080
+INSTALL="install -c"
+
+case $2 in
+POST-INSTALL)
+
+	if [  -d ${SPOOLDIR}/http ]
+	then
+		echo "not upgrading spool directory"
+	else
+		echo "upgrading spool directory"
+		${PREFIX}/bin/upgrade-cache ${SPOOLDIR}
+	fi
+	
+	if [  -d ${SPOOLDIR}/http ] 
+	then
+		if ${PREFIX}/bin/endian-cache > /dev/null 2>&1 
+		then
+			echo "no cache conversion needed"
+		else
+			echo "converting cache"
+			${PREFIX}/bin/endian-cache ${SPOOLDIR}
+		fi
+	fi
+
+	echo "creating directories and files as needed"
+	[ -x ${SPOOLDIR} ] || ${INSTALL} -d ${SPOOLDIR}
+	[ -x ${SPOOLDIR}/http ] || ${INSTALL} -d ${SPOOLDIR}/http
+	[ -x ${SPOOLDIR}/outgoing ] || ${INSTALL} -d ${SPOOLDIR}/outgoing
+	[ -x ${SPOOLDIR}/monitor ] || ${INSTALL} -d ${SPOOLDIR}/monitor
+	[ -x ${SPOOLDIR}/lasttime ] || ${INSTALL} -d ${SPOOLDIR}/lasttime
+	[ -x ${SPOOLDIR}/prevtime1 ] || ${INSTALL} -d ${SPOOLDIR}/prevtime1
+	echo 'GET http://www.gedanken.demon.co.uk/wwwoffle/version-2.4/user.html HTTP/1.0'        > ${SPOOLDIR}/outgoing/Owwwoffle-user
+	echo 'Host: www.gedanken.demon.co.uk'                                                    >> ${SPOOLDIR}/outgoing/Owwwoffle-user
+	echo 'Accept: */*'                                                                       >> ${SPOOLDIR}/outgoing/Owwwoffle-user
+	echo ''                                                                                  >> ${SPOOLDIR}/outgoing/Owwwoffle-user
+	awk 'BEGIN{printf("http://www.gedanken.demon.co.uk/wwwoffle/version-2.4/user.html");}'    > ${SPOOLDIR}/outgoing/Uwwwoffle-user < /dev/null
+	echo 'GET http://www.gedanken.demon.co.uk/wwwoffle/version-2.4/browser.html HTTP/1.0'     > ${SPOOLDIR}/outgoing/Owwwoffle-browser
+	echo 'Host: www.gedanken.demon.co.uk'                                                    >> ${SPOOLDIR}/outgoing/Owwwoffle-browser
+	echo 'Accept: */*'                                                                       >> ${SPOOLDIR}/outgoing/Owwwoffle-browser
+	echo ''                                                                                  >> ${SPOOLDIR}/outgoing/Owwwoffle-browser
+	awk 'BEGIN{printf("http://www.gedanken.demon.co.uk/wwwoffle/version-2.4/browser.html");}' > ${SPOOLDIR}/outgoing/Uwwwoffle-browser < /dev/null
+
+	echo "installing configuration file"
+	if [ -f ${CONFDIR}/wwwoffle.conf ]
+	then
+		echo "upgrading configuration file"
+		perl ${SPOOLDIR}/hold/upgrade-config.pl ${CONFDIR}/wwwoffle.conf
+	else
+		${INSTALL} -m 644 ${CONFDIR}/wwwoffle.conf.install ${CONFDIR}/wwwoffle.conf
+	fi
+
+        if [ -x ${SPOOLDIR}/html ] 
+	then
+		echo "preserving old html files"
+		rm -rf ${SPOOLDIR}/html.old
+		mv ${SPOOLDIR}/html ${SPOOLDIR}/html.old
+        fi
+
+	echo "moving html files into place"
+	tar cf - -C ${SPOOLDIR}/hold html | tar xf - -C ${SPOOLDIR}
+	echo "fixing up html files"
+	(cd ${SPOOLDIR}/html && ./fixup-install.sh ${SPOOLDIR} ${LOCALHOST} && rm ./fixup-install.sh)
+
+#	echo "removing holding directory"
+#	rm -rf ${SPOOLDIR}/hold
+
+	;;
+
+*)
+	echo "$0: $1 - doing nothing"
+	;;
+esac
+
+exit 0

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sun Apr 18 21:10:14 PDT 1999 
State-Changed-Why:  
Patches committed, thanks! 
>Unformatted:
