From nobody@FreeBSD.org  Wed May 27 17:35:02 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 35D84106568D
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 27 May 2009 17:35:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 18FBC8FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 27 May 2009 17:35:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n4RHZ1HD049430
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 27 May 2009 17:35:01 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n4RHZ1H5049429;
	Wed, 27 May 2009 17:35:01 GMT
	(envelope-from nobody)
Message-Id: <200905271735.n4RHZ1H5049429@www.freebsd.org>
Date: Wed, 27 May 2009 17:35:01 GMT
From: Michael Scheidell <scheidell@secnap.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [MAINTAINER UPDATE] Fix for mail/p5-Mail-SpamAssassin DKIM, signal and non base openssl
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         135001
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] Fix for mail/p5-Mail-SpamAssassin DKIM, signal and non base openssl
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gabor
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 27 17:40:01 UTC 2009
>Closed-Date:    Sat May 30 23:29:14 UTC 2009
>Last-Modified:  Sat May 30 23:30:06 UTC 2009
>Originator:     Michael Scheidell
>Release:        7.1, 6.4, 5.5, 6.3,6.2,7.0
>Organization:
SECNAP Network Security
>Environment:
>Description:
Three issues.

#1 There were  problems with p5-Mail-DKIM 0.33 so I put in a pr for a upgrade to 0.35 (see pr 134964 http://www.freebsd.org/cgi/query-pr.cgi?pr=134964

#2, running spamassassin via procmail could close without generating a error code

see pr 134552 http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/134552
Thanks to 	Eric van Gyzen

#3, compiling spamc/spamd with NON base, ie PORTS openssl would fail. patch to makefile to include CFLAGS
Thanks to oliver@FreeBSD.org



Note: this requires  pr 134964 first, since it depends on dkim version 0.35.
Additionally, there was a 'problem' with dkim on perl 5.8.8 (resolved in 5.8.9) so please don't send me a pr on a problem with old version of perl (upgrade it)
>How-To-Repeat:
sign dkim emails, try to verify, some fail

run procmail, see spamassassin PR: 
When SpamAssassin 3.2.5 is killed by a signal, it exits with a zero
exit status. When used with procmail, this causes mail to be lost,
because procmail thinks spamassassin completed successfully, but
spamassassin did not write the filtered mail to stdout to be
reclaimed by procmail for further processing and delivery.

For details, see:

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6033



Hi,
when OpenSSL is not installed in the base but only in $PREFIX,
p5-Mail-Spamassasin fails to compile:
cc -DSPAMC_SSL -DPIC -fPIC spamc/libspamc.c spamc/utils.c  -o spamc/libsslspamc.so -shared  -L/usr/local/lib -lssl -lcrypto -lz
In file included from spamc/libspamc.c:28:
spamc/utils.h:29:28: error: openssl/crypto.h: No such file or directory
spamc/utils.h:30:25: error: openssl/pem.h: No such file or directory
spamc/utils.h:31:25: error: openssl/ssl.h: No such file or directory
spamc/utils.h:32:25: error: openssl/err.h: No such file or directory 

>Fix:
Commit pr 134964 

then apply these patches: (here AND attached since the both get mangled now and then)



(generates a new file: files/patch-spamassassin.raw

diff -bBru /var/tmp/SA/ ./
diff -bBru /var/tmp/SA/Makefile ./Makefile
--- /var/tmp/SA/Makefile        2009-05-20 19:07:03.000000000 -0400
+++ ./Makefile  2009-05-27 12:53:59.000000000 -0400
@@ -7,7 +7,7 @@
 
 PORTNAME=      Mail-SpamAssassin
 PORTVERSION=   3.2.5
-PORTREVISION=  3
+PORTREVISION=  4
 CATEGORIES=    mail perl5
 MASTER_SITES=  ${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
 MASTER_SITE_SUBDIR=    spamassassin/source/:apache Mail/:cpan
@@ -98,7 +98,7 @@
 .endif
 
 .if defined(WITH_DKIM)
-RUN_DEPENDS+=  p5-Mail-DKIM>=0.33:${PORTSDIR}/mail/p5-Mail-DKIM
+RUN_DEPENDS+=  p5-Mail-DKIM>=0.34:${PORTSDIR}/mail/p5-Mail-DKIM
 RUN_DEPENDS+=  ${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
 RUN_DEPENDS+=  p5-Crypt-OpenSSL-RSA>=0.24:${PORTSDIR}/security/p5-Crypt-OpenSSL-RSA
 .endif
@@ -207,7 +207,8 @@
                -e 's#B_CONFDIR)/v320.pre#B_CONFDIR)/v320.pre.sample#g' \
                -e 's/require DBI/0/' \
                ${WRKSRC}/Makefile.PL
-       @${REINPLACE_CMD} -e '/^CC =/d' ${WRKSRC}/spamc/Makefile.in
+       @${REINPLACE_CMD} -e '/^CC =/d; \
+               s|@SSLCFLAGS@|& $${CFLAGS}|g' ${WRKSRC}/spamc/Makefile.in
 
 .if defined(WITH_RAZOR)
        ${REINPLACE_CMD} -e '/Razor2/s/^#loadplugin/loadplugin/' ${WRKSRC}/rules/v312.pre
diff -bBru /var/tmp/SA/files/patch-spamassassin.raw ./files/patch-spamassassin.raw
--- /var/tmp/SA/files/patch-spamassassin.raw    2009-05-27 12:56:40.000000000 -0400
+++ ./files/patch-spamassassin.raw      2009-05-27 12:56:27.000000000 -0400
@@ -0,0 +1,12 @@
+--- spamassassin.raw.orig      2009-05-14 20:48:01.000000000 -0500
++++ spamassassin.raw   2009-05-14 20:48:19.000000000 -0500
+@@ -530,7 +530,7 @@
+     $mail->finish();      # bug 5626: remove temp files etc.
+     $mail = undef;
+   }
+-  exit 0;
++  exit 15;
+ }
+ 
+ # ---------------------------------------------------------------------------
+


Patch attached with submission follows:

diff -bBru /var/tmp/SA/Makefile ./Makefile
--- /var/tmp/SA/Makefile	2009-05-20 19:07:03.000000000 -0400
+++ ./Makefile	2009-05-27 12:53:59.000000000 -0400
@@ -7,7 +7,7 @@
 
 PORTNAME=	Mail-SpamAssassin
 PORTVERSION=	3.2.5
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	mail perl5
 MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
 MASTER_SITE_SUBDIR=	spamassassin/source/:apache Mail/:cpan
@@ -98,7 +98,7 @@
 .endif
 
 .if defined(WITH_DKIM)
-RUN_DEPENDS+=	p5-Mail-DKIM>=0.33:${PORTSDIR}/mail/p5-Mail-DKIM
+RUN_DEPENDS+=	p5-Mail-DKIM>=0.34:${PORTSDIR}/mail/p5-Mail-DKIM
 RUN_DEPENDS+=	${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL
 RUN_DEPENDS+=	p5-Crypt-OpenSSL-RSA>=0.24:${PORTSDIR}/security/p5-Crypt-OpenSSL-RSA
 .endif
@@ -207,7 +207,8 @@
 		-e 's#B_CONFDIR)/v320.pre#B_CONFDIR)/v320.pre.sample#g' \
 		-e 's/require DBI/0/' \
 		${WRKSRC}/Makefile.PL
-	@${REINPLACE_CMD} -e '/^CC =/d' ${WRKSRC}/spamc/Makefile.in
+	@${REINPLACE_CMD} -e '/^CC =/d; \
+		s|@SSLCFLAGS@|& $${CFLAGS}|g' ${WRKSRC}/spamc/Makefile.in
 
 .if defined(WITH_RAZOR)
 	${REINPLACE_CMD} -e '/Razor2/s/^#loadplugin/loadplugin/' ${WRKSRC}/rules/v312.pre
diff -bBru /var/tmp/SA/files/patch-spamassassin.raw ./files/patch-spamassassin.raw
--- /var/tmp/SA/files/patch-spamassassin.raw	2009-05-27 12:56:40.000000000 -0400
+++ ./files/patch-spamassassin.raw	2009-05-27 12:56:27.000000000 -0400
@@ -0,0 +1,12 @@
+--- spamassassin.raw.orig	2009-05-14 20:48:01.000000000 -0500
++++ spamassassin.raw	2009-05-14 20:48:19.000000000 -0500
+@@ -530,7 +530,7 @@
+     $mail->finish();      # bug 5626: remove temp files etc.
+     $mail = undef;
+   }
+-  exit 0;
++  exit 15;
+ }
+ 
+ # ---------------------------------------------------------------------------
+
Only in ./: sa.txt


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gabor 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed May 27 17:40:11 UTC 2009 
Responsible-Changed-Why:  
gabor@ wants his PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135001 
State-Changed-From-To: open->closed 
State-Changed-By: gabor 
State-Changed-When: Sat May 30 23:29:04 UTC 2009 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135001 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/135001: commit references a PR
Date: Sat, 30 May 2009 23:27:33 +0000 (UTC)

 gabor       2009-05-30 23:27:23 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/p5-Mail-SpamAssassin Makefile 
   Added files:
     mail/p5-Mail-SpamAssassin/files patch-spamassassin.raw 
   Log:
   - Fixing 3 issues:
   
           #1 There were problems with p5-Mail-DKIM 0.33, requiring >=0.34 [1]
   
           #2, running spamassassin via procmail could close without generating
               a error code [1] [2]
   
           #3, compiling spamc/spamd with NON base, ie PORTS openssl would fail.
               patch to makefile to include CFLAGS [1] [3]
   
   - Bump PORTREVISION
   
   PR:             ports/135001 [1], ports/134552 [2]
   Submitted by:   Michael Scheidell <scheidell@secnap.net> (maintainer) [1],
                   Eric van Gyzen <eric@vangyzen.net> [2],
                   olivier [3]
   
   Revision  Changes    Path
   1.125     +5 -3      ports/mail/p5-Mail-SpamAssassin/Makefile
   1.5       +12 -0     ports/mail/p5-Mail-SpamAssassin/files/patch-spamassassin.raw (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
