update to wwwoffle-2.9i, use _wwwoffle user instead of daemon, get rid of

complex flavour patching and @sample'ing and place the html files etc
directly into place.
This commit is contained in:
sthen 2015-11-10 13:56:01 +00:00
parent d2b43706a6
commit 6a3e23a51b
14 changed files with 962 additions and 582 deletions

View File

@ -1,36 +1,28 @@
# $OpenBSD: Makefile,v 1.19 2015/11/10 12:43:39 sthen Exp $
# $OpenBSD: Makefile,v 1.20 2015/11/10 13:56:01 sthen Exp $
COMMENT= WWW OFFLine Explorer
DISTNAME= wwwoffle-2.5e
REVISION= 3
DISTNAME= wwwoffle-2.9i
CATEGORIES= www
HOMEPAGE= http://www.gedanken.org.uk/software/wwwoffle/
# GPLv2
# GPLv2+
PERMIT_PACKAGE_CDROM= Yes
WANTLIB += c
WANTLIB += c z
MASTER_SITES= http://www.gedanken.org.uk/software/wwwoffle/download/
EXTRACT_SUFX= .tgz
FLAVORS= de fr es ru pl it
FLAVOR?=
CONFIGURE_STYLE= gnu
MAKE_ENV= FLAVOR="${FLAVOR}"
MAKE_FLAGS= prefix="${PREFIX}"
FAKE_FLAGS= CONFDIR="${WRKINST}${PREFIX}/share/examples/wwwoffle"
NO_TEST= Yes
# These index.htmls are symlinks and @sample doesn't like that.
post-install:
@rm ${PREFIX}/share/wwwoffle/html/htdig/index.html
@${INSTALL_DATA} ${PREFIX}/share/wwwoffle/html/htdig/search.html \
${PREFIX}/share/wwwoffle/html/htdig/index.html
@rm ${PREFIX}/share/wwwoffle/html/index.html
@${INSTALL_DATA} ${PREFIX}/share/wwwoffle/html/Welcome.html \
${PREFIX}/share/wwwoffle/html/index.html
${INSTALL_DATA_DIR} ${WRKINST}${LOCALSTATEDIR}/spool/wwwoffle/monitor
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (wwwoffle-2.5e.tgz) = cNG6UbEkBbyVlxOe0TFLwEDSX3VABTMHZtIPwSRrxwo=
SIZE (wwwoffle-2.5e.tgz) = 497584
SHA256 (wwwoffle-2.9i.tgz) = 5jQaTsJjHcIv1SCcfl/+YopYMq0ZHURMVq68ODfu0q4=
SIZE (wwwoffle-2.9i.tgz) = 1113771

View File

@ -1,159 +0,0 @@
$OpenBSD: patch-Makefile,v 1.3 2010/03/20 16:55:33 jasper Exp $
- use PREFIX instead of hardcoded INSTDIR
- introduce COMPCONFDIR and COMPSPOOLDIR containing the defines for
gcc. SPOOLDIR and CONFDIR are now only being used for (fake) install.
The spool and htmldoc files now install into /usr/local/share/wwwoffle
and then get copied over to /var/spool/wwwoffle by pkg/INSTALL
- use FLAVOR to choose language for documentation
- set compiler/linker flags to FreeBSD's
- change documentation dir to PREFIX/share/doc/
--- Makefile.orig Sun Apr 2 17:27:30 2000
+++ Makefile Wed Feb 3 22:33:16 2010
@@ -16,49 +16,58 @@
LOCALHOST=localhost:8080
-INSTDIR=/usr/local
-SPOOLDIR=/var/spool/wwwoffle
-CONFDIR=/var/spool/wwwoffle
+INSTDIR="${PREFIX}"
+SPOOLDIR="${PREFIX}/share/wwwoffle"
+COMPSPOOLDIR=/var/spool/wwwoffle
+CONFDIR="${PREFIX}/share/wwwoffle"
+COMPCONFDIR=/var/spool/wwwoffle
-# For Cygwin (win32).
-#INSTDIR=/wwwoffle
-#SPOOLDIR=/wwwoffle/spool
-#CONFDIR=/wwwoffle
-
# For German language web pages and documentation.
-#LANG=de
+.if ${FLAVOR:L:Mde}
+LANG=de
+.endif
# For French language web pages and documentation.
-#LANG=fr
+.if ${FLAVOR:L:Mfr}
+LANG=fr
+.endif
# For Spanish language web pages and documentation.
-#LANG=es
+.if ${FLAVOR:L:Mes}
+LANG=es
+.endif
# For Russian language web pages and documentation.
-#LANG=ru
+.if ${FLAVOR:L:Mru}
+LANG=ru
+.endif
# For Polish language web pages and documentation.
-#LANG=pl
+.if ${FLAVOR:L:Mpl}
+LANG=pl
+.endif
# For Italian language web pages and documentation.
-#LANG=it
+.if ${FLAVOR:L:Mit}
+LANG=it
+.endif
########
-CC=gcc
-CFLAGS=-O2 -Wall -g
+#CC=gcc
+#CFLAGS=-O2 -Wall -g
# This is used in the FreeBSD port (http://www.freebsd.org/ports/).
#CFLAGS=-O2 -Wall
-LD=gcc
-LDFLAGS=-g
+LD=${CC}
+#LDFLAGS=-g
# For HP/UX this is a good idea.
#LDFLAGS=
# This is used in the FreeBSD port (http://www.freebsd.org/ports/).
-#LDFLAGS=-s
+LDFLAGS=-s
# Optimal flex options for a very fast but large HTML parser.
LEX=flex -i -L -pp -B -F -8
@@ -174,7 +183,7 @@ wwwoffled.o : wwwoffled.c wwwoffle.h misc.h config.h
wwwoffles.o : wwwoffles.c wwwoffle.h misc.h config.h errors.h sockets.h proto.h document.h
wwwoffle-tools.o : wwwoffle-tools.c wwwoffle.h misc.h errors.h
- $(COMPILE) wwwoffle-tools.c -o $@ $(INCLUDE) -DSPOOL_DIR=\"$(SPOOLDIR)\"
+ $(COMPILE) wwwoffle-tools.c -o $@ $(INCLUDE) -DSPOOL_DIR=\"$(COMPSPOOLDIR)\"
upgrade-cache.o : upgrade-cache.c wwwoffle.h misc.h errors.h
@@ -207,7 +216,7 @@ refresh.o : refresh.c wwwoffle.h misc.h config.h
spool.o : spool.c wwwoffle.h misc.h config.h errors.h
config.o : config.c wwwoffle.h misc.h config.h errors.h sockets.h proto.h
- $(COMPILE) config.c -o $@ $(INCLUDE) -DSPOOL_DIR=\"$(SPOOLDIR)\" -DCONF_DIR=\"$(CONFDIR)\"
+ $(COMPILE) config.c -o $@ $(INCLUDE) -DSPOOL_DIR=\"$(COMPSPOOLDIR)\" -DCONF_DIR=\"$(COMPCONFDIR)\"
errors.o : errors.c config.h errors.h
io.o : io.c wwwoffle.h misc.h errors.h
misc.o : misc.c misc.h config.h proto.h
@@ -217,7 +226,7 @@ sockets.o : sockets.c
md5.o : md5.c md5.h
config-startup.o : config.c wwwoffle.h misc.h config.h errors.h sockets.h proto.h
- $(COMPILE) config.c -o $@ $(INCLUDE) -DSPOOL_DIR=\"$(SPOOLDIR)\" -DCONF_DIR=\"$(CONFDIR)\" -DSTARTUP_ONLY
+ $(COMPILE) config.c -o $@ $(INCLUDE) -DSPOOL_DIR=\"$(COMPSPOOLDIR)\" -DCONF_DIR=\"$(COMPCONFDIR)\" -DSTARTUP_ONLY
proto-none.o : proto.c misc.h proto.h
$(COMPILE) proto.c -o $@ $(INCLUDE) -DNO_PROTOCOLS
@@ -285,17 +294,17 @@ install_doc :
[ -x $(INSTDIR)/man/man1 ] || $(INSTALL) -d -m 755 $(INSTDIR)/man/man1
$(INSTALL) -c -m 644 wwwoffle.man $(INSTDIR)/man/man1/wwwoffle.1
[ -x $(INSTDIR)/man/man5 ] || $(INSTALL) -d -m 755 $(INSTDIR)/man/man5
- sed -e 's%SPOOLDIR%$(SPOOLDIR)%' -e 's%CONFDIR%$(CONFDIR)%' < wwwoffle.conf.man > wwwoffle.conf.man.install
+ sed -e 's%SPOOLDIR%$(COMPSPOOLDIR)%' -e 's%CONFDIR%$(COMPCONFDIR)%' < wwwoffle.conf.man > wwwoffle.conf.man.install
$(INSTALL) -c -m 644 wwwoffle.conf.man.install $(INSTDIR)/man/man5/wwwoffle.conf.5
[ -x $(INSTDIR)/man/man8 ] || $(INSTALL) -d -m 755 $(INSTDIR)/man/man8
$(INSTALL) -c -m 644 wwwoffled.man $(INSTDIR)/man/man8/wwwoffled.8
- [ -x $(INSTDIR)/doc/wwwoffle ] || $(INSTALL) -d -m 755 $(INSTDIR)/doc/wwwoffle
+ [ -x $(INSTDIR)/share/doc/wwwoffle ] || $(INSTALL) -d -m 755 $(INSTDIR)/share/doc/wwwoffle
for file in CHANGES.CONF CONVERT COPYING FAQ INSTALL NEWS README* UPGRADE ; do \
- $(INSTALL) -c -m 644 $$file $(INSTDIR)/doc/wwwoffle/$$file ;\
+ $(INSTALL) -c -m 644 $$file $(INSTDIR)/share/doc/wwwoffle/$$file ;\
done
[ "x$(LANG)" = "x" ] || [ ! -d lang-$(LANG) ] || ( cd lang-$(LANG) && \
for file in CHANGES.CONF CONVERT COPYING FAQ INSTALL NEWS README* UPGRADE ; do \
- [ ! -f $$file ] || $(INSTALL) -c -m 644 $$file $(INSTDIR)/doc/wwwoffle/$$file-$(LANG) ;\
+ [ ! -f $$file ] || $(INSTALL) -c -m 644 $$file $(INSTDIR)/share/doc/wwwoffle/$$file-$(LANG) ;\
done )
@@ -307,7 +316,7 @@ install_doc-win32 :
$(INSTALL) -c -m 644 README.win32 $(CONFDIR)/README.win32
[ "x$(LANG)" = "x" ] || [ ! -d lang-$(LANG) ] || ( cd lang-$(LANG) && \
for file in CHANGES.CONF COPYING FAQ INSTALL NEWS README* ; do \
- [ ! -f $$file ] || $(INSTALL) -c -m 644 $$file $(INSTDIR)/doc/wwwoffle/$$file-$(LANG) ;\
+ [ ! -f $$file ] || $(INSTALL) -c -m 644 $$file $(INSTDIR)/share/doc/wwwoffle/$$file-$(LANG) ;\
done )
install_cache : endian-cache
@@ -358,7 +367,7 @@ install_html : html
-chgrp -R 0 $(SPOOLDIR)/html > /dev/null 2>&1
install_config :
- sed -e 's%SPOOLDIR%$(SPOOLDIR)%' -e 's%CONFDIR%$(CONFDIR)%' < wwwoffle.conf > wwwoffle.conf.install
+ sed -e 's%SPOOLDIR%$(COMPSPOOLDIR)%' -e 's%CONFDIR%$(COMPCONFDIR)%' < wwwoffle.conf > wwwoffle.conf.install
[ -x $(CONFDIR) ] || $(INSTALL) -d -m 750 $(CONFDIR)
@[ ! -f $(CONFDIR)/wwwoffle.conf ] || \
(echo "WWWOFFLE: " ;\

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-conf_Makefile_in,v 1.1 2015/11/10 13:56:01 sthen Exp $
--- conf/Makefile.in.orig Tue Nov 10 13:06:44 2015
+++ conf/Makefile.in Tue Nov 10 13:08:50 2015
@@ -22,8 +22,8 @@ SHELL=/bin/sh
prefix=@prefix@
-SPOOLDIR=$(DESTDIR)@SPOOLDIR@
-CONFDIR=$(DESTDIR)@CONFDIR@
+SPOOLDIR?=$(DESTDIR)@SPOOLDIR@
+CONFDIR?=$(DESTDIR)@CONFDIR@
REAL_SPOOLDIR=@SPOOLDIR@
REAL_CONFDIR=@CONFDIR@

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-conf_wwwoffle_conf_template,v 1.1 2015/11/10 13:56:01 sthen Exp $
--- conf/wwwoffle.conf.template.orig Tue Nov 10 13:31:19 2015
+++ conf/wwwoffle.conf.template Tue Nov 10 13:31:23 2015
@@ -20,8 +20,8 @@ StartUp
spool-dir = SPOOLDIR
-#run-uid = daemon
-#run-gid = daemon
+ run-uid = _wwwoffle
+ run-gid = _wwwoffle
use-syslog = yes

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-doc_Makefile_in,v 1.1 2015/11/10 13:56:01 sthen Exp $
--- doc/Makefile.in.orig Tue Nov 10 13:02:33 2015
+++ doc/Makefile.in Tue Nov 10 13:02:36 2015
@@ -23,7 +23,7 @@ SHELL=/bin/sh
prefix=@prefix@
datarootdir = @datarootdir@
mandir=$(DESTDIR)@mandir@
-docdir=$(DESTDIR)${prefix}/doc/wwwoffle
+docdir=$(DESTDIR)${prefix}/share/doc/wwwoffle
SPOOLDIR=@SPOOLDIR@
CONFDIR=@CONFDIR@

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-html_l,v 1.1 2010/05/23 01:10:54 espie Exp $
--- html.l.orig Sun May 23 03:08:20 2010
+++ html.l Sun May 23 03:08:43 2010
@@ -640,6 +640,7 @@ static void parse_html(void)
break;
default:
+ ;
}
}

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-htmlmodify_l,v 1.1 2010/05/23 01:10:54 espie Exp $
--- htmlmodify.l.orig Sun May 23 03:09:19 2010
+++ htmlmodify.l Sun May 23 03:09:51 2010
@@ -399,6 +399,7 @@ static void modify_html(void)
break;
default:
+ ;
}
if(cache_info)

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-misc_c,v 1.1 2010/03/20 16:55:33 jasper Exp $
- change arg type for gmtime() and localtime() from long to time_t
--- misc.c.orig Mon Mar 20 20:18:29 2000
+++ misc.c Wed Feb 3 22:33:16 2010
@@ -681,7 +681,7 @@ char *MakeHash(const char *args)
int utc Set to true to get Universal Time, else localtime.
++++++++++++++++++++++++++++++++++++++*/
-char *RFC822Date(long t,int utc)
+char *RFC822Date(time_t t,int utc)
{
static char *week[7]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
static char *month[12]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-misc_h,v 1.1 2010/03/20 16:55:33 jasper Exp $
- change arg type for gmtime() and localtime() from long to time_t
--- misc.h.orig Sat Dec 18 17:07:01 1999
+++ misc.h Wed Feb 3 22:33:16 2010
@@ -90,7 +90,7 @@ char *CanonicaliseName(char *name);
char *MakeHash(const char *args);
-char *RFC822Date(long t,int utc);
+char *RFC822Date(time_t t,int utc);
long DateToTimeT(const char *date);
char *URLDecode(const char *str, int isform);

View File

@ -1,72 +0,0 @@
$OpenBSD: patch-wwwoffle_conf,v 1.2 2010/03/20 16:55:33 jasper Exp $
- enable running as user "daemon"
- don't get recursive/cache gzip or compress archives
- setup OpenBSD related aliases
--- wwwoffle.conf.orig Sun Mar 12 15:00:41 2000
+++ wwwoffle.conf Mon Jul 31 19:45:03 2000
@@ -84,8 +84,8 @@ StartUp
spool-dir = SPOOLDIR
-#run-uid = daemon
-#run-gid = daemon
+ run-uid = daemon
+ run-gid = daemon
use-syslog = yes
@@ -276,7 +276,7 @@ FetchOptions
ModifyHTML
{
- enable-modify-html = no
+ enable-modify-html = yes
add-cache-info = no
@@ -416,8 +416,10 @@ DontCache
# Don't cache any hosts in the barfoo.com domain.
# *://*.barfoo.com/
# Don't cache any gzipped or tar files.
-# *://*/*.gz
-# *://*/*.tar
+ *://*/*.gz
+ *://*/*.tar
+ *://*/*.tgz
+ *://*/*.Z
# Don't cache any files from /volatile in the foo.com domain.
# *://*.foo.com/volatile/*
}
@@ -473,8 +475,10 @@ DontGetRecursive
#### Example ####
# Dont get any gzipped or tar files when getting recursively.
-# *://*/*.gz
-# *://*/*.tar
+ *://*/*.gz
+ *://*/*.tar
+ *://*/*.tgz
+ *://*/*.Z
}
@@ -530,7 +534,7 @@ CensorHeader
# Don't send Cookies back
# Cookie =
# Lie about the Browser type.
-# User-Agent = WWWOFFLE/2.5
+ User-Agent = WWWOFFLE/2.5
}
@@ -736,6 +740,8 @@ Alias
# http://www.bar.com/ = http://www.bar-mirror.foo.com/
# The wwwoffle homepage can be aliased
# http://wwwoffle/ = http://www.gedanken.demon.co.uk/wwwoffle/
+ http://openbsd/ = http://www.openbsd.org/
+ http://undeadly/ = http://www.undeadly.org/
}

View File

@ -1,18 +0,0 @@
You may want to put the following into your /etc/rc.local:
# start wwwoffle
if [ -x ${PREFIX}/sbin/wwwoffled ]; then
echo -n ' wwwoffled'
${PREFIX}/sbin/wwwoffled -c /var/spool/wwwoffle/wwwoffle.conf \
-p > /var/run/wwwoffled.pid
fi
in /etc/ppp/ppp.linkup:
!bg ${PREFIX}/bin/wwwoffle -online
in /etc/ppp/ppp.linkdown:
!bg ${PREFIX}/bin/wwwoffle -offline
Read ${PREFIX}/share/doc/wwwoffle/* for further information.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
#!/bin/sh
#
# $OpenBSD: wwwoffled.rc,v 1.1 2015/11/10 13:56:01 sthen Exp $
daemon="${TRUEPREFIX}/sbin/wwwoffled"
. /etc/rc.d/rc.subr
rc_cmd $1