ports/99073: [NEW PORT] www/havp: HTTP Antivirus Proxy

Elisey O. Savateev b3k at mail.ru
Sat Jun 17 08:40:25 UTC 2006


>Number:         99073
>Category:       ports
>Synopsis:       [NEW PORT] www/havp: HTTP Antivirus Proxy
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 17 08:40:18 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Elisey O. Savateev
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:
FreeBSD beastie 6.1-STABLE FreeBSD 6.1-STABLE #20: Sun Jun  4 21:19:04 YEKST
>Description:
HAVP (HTTP Antivirus Proxy) is a proxy with a ClamAV anti-virus scanner. The
main aims are continuous, non-blocking downloads and smooth scanning of
dynamic and password protected HTTP traffic. Havp antivirus proxy has a parent
and transparent proxy mode. It can be used with squid or standalone.

WWW: http://www.server-side.de/

- Elisey Savateev
b3k at mail.ru
>How-To-Repeat:

>Fix:
--- havp-0.81.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	havp
#	havp/Makefile
#	havp/pkg-descr
#	havp/distinfo
#	havp/files
#	havp/files/patch-havp_Makefile.in
#	havp/files/pkg-install.in
#	havp/files/pkg-deinstall.in
#	havp/files/havp.in
#	havp/pkg-plist
#
echo c - havp
mkdir -p havp > /dev/null 2>&1
echo x - havp/Makefile
sed 's/^X//' >havp/Makefile << 'END-of-havp/Makefile'
X# New ports collection makefile for:	havp
X# Date created:				17 June 2006
X# Whom:					Elisey Savateev <b3k at mail.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	havp
XPORTVERSION=	0.81
XCATEGORIES=	www
XMASTER_SITES=	http://www.server-side.de/download/ \
X				http://bio3k.softboard.ru/uploads/arch/
X
XMAINTAINER=	b3k at mail.ru
XCOMMENT=	HTTP Antivirus Proxy
X
XLIB_DEPENDS=	clamav.1:${PORTSDIR}/security/clamav
X
XGNU_CONFIGURE=	yes
XUSE_GMAKE=	yes
XUSE_RC_SUBR=	havp
X
XLOG_DIR=	/var/log/havp
XTMP_DIR=	/var/tmp/havp
XRUN_DIR=	/var/run/havp
XPLIST_SUB+=	LOG_DIR=${LOG_DIR} TMP_DIR=${TMP_DIR} RUN_DIR=${RUN_DIR}
X
XSUB_FILES=	pkg-install pkg-deinstall
XSUB_LIST=	LOG_DIR=${LOG_DIR} TMP_DIR=${TMP_DIR} RUN_DIR=${RUN_DIR}
X
Xpre-install:
X	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
X
Xpost-install:
X	@[ -f ${PREFIX}/etc/havp/havp.config ] || \
X		${CP} -p ${PREFIX}/etc/havp/havp.config.default ${PREFIX}/etc/havp/havp.config
X	@${MKDIR} ${EXAMPLESDIR}
X	@${CP} ${WRKSRC}/etc/havp/blacklist ${EXAMPLESDIR}/blacklist.sample
X	@${CP} -R ${WRKSRC}/etc/havp/templates ${EXAMPLESDIR}
X	@${CP} ${WRKSRC}/etc/havp/whitelist ${EXAMPLESDIR}/whitelist.sample
X	@${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL
X
X.include <bsd.port.mk>
END-of-havp/Makefile
echo x - havp/pkg-descr
sed 's/^X//' >havp/pkg-descr << 'END-of-havp/pkg-descr'
XHAVP (HTTP Antivirus Proxy) is a proxy with a ClamAV anti-virus scanner. The
Xmain aims are continuous, non-blocking downloads and smooth scanning of
Xdynamic and password protected HTTP traffic. Havp antivirus proxy has a parent
Xand transparent proxy mode. It can be used with squid or standalone.
X
XWWW: http://www.server-side.de/
X
X- Elisey Savateev
Xb3k at mail.ru
END-of-havp/pkg-descr
echo x - havp/distinfo
sed 's/^X//' >havp/distinfo << 'END-of-havp/distinfo'
XMD5 (havp-0.81.tar.gz) = 248a0020cca73ca8833e6e0090af4302
XSHA256 (havp-0.81.tar.gz) = ec1fe99858b79a9f440569ce353b2eba5bcba0920a092025d26df35d63941a77
XSIZE (havp-0.81.tar.gz) = 104299
END-of-havp/distinfo
echo c - havp/files
mkdir -p havp/files > /dev/null 2>&1
echo x - havp/files/patch-havp_Makefile.in
sed 's/^X//' >havp/files/patch-havp_Makefile.in << 'END-of-havp/files/patch-havp_Makefile.in'
X--- havp/Makefile.in.bak	Sun Apr 23 18:31:11 2006
X+++ havp/Makefile.in	Sat Jun 17 12:12:17 2006
X@@ -26,31 +26,7 @@
X install: all
X 	$(INSTALL) -d $(sbindir)
X 	$(INSTALL) -s -m 755 havp $(sbindir)/havp
X-	$(INSTALL) -d -m 755 /var/log/havp/
X-	$(INSTALL) -d -m 755 /var/tmp/havp/
X-	$(INSTALL) -d -m 755 /var/run/havp/
X-	$(INSTALL) -d /etc/init.d
X-	$(INSTALL) -m 755 ../etc/init.d/havp /etc/init.d/
X 	$(INSTALL) -m 644 ../etc/havp/havp.config $(etcdir)/havp/havp.config.default
X-	@if [ ! -f $(etcdir)/havp/havp.config ]; then \
X-		$(INSTALL) -m 644 ../etc/havp/havp.config $(etcdir)/havp/havp.config; \
X-	else \
X-		../update-conf $(etcdir)/havp/havp.config; \
X-	fi
X-	@if [ ! -f $(etcdir)/havp/whitelist ]; then \
X-		$(INSTALL) -m 644 ../etc/havp/whitelist $(etcdir)/havp/whitelist; \
X-	fi
X-	@if [ ! -f $(etcdir)/havp/blacklist ]; then \
X-		$(INSTALL) -m 644 ../etc/havp/blacklist $(etcdir)/havp/blacklist; \
X-	fi
X-	cp -r ../etc/havp/templates $(etcdir)/havp
X-	chmod -R a+rX $(etcdir)/havp/templates
X-	@echo ""
X-	@echo "Remember to give correct permissions:"
X-	@echo " chown <havpuser> /var/tmp/havp (after mounting if needed)"
X-	@echo " chown <havpuser> /var/log/havp"
X-	@echo " chown <havpuser> /var/run/havp"
X-	@echo ""
X 
X clean:
X 	rm -f havp *.o scanners/*.o
END-of-havp/files/patch-havp_Makefile.in
echo x - havp/files/pkg-install.in
sed 's/^X//' >havp/files/pkg-install.in << 'END-of-havp/files/pkg-install.in'
X#!/bin/sh
X# $FreeBSD$
X
XDEST_DIR=${PKG_DESTDIR:-}
X
XHAVP_USER=havp
XHAVP_GROUP=havp
X
XLOG_DIR=$DEST_DIR%%LOG_DIR%%
XTMP_DIR=$DEST_DIR%%TMP_DIR%%
XRUN_DIR=$DEST_DIR%%RUN_DIR%%
X
Xif [ "$2" = "PRE-INSTALL" ]; then
X	if ! pw groupshow "$HAVP_GROUP" 2>/dev/null 1>&2; then
X		if pw groupadd $HAVP_GROUP; then
X			echo "=> Added group \"$HAVP_GROUP\"."
X		else
X			echo "=> Adding group \"$HAVP_GROUP\" failed..."
X			exit 1
X		fi
X	fi
X
X	if ! pw usershow "$HAVP_USER" 2>/dev/null 1>&2; then
X		if pw useradd $HAVP_USER -g $HAVP_GROUP -h - \
X			-s "/sbin/nologin" -d "/nonexistent" \
X			-c "havp daemon"; \
X		then
X			echo "=> Added user \"$HAVP_USER\"."
X		else
X			echo "=> Adding user \"$HAVP_USER\" failed..."
X			exit 1
X		fi
X	fi
Xelif [ "$2" = "POST-INSTALL" ]; then
X	if [ ! -d "$LOG_DIR" ]; then
X		mkdir -p "$LOG_DIR" || exit 1
X		chown "$HAVP_USER:$HAVP_GROUP" "$LOG_DIR" || exit 1
X	fi
X
X	if [ ! -d "$TMP_DIR" ]; then
X		mkdir -p "$TMP_DIR" || exit 1
X		chown "$HAVP_USER:$HAVP_GROUP" "$TMP_DIR" || exit 1
X	fi
X
X	if [ ! -d "$RUN_DIR" ]; then
X		mkdir -p "$RUN_DIR" || exit 1
X		chown "$HAVP_USER:$HAVP_GROUP" "$RUN_DIR" || exit 1
X	fi
Xfi
X
Xexit 0
END-of-havp/files/pkg-install.in
echo x - havp/files/pkg-deinstall.in
sed 's/^X//' >havp/files/pkg-deinstall.in << 'END-of-havp/files/pkg-deinstall.in'
X#!/bin/sh
X# $FreeBSD$
X
Xif [ "$2" != "POST-DEINSTALL" ]; then
X	exit 0
Xfi
X
XHAVP_USER=havp
X
Xif pw usershow "$HAVP_USER" 2>/dev/null 1>&2; then
X	echo "=============================================================================="
X	echo "To delete $HAVP_USER user permanently, use 'pw userdel \"$HAVP_USER\"'"
X	echo "=============================================================================="
Xfi
X
Xexit 0
END-of-havp/files/pkg-deinstall.in
echo x - havp/files/havp.in
sed 's/^X//' >havp/files/havp.in << 'END-of-havp/files/havp.in'
X#!/bin/sh
X#
X# $FreeBSD$
X#
X
X# PROVIDE: havp
X# REQUIRE: DAEMON cleanvar
X# BEFORE: LOGIN
X
X#
X# Add the following lines to /etc/rc.conf to enable c-icap:
X#
X# havp_enable="YES"
X#
X# See '%%PREFIX%%/sbin/havp --help' for flags
X#
X
X. %%RC_SUBR%%
X
Xname="havp"
Xrcvar=`set_rcvar`
X
Xcommand="%%PREFIX%%/sbin/$name"
Xpidfile="%%RUN_DIR%%/${name}.pid"
Xrequired_dirs="%%TMP_DIR%%"
Xrequired_files="%%PREFIX%%/etc/havp/blacklist %%PREFIX%%/etc/havp/havp.config %%PREFIX%%/etc/havp/whitelist"
X
X# read settings, set default values
Xload_rc_config "$name"
X: ${havp_enable="NO"}
X: ${havp_flags=""}
X
Xrun_rc_command "$1"
END-of-havp/files/havp.in
echo x - havp/pkg-plist
sed 's/^X//' >havp/pkg-plist << 'END-of-havp/pkg-plist'
X at comment $FreeBSD$
Xsbin/havp
X at unexec if cmp -s %D/etc/havp/havp.config %D/etc/havp/havp.config.default; then rm -f %D/etc/havp/havp.config; fi
Xetc/havp/havp.config.default
X at exec [ -f %B/havp.config ] || cp %B/%f %B/havp.config
X at dirrmtry etc/havp
X at unexec [ ! -f %%RUN_DIR%%/havp.pid ] || %D/etc/rc.d/havp stop
X%%EXAMPLESDIR%%/blacklist.sample
X%%EXAMPLESDIR%%/templates/br/blacklist.html
X%%EXAMPLESDIR%%/templates/br/dns.html
X%%EXAMPLESDIR%%/templates/br/down.html
X%%EXAMPLESDIR%%/templates/br/error.html
X%%EXAMPLESDIR%%/templates/br/invalid.html
X%%EXAMPLESDIR%%/templates/br/maxsize.html
X%%EXAMPLESDIR%%/templates/br/request.html
X%%EXAMPLESDIR%%/templates/br/scanner.html
X%%EXAMPLESDIR%%/templates/br/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/br
X%%EXAMPLESDIR%%/templates/css2/havp.css
X at dirrm %%EXAMPLESDIR%%/templates/css2
X%%EXAMPLESDIR%%/templates/de/blacklist.html
X%%EXAMPLESDIR%%/templates/de/dns.html
X%%EXAMPLESDIR%%/templates/de/down.html
X%%EXAMPLESDIR%%/templates/de/error.html
X%%EXAMPLESDIR%%/templates/de/invalid.html
X%%EXAMPLESDIR%%/templates/de/maxsize.html
X%%EXAMPLESDIR%%/templates/de/request.html
X%%EXAMPLESDIR%%/templates/de/scanner.html
X%%EXAMPLESDIR%%/templates/de/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/de
X%%EXAMPLESDIR%%/templates/en/blacklist.html
X%%EXAMPLESDIR%%/templates/en/dns.html
X%%EXAMPLESDIR%%/templates/en/down.html
X%%EXAMPLESDIR%%/templates/en/error.html
X%%EXAMPLESDIR%%/templates/en/invalid.html
X%%EXAMPLESDIR%%/templates/en/maxsize.html
X%%EXAMPLESDIR%%/templates/en/request.html
X%%EXAMPLESDIR%%/templates/en/scanner.html
X%%EXAMPLESDIR%%/templates/en/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/en
X%%EXAMPLESDIR%%/templates/es/blacklist.html
X%%EXAMPLESDIR%%/templates/es/dns.html
X%%EXAMPLESDIR%%/templates/es/down.html
X%%EXAMPLESDIR%%/templates/es/error.html
X%%EXAMPLESDIR%%/templates/es/invalid.html
X%%EXAMPLESDIR%%/templates/es/maxsize.html
X%%EXAMPLESDIR%%/templates/es/request.html
X%%EXAMPLESDIR%%/templates/es/scanner.html
X%%EXAMPLESDIR%%/templates/es/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/es
X%%EXAMPLESDIR%%/templates/fr/blacklist.html
X%%EXAMPLESDIR%%/templates/fr/dns.html
X%%EXAMPLESDIR%%/templates/fr/down.html
X%%EXAMPLESDIR%%/templates/fr/error.html
X%%EXAMPLESDIR%%/templates/fr/invalid.html
X%%EXAMPLESDIR%%/templates/fr/maxsize.html
X%%EXAMPLESDIR%%/templates/fr/request.html
X%%EXAMPLESDIR%%/templates/fr/scanner.html
X%%EXAMPLESDIR%%/templates/fr/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/fr
X%%EXAMPLESDIR%%/templates/it/blacklist.html
X%%EXAMPLESDIR%%/templates/it/dns.html
X%%EXAMPLESDIR%%/templates/it/down.html
X%%EXAMPLESDIR%%/templates/it/error.html
X%%EXAMPLESDIR%%/templates/it/invalid.html
X%%EXAMPLESDIR%%/templates/it/maxsize.html
X%%EXAMPLESDIR%%/templates/it/request.html
X%%EXAMPLESDIR%%/templates/it/scanner.html
X%%EXAMPLESDIR%%/templates/it/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/it
X%%EXAMPLESDIR%%/templates/nl/blacklist.html
X%%EXAMPLESDIR%%/templates/nl/dns.html
X%%EXAMPLESDIR%%/templates/nl/down.html
X%%EXAMPLESDIR%%/templates/nl/error.html
X%%EXAMPLESDIR%%/templates/nl/invalid.html
X%%EXAMPLESDIR%%/templates/nl/maxsize.html
X%%EXAMPLESDIR%%/templates/nl/request.html
X%%EXAMPLESDIR%%/templates/nl/scanner.html
X%%EXAMPLESDIR%%/templates/nl/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/nl
X%%EXAMPLESDIR%%/templates/pf/blacklist.html
X%%EXAMPLESDIR%%/templates/pf/dns.html
X%%EXAMPLESDIR%%/templates/pf/down.html
X%%EXAMPLESDIR%%/templates/pf/error.html
X%%EXAMPLESDIR%%/templates/pf/invalid.html
X%%EXAMPLESDIR%%/templates/pf/maxsize.html
X%%EXAMPLESDIR%%/templates/pf/request.html
X%%EXAMPLESDIR%%/templates/pf/scanner.html
X%%EXAMPLESDIR%%/templates/pf/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/pf
X%%EXAMPLESDIR%%/templates/pl/blacklist.html
X%%EXAMPLESDIR%%/templates/pl/dns.html
X%%EXAMPLESDIR%%/templates/pl/down.html
X%%EXAMPLESDIR%%/templates/pl/error.html
X%%EXAMPLESDIR%%/templates/pl/invalid.html
X%%EXAMPLESDIR%%/templates/pl/maxsize.html
X%%EXAMPLESDIR%%/templates/pl/request.html
X%%EXAMPLESDIR%%/templates/pl/scanner.html
X%%EXAMPLESDIR%%/templates/pl/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/pl
X%%EXAMPLESDIR%%/templates/ru/blacklist.html
X%%EXAMPLESDIR%%/templates/ru/dns.html
X%%EXAMPLESDIR%%/templates/ru/down.html
X%%EXAMPLESDIR%%/templates/ru/error.html
X%%EXAMPLESDIR%%/templates/ru/invalid.html
X%%EXAMPLESDIR%%/templates/ru/maxsize.html
X%%EXAMPLESDIR%%/templates/ru/request.html
X%%EXAMPLESDIR%%/templates/ru/scanner.html
X%%EXAMPLESDIR%%/templates/ru/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/ru
X%%EXAMPLESDIR%%/templates/sv/blacklist.html
X%%EXAMPLESDIR%%/templates/sv/dns.html
X%%EXAMPLESDIR%%/templates/sv/down.html
X%%EXAMPLESDIR%%/templates/sv/error.html
X%%EXAMPLESDIR%%/templates/sv/invalid.html
X%%EXAMPLESDIR%%/templates/sv/maxsize.html
X%%EXAMPLESDIR%%/templates/sv/request.html
X%%EXAMPLESDIR%%/templates/sv/scanner.html
X%%EXAMPLESDIR%%/templates/sv/virus.html
X at dirrm %%EXAMPLESDIR%%/templates/sv
X at dirrm %%EXAMPLESDIR%%/templates
X%%EXAMPLESDIR%%/whitelist.sample
X at dirrm %%EXAMPLESDIR%%
X at unexec rmdir %%LOG_DIR%% 2>/dev/null || true
X at unexec rmdir %%TMP_DIR%% 2>/dev/null || true
X at unexec rmdir %%RUN_DIR%% 2>/dev/null || true
END-of-havp/pkg-plist
exit
--- havp-0.81.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list