From takefu@airport.fm  Thu Aug 12 08:59:33 2010
Return-Path: <takefu@airport.fm>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E1CE3106567C
	for <freebsd-gnats-submit@freebsd.org>; Thu, 12 Aug 2010 08:38:03 +0000 (UTC)
	(envelope-from takefu@airport.fm)
Received: from ae-osaka.co.jp (unknown [IPv6:2001:3e0:4ec:a000::1])
	by mx1.freebsd.org (Postfix) with ESMTP id 545A18FC15
	for <freebsd-gnats-submit@freebsd.org>; Thu, 12 Aug 2010 08:38:03 +0000 (UTC)
Received: from ae-osaka.co.jp (localhost.ae-osaka.co.jp [127.0.0.1])
	by ae-osaka.co.jp (Postfix) with ESMTP id 035D311472
	for <freebsd-gnats-submit@freebsd.org>; Thu, 12 Aug 2010 17:38:02 +0900 (JST)
Received: from ae-osaka.co.jp ([127.0.0.1])
	by ae-osaka.co.jp (ae-osaka.co.jp [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id X5c5BfH6CQrb for <freebsd-gnats-submit@freebsd.org>;
	Thu, 12 Aug 2010 17:38:01 +0900 (JST)
Received: from [IPv6:2001:3e0:4ec:a011:fc31:bdeb:4324:3ca3] (unknown [IPv6:2001:3e0:4ec:a011:fc31:bdeb:4324:3ca3])
	by ae-osaka.co.jp (Postfix) with ESMTPSA id 83CA811471
	for <freebsd-gnats-submit@freebsd.org>; Thu, 12 Aug 2010 17:37:54 +0900 (JST)
Message-Id: <4C63B2E1.6050802@airport.fm>
Date: Thu, 12 Aug 2010 17:37:53 +0900
From: Takefu <takefu@airport.fm>
Reply-To: takefu@airport.fm
To: freebsd-gnats-submit@freebsd.org
Subject: [PATCH] mail/p5-Mail-SpamAssassin Test suite fails with perl 5.12.0

>Number:         149561
>Category:       ports
>Synopsis:       mail/p5-Mail-SpamAssassin Test suite fails with perl 5.12.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 12 09:10:01 UTC 2010
>Closed-Date:    Wed Oct 06 10:58:54 UTC 2010
>Last-Modified:  Wed Oct 06 10:58:54 UTC 2010
>Originator:     Takefu
>Release:        
>Organization:
FOX Amateur Radio Club
>Environment:
>Description:
lang/perl5.12 problems occur in combination.
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6392

>How-To-Repeat:
>Fix:
--- p5-Mail-SpamAssassin.diff begins here ---
diff -ruN /usr/ports/mail/p5-Mail-SpamAssassin/Makefile mail/p5-Mail-SpamAssassin/Makefile
--- /usr/ports/mail/p5-Mail-SpamAssassin/Makefile	2010-08-12 17:01:00.000000000 +0900
+++ mail/p5-Mail-SpamAssassin/Makefile	2010-08-12 17:14:58.000000000 +0900
@@ -7,6 +7,7 @@

 PORTNAME=	Mail-SpamAssassin
 PORTVERSION=	3.3.1
+PORTREVISION=	1
 CATEGORIES=	mail perl5
 MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
 MASTER_SITE_SUBDIR=	spamassassin/source/:apache Mail/:cpan
@@ -28,8 +29,7 @@
 		${SITE_PERL}/${PERL_ARCH}/Encode/Detect.pm:${PORTSDIR}/converters/p5-Encode-Detect \
 		${SITE_PERL}/Mail/Internet.pm:${PORTSDIR}/mail/p5-Mail-Tools

-RUN_DEPENDS=	${BUILD_DEPENDS} \
-		${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes
+RUN_DEPENDS=	${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes

 CONFLICTS=	ja-p5-Mail-SpamAssassin-[0-9]*

diff -ruN /usr/ports/mail/p5-Mail-SpamAssassin/files/patch-Dns.pm mail/p5-Mail-SpamAssassin/files/patch-Dns.pm
--- /usr/ports/mail/p5-Mail-SpamAssassin/files/patch-Dns.pm	1970-01-01 09:00:00.000000000 +0900
+++ mail/p5-Mail-SpamAssassin/files/patch-Dns.pm	2010-07-28 11:13:57.000000000 +0900
@@ -0,0 +1,11 @@
+--- lib/Mail/SpamAssassin/Dns.pm	2010/03/16 14:43:51	923775
++++ lib/Mail/SpamAssassin/Dns.pm	2010/05/13 16:47:08	943933
+@@ -754,7 +754,7 @@
+   dbg("dns: entering helper-app run mode");
+   $self->{old_slash} = $/;              # Razor pollutes this
+   %{$self->{old_env}} = ();
+-  if ( defined %ENV ) {
++  if ( %ENV ) {
+     # undefined values in %ENV can result due to autovivification elsewhere,
+     # this prevents later possible warnings when we restore %ENV
+     while (my ($key, $value) = each %ENV) {
diff -ruN /usr/ports/mail/p5-Mail-SpamAssassin/files/patch-HTML.pm mail/p5-Mail-SpamAssassin/files/patch-HTML.pm
--- /usr/ports/mail/p5-Mail-SpamAssassin/files/patch-HTML.pm	1970-01-01 09:00:00.000000000 +0900
+++ mail/p5-Mail-SpamAssassin/files/patch-HTML.pm	2010-07-28 11:14:10.000000000 +0900
@@ -0,0 +1,11 @@
+--- lib/Mail/SpamAssassin/HTML.pm	2010/03/16 14:43:51	923775
++++ lib/Mail/SpamAssassin/HTML.pm	2010/05/13 16:47:08	943933
+@@ -191,7 +191,7 @@
+   my $self = shift;
+   my %options = @_;
+
+-  return join('', @{ $self->{text} }) unless keys %options;
++  return join('', @{ $self->{text} }) unless %options;
+
+   my $mask;
+   while (my ($k, $v) = each %options) {
diff -ruN /usr/ports/mail/p5-Mail-SpamAssassin/files/patch-Plugin-BodyEval.pm mail/p5-Mail-SpamAssassin/files/patch-Plugin-BodyEval.pm
--- /usr/ports/mail/p5-Mail-SpamAssassin/files/patch-Plugin-BodyEval.pm	1970-01-01 09:00:00.000000000 +0900
+++ mail/p5-Mail-SpamAssassin/files/patch-Plugin-BodyEval.pm	2010-07-28 11:14:27.000000000 +0900
@@ -0,0 +1,11 @@
+--- lib/Mail/SpamAssassin/Plugin/BodyEval.pm	2010/03/16 14:43:51	923775
++++ lib/Mail/SpamAssassin/Plugin/BodyEval.pm	2010/05/13 16:47:08	943933
+@@ -119,7 +119,7 @@
+         }
+
+ 	# If there are no words, mark if there's at least 1 image ...
+-	if (keys %html == 0 && exists $pms->{html}{inside}{img}) {
++	if (!%html && exists $pms->{html}{inside}{img}) {
+ 	  # Use "\n" as the mark since it can't ever occur normally
+ 	  $html{"\n"}=1;
+ 	}
diff -ruN /usr/ports/mail/p5-Mail-SpamAssassin/files/patch-Plugin-Check.pm mail/p5-Mail-SpamAssassin/files/patch-Plugin-Check.pm
--- /usr/ports/mail/p5-Mail-SpamAssassin/files/patch-Plugin-Check.pm	1970-01-01 09:00:00.000000000 +0900
+++ mail/p5-Mail-SpamAssassin/files/patch-Plugin-Check.pm	2010-07-28 11:14:42.000000000 +0900
@@ -0,0 +1,185 @@
+--- lib/Mail/SpamAssassin/Plugin/Check.pm	2010/03/16 14:43:51	923775
++++ lib/Mail/SpamAssassin/Plugin/Check.pm	2010/05/13 16:47:08	943933
+@@ -307,64 +307,51 @@
+   my $package_name = __PACKAGE__;
+   my $methodname = $package_name."::_".$ruletype."_tests_".$clean_priority;
+
+-  if (defined &{$methodname} && !$doing_user_rules) {
+-run_compiled_method:
+-  # dbg("rules: run_generic_tests - calling %s", $methodname);
+-    my $t = Mail::SpamAssassin::Timeout->new({ deadline => $master_deadline });
+-    my $err = $t->run(sub {
+-      no strict "refs";
+-      $methodname->($pms, @{$opts{args}});
+-    });
+-    if ($t->timed_out() && $master_deadline && time > $master_deadline) {
+-      info("check: exceeded time limit in $methodname, skipping further tests");
+-      $pms->{deadline_exceeded} = 1;
+-    }
+-    return;
+-  }
++  if (!defined &{$methodname} || $doing_user_rules) {
+
+-  # use %nopts for named parameter-passing; it's more friendly to future-proof
+-  # subclassing, since new parameters can be added without breaking third-party
+-  # subclassed implementations of this plugin.
+-  my %nopts = (
+-    ruletype => $ruletype,
+-    doing_user_rules => $doing_user_rules,
+-    priority => $priority,
+-    clean_priority => $clean_priority
+-  );
++    # use %nopts for named parameter-passing; it's more friendly
++    # to future-proof subclassing, since new parameters can be added without
++    # breaking third-party subclassed implementations of this plugin.
++    my %nopts = (
++      ruletype => $ruletype,
++      doing_user_rules => $doing_user_rules,
++      priority => $priority,
++      clean_priority => $clean_priority
++    );
++
++    # build up the eval string...
++    $self->{evalstr_methodname} = $methodname;
++    $self->{evalstr_chunk_current_methodname} = undef;
++    $self->{evalstr_chunk_methodnames} = [];
++    $self->{evalstr_chunk_prefix} = []; # stack (array) of source code sections
++    $self->{evalstr} = ''; $self->{evalstr_l} = 0;
++    $self->{evalstr2} = '';
++    $self->begin_evalstr_chunk($pms);
+
+-  # build up the eval string...
+-  $self->{evalstr_methodname} = $methodname;
+-  $self->{evalstr_chunk_current_methodname} = undef;
+-  $self->{evalstr_chunk_methodnames} = [];
+-  $self->{evalstr_chunk_prefix} = [];  # stack (array) of source code sections
+-  $self->{evalstr} = ''; $self->{evalstr_l} = 0;
+-  $self->{evalstr2} = '';
+-  $self->begin_evalstr_chunk($pms);
+-
+-  $self->push_evalstr_prefix($pms, '
+-      # start_rules_plugin_code '.$ruletype.' '.$priority.'
+-      my $scoresptr = $self->{conf}->{scores};
+-  ');
+-  if (defined $opts{pre_loop_body}) {
+-    $opts{pre_loop_body}->($self, $pms, $conf, %nopts);
+-  }
+-  $self->add_evalstr($pms,
+-                     $self->start_rules_plugin_code($ruletype, $priority) );
+-  while (my($rulename, $test) = each %{$opts{testhash}->{$priority}}) {
+-    $opts{loop_body}->($self, $pms, $conf, $rulename, $test, %nopts);
+-  }
+-  if (defined $opts{post_loop_body}) {
+-    $opts{post_loop_body}->($self, $pms, $conf, %nopts);
+-  }
++    $self->push_evalstr_prefix($pms, '
++        # start_rules_plugin_code '.$ruletype.' '.$priority.'
++        my $scoresptr = $self->{conf}->{scores};
++    ');
++    if (defined $opts{pre_loop_body}) {
++      $opts{pre_loop_body}->($self, $pms, $conf, %nopts);
++    }
++    $self->add_evalstr($pms,
++                       $self->start_rules_plugin_code($ruletype, $priority) );
++    while (my($rulename, $test) = each %{$opts{testhash}->{$priority}}) {
++      $opts{loop_body}->($self, $pms, $conf, $rulename, $test, %nopts);
++    }
++    if (defined $opts{post_loop_body}) {
++      $opts{post_loop_body}->($self, $pms, $conf, %nopts);
++    }
+
+-  $self->flush_evalstr($pms, 'run_generic_tests');
+-  $self->free_ruleset_source($pms, $ruletype, $priority);
++    $self->flush_evalstr($pms, 'run_generic_tests');
++    $self->free_ruleset_source($pms, $ruletype, $priority);
+
+-  # clear out a previous version of this method
+-  undef &{$methodname};
++    # clear out a previous version of this method
++    undef &{$methodname};
+
+-  # generate the loop that goes through each line...
+-  my $evalstr = <<"EOT";
++    # generate the loop that goes through each line...
++    my $evalstr = <<"EOT";
+   {
+     package $package_name;
+
+@@ -373,40 +360,51 @@
+     sub $methodname {
+ EOT
+
+-  for my $chunk_methodname (@{$self->{evalstr_chunk_methodnames}}) {
+-    $evalstr .= "      $chunk_methodname(\@_);\n";
+-  }
++    for my $chunk_methodname (@{$self->{evalstr_chunk_methodnames}}) {
++      $evalstr .= "      $chunk_methodname(\@_);\n";
++    }
+
+-  $evalstr .= <<"EOT";
++    $evalstr .= <<"EOT";
+     }
+
+     1;
+   }
+ EOT
+
+-  delete $self->{evalstr};   # free up some RAM before we eval()
+-  delete $self->{evalstr2};
+-  delete $self->{evalstr_methodname};
+-  delete $self->{evalstr_chunk_current_methodname};
+-  delete $self->{evalstr_chunk_methodnames};
+-  delete $self->{evalstr_chunk_prefix};
+-
+-  dbg("rules: run_generic_tests - compiling eval code: %s, priority %s",
+-      $ruletype, $priority);
+-# dbg("rules: eval code to compile: $evalstr");
+-  my $eval_result;
+-  { my $timer = $self->{main}->time_method('compile_gen');
+-    $eval_result = eval($evalstr);
+-  }
+-  if (!$eval_result) {
+-    my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
+-    warn "rules: failed to compile $ruletype tests, skipping:\n".
+-         "\t($eval_stat)\n";
+-    $pms->{rule_errors}++;
+-  }
+-  else {
++    delete $self->{evalstr};   # free up some RAM before we eval()
++    delete $self->{evalstr2};
++    delete $self->{evalstr_methodname};
++    delete $self->{evalstr_chunk_current_methodname};
++    delete $self->{evalstr_chunk_methodnames};
++    delete $self->{evalstr_chunk_prefix};
++
++    dbg("rules: run_generic_tests - compiling eval code: %s, priority %s",
++        $ruletype, $priority);
++  # dbg("rules: eval code to compile: $evalstr");
++    my $eval_result;
++    { my $timer = $self->{main}->time_method('compile_gen');
++      $eval_result = eval($evalstr);
++    }
++    if (!$eval_result) {
++      my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
++      warn "rules: failed to compile $ruletype tests, skipping:\n".
++           "\t($eval_stat)\n";
++      $pms->{rule_errors}++;
++      return;
++    }
+     dbg("rules: compiled $ruletype tests");
+-    goto run_compiled_method;
++  }
++
++#run_compiled_method:
++# dbg("rules: run_generic_tests - calling %s", $methodname);
++  my $t = Mail::SpamAssassin::Timeout->new({ deadline => $master_deadline });
++  my $err = $t->run(sub {
++    no strict "refs";
++    $methodname->($pms, @{$opts{args}});
++  });
++  if ($t->timed_out() && $master_deadline && time > $master_deadline) {
++    info("check: exceeded time limit in $methodname, skipping further tests");
++    $pms->{deadline_exceeded} = 1;
+   }
+ }
+
--- p5-Mail-SpamAssassin.diff ends here ---
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Thu Aug 12 10:02:27 UTC 2010 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: scheidell@secnap.net
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/149561: mail/p5-Mail-SpamAssassin Test suite fails with perl 5.12.0
Date: Thu, 12 Aug 2010 10:02:24 UT

 Maintainer of mail/p5-Mail-SpamAssassin,
 
 Please note that PR ports/149561 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/149561
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Edwin Groothuis <edwin@FreeBSD.org>
To: scheidell@secnap.net
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/149561: mail/p5-Mail-SpamAssassin Test suite fails with perl 5.12.0
Date: Thu, 12 Aug 2010 11:28:54 UT

 Maintainer of mail/p5-Mail-SpamAssassin,
 
 Please note that PR ports/149561 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/149561
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Michael Scheidell <michael.scheidell@secnap.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/149561: mail/p5-Mail-SpamAssassin Test suite fails with
 perl 5.12.0
Date: Thu, 12 Aug 2010 09:51:37 -0400

 call secnap's 'philly office' if you need me.
 
 (215) 554-6175   extension 1259
 
 
 On 8/12/10 7:28 AM, Edwin Groothuis wrote:
 > Maintainer of mail/p5-Mail-SpamAssassin,
 >
 > Please note that PR ports/149561 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >      http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/149561
 >
 >    
 
 -- 
 Michael Scheidell, CTO
 o: 561-999-5000
 d: 561-948-2259
 ISN: 1259*1300
  > *| *SECNAP Network Security Corporation
 
     * Certified SNORT Integrator
     * 2008-9 Hot Company Award Winner, World Executive Alliance
     * Five-Star Partner Program 2009, VARBusiness
     * Best in Email Security,2010: Network Products Guide
     * King of Spam Filters, SC Magazine 2008
 
 ______________________________________________________________________
 This email has been scanned and certified safe by SpammerTrap(r). 
 For Information please see http://www.secnap.com/products/spammertrap/
 ______________________________________________________________________  

From: Michael Scheidell <michael.scheidell@secnap.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/149561: mail/p5-Mail-SpamAssassin Test suite fails with
 perl 5.12.0
Date: Thu, 12 Aug 2010 16:25:44 -0400

 On 8/12/10 7:28 AM, Edwin Groothuis wrote:
 > Maintainer of mail/p5-Mail-SpamAssassin,
 >
 > Please note that PR ports/149561 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >      http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/149561
 >
 >    
 Thanks, see patch.  other issues with perl 5.12.* might indicate not 
 supporting it yet.
 SA pulls in (as dependencies), modules that perl 5.12.1 already has.  
 and, the ports tree has modules that are OLDER then the stock perl 
 5.12.* modules.
 
 I am going to investigate this and the same issues with amavisd-new port.
 
 Bug submitter: do you suggest that I make this port BROKEN with perl 
 5.12.1 till this is sorted out? or just muddle alone?
 
 -- 
 Michael Scheidell, CTO
 o: 561-999-5000
 d: 561-948-2259
 ISN: 1259*1300
  > *| *SECNAP Network Security Corporation
 
     * Certified SNORT Integrator
     * 2008-9 Hot Company Award Winner, World Executive Alliance
     * Five-Star Partner Program 2009, VARBusiness
     * Best in Email Security,2010: Network Products Guide
     * King of Spam Filters, SC Magazine 2008
 
 ______________________________________________________________________
 This email has been scanned and certified safe by SpammerTrap(r). 
 For Information please see http://www.secnap.com/products/spammertrap/
 ______________________________________________________________________  
State-Changed-From-To: feedback->analyzed 
State-Changed-By: linimon 
State-Changed-When: Thu Aug 12 23:32:16 UTC 2010 
State-Changed-Why:  
Maintainer has replied with patch, but it may need more work. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149561 
Responsible-Changed-From-To: freebsd-ports-bugs->perl 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Thu Sep 9 18:44:04 UTC 2010 
Responsible-Changed-Why:  
to perl 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149561 
Responsible-Changed-From-To: perl->mm 
Responsible-Changed-By: mm 
Responsible-Changed-When: Mon Sep 20 12:50:10 UTC 2010 
Responsible-Changed-Why:  
This is a local port issue, taking over. 

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

From: Martin Matuska <mm@FreeBSD.org>
To: bug-followup@FreeBSD.org, takefu@airport.fm, 
 Michael Scheidell <michael.scheidell@secnap.com>
Cc:  
Subject: Re: ports/149561: mail/p5-Mail-SpamAssassin Test suite fails with
 perl 5.12.0
Date: Mon, 20 Sep 2010 14:57:02 +0200

 This is a multi-part message in MIME format.
 --------------090200030102090203010108
 Content-Type: text/plain; charset=windows-1250
 Content-Transfer-Encoding: 7bit
 
 A better approach than X patches for X files is using one patch file
 with direct SVN import from Apache SVN (spamassassin/branches/3.3). On
 3.3.2 update, this file just gets removed.
 
 Apache SVN changeset: 943933
 https://svn.apache.org/viewvc?view=revision&revision=943933
 
 Maintainer, do you agree to adding of this patch?
 
 Thanks.
 
 --------------090200030102090203010108
 Content-Type: text/plain;
  name="patch-bug6392"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="patch-bug6392"
 
 Index: lib/Mail/SpamAssassin/HTML.pm
 ===================================================================
 --- lib/Mail/SpamAssassin/HTML.pm	(revision 943932)
 +++ lib/Mail/SpamAssassin/HTML.pm	(revision 943933)
 @@ -191,7 +191,7 @@
    my $self = shift;
    my %options = @_;
  
 -  return join('', @{ $self->{text} }) unless keys %options;
 +  return join('', @{ $self->{text} }) unless %options;
  
    my $mask;
    while (my ($k, $v) = each %options) {
 Index: lib/Mail/SpamAssassin/Dns.pm
 ===================================================================
 --- lib/Mail/SpamAssassin/Dns.pm	(revision 943932)
 +++ lib/Mail/SpamAssassin/Dns.pm	(revision 943933)
 @@ -754,7 +754,7 @@
    dbg("dns: entering helper-app run mode");
    $self->{old_slash} = $/;              # Razor pollutes this
    %{$self->{old_env}} = ();
 -  if ( defined %ENV ) {
 +  if ( %ENV ) {
      # undefined values in %ENV can result due to autovivification elsewhere,
      # this prevents later possible warnings when we restore %ENV
      while (my ($key, $value) = each %ENV) {
 Index: lib/Mail/SpamAssassin/Plugin/Check.pm
 ===================================================================
 --- lib/Mail/SpamAssassin/Plugin/Check.pm	(revision 943932)
 +++ lib/Mail/SpamAssassin/Plugin/Check.pm	(revision 943933)
 @@ -307,64 +307,51 @@
    my $package_name = __PACKAGE__;
    my $methodname = $package_name."::_".$ruletype."_tests_".$clean_priority;
  
 -  if (defined &{$methodname} && !$doing_user_rules) {
 -run_compiled_method:
 -  # dbg("rules: run_generic_tests - calling %s", $methodname);
 -    my $t = Mail::SpamAssassin::Timeout->new({ deadline => $master_deadline });
 -    my $err = $t->run(sub {
 -      no strict "refs";
 -      $methodname->($pms, @{$opts{args}});
 -    });
 -    if ($t->timed_out() && $master_deadline && time > $master_deadline) {
 -      info("check: exceeded time limit in $methodname, skipping further tests");
 -      $pms->{deadline_exceeded} = 1;
 -    }
 -    return;
 -  }
 +  if (!defined &{$methodname} || $doing_user_rules) {
  
 -  # use %nopts for named parameter-passing; it's more friendly to future-proof
 -  # subclassing, since new parameters can be added without breaking third-party
 -  # subclassed implementations of this plugin.
 -  my %nopts = (
 -    ruletype => $ruletype,
 -    doing_user_rules => $doing_user_rules,
 -    priority => $priority,
 -    clean_priority => $clean_priority
 -  );
 +    # use %nopts for named parameter-passing; it's more friendly
 +    # to future-proof subclassing, since new parameters can be added without
 +    # breaking third-party subclassed implementations of this plugin.
 +    my %nopts = (
 +      ruletype => $ruletype,
 +      doing_user_rules => $doing_user_rules,
 +      priority => $priority,
 +      clean_priority => $clean_priority
 +    );
  
 -  # build up the eval string...
 -  $self->{evalstr_methodname} = $methodname;
 -  $self->{evalstr_chunk_current_methodname} = undef;
 -  $self->{evalstr_chunk_methodnames} = [];
 -  $self->{evalstr_chunk_prefix} = [];  # stack (array) of source code sections
 -  $self->{evalstr} = ''; $self->{evalstr_l} = 0;
 -  $self->{evalstr2} = '';
 -  $self->begin_evalstr_chunk($pms);
 +    # build up the eval string...
 +    $self->{evalstr_methodname} = $methodname;
 +    $self->{evalstr_chunk_current_methodname} = undef;
 +    $self->{evalstr_chunk_methodnames} = [];
 +    $self->{evalstr_chunk_prefix} = []; # stack (array) of source code sections
 +    $self->{evalstr} = ''; $self->{evalstr_l} = 0;
 +    $self->{evalstr2} = '';
 +    $self->begin_evalstr_chunk($pms);
  
 -  $self->push_evalstr_prefix($pms, '
 -      # start_rules_plugin_code '.$ruletype.' '.$priority.'
 -      my $scoresptr = $self->{conf}->{scores};
 -  ');
 -  if (defined $opts{pre_loop_body}) {
 -    $opts{pre_loop_body}->($self, $pms, $conf, %nopts);
 -  }
 -  $self->add_evalstr($pms,
 -                     $self->start_rules_plugin_code($ruletype, $priority) );
 -  while (my($rulename, $test) = each %{$opts{testhash}->{$priority}}) {
 -    $opts{loop_body}->($self, $pms, $conf, $rulename, $test, %nopts);
 -  }
 -  if (defined $opts{post_loop_body}) {
 -    $opts{post_loop_body}->($self, $pms, $conf, %nopts);
 -  }
 +    $self->push_evalstr_prefix($pms, '
 +        # start_rules_plugin_code '.$ruletype.' '.$priority.'
 +        my $scoresptr = $self->{conf}->{scores};
 +    ');
 +    if (defined $opts{pre_loop_body}) {
 +      $opts{pre_loop_body}->($self, $pms, $conf, %nopts);
 +    }
 +    $self->add_evalstr($pms,
 +                       $self->start_rules_plugin_code($ruletype, $priority) );
 +    while (my($rulename, $test) = each %{$opts{testhash}->{$priority}}) {
 +      $opts{loop_body}->($self, $pms, $conf, $rulename, $test, %nopts);
 +    }
 +    if (defined $opts{post_loop_body}) {
 +      $opts{post_loop_body}->($self, $pms, $conf, %nopts);
 +    }
  
 -  $self->flush_evalstr($pms, 'run_generic_tests');
 -  $self->free_ruleset_source($pms, $ruletype, $priority);
 +    $self->flush_evalstr($pms, 'run_generic_tests');
 +    $self->free_ruleset_source($pms, $ruletype, $priority);
  
 -  # clear out a previous version of this method
 -  undef &{$methodname};
 +    # clear out a previous version of this method
 +    undef &{$methodname};
  
 -  # generate the loop that goes through each line...
 -  my $evalstr = <<"EOT";
 +    # generate the loop that goes through each line...
 +    my $evalstr = <<"EOT";
    {
      package $package_name;
  
 @@ -373,41 +360,52 @@
      sub $methodname {
  EOT
  
 -  for my $chunk_methodname (@{$self->{evalstr_chunk_methodnames}}) {
 -    $evalstr .= "      $chunk_methodname(\@_);\n";
 -  }
 +    for my $chunk_methodname (@{$self->{evalstr_chunk_methodnames}}) {
 +      $evalstr .= "      $chunk_methodname(\@_);\n";
 +    }
  
 -  $evalstr .= <<"EOT";
 +    $evalstr .= <<"EOT";
      }
  
      1;
    }
  EOT
  
 -  delete $self->{evalstr};   # free up some RAM before we eval()
 -  delete $self->{evalstr2};
 -  delete $self->{evalstr_methodname};
 -  delete $self->{evalstr_chunk_current_methodname};
 -  delete $self->{evalstr_chunk_methodnames};
 -  delete $self->{evalstr_chunk_prefix};
 +    delete $self->{evalstr};   # free up some RAM before we eval()
 +    delete $self->{evalstr2};
 +    delete $self->{evalstr_methodname};
 +    delete $self->{evalstr_chunk_current_methodname};
 +    delete $self->{evalstr_chunk_methodnames};
 +    delete $self->{evalstr_chunk_prefix};
  
 -  dbg("rules: run_generic_tests - compiling eval code: %s, priority %s",
 -      $ruletype, $priority);
 -# dbg("rules: eval code to compile: $evalstr");
 -  my $eval_result;
 -  { my $timer = $self->{main}->time_method('compile_gen');
 -    $eval_result = eval($evalstr);
 -  }
 -  if (!$eval_result) {
 -    my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
 -    warn "rules: failed to compile $ruletype tests, skipping:\n".
 -         "\t($eval_stat)\n";
 -    $pms->{rule_errors}++;
 -  }
 -  else {
 +    dbg("rules: run_generic_tests - compiling eval code: %s, priority %s",
 +        $ruletype, $priority);
 +  # dbg("rules: eval code to compile: $evalstr");
 +    my $eval_result;
 +    { my $timer = $self->{main}->time_method('compile_gen');
 +      $eval_result = eval($evalstr);
 +    }
 +    if (!$eval_result) {
 +      my $eval_stat = $@ ne '' ? $@ : "errno=$!";  chomp $eval_stat;
 +      warn "rules: failed to compile $ruletype tests, skipping:\n".
 +           "\t($eval_stat)\n";
 +      $pms->{rule_errors}++;
 +      return;
 +    }
      dbg("rules: compiled $ruletype tests");
 -    goto run_compiled_method;
    }
 +
 +#run_compiled_method:
 +# dbg("rules: run_generic_tests - calling %s", $methodname);
 +  my $t = Mail::SpamAssassin::Timeout->new({ deadline => $master_deadline });
 +  my $err = $t->run(sub {
 +    no strict "refs";
 +    $methodname->($pms, @{$opts{args}});
 +  });
 +  if ($t->timed_out() && $master_deadline && time > $master_deadline) {
 +    info("check: exceeded time limit in $methodname, skipping further tests");
 +    $pms->{deadline_exceeded} = 1;
 +  }
  }
  
  sub begin_evalstr_chunk {
 Index: lib/Mail/SpamAssassin/Plugin/BodyEval.pm
 ===================================================================
 --- lib/Mail/SpamAssassin/Plugin/BodyEval.pm	(revision 943932)
 +++ lib/Mail/SpamAssassin/Plugin/BodyEval.pm	(revision 943933)
 @@ -119,7 +119,7 @@
          }
  
  	# If there are no words, mark if there's at least 1 image ...
 -	if (keys %html == 0 && exists $pms->{html}{inside}{img}) {
 +	if (!%html && exists $pms->{html}{inside}{img}) {
  	  # Use "\n" as the mark since it can't ever occur normally
  	  $html{"\n"}=1;
  	}
 
 --------------090200030102090203010108--
State-Changed-From-To: analyzed->feedback 
State-Changed-By: mm 
State-Changed-When: Mon Sep 20 13:03:05 UTC 2010 
State-Changed-Why:  
Awaiting feedback from maintainer. 

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

From: Michael Scheidell <michael.scheidell@secnap.com>
To: Martin Matuska <mm@FreeBSD.org>, "bug-followup@FreeBSD.org"
	<bug-followup@FreeBSD.org>, "takefu@airport.fm" <takefu@airport.fm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IHlvdSBhZ3JlZSB0
 byBhZGRpbmcgb2YgdGhpcyBwYXRjaD8NCg0KVGhhbmtzLg0K

From: Martin Matuska <mm@FreeBSD.org>
To: bug-followup@FreeBSD.org, takefu@airport.fm, 
 Michael Scheidell <michael.scheidell@secnap.com>
Cc:  
Subject: Re: ports/149561: mail/p5-Mail-SpamAssassin Test suite fails with
 perl 5.12.0
Date: Mon, 20 Sep 2010 16:15:18 +0200

 Here is a list of directly referenced dependencies, where are the
 overwriting functions?
 
 p5-NetAddr-IP:
 only in ports
 
 p5-Archive-Tar:
 5.8.9: not included
 5.10.1: 1.52
 5.12.2: 1.54
 ports: 1.68
 
 p5-Net-DNS:
 only in ports
 
 p5-Compress-Zlib:
 5.8.9:  not included
 5.10.1: 2.020
 5.12.2: 2.024
 ports:	2.015
 
 p5-IO-Zlib:
 5.8.9:  not included
 5.10.1: 1.09
 5.12.2: 1.10
 ports:	1.10
 
 p5-HTML-Parser:
 only in ports
 
 p5-IO-Compress:
 5.8.9:  not included
 5.10.1: 2.020
 5.12.2: 2.024
 ports:	2.015
 
 p5-Test-Harness:
 5.8.9:  2.64
 5.10.1: 3.17
 5.12.2: 3.17
 ports:	3.22
 
 p5-libwww:
 only in ports
 
 p5-Encode-Detect:
 only in ports
 
 p5-Mail-Tools:
 only in ports
 
 p5-Time-HiRes:
 5.8.9:  1.9715
 5.10.1: 1.9719
 5.12.2: 1.9719
 ports:	1.9721
 
 p5-Mail-SPF:
 
 p5-IO-Socket-INET6:
 
 p5-IO-Socket-SSL:
 
 p5-DBD-mysql:
 only in ports
 
 p5-DBD-Pg:
 only in ports
 
 p5-Digest-SHA1:
 only in ports
 
 p5-Digest-SHA:
 5.8.9:  not included
 5.10.1: 5.47
 5.12.2: 5.47
 ports:	5.48
 
 p5-Mail-DKIM:
 only in ports
 
 p5-Crypt-OpenSSL-RSA:
 only in ports
 
 p5-IP-Country:
 only in ports
 
 The only one I can see with a lower version is p5-Compress-Zlib.
 Btw. maybe p5-Time-HiRes can be omitted at all?

From: Michael Scheidell <michael.scheidell@secnap.com>
To: Martin Matuska <mm@FreeBSD.org>
Cc: <bug-followup@FreeBSD.org>, <takefu@airport.fm>
Subject: Re: ports/149561: mail/p5-Mail-SpamAssassin Test suite fails with
 perl 5.12.0
Date: Mon, 20 Sep 2010 10:23:06 -0400

   They may be in dependencies for optional features.
 I gave this a test before the 3.3.2 patch was finalized and ran into 
 problems with newer (included in .12) pm's being overwritten by some of 
 those in ports.
 
 Options include going through every p5-* port and marking them broken or 
 invalid if PERL> 5000012, or tracing down, multi-level, every dependency 
 of every dependency of every dependency.
 
 example: enable dkim, sa-compile, gnupg (needed for sa-compile), mysql, 
 razor, spf, relay and dcc.
 ( didn't test it with pgsql).
 
 I did not do an in depth check since at the time there was still no 
 official patch in cvs for SA.
 
 and this one is a can of worms:  it has always caused problems since it 
 can include several other pm's.
 
   p5-Compress-Zlib.
 
 
 
 -- 
 Michael Scheidell, CTO
 o: 561-999-5000
 d: 561-948-2259
 ISN: 1259*1300
  > *| *SECNAP Network Security Corporation
 
     * Certified SNORT Integrator
     * 2008-9 Hot Company Award Winner, World Executive Alliance
     * Five-Star Partner Program 2009, VARBusiness
     * Best in Email Security,2010: Network Products Guide
     * King of Spam Filters, SC Magazine 2008
 
 ______________________________________________________________________
 This email has been scanned and certified safe by SpammerTrap(r). 
 For Information please see http://www.secnap.com/products/spammertrap/
 ______________________________________________________________________  

From: Martin Matuska <mm@FreeBSD.org>
To: bug-followup@FreeBSD.org, takefu@airport.fm
Cc:  
Subject: Re: ports/149561: mail/p5-Mail-SpamAssassin Test suite fails with
 perl 5.12.0
Date: Tue, 28 Sep 2010 00:17:19 +0200

 I have cleaned up the p5-Zlib-Compress stuff and also removed
 p5-Digest-SHA from this port. Can the 5.12 compat patch from upstream be
 committed now?
 
 I also suggest the following:
 - do not depend on p5-Time-HiRes (this is already in all suported perl
 versions)
 - do not depend on p5-Test-Harness starting with Perl 5.10.1

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/149561: commit references a PR
Date: Wed,  6 Oct 2010 10:38:14 +0000 (UTC)

 mm          2010-10-06 10:38:09 UTC
 
   FreeBSD ports repository
 
   Modified files:
     mail/p5-Mail-SpamAssassin Makefile 
   Added files:
     mail/p5-Mail-SpamAssassin/files patch-bug6392 patch-bug6396 
   Log:
   - fix unnecessary dependencies for perl >= 5.10.1
   - add upstream patch for perl 5.12 (bugs #6392, #6396)
   
   PR:             ports/150764, ports/149561
   Approved by:    maintainer (timeout in ports/150764)
   
   Revision  Changes    Path
   1.136     +17 -15    ports/mail/p5-Mail-SpamAssassin/Makefile
   1.1       +225 -0    ports/mail/p5-Mail-SpamAssassin/files/patch-bug6392 (new)
   1.1       +13 -0     ports/mail/p5-Mail-SpamAssassin/files/patch-bug6396 (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"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: mm 
State-Changed-When: Wed Oct 6 10:58:53 UTC 2010 
State-Changed-Why:  
Resolved, Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=149561 
>Unformatted:
