summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /mail-filter/p3scan
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'mail-filter/p3scan')
-rw-r--r--mail-filter/p3scan/Manifest2
-rw-r--r--mail-filter/p3scan/files/p3scan-ocreat.patch11
-rw-r--r--mail-filter/p3scan/files/p3scan.init28
-rw-r--r--mail-filter/p3scan/files/p3scan.init-r135
-rw-r--r--mail-filter/p3scan/metadata.xml9
-rw-r--r--mail-filter/p3scan/p3scan-2.3.1.ebuild78
-rw-r--r--mail-filter/p3scan/p3scan-2.3.2-r1.ebuild101
-rw-r--r--mail-filter/p3scan/p3scan-2.3.2-r2.ebuild94
8 files changed, 358 insertions, 0 deletions
diff --git a/mail-filter/p3scan/Manifest b/mail-filter/p3scan/Manifest
new file mode 100644
index 000000000000..7cd734a87dd1
--- /dev/null
+++ b/mail-filter/p3scan/Manifest
@@ -0,0 +1,2 @@
+DIST p3scan-2.3.1.tar.gz 315677 SHA256 2c51185caddde414de13f7de9b94986145a6519deac1de655f38538113122329
+DIST p3scan-2.3.2.tar.gz 321684 SHA256 570bdf87132b23120339e247809dc2cf37c2735d504f4e1072528c04d940bb5f SHA512 7504e988ca21760ea73f3ae41d9ec79c560da29e88ac849b671e4452e426cb8ca5065fe8de5b839299bd5da81e16f51951748a134a1737502f924c89867b75b7 WHIRLPOOL 852cd76b92656bc89d9f8c8e8890c2ee58e7d9f9019537ddde74831bcfd675883571a15778d57b25f2c46fe7c40dfe429592d7943e975fb35185894a0b296dbe
diff --git a/mail-filter/p3scan/files/p3scan-ocreat.patch b/mail-filter/p3scan/files/p3scan-ocreat.patch
new file mode 100644
index 000000000000..c99bc88a0a5f
--- /dev/null
+++ b/mail-filter/p3scan/files/p3scan-ocreat.patch
@@ -0,0 +1,11 @@
+--- p3scan.c 2005-12-12 15:00:00.000000000 +0000
++++ p3scan.c 2009-03-06 02:34:13.000000000 +0000
+@@ -366,7 +366,7 @@
+ XXXXXX[4] = letters[v % 62];
+ v /= 62;
+ XXXXXX[5] = letters[v % 62];
+- fd=open(template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | O_SYNC, 0600);
++ fd=open(template, O_RDWR | O_CREAT | O_EXCL | O_SYNC, 0600);
+ if (fd >= 0){
+ errno = save_errno;
+ return fd;
diff --git a/mail-filter/p3scan/files/p3scan.init b/mail-filter/p3scan/files/p3scan.init
new file mode 100644
index 000000000000..8918ba0624f2
--- /dev/null
+++ b/mail-filter/p3scan/files/p3scan.init
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting p3scan"
+ start-stop-daemon --start --quiet --pidfile /var/run/p3scan/p3scan.pid --exec /usr/sbin/p3scan
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping p3scan"
+ start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/p3scan/p3scan.pid
+ eend $?
+}
+
+restart() {
+ ebegin "Restarting p3scan"
+ svc_stop
+ sleep 1
+ svc_start
+ eend $?
+}
diff --git a/mail-filter/p3scan/files/p3scan.init-r1 b/mail-filter/p3scan/files/p3scan.init-r1
new file mode 100644
index 000000000000..ab0e1a0fb1ea
--- /dev/null
+++ b/mail-filter/p3scan/files/p3scan.init-r1
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+}
+
+checkconfig() {
+ if [[ ! -d /var/run/p3scan ]] ; then
+ checkpath -q -d -m 0700 -o mail:mail /var/run/p3scan || return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting p3scan"
+ start-stop-daemon --start --quiet --pidfile /var/run/p3scan/p3scan.pid --exec /usr/sbin/p3scan
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping p3scan"
+ start-stop-daemon --stop --quiet --pidfile /var/run/p3scan/p3scan.pid
+ eend $?
+}
+
+restart() {
+ ebegin "Restarting p3scan"
+ svc_stop
+ sleep 1
+ svc_start
+ eend $?
+}
diff --git a/mail-filter/p3scan/metadata.xml b/mail-filter/p3scan/metadata.xml
new file mode 100644
index 000000000000..4ace1cd8cdeb
--- /dev/null
+++ b/mail-filter/p3scan/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>net-mail</herd>
+ <longdescription>P3Scan is a fully transparent scanning proxy-server for POP3-Clients. It provides scanning of incoming email messages for Virus''s, Worms, Trojans, Spam, and harmfull attachments. It can also parse HTML messages.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">p3scan</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/mail-filter/p3scan/p3scan-2.3.1.ebuild b/mail-filter/p3scan/p3scan-2.3.1.ebuild
new file mode 100644
index 000000000000..81ae625497d9
--- /dev/null
+++ b/mail-filter/p3scan/p3scan-2.3.1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils user
+
+DESCRIPTION="This is a full-transparent proxy-server for POP3-Clients"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://p3scan.sf.net/"
+
+DEPEND="net-mail/ripmime
+ dev-libs/libpcre"
+RDEPEND="net-firewall/iptables"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~ppc x86"
+IUSE=""
+
+src_compile() {
+ emake || die
+}
+
+src_install () {
+ newinitd ${FILESDIR}/${PN}.init ${PN}
+
+ dosbin ${PN} || die
+
+ dodir /etc/${PN}
+ insinto /etc/${PN}
+ doins ${PN}.conf ${PN}-*.mail
+ doins ${PN}-*.mail
+
+ keepdir /var/run/${PN}
+
+ keepdir /var/spool/${PN}
+ keepdir /var/spool/${PN}/children
+ keepdir /var/spool/${PN}/notify
+
+ fowners mail:mail /var/run/${PN}
+ fperms 700 /var/run/${PN}
+
+ fowners mail:mail /var/spool/${PN}
+ fperms 700 /var/spool/${PN}
+
+ fowners mail:mail /var/spool/${PN}/children
+ fperms 700 /var/spool/${PN}/children
+
+ fowners mail:mail /var/spool/${PN}/notify
+ fperms 700 /var/spool/${PN}/notify
+
+ doman p3scan.8.gz p3scan_readme.8.gz
+
+ dodoc AUTHORS CHANGELOG CONTRIBUTERS LICENSE NEWS README \
+ README-rpm spamfaq.* TODO.list
+}
+
+pkg_postinst() {
+ enewuser mail 8 /bin/true /var/spool/mail mail
+
+ if [ ! -L /etc/${PN}/${PN}.mail ]; then
+ ln -sf /etc/${PN}/${PN}-en.mail /etc/${PN}/${PN}.mail
+ fi
+
+ echo
+ elog "Default infected notification template language is set to english, change the"
+ elog "symbolic link /etc/${PN}/${PN}.mail if you want it in another language."
+ elog
+ elog "To start ${PN}, you can use /etc/init.d/${PN} start"
+ elog
+ elog "You need port-redirecting, a rule like:"
+ elog " iptables -t nat -A PREROUTING -p tcp -i eth0 --dport pop3 -j REDIRECT --to 8110"
+ elog "to forward pop3 connections incoming from eth0 interface."
+ elog
+ elog "You will also need to configure at least following in /etc/${PN}/${PN}.conf:"
+ elog "scannertype, scanner, virusregexp"
+ echo
+}
diff --git a/mail-filter/p3scan/p3scan-2.3.2-r1.ebuild b/mail-filter/p3scan/p3scan-2.3.2-r1.ebuild
new file mode 100644
index 000000000000..06ea1c1709bb
--- /dev/null
+++ b/mail-filter/p3scan/p3scan-2.3.2-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="This is a full-transparent proxy-server for POP3-Clients"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://p3scan.sf.net/"
+
+# Older ripmime did not install a library
+DEPEND="dev-libs/libpcre
+ >=net-mail/ripmime-1.4.0.9
+ "
+RDEPEND="net-firewall/iptables"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}/p3scan-ocreat.patch"
+
+ # respect CC (bug #244144), and CFLAGS (bug #240786)
+ sed -i \
+ -e "s/gcc/$(tc-getCC)/" \
+ -e "s:^CFLAGS=-Wall -O2 :CFLAGS=${CFLAGS} :" \
+ -e '/^LDFLAGS=/d' \
+ -e '/^ripmime\/libripmime/,+7d' \
+ -e '/^\.c\.o:/,+3d' \
+ -e '$ap3scan: LDLIBS:=-lripmime -lpcre -lssl -lcrypto\np3scan: $(OBJECTS)' \
+ Makefile || die
+ # Be sure the system copy is used
+ rm -rf ripmime/
+}
+
+src_compile() {
+ emake || die
+}
+
+src_install () {
+ newinitd "${FILESDIR}"/${PN}.init ${PN}
+
+ dosbin ${PN} || die
+
+ dodir /etc/${PN}
+ insinto /etc/${PN}
+ doins ${PN}.conf ${PN}-*.mail
+ doins ${PN}-*.mail
+
+ keepdir /var/run/${PN}
+
+ keepdir /var/spool/${PN}
+ keepdir /var/spool/${PN}/children
+ keepdir /var/spool/${PN}/notify
+
+ fowners mail:mail /var/run/${PN}
+ fperms 700 /var/run/${PN}
+
+ fowners mail:mail /var/spool/${PN}
+ fperms 700 /var/spool/${PN}
+
+ fowners mail:mail /var/spool/${PN}/children
+ fperms 700 /var/spool/${PN}/children
+
+ fowners mail:mail /var/spool/${PN}/notify
+ fperms 700 /var/spool/${PN}/notify
+
+ doman p3scan.8.gz p3scan_readme.8.gz
+
+ dodoc AUTHORS CHANGELOG CONTRIBUTERS NEWS README \
+ README-rpm TODO.list p3scan.sh spamfaq.*
+}
+
+pkg_postinst() {
+ enewuser mail 8 /bin/true /var/spool/mail mail
+
+ if [ ! -L /etc/${PN}/${PN}.mail ]; then
+ ln -sf /etc/${PN}/${PN}-en.mail /etc/${PN}/${PN}.mail
+ fi
+
+ echo
+ elog "Default infected notification template language is set to english, change the"
+ elog "symbolic link /etc/${PN}/${PN}.mail if you want it in another language."
+ elog
+ elog "To start ${PN}, you can use /etc/init.d/${PN} start"
+ elog
+ elog "You need port-redirecting, a rule like:"
+ elog " iptables -t nat -A PREROUTING -p tcp -i eth0 --dport pop3 -j REDIRECT --to 8110"
+ elog "to forward pop3 connections incoming from eth0 interface."
+ elog
+ elog "You will need to configure at least following in /etc/${PN}/${PN}.conf:"
+ elog "scannertype, scanner, virusregexp"
+ elog
+ elog "An example scanner script has been installed to:"
+ elog "/usr/share/doc/${PF}/"
+ echo
+}
diff --git a/mail-filter/p3scan/p3scan-2.3.2-r2.ebuild b/mail-filter/p3scan/p3scan-2.3.2-r2.ebuild
new file mode 100644
index 000000000000..f909832aca21
--- /dev/null
+++ b/mail-filter/p3scan/p3scan-2.3.2-r2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="This is a full-transparent proxy-server for POP3-Clients"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+HOMEPAGE="http://p3scan.sf.net/"
+
+# Older ripmime did not install a library
+DEPEND="dev-libs/libpcre
+ >=net-mail/ripmime-1.4.0.9
+ >=net-mail/mailbase-1
+ "
+RDEPEND="net-firewall/iptables
+ sys-apps/openrc"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}/p3scan-ocreat.patch"
+
+ # respect CC (bug #244144), and CFLAGS (bug #240786)
+ sed -i \
+ -e "s/gcc/$(tc-getCC)/" \
+ -e "s:^CFLAGS=-Wall -O2 :CFLAGS=${CFLAGS} :" \
+ -e '/^LDFLAGS=/d' \
+ -e '/^ripmime\/libripmime/,+7d' \
+ -e '/^\.c\.o:/,+3d' \
+ -e '$ap3scan: LDLIBS:=-lripmime -lpcre -lssl -lcrypto\np3scan: $(OBJECTS)' \
+ Makefile || die
+ # Be sure the system copy is used
+ rm -rf ripmime/
+}
+
+src_install () {
+ newinitd "${FILESDIR}"/${PN}.init-r1 ${PN}
+
+ dosbin ${PN}
+
+ dodir /etc/${PN}
+ insinto /etc/${PN}
+ doins ${PN}.conf ${PN}-*.mail
+ doins ${PN}-*.mail
+
+ keepdir /var/spool/${PN}
+ keepdir /var/spool/${PN}/children
+ keepdir /var/spool/${PN}/notify
+
+ fowners mail:mail /var/spool/${PN}
+ fperms 700 /var/spool/${PN}
+
+ fowners mail:mail /var/spool/${PN}/children
+ fperms 700 /var/spool/${PN}/children
+
+ fowners mail:mail /var/spool/${PN}/notify
+ fperms 700 /var/spool/${PN}/notify
+
+ doman p3scan.8.gz p3scan_readme.8.gz
+
+ dodoc AUTHORS CHANGELOG CONTRIBUTERS NEWS README \
+ README-rpm TODO.list p3scan.sh spamfaq.*
+}
+
+pkg_postinst() {
+ if [ ! -L /etc/${PN}/${PN}.mail ]; then
+ ln -sf /etc/${PN}/${PN}-en.mail /etc/${PN}/${PN}.mail || die
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ echo
+ elog "Default infected notification template language is set to english, change the"
+ elog "symbolic link /etc/${PN}/${PN}.mail if you want it in another language."
+ elog
+ elog "To start ${PN}, you can use /etc/init.d/${PN} start"
+ elog
+ elog "You need port-redirecting, a rule like:"
+ elog " iptables -t nat -A PREROUTING -p tcp -i eth0 --dport pop3 -j REDIRECT --to 8110"
+ elog "to forward pop3 connections incoming from eth0 interface."
+ elog
+ elog "You will need to configure at least following in /etc/${PN}/${PN}.conf:"
+ elog "scannertype, scanner, virusregexp"
+ elog
+ elog "An example scanner script has been installed to:"
+ elog "/usr/share/doc/${PF}/"
+ echo
+ fi
+}