diff options
author | Alin Năstac <mrness@gentoo.org> | 2005-03-08 19:45:38 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2005-03-08 19:45:38 +0000 |
commit | 0f5d905bcb00eab5fa2873905b226ecd4937eac9 (patch) | |
tree | 51d8d1db07a5dbc7dcf308f199ecdbe63fdf1471 /www-proxy | |
parent | tidy (diff) | |
download | gentoo-2-0f5d905bcb00eab5fa2873905b226ecd4937eac9.tar.gz gentoo-2-0f5d905bcb00eab5fa2873905b226ecd4937eac9.tar.bz2 gentoo-2-0f5d905bcb00eab5fa2873905b226ecd4937eac9.zip |
initial import from #60093
(Portage version: 2.0.51.19)
Diffstat (limited to 'www-proxy')
8 files changed, 184 insertions, 0 deletions
diff --git a/www-proxy/dansguardian-dgav/ChangeLog b/www-proxy/dansguardian-dgav/ChangeLog new file mode 100644 index 000000000000..276747bf4770 --- /dev/null +++ b/www-proxy/dansguardian-dgav/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for www-proxy/dansguardian-dgav +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-proxy/dansguardian-dgav/ChangeLog,v 1.1 2005/03/08 19:45:38 mrness Exp $ + +*dansguardian-dgav-6.3.8 (08 Mar 2005) + + 08 Mar 2005; Alin Nastac <mrness@gentoo.org> +metadata.xml, + +files/dansguardian-xnaughty-2.7.6-1.diff, +files/dansguardian.init, + +files/dgav-6.3.8-virus-response.patch, +dansguardian-dgav-6.3.8.ebuild: + Initial import from bug #60093, thanks to Francisco Javier <ffelix@sshinf.com>. + diff --git a/www-proxy/dansguardian-dgav/Manifest b/www-proxy/dansguardian-dgav/Manifest new file mode 100644 index 000000000000..f3bb3ec0b9e3 --- /dev/null +++ b/www-proxy/dansguardian-dgav/Manifest @@ -0,0 +1,3 @@ +MD5 eae7ecd72a879cc9ea55eca6217bf877 dansguardian-dgav-6.3.8.ebuild 1492 +MD5 83f87e787232c7f3f943ddc179f4ed47 metadata.xml 233 +MD5 dd34bc7952c9d271a3b5b25605afaafc files/digest-dansguardian-dgav-6.3.8 169 diff --git a/www-proxy/dansguardian-dgav/dansguardian-dgav-6.3.8.ebuild b/www-proxy/dansguardian-dgav/dansguardian-dgav-6.3.8.ebuild new file mode 100644 index 000000000000..01519412b309 --- /dev/null +++ b/www-proxy/dansguardian-dgav/dansguardian-dgav-6.3.8.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-proxy/dansguardian-dgav/dansguardian-dgav-6.3.8.ebuild,v 1.1 2005/03/08 19:45:38 mrness Exp $ + +inherit eutils + +DG_PN=${PN/-*/} +AV_PN=${PN/*-/} +DG_PV=2.8.0.3 + +DESCRIPTION="DansGuardian with Anti-Virus plugin" +HOMEPAGE="http://sourceforge.net/projects/dgav/" +SRC_URI="http://mirror.dansguardian.org/downloads/2/Stable/${DG_PN}-${DG_PV}.source.tar.gz + mirror://sourceforge/${AV_PN}/${DG_PN}-${DG_PV}-antivirus-${PV}.patch.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~sparc ~ppc" +IUSE="threads" +DEPEND="!www-proxy/dansguardian + virtual/libc + net-libs/libesmtp + app-antivirus/clamav" + +S="${WORKDIR}/${DG_PN}-${DG_PV}" + +src_unpack() { + unpack ${A} + + cd ${S} || die "source dir not found" + epatch ${FILESDIR}/dansguardian-xnaughty-2.7.6-1.diff + epatch ../${DG_PN}-${DG_PV}-antivirus-${PV}.patch + epatch ${FILESDIR}/${AV_PN}-${PV}-virus-response.patch + epatch clamdscan.patch + + #add support for threads + useq threads && sed -i -e 's/^\(LIBS *=.*-lesmtp.*\)/\1 -pthread/' autoconf/linux.in +} + +src_compile() { + ./configure \ + --prefix= \ + --installprefix=${D} \ + --mandir=/usr/share/man/ \ + --cgidir=/var/www/localhost/cgi-bin/ || die "./configure failed" + emake OPTIMISE="${CFLAGS}" || die "emake failed" +} + +src_install() { + if [ -d "/etc/logrotate.d" ]; then mkdir -p ${D}/etc/logrotate.d; fi + make install || die "make install failed" + + dodir /etc/init.d + cp ${FILESDIR}/dansguardian.init ${D}/etc/init.d/dansguardian + + rm -rf ${D}/etc/rc.d + + #Fixing location of initscript + sed -i -e 's/rc.d\///' ${D}/etc/dansguardian/logrotation + + dodoc INSTALL README* LICENSE +} diff --git a/www-proxy/dansguardian-dgav/files/dansguardian-xnaughty-2.7.6-1.diff b/www-proxy/dansguardian-dgav/files/dansguardian-xnaughty-2.7.6-1.diff new file mode 100644 index 000000000000..d1e097ce0b08 --- /dev/null +++ b/www-proxy/dansguardian-dgav/files/dansguardian-xnaughty-2.7.6-1.diff @@ -0,0 +1,50 @@ +diff -ur DansGuardian-2.7.6-1/ConnectionHandler.cpp DansGuardian-2.7.6-1-new/ConnectionHandler.cpp +--- DansGuardian-2.7.6-1/ConnectionHandler.cpp 2003-12-03 16:04:18.000000000 -0600 ++++ DansGuardian-2.7.6-1-new/ConnectionHandler.cpp 2003-12-03 17:43:36.000000000 -0600 +@@ -990,6 +990,11 @@ + else if (o.reporting_level == -1) { // stealth + (*checkme).isItNaughty = false; // dont block + } ++ else if (o.reporting_level == -2) { // just add a header ++ (*docheader).addXNaughty("true", (*checkme).whatIsNaughty.c_str(), (*url).toCharArray()); ++ (*checkme).isItNaughty = false; // dont block ++ } ++ + } catch (exception& e) {} + if ((*checkme).isItNaughty) { // not stealth mode then + try { +Only in DansGuardian-2.7.6-1-new/: ConnectionHandler.cpp.orig +diff -ur DansGuardian-2.7.6-1/HTTPHeader.cpp DansGuardian-2.7.6-1-new/HTTPHeader.cpp +--- DansGuardian-2.7.6-1/HTTPHeader.cpp 2003-12-03 16:04:18.000000000 -0600 ++++ DansGuardian-2.7.6-1-new/HTTPHeader.cpp 2003-12-03 17:38:09.000000000 -0600 +@@ -456,6 +456,17 @@ + header.push_back(String(line.c_str())); + } + ++void HTTPHeader::addXNaughty(std::string naughty, std::string whatIsNaughty, std::string whereIsNaughty) { ++ std::string line; ++ ++ line = "X-Naughty: " + naughty + "\r"; ++ header.push_back(String(line.c_str())); ++ line = "X-Naughty-Why: " + whatIsNaughty + "\r"; ++ header.push_back(String(line.c_str())); ++ line = "X-Naughty-Where: " + whereIsNaughty + "\r"; ++ header.push_back(String(line.c_str())); ++} ++ + void HTTPHeader::setTimeout(int t) { + timeout = t; + } +Only in DansGuardian-2.7.6-1-new/: HTTPHeader.cpp.orig +diff -ur DansGuardian-2.7.6-1/HTTPHeader.hpp DansGuardian-2.7.6-1-new/HTTPHeader.hpp +--- DansGuardian-2.7.6-1/HTTPHeader.hpp 2003-12-03 16:04:18.000000000 -0600 ++++ DansGuardian-2.7.6-1-new/HTTPHeader.hpp 2003-12-03 17:38:09.000000000 -0600 +@@ -43,6 +43,7 @@ + std::string getXForwardedForIP(); + void setTimeout(int t); + void addXForwardedFor(std::string clientip); ++ void addXNaughty(std::string naughty, std::string whatIsNaughty, std::string whereIsNaughty); + bool isCompressed(); + String contentEncoding(); + void removeEncoding(int newlen); +Only in DansGuardian-2.7.6-1-new/: HTTPHeader.hpp.orig diff --git a/www-proxy/dansguardian-dgav/files/dansguardian.init b/www-proxy/dansguardian-dgav/files/dansguardian.init new file mode 100644 index 000000000000..f6c9630deade --- /dev/null +++ b/www-proxy/dansguardian-dgav/files/dansguardian.init @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-proxy/dansguardian-dgav/files/dansguardian.init,v 1.1 2005/03/08 19:45:38 mrness Exp $ + +depend() { + need net clamd + after squid +} + +start() { + ebegin "Starting DansGuardian" + start-stop-daemon --start --quiet --pidfile /var/run/dansguardian.pid \ + --exec /usr/sbin/dansguardian + eend $? +} + +stop() { + ebegin "Stopping DansGuardian" + start-stop-daemon --stop --quiet --pidfile /var/run/dansguardian.pid + eend $? +} diff --git a/www-proxy/dansguardian-dgav/files/dgav-6.3.8-virus-response.patch b/www-proxy/dansguardian-dgav/files/dgav-6.3.8-virus-response.patch new file mode 100644 index 000000000000..5c0a643a844e --- /dev/null +++ b/www-proxy/dansguardian-dgav/files/dgav-6.3.8-virus-response.patch @@ -0,0 +1,28 @@ +--- VirusScanner.cpp.ori 2004-12-03 19:15:56.000000000 +0100 ++++ VirusScanner.cpp 2004-12-03 19:10:19.000000000 +0100 +@@ -367,20 +367,20 @@ + } + else { + (*peerconn).writeString("<html><head>"); +- (*peerconn).writeString("<script language=JavaScript>"); +- (*peerconn).writeString("location.href="); ++ (*peerconn).writeString("<meta http-equiv=\"REFRESH\" content=\"0;url="); + (*peerconn).writeString(location.c_str()); + (*peerconn).writeString("?USER=="); + (*peerconn).writeString(username.c_str()); + (*peerconn).writeString("::REASON==Virus%20'"); + (*peerconn).writeString(virname); + (*peerconn).writeString("'%20found"); +- (*peerconn).writeString("::URL=="); ++ (*peerconn).writeString("::DENIEDURL=="); + (*peerconn).writeString(url.toCharArray()); +- (*peerconn).writeString("</script>"); ++ (*peerconn).writeString("::IP=="); ++ (*peerconn).writeString(clientip.c_str()); ++ (*peerconn).writeString("\">"); + (*peerconn).writeString("</head></html>"); + } +- + if (o.notify) { + #ifdef DGDEBUG + std::cout << "Sending email..." << endl; diff --git a/www-proxy/dansguardian-dgav/files/digest-dansguardian-dgav-6.3.8 b/www-proxy/dansguardian-dgav/files/digest-dansguardian-dgav-6.3.8 new file mode 100644 index 000000000000..43e9d3e1fcb7 --- /dev/null +++ b/www-proxy/dansguardian-dgav/files/digest-dansguardian-dgav-6.3.8 @@ -0,0 +1,2 @@ +MD5 46bbb0d977b8cdd9e978ba5922c1d708 dansguardian-2.8.0.3.source.tar.gz 192351 +MD5 54ff9d90a47160cb3e2eea8d149782a8 dansguardian-2.8.0.3-antivirus-6.3.8.patch.bz2 31547 diff --git a/www-proxy/dansguardian-dgav/metadata.xml b/www-proxy/dansguardian-dgav/metadata.xml new file mode 100644 index 000000000000..6c593acddd5b --- /dev/null +++ b/www-proxy/dansguardian-dgav/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>www-proxy</herd> +<longdescription>DansGuardian with Anti-Virus plugin</longdescription> +</pkgmetadata> |