From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jan 28 22:00:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5FB9257D for ; Mon, 28 Jan 2013 22:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 40D65F90 for ; Mon, 28 Jan 2013 22:00:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0SM00Y9055541 for ; Mon, 28 Jan 2013 22:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0SM008c055536; Mon, 28 Jan 2013 22:00:00 GMT (envelope-from gnats) Resent-Date: Mon, 28 Jan 2013 22:00:00 GMT Resent-Message-Id: <201301282200.r0SM008c055536@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, slaven@rezic.de Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 794C456E for ; Mon, 28 Jan 2013 21:59:44 +0000 (UTC) (envelope-from slaven@rezic.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 214C3F87 for ; Mon, 28 Jan 2013 21:59:43 +0000 (UTC) Received: from localhost.localdomain (g226055223.adsl.alicedsl.de [92.226.55.223]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0McRue-1UHTab12Lg-00ILYq; Mon, 28 Jan 2013 22:59:37 +0100 Received: from cvrsnica.herceg.de (cvrsnica.herceg.de [192.168.1.10]) by biokovo.herceg.de (8.14.3/8.14.3) with ESMTP id r0SLwuja090821 for ; Mon, 28 Jan 2013 22:58:56 +0100 (CET) (envelope-from eserte@cvrsnica.herceg.de) Received: from cvrsnica.herceg.de (localhost [127.0.0.1]) by cvrsnica.herceg.de (8.14.5/8.14.5) with ESMTP id r0SLwuth096442 for ; Mon, 28 Jan 2013 22:58:56 +0100 (CET) (envelope-from eserte@cvrsnica.herceg.de) Received: (from eserte@localhost) by cvrsnica.herceg.de (8.14.5/8.14.5/Submit) id r0SLwu2s096441; Mon, 28 Jan 2013 22:58:56 +0100 (CET) (envelope-from eserte) Message-Id: <201301282158.r0SLwu2s096441@cvrsnica.herceg.de> Date: Mon, 28 Jan 2013 22:58:56 +0100 (CET) From: Slaven Rezic To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/175658: www/p5-libwww: read timeout does not work with 6.04 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: slaven@rezic.de List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2013 22:00:02 -0000 >Number: 175658 >Category: ports >Synopsis: www/p5-libwww: read timeout does not work with 6.04 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 28 22:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Slaven Rezic >Release: FreeBSD 9.0-RELEASE amd64 >Organization: www.rezic.de >Environment: System: FreeBSD cvrsnica.herceg.de 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: See https://rt.cpan.org/Ticket/Display.html?id=81799 for a detailed report. >How-To-Repeat: lwp-request -t 5 $SOME_HANGING_URL >Fix: Here's the proposed patch incorporated into the freebsd port: diff --git c/Makefile w/Makefile index 5de5865..e50870d 100644 --- c/Makefile +++ w/Makefile @@ -3,6 +3,7 @@ PORTNAME= libwww PORTVERSION= 6.04 +PORTREVISION= 1 CATEGORIES= www devel perl5 MASTER_SITES= CPAN/LWP PKGNAMEPREFIX= p5- @@ -28,6 +29,8 @@ RUN_DEPENDS:= ${BUILD_DEPENDS} OPTIONS_DEFINE= HTTPS +PATCH_STRIP= -p1 + CONFIGURE_ARGS= --aliases PERL_CONFIGURE= yes diff --git c/files/patch-read-timeout w/files/patch-read-timeout new file mode 100644 index 0000000..d35c5b9 --- /dev/null +++ w/files/patch-read-timeout @@ -0,0 +1,67 @@ +commit 6794fa73e92d63e973b38f97299b4181bdd7ee8b +Author: Gisle Aas +Date: Thu Nov 8 21:07:33 2012 +0100 + + With Net::HTTP 6.04 we don't need our own can_read() and sysread override + +diff --git a/Makefile.PL b/Makefile.PL +index a6f808e..87075b4 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -61,7 +61,7 @@ WriteMakefile( + 'LWP::MediaTypes' => 6, + 'MIME::Base64' => "2.1", + 'Net::FTP' => "2.58", +- 'Net::HTTP' => 6, ++ 'Net::HTTP' => "6.04", + 'URI' => "1.10", + 'URI::Escape' => 0, + 'WWW::RobotRules' => 6, +diff --git a/lib/LWP/Protocol/http.pm b/lib/LWP/Protocol/http.pm +index 8d7c6d9..d0583d4 100644 +--- a/lib/LWP/Protocol/http.pm ++++ b/lib/LWP/Protocol/http.pm +@@ -446,43 +446,6 @@ sub request + #----------------------------------------------------------- + package LWP::Protocol::http::SocketMethods; + +-sub sysread { +- my $self = shift; +- if (my $timeout = ${*$self}{io_socket_timeout}) { +- die "read timeout" unless $self->can_read($timeout); +- } +- else { +- # since we have made the socket non-blocking we +- # use select to wait for some data to arrive +- $self->can_read(undef) || die "Assert"; +- } +- sysread($self, $_[0], $_[1], $_[2] || 0); +-} +- +-sub can_read { +- my($self, $timeout) = @_; +- my $fbits = ''; +- vec($fbits, fileno($self), 1) = 1; +- SELECT: +- { +- my $before; +- $before = time if $timeout; +- my $nfound = select($fbits, undef, undef, $timeout); +- if ($nfound < 0) { +- if ($!{EINTR} || $!{EAGAIN}) { +- # don't really think EAGAIN can happen here +- if ($timeout) { +- $timeout -= time - $before; +- $timeout = 0 if $timeout < 0; +- } +- redo SELECT; +- } +- die "select failed: $!"; +- } +- return $nfound > 0; +- } +-} +- + sub ping { + my $self = shift; + !$self->can_read(0); >Release-Note: >Audit-Trail: >Unformatted: