From nobody@FreeBSD.org  Sat May 16 08:30:39 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 A78A9106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 May 2009 08:30:39 +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 7AB0A8FC27
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 May 2009 08:30:39 +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 n4G8UdUf034161
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 May 2009 08:30:39 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n4G8UdZV034160;
	Sat, 16 May 2009 08:30:39 GMT
	(envelope-from nobody)
Message-Id: <200905160830.n4G8UdZV034160@www.freebsd.org>
Date: Sat, 16 May 2009 08:30:39 GMT
From: Michael Scheidell <scheidell@secnap.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [MAINTAINER UPDATE] Fix for mail/p5-Mail-SpamAssassin:  sa-update channel
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         134574
>Category:       ports
>Synopsis:       [MAINTAINER UPDATE] Fix for mail/p5-Mail-SpamAssassin:  sa-update channel
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gabor
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 16 08:40:01 UTC 2009
>Closed-Date:    Wed May 20 23:07:33 UTC 2009
>Last-Modified:  Wed May 20 23:10:01 UTC 2009
>Originator:     Michael Scheidell
>Release:        all of them
>Organization:
SECNAP Network Security
>Environment:
na
>Description:
if a user does an update on p5-Mail-SpamAssassin from an older version (3.2.5) sa-update channel does not get updated.

older versions (/var/db/spamassassin/3.002005/updates_spamassassin_org/MIRRORED.BY) had this in it: (from june 2008)

test mirror: zone, cached via Coral
#http://buildbot.spamassassin.org.nyud.net:8090/updatestage/
http://spamassassin.kludge.org/updates/

see:

http://forums.freebsd.org/archive/index.php/t-3521.html

sa-update would fail to find updates spamassassin.kludge.org no longer exists)

if sa-update files to find host, it won't update. and won't update MIRRORED.BY


>How-To-Repeat:
check old mirrored by.
replace mirrored.by with the above
run sa-update.
>Fix:
remove old mirrored.by and sa-update will replace mirrored.by and do the update.

new mirrored.by (today) has this:

# test mirror: zone, cached via Coral
#http://buildbot.spamassassin.org.nyud.net:8090/updatestage/
http://daryl.dostech.ca/sa-update/asf/ weight=5
http://www.sa-update.pccc.com/ weight=5

these patches to port will delete old MIRRORED.BY during (re) install if sa-update fails with rc==4

only issue would be an integrator with a custom MIRRORED.BY (and a failure)

diff -bBru /var/tmp/SA/ ./
diff -bBru /var/tmp/SA/Makefile ./Makefile
--- /var/tmp/SA/Makefile        2009-03-19 13:11:27.000000000 -0400
+++ ./Makefile  2009-05-16 04:26:41.000000000 -0400
@@ -7,7 +7,7 @@
 
 PORTNAME=      Mail-SpamAssassin
 PORTVERSION=   3.2.5
-PORTREVISION=  2
+PORTREVISION=  3
 CATEGORIES=    mail perl5
 MASTER_SITES=  ${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
 MASTER_SITE_SUBDIR=    spamassassin/source/:apache Mail/:cpan
diff -bBru /var/tmp/SA/pkg-install ./pkg-install
--- /var/tmp/SA/pkg-install     2007-08-13 18:33:32.000000000 -0400
+++ ./pkg-install       2009-05-16 04:26:25.000000000 -0400
@@ -31,6 +31,11 @@
 
    if yesno "Do you wish to run sa-update to fetch new rules" "N";then
        ${PKG_PREFIX}/bin/sa-update
+       if [ $? -eq 4 ];then
+          # rc=4 means host not found, might be old mirrors.
+          rm -rf /var/db/spamassassin/3*/updates_spamassassin_org/MIRRORED.BY
+          ${PKG_PREFIX}/bin/sa-update
+       fi
    fi
    grep '^load.*Rule2XSBody' ${PKG_PREFIX}/etc/mail/spamassassin/v320.pre > /dev/null
    if [ $? -eq 0 ];then




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

http://www.freebsd.org/cgi/query-pr.cgi?pr=134574 
State-Changed-From-To: open->closed 
State-Changed-By: gabor 
State-Changed-When: Wed May 20 23:07:20 UTC 2009 
State-Changed-Why:  
Committed, thanks. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/134574: commit references a PR
Date: Wed, 20 May 2009 23:07:12 +0000 (UTC)

 gabor       2009-05-20 23:07:03 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/p5-Mail-SpamAssassin Makefile pkg-install 
   Log:
   - Update sa-update channel when updating the port
   - Bump PORTREVISION
   
   PR:             ports/134574
   Submitted by:   Michael Scheidell <scheidell@secnap.net> (maintainer)
   
   Revision  Changes    Path
   1.124     +1 -1      ports/mail/p5-Mail-SpamAssassin/Makefile
   1.5       +5 -0      ports/mail/p5-Mail-SpamAssassin/pkg-install
 _______________________________________________
 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:
