ports/78372: port update: www/dansguardian to 2.8.0.4
Freddie Cash
fcash at sd73.bc.ca
Thu Mar 3 18:10:22 UTC 2005
>Number: 78372
>Category: ports
>Synopsis: port update: www/dansguardian to 2.8.0.4
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 03 18:10:20 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Freddie Cash
>Release: FreeBSD 6.0-CURRENT i386
>Organization:
School District 73
>Environment:
System: FreeBSD ember.sd73.bc.ca 6.0-CURRENT FreeBSD 6.0-CURRENT #10: Sat Feb 26 10:53:36 PST 2005 root at ember.sd73.b
FreeBSD newvista-build.sd73.bc.ca 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #0: Tue Feb 22 20:30:27 PST 2005 root at newvista-bui
>Description:
Update port to latest stable release of DansGuardian.
Changes include:
- updated Big5 Chinese and Lithuanian language files
- added Hebrew and Swedish language files
- fixed several bugs in HTTP header handling
- fixed a few bugs in the -r soft-restart feature
- fixed a security issue with malformed URL processing
Changes to port structure include:
- install all default config files under samples/ directory, making it much simpler to do upgrades
(It's not elegant or perfect, but it works better than the .dist install I was using before)
>How-To-Repeat:
>Fix:
The patch below has been test on 6.0-CURRENT and 5.3-RELEASE-p5. No testing has been done on 4.x systems.
--- dansguardian-2.8.0.4.diff begins here ---
diff -ruH dansguardian.orig/Makefile dansguardian/Makefile
--- dansguardian.orig/Makefile Mon Feb 21 10:02:28 2005
+++ dansguardian/Makefile Wed Mar 2 15:38:49 2005
@@ -6,7 +6,7 @@
#
PORTNAME= dansguardian
-PORTVERSION= 2.8.0.2
+PORTVERSION= 2.8.0.4
CATEGORIES= www
MASTER_SITES= # empty, see below
DISTNAME= ${PORTNAME}-${PORTVERSION}.source
@@ -32,7 +32,9 @@
--logdir=/var/log/ \
--cgidir=/www/cgi-bin/ \
--piddir=/var/run/
+
MAN8= dansguardian.8
+NOMANCOMPRESSED= yes
OPTIONS= DG_GCC3 "Compile using GCC 3.3 on FreeBSD 4.x." off \
DG_PHRASELISTS "Install new phraselists. (Overwrites existing.)" off
@@ -49,7 +51,7 @@
# Set which version of GCC to compile the port with
.if ${OSVERSION} > 500000
CONFIGURE_ARGS+= --gccver=3
-.else
+else
CONFIGURE_ARGS+= --gccver=2
.endif
diff -ruH dansguardian.orig/distinfo dansguardian/distinfo
--- dansguardian.orig/distinfo Mon Feb 21 10:02:28 2005
+++ dansguardian/distinfo Mon Feb 28 09:48:39 2005
@@ -1,2 +1,2 @@
-MD5 (dansguardian-2.8.0.2.source.tar.gz) = 94e967f97930739de6c531ec4db67d48
-SIZE (dansguardian-2.8.0.2.source.tar.gz) = 192297
+MD5 (dansguardian-2.8.0.4.source.tar.gz) = 91d65adf4087a863ad605dddd6e18046
+SIZE (dansguardian-2.8.0.4.source.tar.gz) = 194475
diff -ruH dansguardian.orig/files/patch-autoconf::fbsd.in dansguardian/files/patch-autoconf::fbsd.in
--- dansguardian.orig/files/patch-autoconf::fbsd.in Mon Feb 21 10:02:28 2005
+++ dansguardian/files/patch-autoconf::fbsd.in Wed Mar 2 15:21:46 2005
@@ -1,15 +1,41 @@
---- autoconf/fbsd.in.orig Tue Jun 29 10:21:27 2004
-+++ autoconf/fbsd.in Tue Jun 29 10:23:52 2004
-@@ -43,48 +43,37 @@
+--- autoconf/fbsd.in.orig Sun Feb 20 07:25:10 2005
++++ autoconf/fbsd.in Wed Mar 2 15:21:28 2005
+@@ -21,16 +21,15 @@
+ logrotate.dansguardian dansguardianf1.conf
+
+ PASSVARS = -DPROXYUSER=\"${PROXYUSER}\"
+-#PASSVARS += -DLOGLOCATION=\"${LOGLOCATION}access.log\"
++PASSVARS += -DLOGLOCATION=\"${LOGLOCATION}dansguardian.log\"
+ PASSVARS += -DCONFFILELOCATION=\"${CONFFILELOCATION}dansguardian.conf\"
+-#PASSVARS += -DPIDDIR=\"${PIDDIR}\"
++PASSVARS += -DPIDDIR=\"${PIDDIR}\"
+
+ #Some advanced options:
+ #WARNING = -Wall
+-#OPTIMISE = -O2
+-OPTIMISE = ${CXXFLAGS}
+ #DEBUG += -DDGDEBUG
+ #STATIC = -static
++OPTIMISE = ${CXXFLAGS}
+
+ I = $(INSTALLPREFIX)
+ CFLAGS = $(OPTIMISE) $(WARNING)
+@@ -39,53 +38,43 @@
+ .cpp.o:
+ $(CPP) $(DEBUG) $(CFLAGS) -c $<
+
+-all: $(OBJ)
++all: $(OBJ)
$(CPP) -o dansguardian $(DGCFLAGS) $(DEBUG) $(OBJ) $(LIBS) dansguardian.cpp
install:
-- @test -d $I$(SYSVLOCATION) || install -d $I$(SYSVLOCATION)
+ @test -d $I$(SYSVLOCATION) || install -d $I$(SYSVLOCATION)
@test -d $I$(CONFFILELOCATION) || install -d $I$(CONFFILELOCATION)
- @test -d $I$(CONFFILELOCATION)phraselists || install -d $I$(CONFFILELOCATION)phraselists
-- @test -d $I$(CONFFILELOCATION)languages || install -d $I$(CONFFILELOCATION)languages
+ @test -d $I$(CONFFILELOCATION)languages || install -d $I$(CONFFILELOCATION)languages
++ @test -d $I$(CONFFILELOCATION)samples || install -d $I$(CONFFILELOCATION)samples
@test -d $I$(CGIBINLOCATION) || install -d $I$(CGIBINLOCATION)
-- @test -d $I$(MANUALFILES)man8/ || install -d $I$(MANUALFILES)man8/
+ @test -d $I$(MANUALFILES)man8/ || install -d $I$(MANUALFILES)man8/
- @test -d $I$(LOGLOCATION) || install -d $I$(LOGLOCATION)
@test -d $I$(BINARYLOCATION) || install -d $I$(BINARYLOCATION)
- cp -f ./filtergroupslist $I$(CONFFILELOCATION)filtergroupslist
@@ -44,36 +70,35 @@
- cp -f ./dansguardian.8.gz $I$(MANUALFILES)man8/dansguardian.8.gz
- chown -R $(PROXYUSER):$(PROXYGROUP) $I$(LOGLOCATION)
- chmod -R u+wr $I$(LOGLOCATION)
+- chmod -R og-w $I$(LOGLOCATION)
- chmod u+wrx $I$(LOGLOCATION)
- if [ -d $(LOGROTATELOCATION) ]; then cp -f ./logrotate.dansguardian $I$(LOGROTATELOCATION)dansguardian; fi
-+ @test -d $I$(CONFFILELOCATION)languages || install -d $I$(CONFFILELOCATION)languages
-+ cp -fR ./languages/* $I$(CONFFILELOCATION)languages/
-+ install -o root -g wheel -m 644 ./filtergroupslist $I$(CONFFILELOCATION)filtergroupslist.dist
-+ install -o root -g wheel -m 644 ./dansguardianf1.conf $I$(CONFFILELOCATION)dansguardianf1.conf.dist
+ install -o root -g wheel -m 755 ./dansguardian $I$(BINARYLOCATION)dansguardian
-+ install -o root -g wheel -m 644 ./dansguardian.conf $I$(CONFFILELOCATION)dansguardian.conf.dist
-+ install -o root -g wheel -m 644 ./bannedphraselist $I$(CONFFILELOCATION)bannedphraselist.dist
-+ install -o root -g wheel -m 644 ./exceptionphraselist $I$(CONFFILELOCATION)exceptionphraselist.dist
-+ install -o root -g wheel -m 644 ./weightedphraselist $I$(CONFFILELOCATION)weightedphraselist.dist
-+ install -o root -g wheel -m 644 ./bannediplist $I$(CONFFILELOCATION)bannediplist.dist
-+ install -o root -g wheel -m 644 ./banneduserlist $I$(CONFFILELOCATION)banneduserlist.dist
-+ install -o root -g wheel -m 644 ./bannedextensionlist $I$(CONFFILELOCATION)bannedextensionlist.dist
-+ install -o root -g wheel -m 644 ./bannedmimetypelist $I$(CONFFILELOCATION)bannedmimetypelist.dist
-+ install -o root -g wheel -m 644 ./bannedurllist $I$(CONFFILELOCATION)bannedurllist.dist
-+ install -o root -g wheel -m 644 ./bannedregexpurllist $I$(CONFFILELOCATION)bannedregexpurllist.dist
-+ install -o root -g wheel -m 644 ./bannedsitelist $I$(CONFFILELOCATION)bannedsitelist.dist
-+ install -o root -g wheel -m 644 ./contentregexplist $I$(CONFFILELOCATION)contentregexplist.dist
-+ install -o root -g wheel -m 644 ./greysitelist $I$(CONFFILELOCATION)greysitelist.dist
-+ install -o root -g wheel -m 644 ./greyurllist $I$(CONFFILELOCATION)greyurllist.dist
-+ install -o root -g wheel -m 644 ./exceptionsitelist $I$(CONFFILELOCATION)exceptionsitelist.dist
-+ install -o root -g wheel -m 644 ./exceptionurllist $I$(CONFFILELOCATION)exceptionurllist.dist
-+ install -o root -g wheel -m 644 ./exceptionuserlist $I$(CONFFILELOCATION)exceptionuserlist.dist
-+ install -o root -g wheel -m 644 ./exceptioniplist $I$(CONFFILELOCATION)exceptioniplist.dist
-+ install -o root -g wheel -m 644 ./pics $I$(CONFFILELOCATION)pics.dist
-+ install -o root -g wheel -m 644 ./transparent1x1.gif $I$(CONFFILELOCATION)transparent1x1.gif
-+ install -o root -g wheel -m 755 ./dansguardian.pl $I$(CGIBINLOCATION)dansguardian.pl.dist
++ install -o root -g wheel -m 644 ./filtergroupslist $I$(CONFFILELOCATION)samples/filtergroupslist
++ install -o root -g wheel -m 644 ./dansguardianf1.conf $I$(CONFFILELOCATION)samples/dansguardianf1.conf
++ install -o root -g wheel -m 644 ./dansguardian.conf $I$(CONFFILELOCATION)samples/dansguardian.conf
++ install -o root -g wheel -m 644 ./bannedphraselist $I$(CONFFILELOCATION)samples/bannedphraselist
++ install -o root -g wheel -m 644 ./exceptionphraselist $I$(CONFFILELOCATION)samples/exceptionphraselist
++ install -o root -g wheel -m 644 ./weightedphraselist $I$(CONFFILELOCATION)samples/weightedphraselist
++ install -o root -g wheel -m 644 ./bannediplist $I$(CONFFILELOCATION)samples/bannediplist
++ install -o root -g wheel -m 644 ./banneduserlist $I$(CONFFILELOCATION)samples/banneduserlist
++ install -o root -g wheel -m 644 ./bannedextensionlist $I$(CONFFILELOCATION)samples/bannedextensionlist
++ install -o root -g wheel -m 644 ./bannedmimetypelist $I$(CONFFILELOCATION)samples/bannedmimetypelist
++ install -o root -g wheel -m 644 ./bannedurllist $I$(CONFFILELOCATION)samples/bannedurllist
++ install -o root -g wheel -m 644 ./bannedregexpurllist $I$(CONFFILELOCATION)samples/bannedregexpurllist
++ install -o root -g wheel -m 644 ./bannedsitelist $I$(CONFFILELOCATION)samples/bannedsitelist
++ install -o root -g wheel -m 644 ./contentregexplist $I$(CONFFILELOCATION)samples/contentregexplist
++ install -o root -g wheel -m 644 ./greysitelist $I$(CONFFILELOCATION)samples/greysitelist
++ install -o root -g wheel -m 644 ./greyurllist $I$(CONFFILELOCATION)samples/greyurllist
++ install -o root -g wheel -m 644 ./exceptionsitelist $I$(CONFFILELOCATION)samples/exceptionsitelist
++ install -o root -g wheel -m 644 ./exceptionurllist $I$(CONFFILELOCATION)samples/exceptionurllist
++ install -o root -g wheel -m 644 ./exceptionuserlist $I$(CONFFILELOCATION)samples/exceptionuserlist
++ install -o root -g wheel -m 644 ./exceptioniplist $I$(CONFFILELOCATION)samples/exceptioniplist
++ install -o root -g wheel -m 644 ./pics $I$(CONFFILELOCATION)samples/pics
++ install -o root -g wheel -m 644 ./transparent1x1.gif $I$(CONFFILELOCATION)samples/transparent1x1.gif
++ install -o root -g wheel -m 755 ./dansguardian.pl $I$(CONFFILELOCATION)samples/dansguardian.pl
+ install -o root -g wheel -m 644 ./dansguardian.8 $I$(MANUALFILES)man8/dansguardian.8
-+ install -o nobody -g nogroup -m 644 /dev/null $I$(LOGLOCATION)dansguardian.log
++ cp -Rf ./languages/* $I$(CONFFILELOCATION)languages/
uninstall:
rm -f $(BINARYLOCATION)dansguardian
diff -ruH dansguardian.orig/files/patch-configure dansguardian/files/patch-configure
--- dansguardian.orig/files/patch-configure Mon Feb 21 10:02:28 2005
+++ dansguardian/files/patch-configure Mon Feb 28 10:37:44 2005
@@ -1,6 +1,15 @@
---- configure.orig Wed Apr 28 09:36:01 2004
-+++ configure Thu May 6 10:56:21 2004
-@@ -2543,7 +2543,7 @@
+--- configure.orig Mon Feb 28 10:34:34 2005
++++ configure Mon Feb 28 10:37:32 2005
+@@ -42,7 +42,7 @@
+ runas_usr='nobody'
+ runas_grp='nobody'
+ mandir='/usr/man/'
+-logdir='/var/log/dansguardian/'
++logdir='/var/log/'
+ piddir='/var/run/'
+ logrotatedir='/etc/logrotate.d/'
+ gccver=`gcc -dumpversion | sed '1,$s/.[0-9]*$//'`
+@@ -2480,7 +2480,7 @@
$extendedecho "SYSVLOCATION = \${PREFIX}$sysvdir" >>Makefile
$extendedecho "CGIBINLOCATION = \${PREFIX}$cgidir" >>Makefile
$extendedecho "MANUALFILES = \${PREFIX}$mandir" >>Makefile
@@ -9,7 +18,16 @@
$extendedecho "LOGROTATELOCATION = \${PREFIX}$logrotatedir" >>Makefile
echo "PROXYUSER = $runas_usr" >>Makefile
echo "PROXYGROUP = $runas_grp" >>Makefile
-@@ -2896,7 +2896,7 @@
+@@ -2498,7 +2498,7 @@
+ if [ -f /usr/include/ppc/endian.h ]; then
+ endianh='/usr/include/ppc/endian.h'
+ else
+- endianh='<endian.h>'
++ endianh='<endian.h>'
+ fi
+ fi
+ fi
+@@ -2834,7 +2834,7 @@
echo "# Log file location" >>dansguardian.conf
echo "# " >>dansguardian.conf
echo "# Defines the log directory and filename." >>dansguardian.conf
@@ -18,3 +36,21 @@
echo "" >>dansguardian.conf
echo "" >>dansguardian.conf
echo "# Network Settings" >>dansguardian.conf
+@@ -3341,7 +3341,7 @@
+ echo "" >>logrotation
+ echo "LOG_DIR=$prefixdir$logdir" >>logrotation
+ echo "NUM_LOGS=4" >>logrotation
+-echo "LOG=\$LOG_DIR/access.log" >>logrotation
++echo "LOG=\$LOG_DIR/dansguardian.log" >>logrotation
+ echo "" >>logrotation
+
+ case `uname -s` in
+@@ -3442,7 +3442,7 @@
+ fi
+
+ $extendedecho "$prefixdir$logdir\c" >>logrotate.dansguardian
+-echo "access.log {" >>logrotate.dansguardian
++echo "dansguardian.log {" >>logrotate.dansguardian
+ echo " rotate 4" >>logrotate.dansguardian
+ echo " weekly" >>logrotate.dansguardian
+ echo " sharedscripts" >>logrotate.dansguardian
diff -ruH dansguardian.orig/pkg-plist dansguardian/pkg-plist
--- dansguardian.orig/pkg-plist Mon Feb 21 10:02:28 2005
+++ dansguardian/pkg-plist Wed Mar 2 14:27:40 2005
@@ -9,14 +9,17 @@
@exec mkdir -p etc/dansguardian/languages/french
@exec mkdir -p etc/dansguardian/languages/german
@exec mkdir -p etc/dansguardian/languages/german2
+ at exec mkdir -p etc/dansguardian/languages/hebrew
@exec mkdir -p etc/dansguardian/languages/indonesian
@exec mkdir -p etc/dansguardian/languages/italian
@exec mkdir -p etc/dansguardian/languages/lithuanian
@exec mkdir -p etc/dansguardian/languages/mxspanish
@exec mkdir -p etc/dansguardian/languages/polish
@exec mkdir -p etc/dansguardian/languages/portuguese
+ at exec mkdir -p etc/dansguardian/languages/swedish
@exec mkdir -p etc/dansguardian/languages/turkish
@exec mkdir -p etc/dansguardian/languages/ukenglish
+ at exec mkdir -p etc/dansguardian/samples
%%PHRASELISTS%%@exec mkdir -p etc/dansguardian/phraselists
%%PHRASELISTS%%@exec mkdir -p etc/dansguardian/phraselists/chat
%%PHRASELISTS%%@exec mkdir -p etc/dansguardian/phraselists/drugadvocacy
@@ -37,28 +40,29 @@
%%PHRASELISTS%%@exec mkdir -p etc/dansguardian/phraselists/violence
%%PHRASELISTS%%@exec mkdir -p etc/dansguardian/phraselists/warezhacking
%%PHRASELISTS%%@exec mkdir -p etc/dansguardian/phraselists/weapons
-etc/dansguardian/bannedextensionlist.dist
-etc/dansguardian/bannediplist.dist
-etc/dansguardian/bannedmimetypelist.dist
-etc/dansguardian/bannedphraselist.dist
-etc/dansguardian/bannedregexpurllist.dist
-etc/dansguardian/bannedsitelist.dist
-etc/dansguardian/bannedurllist.dist
-etc/dansguardian/banneduserlist.dist
-etc/dansguardian/contentregexplist.dist
-etc/dansguardian/dansguardian.conf.dist
-etc/dansguardian/dansguardianf1.conf.dist
-etc/dansguardian/exceptioniplist.dist
-etc/dansguardian/exceptionphraselist.dist
-etc/dansguardian/exceptionsitelist.dist
-etc/dansguardian/exceptionurllist.dist
-etc/dansguardian/exceptionuserlist.dist
-etc/dansguardian/filtergroupslist.dist
-etc/dansguardian/greysitelist.dist
-etc/dansguardian/greyurllist.dist
-etc/dansguardian/pics.dist
-etc/dansguardian/transparent1x1.gif
-etc/dansguardian/weightedphraselist.dist
+etc/dansguardian/samples/bannedextensionlist
+etc/dansguardian/samples/bannediplist
+etc/dansguardian/samples/bannedmimetypelist
+etc/dansguardian/samples/bannedphraselist
+etc/dansguardian/samples/bannedregexpurllist
+etc/dansguardian/samples/bannedsitelist
+etc/dansguardian/samples/bannedurllist
+etc/dansguardian/samples/banneduserlist
+etc/dansguardian/samples/contentregexplist
+etc/dansguardian/samples/dansguardian.conf
+etc/dansguardian/samples/dansguardianf1.conf
+etc/dansguardian/samples/exceptioniplist
+etc/dansguardian/samples/exceptionphraselist
+etc/dansguardian/samples/exceptionsitelist
+etc/dansguardian/samples/exceptionurllist
+etc/dansguardian/samples/exceptionuserlist
+etc/dansguardian/samples/filtergroupslist
+etc/dansguardian/samples/greysitelist
+etc/dansguardian/samples/greyurllist
+etc/dansguardian/samples/pics
+etc/dansguardian/samples/transparent1x1.gif
+etc/dansguardian/samples/weightedphraselist
+etc/dansguardian/samples/dansguardian.pl
etc/dansguardian/languages/ReadMe
etc/dansguardian/languages/arspanish/messages
etc/dansguardian/languages/arspanish/template.html
@@ -80,6 +84,8 @@
etc/dansguardian/languages/german/template.html
etc/dansguardian/languages/german2/messages
etc/dansguardian/languages/german2/template.html
+etc/dansguardian/languages/hebrew/messages
+etc/dansguardian/languages/hebrew/template.html
etc/dansguardian/languages/indonesian/messages
etc/dansguardian/languages/indonesian/template.html
etc/dansguardian/languages/italian/messages
@@ -92,6 +98,8 @@
etc/dansguardian/languages/polish/template.html
etc/dansguardian/languages/portuguese/messages
etc/dansguardian/languages/portuguese/template.html
+etc/dansguardian/languages/swedish/messages
+etc/dansguardian/languages/swedish/template.html
etc/dansguardian/languages/turkish/messages
etc/dansguardian/languages/turkish/template.html
etc/dansguardian/languages/ukenglish/messages
@@ -121,7 +129,6 @@
%%PHRASELISTS%%etc/dansguardian/phraselists/weapons/weighted
etc/rc.d/start-dg.sh
sbin/dansguardian
-www/cgi-bin/dansguardian.pl.dist
@dirrm etc/dansguardian/languages/arspanish
@dirrm etc/dansguardian/languages/bulgarian
@dirrm etc/dansguardian/languages/chinesebig5
@@ -132,15 +139,18 @@
@dirrm etc/dansguardian/languages/french
@dirrm etc/dansguardian/languages/german
@dirrm etc/dansguardian/languages/german2
+ at dirrm etc/dansguardian/languages/hebrew
@dirrm etc/dansguardian/languages/indonesian
@dirrm etc/dansguardian/languages/italian
@dirrm etc/dansguardian/languages/lithuanian
@dirrm etc/dansguardian/languages/mxspanish
@dirrm etc/dansguardian/languages/polish
@dirrm etc/dansguardian/languages/portuguese
+ at dirrm etc/dansguardian/languages/swedish
@dirrm etc/dansguardian/languages/turkish
@dirrm etc/dansguardian/languages/ukenglish
@dirrm etc/dansguardian/languages
+ at dirrm etc/dansguardian/samples
%%PHRASELISTS%%@dirrm etc/dansguardian/phraselists/chat
%%PHRASELISTS%%@dirrm etc/dansguardian/phraselists/drugadvocacy
%%PHRASELISTS%%@dirrm etc/dansguardian/phraselists/dutchbadwords
--- dansguardian-2.8.0.4.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list