commit 5645476577f1a09ea5f16e304e00591528cc8485 Author: Emmanuel Seyman <emmanuel@xxxxxxxxx> Date: Fri Mar 6 17:36:23 2015 +0100 Branch version 0.716 for EPEL6 filter-requires.sh | 3 - perl-SOAP-Lite-0.715-IO-modules.patch | 425 ++++++++++++++++++++++++++++++++++ perl-SOAP-Lite-0.716-test.patch | 13 ++ perl-SOAP-Lite.spec | 142 +++++------- sources | 2 +- 5 files changed, 494 insertions(+), 91 deletions(-) --- diff --git a/perl-SOAP-Lite-0.715-IO-modules.patch b/perl-SOAP-Lite-0.715-IO-modules.patch new file mode 100644 index 0000000..8c7c9fc --- /dev/null +++ b/perl-SOAP-Lite-0.715-IO-modules.patch @@ -0,0 +1,425 @@ +From e5091cc065b492cfaba9896cb488035e291555e6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk@xxxxxxxxxx> +Date: Thu, 2 Aug 2012 17:10:04 +0200 +Subject: [PATCH] Add IO::SessionDat and IO::SessionSet from SOAP::Lite 0.714 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + +Signed-off-by: Petr Šabata <contyk@xxxxxxxxxx> +--- + lib/IO/SessionData.pm | 230 +++++++++++++++++++++++++++++++++++++++++++++++++ + lib/IO/SessionSet.pm | 163 ++++++++++++++++++++++++++++++++++ + 2 files changed, 393 insertions(+), 0 deletions(-) + create mode 100644 lib/IO/SessionData.pm + create mode 100644 lib/IO/SessionSet.pm + +diff --git a/lib/IO/SessionData.pm b/lib/IO/SessionData.pm +new file mode 100644 +index 0000000..de85382 +--- /dev/null ++++ b/lib/IO/SessionData.pm +@@ -0,0 +1,230 @@ ++# ====================================================================== ++# ++# Copyright (C) 2000 Lincoln D. Stein ++# Slightly modified by Paul Kulchenko to work on multiple platforms ++# Formatting changed to match the layout layed out in Perl Best Practices ++# (by Damian Conway) by Martin Kutter in 2008 ++# ++# ====================================================================== ++ ++package IO::SessionData; ++ ++use strict; ++use Carp; ++use IO::SessionSet; ++use vars '$VERSION'; ++$VERSION = 1.02; ++ ++use constant BUFSIZE => 3000; ++ ++BEGIN { ++ my @names = qw(EWOULDBLOCK EAGAIN EINPROGRESS); ++ my %WOULDBLOCK = ++ (eval {require Errno} ++ ? map { ++ Errno->can($_) ++ ? (Errno->can($_)->() => 1) ++ : (), ++ } @names ++ : () ++ ), ++ (eval {require POSIX} ++ ? map { ++ POSIX->can($_) && eval { POSIX->can($_)->() } ++ ? (POSIX->can($_)->() => 1) ++ : () ++ } @names ++ : () ++ ); ++ ++ sub WOULDBLOCK { $WOULDBLOCK{$_[0]+0} } ++} ++ ++# Class method: new() ++# Create a new IO::SessionData object. Intended to be called from within ++# IO::SessionSet, not directly. ++sub new { ++ my $pack = shift; ++ my ($sset,$handle,$writeonly) = @_; ++ # make the handle nonblocking (but check for 'blocking' method first) ++ # thanks to Jos Clijmans <jos.clijmans@xxxxxxxxxx> ++ $handle->blocking(0) if $handle->can('blocking'); ++ my $self = bless { ++ outbuffer => '', ++ sset => $sset, ++ handle => $handle, ++ write_limit => BUFSIZE, ++ writeonly => $writeonly, ++ choker => undef, ++ choked => 0, ++ },$pack; ++ $self->readable(1) unless $writeonly; ++ return $self; ++} ++ ++# Object method: handle() ++# Return the IO::Handle object corresponding to this IO::SessionData ++sub handle { ++ return shift->{handle}; ++} ++ ++# Object method: sessions() ++# Return the IO::SessionSet controlling this object. ++sub sessions { ++ return shift->{sset}; ++} ++ ++# Object method: pending() ++# returns number of bytes pending in the out buffer ++sub pending { ++ return length shift->{outbuffer}; ++} ++ ++# Object method: write_limit([$bufsize]) ++# Get or set the limit on the size of the write buffer. ++# Write buffer will grow to this size plus whatever extra you write to it. ++sub write_limit { ++ my $self = shift; ++ return defined $_[0] ++ ? $self->{write_limit} = $_[0] ++ : $self->{write_limit}; ++} ++ ++# set a callback to be called when the contents of the write buffer becomes larger ++# than the set limit. ++sub set_choke { ++ my $self = shift; ++ return defined $_[0] ++ ? $self->{choker} = $_[0] ++ : $self->{choker}; ++} ++ ++# Object method: write($scalar) ++# $obj->write([$data]) -- append data to buffer and try to write to handle ++# Returns number of bytes written, or 0E0 (zero but true) if data queued but not ++# written. On other errors, returns undef. ++sub write { ++ my $self = shift; ++ return unless my $handle = $self->handle; # no handle ++ return unless defined $self->{outbuffer}; # no buffer for queued data ++ ++ $self->{outbuffer} .= $_[0] if defined $_[0]; ++ ++ my $rc; ++ if ($self->pending) { # data in the out buffer to write ++ local $SIG{PIPE}='IGNORE'; ++ # added length() to make it work on Mac. Thanks to Robin Fuller <rfuller@xxxxxxxxxxxxx> ++ $rc = syswrite($handle,$self->{outbuffer},length($self->{outbuffer})); ++ ++ # able to write, so truncate out buffer apropriately ++ if ($rc) { ++ substr($self->{outbuffer},0,$rc) = ''; ++ } ++ elsif (WOULDBLOCK($!)) { # this is OK ++ $rc = '0E0'; ++ } ++ else { # some sort of write error, such as a PIPE error ++ return $self->bail_out($!); ++ } ++ } ++ else { ++ $rc = '0E0'; # nothing to do, but no error either ++ } ++ ++ $self->adjust_state; ++ ++ # Result code is the number of bytes successfully transmitted ++ return $rc; ++} ++ ++# Object method: read($scalar,$length [,$offset]) ++# Just like sysread(), but returns the number of bytes read on success, ++# 0EO ("0 but true") if the read would block, and undef on EOF and other failures. ++sub read { ++ my $self = shift; ++ return unless my $handle = $self->handle; ++ my $rc = sysread($handle,$_[0],$_[1],$_[2]||0); ++ return $rc if defined $rc; ++ return '0E0' if WOULDBLOCK($!); ++ return; ++} ++ ++# Object method: close() ++# Close the session and remove it from the monitored list. ++sub close { ++ my $self = shift; ++ unless ($self->pending) { ++ $self->sessions->delete($self); ++ CORE::close($self->handle); ++ } ++ else { ++ $self->readable(0); ++ $self->{closing}++; # delayed close ++ } ++} ++ ++# Object method: adjust_state() ++# Called periodically from within write() to control the ++# status of the handle on the IO::SessionSet's IO::Select sets ++sub adjust_state { ++ my $self = shift; ++ ++ # make writable if there's anything in the out buffer ++ $self->writable($self->pending > 0); ++ ++ # make readable if there's no write limit, or the amount in the out ++ # buffer is less than the write limit. ++ $self->choke($self->write_limit <= $self->pending) if $self->write_limit; ++ ++ # Try to close down the session if it is flagged ++ # as in the closing state. ++ $self->close if $self->{closing}; ++} ++ ++# choke gets called when the contents of the write buffer are larger ++# than the limit. The default action is to inactivate the session for further ++# reading until the situation is cleared. ++sub choke { ++ my $self = shift; ++ my $do_choke = shift; ++ return if $self->{choked} == $do_choke; # no change in state ++ if (ref $self->set_choke eq 'CODE') { ++ $self->set_choke->($self,$do_choke); ++ } ++ else { ++ $self->readable(!$do_choke); ++ } ++ $self->{choked} = $do_choke; ++} ++ ++# Object method: readable($flag) ++# Flag the associated IO::SessionSet that we want to do reading on the handle. ++sub readable { ++ my $self = shift; ++ my $is_active = shift; ++ return if $self->{writeonly}; ++ $self->sessions->activate($self,'read',$is_active); ++} ++ ++# Object method: writable($flag) ++# Flag the associated IO::SessionSet that we want to do writing on the handle. ++sub writable { ++ my $self = shift; ++ my $is_active = shift; ++ $self->sessions->activate($self,'write',$is_active); ++} ++ ++# Object method: bail_out([$errcode]) ++# Called when an error is encountered during writing (such as a PIPE). ++# Default behavior is to flush all buffered outgoing data and to close ++# the handle. ++sub bail_out { ++ my $self = shift; ++ my $errcode = shift; # save errorno ++ delete $self->{outbuffer}; # drop buffered data ++ $self->close; ++ $! = $errcode; # restore errno ++ return; ++} ++ ++1; +diff --git a/lib/IO/SessionSet.pm b/lib/IO/SessionSet.pm +new file mode 100644 +index 0000000..ae6e4fe +--- /dev/null ++++ b/lib/IO/SessionSet.pm +@@ -0,0 +1,163 @@ ++# ====================================================================== ++# ++# Copyright (C) 2000 Lincoln D. Stein ++# Formatting changed to match the layout layed out in Perl Best Practices ++# (by Damian Conway) by Martin Kutter in 2008 ++# ++# ====================================================================== ++ ++package IO::SessionSet; ++ ++use strict; ++use Carp; ++use IO::Select; ++use IO::Handle; ++use IO::SessionData; ++ ++use vars '$DEBUG'; ++$DEBUG = 0; ++ ++# Class method new() ++# Create a new Session set. ++# If passed a listening socket, use that to ++# accept new IO::SessionData objects automatically. ++sub new { ++ my $pack = shift; ++ my $listen = shift; ++ my $self = bless { ++ sessions => {}, ++ readers => IO::Select->new(), ++ writers => IO::Select->new(), ++ }, $pack; ++ # if initialized with an IO::Handle object (or subclass) ++ # then we treat it as a listening socket. ++ if ( defined($listen) and $listen->can('accept') ) { ++ $self->{listen_socket} = $listen; ++ $self->{readers}->add($listen); ++ } ++ return $self; ++} ++ ++# Object method: sessions() ++# Return list of all the sessions currently in the set. ++sub sessions { ++ return values %{shift->{sessions}} ++}; ++ ++# Object method: add() ++# Add a handle to the session set. Will automatically ++# create a IO::SessionData wrapper around the handle. ++sub add { ++ my $self = shift; ++ my ($handle,$writeonly) = @_; ++ warn "Adding a new session for $handle.\n" if $DEBUG; ++ return $self->{sessions}{$handle} = ++ $self->SessionDataClass->new($self,$handle,$writeonly); ++} ++ ++# Object method: delete() ++# Remove a session from the session set. May pass either a handle or ++# a corresponding IO::SessionData wrapper. ++sub delete { ++ my $self = shift; ++ my $thing = shift; ++ my $handle = $self->to_handle($thing); ++ my $sess = $self->to_session($thing); ++ warn "Deleting session $sess handle $handle.\n" if $DEBUG; ++ delete $self->{sessions}{$handle}; ++ $self->{readers}->remove($handle); ++ $self->{writers}->remove($handle); ++} ++ ++# Object method: to_handle() ++# Return a handle, given either a handle or a IO::SessionData object. ++sub to_handle { ++ my $self = shift; ++ my $thing = shift; ++ return $thing->handle if $thing->isa('IO::SessionData'); ++ return $thing if defined (fileno $thing); ++ return; # undefined value ++} ++ ++# Object method: to_session ++# Return a IO::SessionData object, given either a handle or the object itself. ++sub to_session { ++ my $self = shift; ++ my $thing = shift; ++ return $thing if $thing->isa('IO::SessionData'); ++ return $self->{sessions}{$thing} if defined (fileno $thing); ++ return; # undefined value ++} ++ ++# Object method: activate() ++# Called with parameters ($session,'read'|'write' [,$activate]) ++# If called without the $activate argument, will return true ++# if the indicated handle is on the read or write IO::Select set. ++# May use either a session object or a handle as first argument. ++sub activate { ++ my $self = shift; ++ my ($thing,$rw,$act) = @_; ++ croak 'Usage $obj->activate($session,"read"|"write" [,$activate])' ++ unless @_ >= 2; ++ my $handle = $self->to_handle($thing); ++ my $select = lc($rw) eq 'read' ? 'readers' : 'writers'; ++ my $prior = defined $self->{$select}->exists($handle); ++ if (defined $act && $act != $prior) { ++ $self->{$select}->add($handle) if $act; ++ $self->{$select}->remove($handle) unless $act; ++ warn $act ? 'Activating' : 'Inactivating', ++ " handle $handle for ", ++ $rw eq 'read' ? 'reading':'writing',".\n" if $DEBUG; ++ } ++ return $prior; ++} ++ ++# Object method: wait() ++# Wait for I/O. Handles writes automatically. Returns a list of ++# IO::SessionData objects ready for reading. ++# If there is a listen socket, then will automatically do an accept() ++# and return a new IO::SessionData object for that. ++sub wait { ++ my $self = shift; ++ my $timeout = shift; ++ ++ # Call select() to get the list of sessions that are ready for ++ # reading/writing. ++ warn "IO::Select->select() returned error: $!" ++ unless my ($read,$write) = ++ IO::Select->select($self->{readers},$self->{writers},undef,$timeout); ++ ++ # handle queued writes automatically ++ foreach (@$write) { ++ my $session = $self->to_session($_); ++ warn "Writing pending data (",$session->pending+0," bytes) for $_.\n" ++ if $DEBUG; ++ my $rc = $session->write; ++ } ++ ++ # Return list of sessions that are ready for reading. ++ # If one of the ready handles is the listen socket, then ++ # create a new session. ++ # Otherwise return the ready handles as a list of IO::SessionData objects. ++ my @sessions; ++ foreach (@$read) { ++ if ($_ eq $self->{listen_socket}) { ++ my $newhandle = $_->accept; ++ warn "Accepting a new handle $newhandle.\n" if $DEBUG; ++ my $newsess = $self->add($newhandle) if $newhandle; ++ push @sessions,$newsess; ++ } ++ else { ++ push @sessions,$self->to_session($_); ++ } ++ } ++ return @sessions; ++} ++ ++# Class method: SessionDataClass ++# Return the string containing the name of the session data ++# wrapper class. Subclass and override to use a different ++# session data class. ++sub SessionDataClass { return 'IO::SessionData'; } ++ ++1; +-- +1.7.7.6 + diff --git a/perl-SOAP-Lite-0.716-test.patch b/perl-SOAP-Lite-0.716-test.patch new file mode 100644 index 0000000..0fae97f --- /dev/null +++ b/perl-SOAP-Lite-0.716-test.patch @@ -0,0 +1,13 @@ +diff --git a/t/04-attach.t b/t/04-attach.t +index 3258e89..6fb5650 100644 +--- a/t/04-attach.t ++++ b/t/04-attach.t +@@ -20,7 +20,7 @@ BEGIN { + } + } + +-BEGIN { plan tests => 15 } ++BEGIN { plan tests => 18 } + + my ( $a, $soap, $d, $s, $r, $serialized, $deserialized ); + diff --git a/perl-SOAP-Lite.spec b/perl-SOAP-Lite.spec index 84fdc9d..14400cd 100644 --- a/perl-SOAP-Lite.spec +++ b/perl-SOAP-Lite.spec @@ -1,68 +1,63 @@ Name: perl-SOAP-Lite -Version: 1.13 -Release: 1%{?dist} +Version: 0.716 +Release: 4%{?dist} Summary: Client and server side SOAP implementation License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/SOAP-Lite/ -Source0: http://search.cpan.org/CPAN/authors/id/P/PH/PHRED/SOAP-Lite-%{version}.tar.gz +Source0: http://search.cpan.org/CPAN/authors/id/M/MK/MKUTTER/SOAP-Lite-%{version}.tar.gz +# This shouldn't be needed with 0.717+ (#78489) +Patch0: perl-SOAP-Lite-0.715-IO-modules.patch +Patch1: perl-SOAP-Lite-0.716-test.patch BuildArch: noarch -# Build + +# Core package BuildRequires: perl -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 -BuildRequires: perl(strict) -BuildRequires: perl(warnings) -# Runtime -BuildRequires: perl(bytes) -BuildRequires: perl(Carp) BuildRequires: perl(Class::Inspector) BuildRequires: perl(constant) -BuildRequires: perl(Encode) -BuildRequires: perl(Exporter) -BuildRequires: perl(IO::File) -BuildRequires: perl(IO::Select) -BuildRequires: perl(IO::SessionData) -BuildRequires: perl(IO::SessionSet) -BuildRequires: perl(IO::Socket) -BuildRequires: perl(IPC::Open2) -BuildRequires: perl(LWP::UserAgent) -BuildRequires: perl(Net::POP3) -BuildRequires: perl(overload) +BuildRequires: perl(MIME::Base64) BuildRequires: perl(Scalar::Util) +BuildRequires: perl(Task::Weaken) +BuildRequires: perl(Test::More) BuildRequires: perl(URI) -BuildRequires: perl(URI::Escape) -BuildRequires: perl(vars) -BuildRequires: perl(XML::Parser) -# Tests only -# Tests in Issues/ and SOAP/ directories are not executed -# Many tests are skipped for various reasons -BuildRequires: perl(B) -BuildRequires: perl(Data::Dumper) -BuildRequires: perl(File::Basename) -BuildRequires: perl(LWP::Protocol::http) -BuildRequires: perl(LWP::Protocol::https) +BuildRequires: perl(XML::Parser) >= 2.23 +# Optional +BuildRequires: perl(LWP::UserAgent) +BuildRequires: perl(Crypt::SSLeay) +BuildRequires: perl(MIME::Lite) +BuildRequires: perl(HTTP::Daemon) +BuildRequires: perl(Apache) +BuildRequires: perl(FCGI) BuildRequires: perl(MIME::Parser) -BuildRequires: perl(Test) -BuildRequires: perl(Test::More) -# We don't require Apache* modules as both mod_perl 1 and 2 are supported. -# The server also introduces a huge dependency chain not everyone really wants. +BuildRequires: perl(Net::POP3) +BuildRequires: perl(IO::File) +BuildRequires: perl(IO::Socket::SSL) +BuildRequires: perl(Compress::Zlib) + +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(Compress::Zlib) Requires: perl(Encode) -Requires: perl(FCGI) +Requires: perl(Errno) +Requires: perl(HTTP::Daemon) Requires: perl(HTTP::Headers) Requires: perl(HTTP::Request) Requires: perl(LWP::UserAgent) -Requires: perl(LWP::Protocol::http) -Requires: perl(LWP::Protocol::https) Requires: perl(MIME::Base64) Requires: perl(MIME::Entity) -Requires: perl(URI::_server) +Requires: perl(MIME::Parser) +Requires: perl(POSIX) +Requires: perl(URI) Requires: perl(XML::Parser) -Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version)) -# Merged back into SOAP-Lite in 1.00 -Provides: perl-SOAP-Transport-TCP = %{version}-%{release} -Obsoletes: perl-SOAP-Transport-TCP < 0.715-12 - +Requires: perl(XML::Parser::Lite) + +# RPM 4.8 filters +%{?filter_setup: +%filter_from_requires /perl(My::/d +%filter_from_provides /perl(My::/d +%filter_from_provides /perl(LWP::Protocol)/d +%?perl_default_filter +} +# RPM 4.9 filters %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}perl\\(My::.*\\) %global __provides_exclude %__provides_exclude|perl\\(LWP::Protocol\\) %global __requires_exclude %{?_requires_exclude:%__requires_exclude|}perl\\(My::\\) @@ -74,65 +69,38 @@ client and server side. %prep %setup -q -n SOAP-Lite-%{version} -find examples -type f -exec chmod -c ugo-x {} + +%patch0 -p1 +%patch1 -p1 +find examples -type f -exec chmod ugo-x {} \; %build -perl Makefile.PL --noprompt INSTALLDIRS=vendor NO_PACKLIST=1 +perl Makefile.PL --noprompt INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} -%{_fixperms} %{buildroot}/* +find %{buildroot} -type f -name .packlist -exec rm -f {} ';' +chmod -R u+w %{buildroot}/* %check -make test +# PERL_PERTURB_KEYS=0 to work around CPAN RT#84168, fixed in 1.01. +PERL_PERTURB_KEYS=0 make test %files -%doc Changes HACKING README ReleaseNotes.txt examples +%doc Changes README ReleaseNotes.txt examples %{_bindir}/*pl %{perl_vendorlib}/SOAP %{perl_vendorlib}/Apache +%{perl_vendorlib}/IO +%{perl_vendorlib}/UDDI +%{perl_vendorlib}/XML +%{perl_vendorlib}/XMLRPC %{_mandir}/man3/* %{_mandir}/man1/* %changelog -* Tue Jan 06 2015 Petr Šabata <contyk@xxxxxxxxxx> - 1.13-1 -- 1.13 bugfix bump - -* Fri Dec 05 2014 Petr Šabata <contyk@xxxxxxxxxx> - 1.12-1 -- 1.12 bump - -* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@xxxxxxxxxx> - 1.11-3 -- Perl 5.20 rebuild - -* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.11-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Wed Feb 26 2014 Petr Šabata <contyk@xxxxxxxxxx> - 1.11-1 -- 1.11 bump - -* Tue Jan 28 2014 Petr Šabata <contyk@xxxxxxxxxx> - 1.10-1 -- 1.10 bump - -* Thu Jan 16 2014 Petr Šabata <contyk@xxxxxxxxxx> - 1.09-1 -- 1.09 bugfix bump - -* Tue Jan 07 2014 Petr Šabata <contyk@xxxxxxxxxx> - 1.08-2 -- Update the source URL - -* Mon Nov 25 2013 Petr Šabata <contyk@xxxxxxxxxx> - 1.08-1 -- 1.08 bump, no code changes - -* Thu Nov 14 2013 Petr Šabata <contyk@xxxxxxxxxx> - 1.06-3 -- Properly obsolete/provide SOAP-Transport-TCP - -* Tue Nov 12 2013 Petr Šabata <contyk@xxxxxxxxxx> - 1.06-2 -- Add a missing, undetected runtime dependency on LWP::UserAgent - -* Tue Nov 12 2013 Petr Šabata <contyk@xxxxxxxxxx> - 1.06-1 -- 1.06 bump -- SOAP::Transport::TCP is back -- UDDI::Lite, XML::Parser::Lite, and XMLRPC::Lite are now split from the package +* Fri Mar 06 2015 Emmanuel Seyman <emmanuel@xxxxxxxxx> - 0.716-4 +- Build for EPEL6 * Sun Aug 04 2013 Petr Pisar <ppisar@xxxxxxxxxx> - 0.716-3 - Perl 5.18 rebuild diff --git a/sources b/sources index 062e482..d4e747a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a743e386947f6e93ca81ee557ddee264 SOAP-Lite-1.13.tar.gz +d9cef5120d52745ecfd24a7622f08d2f SOAP-Lite-0.716.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel