summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail-filter/sid-milter/ChangeLog9
-rw-r--r--mail-filter/sid-milter/files/gentoo.config.m43
-rw-r--r--mail-filter/sid-milter/files/sid-milter-0.2.14-auth.patch173
-rw-r--r--mail-filter/sid-milter/files/sid-milter-0.2.14-postfix-queueID.patch22
-rw-r--r--mail-filter/sid-milter/sid-milter-0.2.14.ebuild61
-rw-r--r--mail-filter/sid-milter/sid-milter-1.0.0-r1.ebuild59
-rw-r--r--mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild11
7 files changed, 13 insertions, 325 deletions
diff --git a/mail-filter/sid-milter/ChangeLog b/mail-filter/sid-milter/ChangeLog
index 104e50ef94c5..62bf1f92663e 100644
--- a/mail-filter/sid-milter/ChangeLog
+++ b/mail-filter/sid-milter/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for mail-filter/sid-milter
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/sid-milter/ChangeLog,v 1.10 2009/03/08 18:31:50 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/sid-milter/ChangeLog,v 1.11 2009/05/09 12:29:01 mrness Exp $
+
+ 09 May 2009; Alin Năstac <mrness@gentoo.org>
+ -files/sid-milter-0.2.14-auth.patch,
+ -files/sid-milter-0.2.14-postfix-queueID.patch, -files/gentoo.config.m4,
+ -sid-milter-0.2.14.ebuild, -sid-milter-1.0.0-r1.ebuild,
+ sid-milter-1.0.0-r2.ebuild:
+ Migrate to EAPI 2. Stable on x86.
*sid-milter-1.0.0-r2 (08 Mar 2009)
diff --git a/mail-filter/sid-milter/files/gentoo.config.m4 b/mail-filter/sid-milter/files/gentoo.config.m4
deleted file mode 100644
index 0ac0ecd1355a..000000000000
--- a/mail-filter/sid-milter/files/gentoo.config.m4
+++ /dev/null
@@ -1,3 +0,0 @@
-define(`confNO_MAN_BUILD',`')
-define(`confOPTIMIZE', `@@CFLAGS@@')
-define(`bld_USE_ARLIB', `true')
diff --git a/mail-filter/sid-milter/files/sid-milter-0.2.14-auth.patch b/mail-filter/sid-milter/files/sid-milter-0.2.14-auth.patch
deleted file mode 100644
index fd016df60215..000000000000
--- a/mail-filter/sid-milter/files/sid-milter-0.2.14-auth.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-# HG changeset patch
-# User root@sodarock.com
-# Date Sun Dec 03 22:38:00 2006 -0800
-# Node ID 5edf430464ebbfd54c1985feca5020983635a365
-# parent: eb44f95bb7cd44e331a3c76bee43474533643f15
-Imported the auth patch from Adrian Havill <havill@redhat.com>
-
-
---- a/sid-filter/sid-filter.c Sun Dec 03 22:35:00 2006 -0800
-+++ b/sid-filter/sid-filter.c Sun Dec 03 22:38:00 2006 -0800
-@@ -1928,11 +1928,11 @@ mlfi_eom(SMFICTX *ctx)
- {
- sfsistat ret;
- int status;
-- int sid_result;
-- int spf_result;
-+ int sid_result, spf_result, auth_result;
- int reason;
- Context sic;
- const char *hostname;
-+ char *auth_type, *auth_author, *auth_ssf, *auth_authen;
- const char *expl;
- char *badaddr;
- char *which;
-@@ -1964,6 +1964,13 @@ mlfi_eom(SMFICTX *ctx)
- if (hostname == NULL)
- hostname = HOSTUNKNOWN;
-
-+ auth_authen = smfi_getsymval(ctx, "{auth_authen}");
-+ auth_type = smfi_getsymval(ctx, "{auth_type}");
-+ auth_ssf = smfi_getsymval(ctx, "{auth_ssf}");
-+ auth_author = smfi_getsymval(ctx, "{auth_author}");
-+
-+ auth_result = auth_authen != NULL && strlen(auth_authen) != 0;
-+
- /* assume we're accepting */
- ret = SMFIS_ACCEPT;
-
-@@ -1986,7 +1993,7 @@ mlfi_eom(SMFICTX *ctx)
- snprintf(pra, sizeof pra, "%s@%s", sic->ctx_local, sic->ctx_domain);
- status = sid_marid_check(sic, SM_SCOPE_PRA, ip, pra, &sid_result,
- &reason, &expl);
-- if (status != 0)
-+ if (!auth_result && status != 0)
- {
- if (dolog)
- {
-@@ -2020,20 +2027,64 @@ mlfi_eom(SMFICTX *ctx)
- /* construct the status header's content */
- sm_strlcpy(prahdr, sic->ctx_pra->hdr_hdr, sizeof prahdr);
- sid_lowercase(prahdr);
-- snprintf(stathdr, sizeof stathdr, "%s %s=%s; sender-id=", hostname,
-+ snprintf(stathdr, sizeof stathdr, "%s header.%s=%s; sender-id=", hostname,
- prahdr, pra);
- sid_stat_header(sid_result, reason, expl, stathdr, sizeof stathdr);
-
- /* save error message for use in SMTP reply*/
- sid_stat_header(sid_result, reason, expl, sid_errmsg,
- sizeof sid_errmsg);
-+
-+ /*
-+ ** Put the status header in place.
-+ */
-+
-+ if (!auth_result && stathdr[0] != '\0' &&
-+ smfi_insheader(ctx, 1, AUTHRESULTSHDR, stathdr) != MI_SUCCESS)
-+ {
-+ if (dolog)
-+ {
-+ syslog(LOG_ERR, "%s smfi_insheader() failed",
-+ sic->ctx_jobid);
-+ }
-+
-+ sid_msgcleanup(ctx);
-+ return SMFIS_TEMPFAIL;
-+ }
-+
-+ snprintf(stathdr, sizeof stathdr, "%s smtp.mail=%s", hostname, sic->ctx_sender != NULL && strlen(sic->ctx_sender) != 0 ? sic->ctx_sender : pra /*FIXME*/);
-+
-+ /*
-+ ** Run the SMTP authentication test
-+ */
-+
-+ if (auth_result) {
-+ sm_strlcat(stathdr, "; auth=", sizeof stathdr);
-+
-+ /* positive = pass, 0 = neutral, negative = fail (not used) */
-+
-+ sm_strlcat(stathdr, auth_result > 0 ? "pass" : "fail", sizeof stathdr);
-+
-+ /* plain, cram-md5, etc... */
-+
-+ if (auth_type != NULL && strlen(auth_type) != 0) {
-+ sm_strlcat(stathdr, " (", sizeof stathdr);
-+ sm_strlcat(stathdr, auth_type, sizeof stathdr);
-+ if (auth_ssf != NULL && atoi(auth_ssf) > 1) {
-+ sm_strlcat(stathdr, " ", sizeof stathdr);
-+ sm_strlcat(stathdr, auth_ssf, sizeof stathdr);
-+ sm_strlcat(stathdr, " bits", sizeof stathdr);
-+ }
-+ sm_strlcat(stathdr, ")", sizeof stathdr);
-+ }
-+ }
-
- /*
- ** Run the "SPF classic" query if the envelope sender wasn't
- ** empty.
- */
-
-- if (sic->ctx_sender[0] != '\0')
-+ if (!auth_result && sic->ctx_sender[0] != '\0')
- {
- expl = NULL;
- status = sid_marid_check(sic, SM_SCOPE_SPF, ip,
-@@ -2083,6 +2134,23 @@ mlfi_eom(SMFICTX *ctx)
- }
-
- /*
-+ ** Put the status header in place.
-+ */
-+
-+ if (stathdr[0] != '\0' &&
-+ smfi_insheader(ctx, 1, AUTHRESULTSHDR, stathdr) != MI_SUCCESS)
-+ {
-+ if (dolog)
-+ {
-+ syslog(LOG_ERR, "%s smfi_insheader() failed",
-+ sic->ctx_jobid);
-+ }
-+
-+ sid_msgcleanup(ctx);
-+ return SMFIS_TEMPFAIL;
-+ }
-+
-+ /*
- ** Identify the filter, if requested.
- */
-
-@@ -2109,24 +2177,6 @@ mlfi_eom(SMFICTX *ctx)
- return SMFIS_TEMPFAIL;
- }
- }
--
-- /*
-- ** Put the status header in place.
-- */
--
-- if (stathdr[0] != '\0' &&
-- smfi_insheader(ctx, 1, AUTHRESULTSHDR, stathdr) != MI_SUCCESS)
-- {
-- if (dolog)
-- {
-- syslog(LOG_ERR, "%s %s() failed",
-- sic->ctx_jobid, ADDHEADERFUNCNAME);
-- }
--
-- sid_msgcleanup(ctx);
-- return SMFIS_TEMPFAIL;
-- }
--
-
- sid_msgcleanup(ctx);
-
-@@ -2216,6 +2266,8 @@ mlfi_eom(SMFICTX *ctx)
- }
- break;
- }
-+ if (auth_result > 0)
-+ ret = SMFIS_ACCEPT;
-
- if (ret == SMFIS_REJECT && !testmode)
- {
-
diff --git a/mail-filter/sid-milter/files/sid-milter-0.2.14-postfix-queueID.patch b/mail-filter/sid-milter/files/sid-milter-0.2.14-postfix-queueID.patch
deleted file mode 100644
index b91202ddffa5..000000000000
--- a/mail-filter/sid-milter/files/sid-milter-0.2.14-postfix-queueID.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- sid-filter/sid-filter.c.orig 2006-07-18 09:28:15.000000000 -0700
-+++ sid-filter/sid-filter.c 2006-07-18 09:31:12.000000000 -0700
-@@ -1867,6 +1867,10 @@
- assert(ctx != NULL);
- #endif /* !DEBUG */
-
-+ ret = mlfi_eoh(ctx);
-+ if (ret != SMFIS_CONTINUE)
-+ return ret;
-+
- memset(stathdr, '\0', sizeof stathdr);
-
- sic = (Context) smfi_getpriv(ctx);
-@@ -2236,7 +2240,7 @@
- mlfi_envfrom, /* envelope sender filter */
- NULL, /* envelope recipient filter */
- mlfi_header, /* header filter */
-- mlfi_eoh, /* end of header */
-+ NULL, /* end of header */
- NULL, /* body block filter */
- mlfi_eom, /* end of message */
- NULL, /* message aborted */
diff --git a/mail-filter/sid-milter/sid-milter-0.2.14.ebuild b/mail-filter/sid-milter/sid-milter-0.2.14.ebuild
deleted file mode 100644
index 9391d381210b..000000000000
--- a/mail-filter/sid-milter/sid-milter-0.2.14.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/sid-milter/sid-milter-0.2.14.ebuild,v 1.5 2009/02/28 15:13:52 mrness Exp $
-
-inherit eutils toolchain-funcs
-
-DESCRIPTION="A milter-based application provide Sender-ID service"
-HOMEPAGE="http://sourceforge.net/projects/sid-milter/"
-SRC_URI="mirror://sourceforge/sid-milter/${P}.tar.gz"
-
-LICENSE="Sendmail-Open-Source"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-RDEPEND="dev-libs/openssl
- >=sys-libs/db-3.2"
-DEPEND="${RDEPEND}
- || ( mail-filter/libmilter mail-mta/sendmail )" # libmilter is a static library
-
-pkg_setup() {
- enewgroup milter
- enewuser milter -1 -1 -1 milter
-}
-
-src_unpack() {
- unpack ${A}
-
- cd "${S}" || die "source dir not found"
-
- # Postfix queue ID patch. See MILTER_README.html#workarounds
- epatch "${FILESDIR}/${P}-postfix-queueID.patch"
-
- epatch "${FILESDIR}/${P}-auth.patch"
-
- sed -e "s:@@CFLAGS@@:${CFLAGS}:" \
- "${FILESDIR}/gentoo.config.m4" > "${S}/devtools/Site/site.config.m4" \
- || die "failed to generate site.config.m4"
-}
-
-src_compile() {
- emake -j1 CC="$(tc-getCC)" || die "emake failed"
-}
-
-src_install() {
- newinitd "${FILESDIR}/sid-filter.init" sid-filter \
- || die "newinitd failed"
- newconfd "${FILESDIR}/sid-filter.conf" sid-filter \
- || die "newconfd failed"
-
- dodir /usr/bin
- emake -j1 DESTDIR="${D}" SUBDIRS=sid-filter \
- SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
- install || die "make install failed"
-
- # man build is broken; do man page installation by hand
- doman */*.8
-
- # some people like docs
- dodoc RELEASE_NOTES *.txt
-}
diff --git a/mail-filter/sid-milter/sid-milter-1.0.0-r1.ebuild b/mail-filter/sid-milter/sid-milter-1.0.0-r1.ebuild
deleted file mode 100644
index f8b1c4fd00a5..000000000000
--- a/mail-filter/sid-milter/sid-milter-1.0.0-r1.ebuild
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/sid-milter/sid-milter-1.0.0-r1.ebuild,v 1.1 2009/03/01 08:46:05 mrness Exp $
-
-inherit eutils toolchain-funcs
-
-DESCRIPTION="A milter-based application to provide Sender-ID verification service"
-HOMEPAGE="http://sourceforge.net/projects/sid-milter/"
-SRC_URI="mirror://sourceforge/sid-milter/${P}.tar.gz"
-
-LICENSE="Sendmail-Open-Source"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="ipv6"
-
-RDEPEND="dev-libs/openssl
- >=sys-libs/db-3.2"
-DEPEND="${RDEPEND}
- || ( mail-filter/libmilter mail-mta/sendmail )" # libmilter is a static library
-
-pkg_setup() {
- enewgroup milter
- enewuser milter -1 -1 -1 milter
-}
-
-src_unpack() {
- unpack ${A}
-
- cd "${S}" || die "source dir not found"
-
- local ENVDEF=""
- use ipv6 && ENVDEF="${ENVDEF} -DNETINET6"
- sed -e "s:@@CFLAGS@@:${CFLAGS}:" \
- -e "s:@@ENVDEF@@:${ENVDEF}:" \
- "${FILESDIR}/gentoo-config.m4" > "${S}/devtools/Site/site.config.m4" \
- || die "failed to generate site.config.m4"
-}
-
-src_compile() {
- emake -j1 CC="$(tc-getCC)" || die "emake failed"
-}
-
-src_install() {
- dodir /usr/bin
- emake -j1 DESTDIR="${D}" SUBDIRS=sid-filter \
- SBINOWN=root SBINGRP=root UBINOWN=root UBINGRP=root \
- install || die "make install failed"
-
- newinitd "${FILESDIR}/sid-filter.init" sid-filter \
- || die "newinitd failed"
- newconfd "${FILESDIR}/sid-filter.conf" sid-filter \
- || die "newconfd failed"
-
- # man build is broken; do man page installation by hand
- doman */*.8 || die "failed to install man pages"
-
- # some people like docs
- dodoc RELEASE_NOTES *.txt sid-filter/README || die "failed to install docs"
-}
diff --git a/mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild b/mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild
index 6627db966cb6..a51b1d7bfd4f 100644
--- a/mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild
+++ b/mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild,v 1.1 2009/03/08 18:31:50 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/sid-milter/sid-milter-1.0.0-r2.ebuild,v 1.2 2009/05/09 12:29:01 mrness Exp $
+
+EAPI="2"
inherit eutils toolchain-funcs
@@ -10,7 +12,7 @@ SRC_URI="mirror://sourceforge/sid-milter/${P}.tar.gz"
LICENSE="Sendmail-Open-Source"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="~amd64 x86"
IUSE="ipv6"
RDEPEND="dev-libs/openssl
@@ -23,10 +25,7 @@ pkg_setup() {
enewuser milter -1 -1 -1 milter
}
-src_unpack() {
- unpack ${A}
-
- cd "${S}" || die "source dir not found"
+src_prepare() {
epatch "${FILESDIR}"/${P}-nopra_on_spf1.patch
local ENVDEF=""