commit 11f63cdd52a8f663a69cf86e68b71a53d19b5fd6 Author: Petr Písař <ppi...@redhat.com> Date: Fri Mar 8 15:51:48 2013 +0100
Handle IO::Socket::SSL as non-blocking ...-Socket-SSL-doesn-t-play-well-with-select.patch | 25 ++++++++++++++++++++ perl-Net-HTTP.spec | 16 ++++++++---- 2 files changed, 36 insertions(+), 5 deletions(-) --- diff --git a/Net-HTTP-6.05-IO-Socket-SSL-doesn-t-play-well-with-select.patch b/Net-HTTP-6.05-IO-Socket-SSL-doesn-t-play-well-with-select.patch new file mode 100644 index 0000000..d70d44a --- /dev/null +++ b/Net-HTTP-6.05-IO-Socket-SSL-doesn-t-play-well-with-select.patch @@ -0,0 +1,25 @@ +From 744fb936829d27c7bf0d95167aa5d89c9afd5dc9 Mon Sep 17 00:00:00 2001 +From: Jesse Luehrs <d...@tozt.net> +Date: Wed, 2 Jan 2013 21:38:25 -0600 +Subject: [PATCH] IO::Socket::SSL doesn't play well with select() + +This should fix RT#81237, although I'm not sure if it re-breaks RT#72676 (I'm not sure what to do to test it). +--- + lib/Net/HTTP/Methods.pm | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/Net/HTTP/Methods.pm b/lib/Net/HTTP/Methods.pm +index 77e3038..378dad4 100644 +--- a/lib/Net/HTTP/Methods.pm ++++ b/lib/Net/HTTP/Methods.pm +@@ -283,6 +283,7 @@ sub my_readline { + sub can_read { + my $self = shift; + return 1 unless defined(fileno($self)); ++ return 1 if $self->isa('IO::Socket::SSL') && $self->pending; + + # With no timeout, wait forever. An explict timeout of 0 can be + # used to just check if the socket is readable without waiting. +-- +1.8.1.4 + diff --git a/perl-Net-HTTP.spec b/perl-Net-HTTP.spec index ceb43b9..a5ec62d 100644 --- a/perl-Net-HTTP.spec +++ b/perl-Net-HTTP.spec @@ -1,12 +1,15 @@ Name: perl-Net-HTTP Version: 6.05 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Low-level HTTP connection (client) License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Net-HTTP/ Source0: http://www.cpan.org/authors/id/G/GA/GAAS/Net-HTTP-%{version}.tar.gz +# Do not block with IO::Socket::SSL, rhbz#768394, CPAN RT#81237 +Patch0: Net-HTTP-6.05-IO-Socket-SSL-doesn-t-play-well-with-select.patch BuildArch: noarch +BuildRequires: perl BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Getopt::Long) # Run-time: @@ -22,7 +25,7 @@ BuildRequires: perl(Data::Dumper) BuildRequires: perl(Socket) BuildRequires: perl(Test) BuildRequires: perl(Test::More) -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(Compress::Raw::Zlib) Requires: perl(IO::Uncompress::Gunzip) Requires: perl(IO::Select) @@ -40,15 +43,15 @@ and HTTP/1.1. %prep %setup -q -n Net-HTTP-%{version} +%patch0 -p1 %build -%{__perl} Makefile.PL INSTALLDIRS=vendor +perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install -make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT +make pure_install DESTDIR=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; -find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} $RPM_BUILD_ROOT/* %check @@ -60,6 +63,9 @@ make test %{_mandir}/man3/* %changelog +* Fri Mar 08 2013 Petr Pisar <ppi...@redhat.com> - 6.05-3 +- Handle IO::Socket::SSL as non-blocking (bug #768394) + * Tue Nov 13 2012 Petr Pisar <ppi...@redhat.com> - 6.05-1 - 6.05 bump -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/perl-devel