FreeBSD Bugzilla – Attachment 113453 Details for
Bug 155007
Update japanese/p5-Mail-SpamAssassin to sync with mail/p5-Mail-SpamAssassin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 17.40 KB, created by
fmysh
on 2011-02-24 16:30:08 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
fmysh
Created:
2011-02-24 16:30:08 UTC
Size:
17.40 KB
patch
obsolete
>diff -uNr p5-Mail-SpamAssassin.orig/Makefile /usr/ports/japanese/p5-Mail-SpamAssassin/Makefile >--- p5-Mail-SpamAssassin.orig/Makefile 2010-12-16 11:33:54.000000000 +0900 >+++ /usr/ports/japanese/p5-Mail-SpamAssassin/Makefile 2011-02-24 23:35:57.693923581 +0900 >@@ -7,7 +7,7 @@ > > PORTNAME= Mail-SpamAssassin > PORTVERSION= 3.3.1 >-PORTREVISION= 2 >+PORTREVISION= 3 > CATEGORIES= japanese mail perl5 > MASTER_SITES= ${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/} \ > ${PATCH_SITES} >@@ -23,22 +23,19 @@ > PATCHLEVEL= 1 > PATCH_DIST_STRIP= -p1 > >+RUN_DEPENDS+= > MAINTAINER= fmysh@iijmio-mail.jp > COMMENT= SpamAssassin with Japanese tokenizer > >-BUILD_DEPENDS= p5-NetAddr-IP>=4.00.7:${PORTSDIR}/net-mgmt/p5-NetAddr-IP \ >- p5-Archive-Tar>=1.23:${PORTSDIR}/archivers/p5-Archive-Tar \ >+RUN_DEPENDS= p5-NetAddr-IP>=4.00.7:${PORTSDIR}/net-mgmt/p5-NetAddr-IP \ > p5-Net-DNS>=0.63:${PORTSDIR}/dns/p5-Net-DNS \ >- p5-IO-Zlib>=1.04:${PORTSDIR}/archivers/p5-IO-Zlib \ > p5-HTML-Parser>=3.43:${PORTSDIR}/www/p5-HTML-Parser \ >- p5-Test-Harness>=3.16:${PORTSDIR}/devel/p5-Test-Harness \ > ${SITE_PERL}/Bundle/LWP.pm:${PORTSDIR}/www/p5-libwww \ > ${SITE_PERL}/${PERL_ARCH}/Encode/Detect.pm:${PORTSDIR}/converters/p5-Encode-Detect \ > ${SITE_PERL}/Mail/Internet.pm:${PORTSDIR}/mail/p5-Mail-Tools >+RUN_DEPENDS+= ja-p5-MeCab>=0.98:${PORTSDIR}/japanese/p5-MeCab > >-RUN_DEPENDS= ${BUILD_DEPENDS} \ >- ${SITE_PERL}/${PERL_ARCH}/Time/HiRes.pm:${PORTSDIR}/devel/p5-Time-HiRes \ >- ja-p5-MeCab>=0.98:${PORTSDIR}/japanese/p5-MeCab >+BUILD_DEPENDS= ${RUN_DEPENDS} > > CONFLICTS= p5-Mail-SpamAssassin-[0-9]* > >@@ -75,6 +72,12 @@ > RUN_DEPENDS+= p5-IO-Compress>=2.017:${PORTSDIR}/archivers/p5-IO-Compress > .endif > >+.if ${PERL_LEVEL} < 501000 >+RUN_DEPENDS+= p5-Archive-Tar>=1.23:${PORTSDIR}/archivers/p5-Archive-Tar \ >+ p5-IO-Zlib>=1.04:${PORTSDIR}/archivers/p5-IO-Zlib \ >+ p5-Test-Harness>=3.16:${PORTSDIR}/devel/p5-Test-Harness >+.endif >+ > .if defined (WITH_SPAMC) > CONFIGURE_ARGS+= BUILD_SPAMC=yes > .else >@@ -84,7 +87,7 @@ > .endif > > .if defined(WITH_SPF_QUERY) >-BUILD_DEPENDS+= ${SITE_PERL}/Mail/SPF.pm:${PORTSDIR}/mail/p5-Mail-SPF >+RUN_DEPENDS+= ${SITE_PERL}/Mail/SPF.pm:${PORTSDIR}/mail/p5-Mail-SPF > .endif > .if !defined(WITHOUT_IPV6) > RUN_DEPENDS+= ${SITE_PERL}/IO/Socket/INET6.pm:${PORTSDIR}/net/p5-IO-Socket-INET6 >@@ -117,20 +120,20 @@ > .if defined(WITH_RAZOR) > RUN_DEPENDS+= razor-agents>=2.84:${PORTSDIR}/mail/razor-agents > .else >-.if !defined(WITH_DKIM) > .if ${PERL_LEVEL} < 501000 >-BUILD_DEPENDS+= p5-Digest-SHA1>=2.11:${PORTSDIR}/security/p5-Digest-SHA1 >+.if !defined(WITH_DKIM) >+RUN_DEPENDS+= p5-Digest-SHA1>=2.11:${PORTSDIR}/security/p5-Digest-SHA1 > .endif > .endif > .endif > > .if defined(WITH_DKIM) >-BUILD_DEPENDS+= ${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL >+RUN_DEPENDS+= ${SITE_PERL}/IO/Socket/SSL.pm:${PORTSDIR}/security/p5-IO-Socket-SSL > . if ${PERL_LEVEL} < 501000 >-BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Digest/SHA.pm:${PORTSDIR}/security/p5-Digest-SHA >+RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Digest/SHA.pm:${PORTSDIR}/security/p5-Digest-SHA > . endif >-BUILD_DEPENDS+= p5-Mail-DKIM>=0.37:${PORTSDIR}/mail/p5-Mail-DKIM >-BUILD_DEPENDS+= p5-Crypt-OpenSSL-RSA>=0.24:${PORTSDIR}/security/p5-Crypt-OpenSSL-RSA >+RUN_DEPENDS+= p5-Mail-DKIM>=0.37:${PORTSDIR}/mail/p5-Mail-DKIM >+RUN_DEPENDS+= p5-Crypt-OpenSSL-RSA>=0.24:${PORTSDIR}/security/p5-Crypt-OpenSSL-RSA > .endif > > .if defined(WITH_SACOMPILE) >diff -uNr p5-Mail-SpamAssassin.orig/distinfo /usr/ports/japanese/p5-Mail-SpamAssassin/distinfo >--- p5-Mail-SpamAssassin.orig/distinfo 2010-08-22 10:45:23.000000000 +0900 >+++ /usr/ports/japanese/p5-Mail-SpamAssassin/distinfo 2011-02-24 23:19:53.760450786 +0900 >@@ -1,12 +1,8 @@ >-MD5 (ja-spamassassin/Mail-SpamAssassin-3.3.1.tar.gz) = 5a93f81fda315411560ff5da099382d2 > SHA256 (ja-spamassassin/Mail-SpamAssassin-3.3.1.tar.gz) = a11ca187150d5a8fc2904c4a50f29d3ff739294fa714aaab127ba692d65410ad > SIZE (ja-spamassassin/Mail-SpamAssassin-3.3.1.tar.gz) = 1196842 >-MD5 (ja-spamassassin/tokenizer.pre) = e8e787b76ab94805c7472a90f860cc0a > SHA256 (ja-spamassassin/tokenizer.pre) = 9f8e30a8449fd13d571427ea30a252b4b275f153bde5345c50427a7aee3c90e0 > SIZE (ja-spamassassin/tokenizer.pre) = 163 >-MD5 (ja-spamassassin/spamassassin-3.3.1-ja-1.txt) = 8bc5f94dcae6cd7c083fa2ce8ea8f75c > SHA256 (ja-spamassassin/spamassassin-3.3.1-ja-1.txt) = 8342ed8b783f0eae867df9749b8c2ef35d7d5bee00bc240624bab57cc5a03070 > SIZE (ja-spamassassin/spamassassin-3.3.1-ja-1.txt) = 7163 >-MD5 (ja-spamassassin/spamassassin-3.3.1-ja-1.patch) = ff49e2eb9808ed0377b56f8d26acbb1b > SHA256 (ja-spamassassin/spamassassin-3.3.1-ja-1.patch) = 39dd21525076b86134b421a99cbbe151feba66da7381003d4743044c852ee2d5 > SIZE (ja-spamassassin/spamassassin-3.3.1-ja-1.patch) = 33740 >diff -uNr p5-Mail-SpamAssassin.orig/files/patch-DKIM.pm /usr/ports/japanese/p5-Mail-SpamAssassin/files/patch-DKIM.pm >--- p5-Mail-SpamAssassin.orig/files/patch-DKIM.pm 1970-01-01 09:00:00.000000000 +0900 >+++ /usr/ports/japanese/p5-Mail-SpamAssassin/files/patch-DKIM.pm 2010-08-18 22:20:59.852121122 +0900 >@@ -0,0 +1,66 @@ >+--- lib/Mail/SpamAssassin/Plugin/DKIM.pm (revision 925052) >++++ lib/Mail/SpamAssassin/Plugin/DKIM.pm (working copy) >+@@ -213,6 +213,19 @@ >+ in the SpamAssassin distribution. The whitelist score is lower, because >+ these are often targets for abuse of public mailers which sign their mail. >+ >++=item unwhitelist_from_dkim author@example.com >++ >++Removes an email address from def_whitelist_from_dkim and whitelist_from_dkim >++tables, if it exists. Useful for removing undesired default entries from a >++distributed configuration file by a local.cf file or by a C<user_prefs>. >++Note that a parameter is a single email address - currently that address >++is removed regardless of a signing-domain which may have been specified in a >++whitelisting entry. >++ >++The specified email address has to match exactly the address previously >++used in a whitelist_from_dkim or def_whitelist_from_dkim directive >++(with an exception that its domain name part is matched case-insensitively). >++ >+ =item adsp_override domain [signing-practices] >+ >+ Currently few domains publish their signing practices (RFC 5617 - ADSP), >+@@ -362,6 +375,7 @@ >+ } >+ my $address = $1; >+ my $sdid = defined $2 ? $2 : ''; # empty implies author domain signature >++ $address =~ s/(\@[^@]*)\z/lc($1)/e; # lowercase the email address domain >+ $self->{parser}->add_to_addrlist_rcvd('whitelist_from_dkim', >+ $address, $sdid); >+ } >+@@ -381,12 +395,32 @@ >+ } >+ my $address = $1; >+ my $sdid = defined $2 ? $2 : ''; # empty implies author domain signature >++ $address =~ s/(\@[^@]*)\z/lc($1)/e; # lowercase the email address domain >+ $self->{parser}->add_to_addrlist_rcvd('def_whitelist_from_dkim', >+ $address, $sdid); >+ } >+ }); >+ >+ push (@cmds, { >++ setting => 'unwhitelist_from_dkim', >++ type => $Mail::SpamAssassin::Conf::CONF_TYPE_ADDRLIST, >++ code => sub { >++ my ($self, $key, $value, $line) = @_; >++ unless (defined $value && $value !~ /^$/) { >++ return $Mail::SpamAssassin::Conf::MISSING_REQUIRED_VALUE; >++ } >++ unless ($value =~ /^\S+$/) { >++ return $Mail::SpamAssassin::Conf::INVALID_VALUE; >++ } >++ $value =~ s/(\@[^@]*)\z/lc($1)/e; # lowercase the email address domain >++ $self->{parser}->remove_from_addrlist_rcvd('whitelist_from_dkim', >++ $value); >++ $self->{parser}->remove_from_addrlist_rcvd('def_whitelist_from_dkim', >++ $value); >++ } >++ }); >++ >++ push (@cmds, { >+ setting => 'adsp_override', >+ type => $Mail::SpamAssassin::Conf::CONF_TYPE_HASH_KEY_VALUE, >+ code => sub { >+ >+ >+ >diff -uNr p5-Mail-SpamAssassin.orig/files/patch-bug6392 /usr/ports/japanese/p5-Mail-SpamAssassin/files/patch-bug6392 >--- p5-Mail-SpamAssassin.orig/files/patch-bug6392 1970-01-01 09:00:00.000000000 +0900 >+++ /usr/ports/japanese/p5-Mail-SpamAssassin/files/patch-bug6392 2011-02-24 23:32:35.668854413 +0900 >@@ -0,0 +1,225 @@ >+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; >+ } >diff -uNr p5-Mail-SpamAssassin.orig/files/patch-bug6396 /usr/ports/japanese/p5-Mail-SpamAssassin/files/patch-bug6396 >--- p5-Mail-SpamAssassin.orig/files/patch-bug6396 1970-01-01 09:00:00.000000000 +0900 >+++ /usr/ports/japanese/p5-Mail-SpamAssassin/files/patch-bug6396 2011-02-24 23:32:35.667856255 +0900 >@@ -0,0 +1,13 @@ >+Index: lib/Mail/SpamAssassin/Plugin/MIMEEval.pm >+=================================================================== >+--- lib/Mail/SpamAssassin/Plugin/MIMEEval.pm (revision 929342) >++++ lib/Mail/SpamAssassin/Plugin/MIMEEval.pm (revision 929343) >+@@ -498,7 +498,7 @@ >+ # perhaps just limit to test, and image? >+ next if ($ctype eq 'application/ics'); >+ >+- my $cte = lc $p->get_header('content-transfer-encoding') || ''; >++ my $cte = lc($p->get_header('content-transfer-encoding') || ''); >+ next if ($cte !~ /^base64$/); >+ foreach my $l ( @{$p->raw()} ) { >+ my $len = length $l;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 155007
: 113453