diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /mail-filter/gld | |
download | gentoo-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/gld')
-rw-r--r-- | mail-filter/gld/Manifest | 1 | ||||
-rw-r--r-- | mail-filter/gld/files/gld.rc | 23 | ||||
-rw-r--r-- | mail-filter/gld/files/tables.sql | 15 | ||||
-rw-r--r-- | mail-filter/gld/gld-1.7-r2.ebuild | 77 | ||||
-rw-r--r-- | mail-filter/gld/metadata.xml | 5 |
5 files changed, 121 insertions, 0 deletions
diff --git a/mail-filter/gld/Manifest b/mail-filter/gld/Manifest new file mode 100644 index 000000000000..1ce6037527c4 --- /dev/null +++ b/mail-filter/gld/Manifest @@ -0,0 +1 @@ +DIST gld-1.7.tgz 40241 SHA256 c0776f6841afa73b6579e355522d79fd15467de2936f1a4464265e6415cae14b SHA512 68bbfd03295c2895608f8404ca1a0942c53003af66d70fda0e2515717ab8e6836f2b609942633b6d70a15b49338a887b5b1082ed1d9bc7c2c0aa3a7735abb13e WHIRLPOOL 815bbf2dc565695ca14eeee5821477e35c5d804c00f33c5e988462b3e6f8f3550c24f56cf6bc77ec9378d7a0cbdc1ba76cd47ae27a40e1cdcc2b3e6ffdd06785 diff --git a/mail-filter/gld/files/gld.rc b/mail-filter/gld/files/gld.rc new file mode 100644 index 000000000000..91d92e4d1898 --- /dev/null +++ b/mail-filter/gld/files/gld.rc @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net # in case mysql daemon is not local + use dns mysql postgresql + before postfix + provide postfix_greylist +} + +start() { + ebegin "Starting gld" + start-stop-daemon --start --quiet --exec /usr/bin/gld + eend $? +} + +stop() { + ebegin "Stopping gld" + start-stop-daemon --stop --quiet --name gld + eend $? +} diff --git a/mail-filter/gld/files/tables.sql b/mail-filter/gld/files/tables.sql new file mode 100644 index 000000000000..245e9a059e36 --- /dev/null +++ b/mail-filter/gld/files/tables.sql @@ -0,0 +1,15 @@ +CREATE TABLE `greylist` ( + `ip` CHAR( 39 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'IP of Sending Host', + `sender` CHAR( 242 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'Address of Sender', + `recipient` CHAR( 242 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'Address of Recipient', + `first` INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Date, when this Sender has first been seen', + `last` INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Date, when this sender has last been seen', + `n` INT( 11 ) NOT NULL DEFAULT '0' COMMENT 'Sequence number', + PRIMARY KEY ( `ip` , `sender` , `recipient` ) +) ENGINE = MYISAM CHARACTER SET latin1 COLLATE latin1_general_ci COMMENT = 'GLD Greylist Table'; + +CREATE TABLE `whitelist` ( + `mail` CHAR( 242 ) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'Adress which is whitelisted', + `comment` CHAR( 242 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'A comment, about why this adress is whitelisted', + PRIMARY KEY ( `mail` ) +) ENGINE = MYISAM CHARACTER SET latin1 COLLATE latin1_general_ci COMMENT = 'GLD Whitelist Table'; diff --git a/mail-filter/gld/gld-1.7-r2.ebuild b/mail-filter/gld/gld-1.7-r2.ebuild new file mode 100644 index 000000000000..4041e32d2d17 --- /dev/null +++ b/mail-filter/gld/gld-1.7-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit toolchain-funcs + +DESCRIPTION="A standalone anti-spam greylisting algorithm on top of Postfix" +HOMEPAGE="http://www.gasmi.net/gld.html" +SRC_URI="http://www.gasmi.net/down/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="postgres" +# Not adding a mysql USE flag. The package defaults to it, so we will too. +DEPEND="sys-libs/zlib + >=dev-libs/openssl-0.9.6 + postgres? ( dev-db/postgresql[server] ) + !postgres? ( virtual/mysql )" +RDEPEND="${DEPEND}" + +src_prepare() { + sed -i gld.conf \ + -e 's:^LOOPBACKONLY=.*:LOOPBACKONLY=1:' \ + -e 's:^#USER=.*:USER=nobody:' \ + -e 's:^#GROUP=.*:GROUP=nobody:' \ + || die "sed gld.conf failed" + + sed -i Makefile.in \ + -e '/ -c /{s|-O2|$(CFLAGS)|g}' \ + -e '/ -o /{s|-O2|$(CFLAGS) $(LDFLAGS)|g}' \ + -e '/strip/d' \ + || die "sed Makefile.in failed" + + sed -i tables.{my,pg}sql \ + -e '/ip char/s/16/39/' \ + || die "sed sql tables failed" +} + +src_configure() { + tc-export CC + # It's kind of weird. $(use_with postgres pgsql) won't work if you don't + # use it... + if use postgres ; then + myconf="${myconf} --with-pgsql" + fi + + econf ${myconf} +} + +src_install() { + dobin gld + + insinto /etc + newins gld.conf gld.conf.example + + dodoc HISTORY README* + + insinto /usr/share/${PN}/sql + doins *.pgsql *-whitelist.sql "${FILESDIR}"/tables.sql + + newinitd "${FILESDIR}"/gld.rc gld +} + +pkg_preinst() { + elog "Please read the README file in /usr/share/doc/${PF} for" + elog "details on how to setup gld." + elog + elog "The sql files have been installed to /usr/share/${PN}/sql." + if [[ $REPLACING_VERSIONS == "1.7-r1" ]]; then + elog "You might want to use the ALTER_TABLE command to change the" + elog "ip field width to 39 chars to accomodate ipv6 addresses." + elog "Please see your sql server documentation." + fi +} diff --git a/mail-filter/gld/metadata.xml b/mail-filter/gld/metadata.xml new file mode 100644 index 000000000000..51f94e3fbe0e --- /dev/null +++ b/mail-filter/gld/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>net-mail</herd> +</pkgmetadata> |