diff options
author | 2012-08-12 12:02:47 +0000 | |
---|---|---|
committer | 2012-08-12 12:02:47 +0000 | |
commit | 5a65a8287efe4bd7f66ff59b5340a03e9afcfdd8 (patch) | |
tree | e38febab1d28328bd5bc0bec7280c076abe53307 /mail-filter/gld | |
parent | Stable for amd64, wrt bug #430638 (diff) | |
download | gentoo-2-5a65a8287efe4bd7f66ff59b5340a03e9afcfdd8.tar.gz gentoo-2-5a65a8287efe4bd7f66ff59b5340a03e9afcfdd8.tar.bz2 gentoo-2-5a65a8287efe4bd7f66ff59b5340a03e9afcfdd8.zip |
Change ip column to 39 chars in sql tables - bug #430384
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Diffstat (limited to 'mail-filter/gld')
-rw-r--r-- | mail-filter/gld/ChangeLog | 10 | ||||
-rw-r--r-- | mail-filter/gld/files/tables.sql | 2 | ||||
-rw-r--r-- | mail-filter/gld/gld-1.7-r2.ebuild | 77 |
3 files changed, 86 insertions, 3 deletions
diff --git a/mail-filter/gld/ChangeLog b/mail-filter/gld/ChangeLog index e679de4e7632..2c70a103b0c3 100644 --- a/mail-filter/gld/ChangeLog +++ b/mail-filter/gld/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for mail-filter/gld -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/gld/ChangeLog,v 1.48 2011/06/23 11:52:53 eras Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/gld/ChangeLog,v 1.49 2012/08/12 12:02:47 eras Exp $ + +*gld-1.7-r2 (12 Aug 2012) + + 12 Aug 2012; Eray Aslan <eras@gentoo.org> +gld-1.7-r2.ebuild, + files/tables.sql: + Change ip column to 39 chars in sql tables - bug #430384 23 Jun 2011; Eray Aslan <eras@gentoo.org> -gld-1.7.ebuild: Remove old diff --git a/mail-filter/gld/files/tables.sql b/mail-filter/gld/files/tables.sql index 98ab4e6f3cf1..245e9a059e36 100644 --- a/mail-filter/gld/files/tables.sql +++ b/mail-filter/gld/files/tables.sql @@ -1,5 +1,5 @@ CREATE TABLE `greylist` ( - `ip` CHAR( 16 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL COMMENT 'IP of Sending Host', + `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', 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..411b665546dd --- /dev/null +++ b/mail-filter/gld/gld-1.7-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/gld/gld-1.7-r2.ebuild,v 1.1 2012/08/12 12:02:47 eras Exp $ + +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 +} |