From owner-svn-ports-all@freebsd.org Mon Nov 23 17:00:20 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B568A321CD; Mon, 23 Nov 2015 17:00:20 +0000 (UTC) (envelope-from adamw@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFE551C54; Mon, 23 Nov 2015 17:00:19 +0000 (UTC) (envelope-from adamw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tANH0JYu039936; Mon, 23 Nov 2015 17:00:19 GMT (envelope-from adamw@FreeBSD.org) Received: (from adamw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tANH0I1V039933; Mon, 23 Nov 2015 17:00:18 GMT (envelope-from adamw@FreeBSD.org) Message-Id: <201511231700.tANH0I1V039933@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adamw set sender to adamw@FreeBSD.org using -f From: Adam Weinberger Date: Mon, 23 Nov 2015 17:00:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r402285 - in head: japanese/spamassassin mail/spamassassin mail/spamassassin/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 17:00:20 -0000 Author: adamw Date: Mon Nov 23 17:00:18 2015 New Revision: 402285 URL: https://svnweb.freebsd.org/changeset/ports/402285 Log: Add two patches from upstream bug #7265, which fixes incompatibilities with Net::DNS 1.03. The FreeBSD p5-Net-DNS port has been downgraded to 1.02 but Net::DNS will be re-issued at some point soon. The changes in these patches seem to work well with Net::DNS 1.02. While here, add some TEST_DEPENDS so I can run the plugin-based tests as well. Bump PORTREVISION for spamassassin and japanese/spamassassin. PR: 204682 Submitted by: Mark.Martinec@ijs.si Obtained from: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7265 Added: head/mail/spamassassin/files/patch-bug7265 (contents, props changed) Modified: head/japanese/spamassassin/Makefile head/mail/spamassassin/Makefile Modified: head/japanese/spamassassin/Makefile ============================================================================== --- head/japanese/spamassassin/Makefile Mon Nov 23 16:43:18 2015 (r402284) +++ head/japanese/spamassassin/Makefile Mon Nov 23 17:00:18 2015 (r402285) @@ -1,7 +1,7 @@ # Created by: TAOKA Fumiyoshi # $FreeBSD$ -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= japanese mail perl5 PKGNAMEPREFIX= ja- Modified: head/mail/spamassassin/Makefile ============================================================================== --- head/mail/spamassassin/Makefile Mon Nov 23 16:43:18 2015 (r402284) +++ head/mail/spamassassin/Makefile Mon Nov 23 17:00:18 2015 (r402285) @@ -3,7 +3,7 @@ PORTNAME= spamassassin PORTVERSION= 3.4.1 -PORTREVISION?= 4 # also bump japanese/spamassassin +PORTREVISION?= 5 # also bump japanese/spamassassin CATEGORIES?= mail perl5 MASTER_SITES= APACHE/spamassassin/source CPAN/Mail DISTNAME= Mail-SpamAssassin-${PORTVERSION} @@ -22,6 +22,10 @@ BUILD_DEPENDS= p5-Encode-Detect>=0:${POR RUN_DEPENDS:= ${BUILD_DEPENDS} \ re2c>=.12.0:${PORTSDIR}/devel/re2c +.for dep in DCC DKIM MYSQL PGSQL PYZOR RAZOR RELAY_COUNTRY SPF_QUERY SSL +TEST_DEPENDS+= ${${dep}_RUN_DEPENDS} +.endfor + CONFLICTS?= ja-spamassassin-[0-9]* CPE_VENDOR= apache Added: head/mail/spamassassin/files/patch-bug7265 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/mail/spamassassin/files/patch-bug7265 Mon Nov 23 17:00:18 2015 (r402285) @@ -0,0 +1,83 @@ +--- lib/Mail/SpamAssassin/DnsResolver.pm (revision 1715195) ++++ lib/Mail/SpamAssassin/DnsResolver.pm (working copy) +@@ -725,6 +725,37 @@ + + ########################################################################### + ++=item $id = $res->bgread() ++ ++Similar to C. Reads a DNS packet from ++a supplied socket, decodes it, and returns a Net::DNS::Packet object ++if successful. Dies on error. ++ ++=cut ++ ++sub bgread() { ++ my ($self) = @_; ++ my $sock = $self->{sock}; ++ my $packetsize = $self->{res}->udppacketsize; ++ $packetsize = 512 if $packetsize < 512; # just in case ++ my $data = ''; ++ my $peeraddr = $sock->recv($data, $packetsize+256); # with some size margin for troubleshooting ++ defined $peeraddr or die "bgread: recv() failed: $!"; ++ my $peerhost = $sock->peerhost; ++ $data ne '' or die "bgread: received empty packet from $peerhost"; ++ dbg("dns: bgread: received %d bytes from %s", length($data), $peerhost); ++ my($answerpkt, $decoded_length) = Net::DNS::Packet->new(\$data); ++ $answerpkt or die "bgread: decoding DNS packet failed: $@"; ++ $answerpkt->answerfrom($peerhost); ++ if ($decoded_length ne length($data)) { ++ warn sprintf("bgread: received a %d bytes packet from %s, decoded %d bytes\n", ++ length($data), $peerhost, $decoded_length); ++ } ++ return $answerpkt; ++} ++ ++########################################################################### ++ + =item $nfound = $res->poll_responses() + + See if there are any C reply packets ready, and return +@@ -772,13 +803,25 @@ + $timeout = 0; # next time around collect whatever is available, then exit + last if $nfound == 0; + +- my $packet = $self->{res}->bgread($self->{sock}); ++ my $packet; ++ eval { ++ $packet = $self->bgread(); ++ } or do { ++ undef $packet; ++ my $eval_stat = $@ ne '' ? $@ : "errno=$!"; chomp $eval_stat; ++ # resignal if alarm went off ++ die $eval_stat if $eval_stat =~ /__alarm__ignore__\(.*\)/s; ++ info("dns: bad dns reply: %s", $eval_stat); ++ }; + ++# Bug 7265, use our own bgread() ++# my $packet = $self->{res}->bgread($self->{sock}); ++ + if (!$packet) { +- my $dns_err = $self->{res}->errorstring; +- # resignal if alarm went off +- die "dns (3) $dns_err\n" if $dns_err =~ /__alarm__ignore__\(.*\)/s; +- info("dns: bad dns reply: $dns_err"); ++ # error already reported above ++# my $dns_err = $self->{res}->errorstring; ++# die "dns (3) $dns_err\n" if $dns_err =~ /__alarm__ignore__\(.*\)/s; ++# info("dns: bad dns reply: $dns_err"); + } else { + my $header = $packet->header; + if (!$header) { +--- lib/Mail/SpamAssassin/Plugin/DKIM.pm (revision 1715196) ++++ lib/Mail/SpamAssassin/Plugin/DKIM.pm (working copy) +@@ -794,7 +794,8 @@ + # Only do so if EDNS0 provides a reasonably-sized UDP payload size, + # as our interface does not provide a DNS fallback to TCP, unlike + # the Net::DNS::Resolver::send which does provide it. +- my $res = $self->{main}->{resolver}->get_resolver; ++ my $res = $self->{main}->{resolver}; ++ dbg("dkim: providing our own resolver: %s", ref $res); + Mail::DKIM::DNS::resolver($res); + } + }