Hello community, here is the log from the commit of package perl-RPC-XML for openSUSE:Factory checked in at 2019-09-02 12:43:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-RPC-XML (Old) and /work/SRC/openSUSE:Factory/.perl-RPC-XML.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-RPC-XML" Mon Sep 2 12:43:21 2019 rev:29 rq:726194 version:0.80 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-RPC-XML/perl-RPC-XML.changes 2016-03-16 10:25:58.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.perl-RPC-XML.new.7948/perl-RPC-XML.changes 2019-09-02 12:43:21.197768848 +0200 @@ -1,0 +2,43 @@ +Thu Aug 22 12:35:17 CEST 2019 - Tina Mueller <tina.muel...@suse.com> + +- Remove patches not needed anymore: + * RPC-XML-0.60-rev127.dif + * RPC-XML-0.76-extern_ent.dif + * RPC-XML-0.78-reproducible.diff + +------------------------------------------------------------------- +Wed Apr 3 07:27:15 UTC 2019 - Stephan Kulow <co...@suse.com> + +- updated to 0.80 + see /usr/share/doc/packages/perl-RPC-XML/ChangeLog + + 0.80 Sunday May 8, 2016, 12:45:00 PM -0700 + + * etc/make_method + Make the build reproducible by dropping timestamps in + make_method output. (Niko Tyni) + + * t/40_server.t + * t/40_server_xmllibxml.t + * t/50_client.t + Fixes for test problems with Strawberry Perl. + + * lib/RPC/XML/Client.pm + Fix leak caused by failing to free Expat parser. We don't want + to return from the method until the parser's been freed. We + therefore need to call $parser->release() before the return + statements caused by request failures. (Tom Grimwood-Taylor) + + * lib/RPC/XML/Server.pm + One socket-opt change, one typo corrected. + + * lib/RPC/XML.pm + Applied patch for numeric regexes and critic cleanup. Addresses + GitHub pull request #10 and RT #111636. + + * t/60_net_server.t + RT #99578: Work-around fix for Net::Server+IO::Socket::IP. If a + system's IPv6 declaration of localhost was before the IPv4 + declaration in the hosts file, this test would fail. + +------------------------------------------------------------------- Old: ---- RPC-XML-0.60-rev127.dif RPC-XML-0.76-extern_ent.dif RPC-XML-0.78-reproducible.diff RPC-XML-0.79.tar.gz New: ---- RPC-XML-0.80.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-RPC-XML.spec ++++++ --- /var/tmp/diff_new_pack.bgHSdd/_old 2019-09-02 12:43:21.985768706 +0200 +++ /var/tmp/diff_new_pack.bgHSdd/_new 2019-09-02 12:43:21.985768706 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-RPC-XML # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,36 +12,33 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: perl-RPC-XML -Version: 0.79 +Version: 0.80 Release: 0 %define cpan_name RPC-XML -Summary: Set of Classes for Core Data, Message and Xml Handling -License: Artistic-1.0 or GPL-1.0+ +Summary: Set of classes for core data, message and XML handling +License: Artistic-1.0 OR GPL-1.0-or-later Group: Development/Libraries/Perl -Url: http://search.cpan.org/dist/RPC-XML/ -Source0: http://www.cpan.org/authors/id/R/RJ/RJRAY/%{cpan_name}-0.79.tar.gz +Url: https://metacpan.org/release/%{cpan_name} +Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJRAY/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml -Patch0: RPC-XML-0.60-rev127.dif -Patch1: RPC-XML-0.76-extern_ent.dif -Patch2: RPC-XML-0.77-fixtest.dif -Patch3: RPC-XML-0.78-reproducible.diff +Patch0: RPC-XML-0.77-fixtest.dif BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(LWP) >= 5.834 BuildRequires: perl(Module::Load) >= 0.24 -BuildRequires: perl(Scalar::Util) >= 1.19 +BuildRequires: perl(Scalar::Util) >= 1.33 BuildRequires: perl(Test::More) >= 0.94 BuildRequires: perl(XML::Parser) >= 2.31 Requires: perl(LWP) >= 5.834 Requires: perl(Module::Load) >= 0.24 -Requires: perl(Scalar::Util) >= 1.19 +Requires: perl(Scalar::Util) >= 1.33 Requires: perl(Test::More) >= 0.94 Requires: perl(XML::Parser) >= 2.31 Recommends: perl(Compress::Raw::Zlib) >= 2.063 @@ -68,17 +65,14 @@ %prep %setup -q -n %{cpan_name}-%{version} find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644 -##%patch0 -%patch1 -%patch2 -p1 -%patch3 -p1 +%patch0 -p1 %build -%{__perl} Makefile.PL INSTALLDIRS=vendor -%{__make} %{?_smp_mflags} +perl Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} %check -%{__make} test +make test %install %perl_make_install ++++++ RPC-XML-0.79.tar.gz -> RPC-XML-0.80.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/ChangeLog new/RPC-XML-0.80/ChangeLog --- old/RPC-XML-0.79/ChangeLog 2015-05-01 17:51:23.000000000 +0200 +++ new/RPC-XML-0.80/ChangeLog 2016-05-08 22:01:53.000000000 +0200 @@ -9,6 +9,35 @@ allowing choice of character-set encodings for XML messages. +0.80 Sunday May 8, 2016, 12:45:00 PM -0700 + + * etc/make_method + Make the build reproducible by dropping timestamps in + make_method output. (Niko Tyni) + + * t/40_server.t + * t/40_server_xmllibxml.t + * t/50_client.t + Fixes for test problems with Strawberry Perl. + + * lib/RPC/XML/Client.pm + Fix leak caused by failing to free Expat parser. We don't want + to return from the method until the parser's been freed. We + therefore need to call $parser->release() before the return + statements caused by request failures. (Tom Grimwood-Taylor) + + * lib/RPC/XML/Server.pm + One socket-opt change, one typo corrected. + + * lib/RPC/XML.pm + Applied patch for numeric regexes and critic cleanup. Addresses + GitHub pull request #10 and RT #111636. + + * t/60_net_server.t + RT #99578: Work-around fix for Net::Server+IO::Socket::IP. If a + system's IPv6 declaration of localhost was before the IPv4 + declaration in the hosts file, this test would fail. + 0.79 Friday May 1, 2015, 09:00:00 AM -0700 * t/40_server.t @@ -1846,9 +1875,9 @@ * * All files are tracked from this point forward. -# Generated on Friday May 1, 2015, 11:49:53 AM -0400 -# Using changelog2x/0.11, App::Changelog2x/0.11, XML::LibXML/2.0117, -# XML::LibXSLT/1.92, libxml/2.9.0, libxslt/1.1.28 (with exslt) +# Generated on Sunday May 8, 2016, 12:58:19 PM -0700 +# Using changelog2x/0.11, App::Changelog2x/0.11, XML::LibXML/2.0110, +# XML::LibXSLT/1.94, libxml/2.9.0, libxslt/1.1.28 (with exslt) # XSLT sources: # $Id: changelog2text.xslt 8 2009-01-19 06:46:50Z rjray $ # $Id: common-text.xslt 8 2009-01-19 06:46:50Z rjray $ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/ChangeLog.xml new/RPC-XML-0.80/ChangeLog.xml --- old/RPC-XML-0.79/ChangeLog.xml 2015-05-01 17:46:35.000000000 +0200 +++ new/RPC-XML-0.80/ChangeLog.xml 2016-05-08 21:45:23.000000000 +0200 @@ -16,6 +16,59 @@ extensions to the base protocol in terms of supporting HTTP/1.1 and allowing choice of character-set encodings for XML messages. </description> + <release date="2016-05-08T12:45:00-07:00" version="0.80" sc:tag="0.80"> + <change git:commit="32560525e443799daa8d2a2429ea9d1d782a1bfd"> + <file path="etc/make_method" /> + <description> + Make the build reproducible by dropping timestamps in make_method + output. (Niko Tyni) + </description> + </change> + <change git:commit="3270580b3538e108a2df16273e7513d197eee2d3"> + <fileset> + <file path="t/40_server.t" /> + <file path="t/40_server_xmllibxml.t" /> + <file path="t/50_client.t" /> + </fileset> + <description> + Fixes for test problems with Strawberry Perl. + </description> + </change> + <change git:commit="d5671287e928fc2911bccb88da9ffb73531e5e4c"> + <file path="lib/RPC/XML/Client.pm" /> + <description> + Fix leak caused by failing to free Expat parser. We don't want to + return from the method until the parser's been freed. We therefore + need to call $parser->release() before the return statements caused + by request failures. (Tom Grimwood-Taylor) + </description> + </change> + <change git:commit="8158b17b8979c0126a5824909e8f57e1d4c13dd8"> + <file path="lib/RPC/XML/Server.pm" /> + <description> + One socket-opt change, one typo corrected. + </description> + </change> + <change git:commit="703a41a19874b54c8edf7d287752b5bf5d0c0008"> + <file path="lib/RPC/XML.pm" /> + <description> + Applied patch for numeric regexes and critic cleanup. Addresses + <xhtml:a href="https://github.com/rjray/rpc-xml/pull/10">GitHub + pull request #10</xhtml:a> and + <xhtml:a href="https://rt.cpan.org/Ticket/Display.html?id=111636">RT + #111636</xhtml:a>. + </description> + </change> + <change git:commit="b183920628411a7a19a1251ebae6907ccda72739"> + <file path="t/60_net_server.t" /> + <description> + <xhtml:a href="https://rt.cpan.org/Ticket/Display.html?id=99578">RT #99578</xhtml:a>: + Work-around fix for Net::Server+IO::Socket::IP. If a system's IPv6 + declaration of localhost was before the IPv4 declaration in the hosts + file, this test would fail. + </description> + </change> + </release> <release date="2015-05-01T09:00:00-07:00" version="0.79" sc:tag="0.79"> <change git:commit="70f6e31b98b3e80bb2ab5fe99f1e42dc454271e9"> <fileset> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/META.json new/RPC-XML-0.80/META.json --- old/RPC-XML-0.79/META.json 2015-05-01 17:55:49.000000000 +0200 +++ new/RPC-XML-0.80/META.json 2016-05-08 22:15:05.000000000 +0200 @@ -4,7 +4,7 @@ "Randy J. Ray" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.143240", + "generated_by" : "ExtUtils::MakeMaker version 7.16, CPAN::Meta::Converter version 2.150005", "license" : [ "perl_5" ], @@ -59,5 +59,6 @@ "url" : "http://github.com/rjray/rpc-xml" } }, - "version" : "0.79" + "version" : "0.80", + "x_serialization_backend" : "JSON::PP version 2.27400" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/META.yml new/RPC-XML-0.80/META.yml --- old/RPC-XML-0.79/META.yml 2015-05-01 17:55:49.000000000 +0200 +++ new/RPC-XML-0.80/META.yml 2016-05-08 22:15:05.000000000 +0200 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.143240' +generated_by: 'ExtUtils::MakeMaker version 7.16, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -35,4 +35,5 @@ bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=RPC-XML homepage: http://search.cpan.org/dist/RPC-XML repository: http://github.com/rjray/rpc-xml -version: '0.79' +version: '0.80' +x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/Makefile.PL new/RPC-XML-0.80/Makefile.PL --- old/RPC-XML-0.79/Makefile.PL 2015-05-01 17:43:46.000000000 +0200 +++ new/RPC-XML-0.80/Makefile.PL 2016-05-08 21:53:02.000000000 +0200 @@ -65,7 +65,7 @@ WriteMakefile( NAME => 'RPC::XML', - VERSION => '0.79', + VERSION => '0.80', AUTHOR => 'Randy J. Ray', ABSTRACT => 'Data, client and server classes for XML-RPC', EXE_FILES => \@scripts, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/README new/RPC-XML-0.80/README --- old/RPC-XML-0.79/README 2015-05-01 17:54:02.000000000 +0200 +++ new/RPC-XML-0.80/README 2016-05-08 22:04:23.000000000 +0200 @@ -1,6 +1,6 @@ RPC::XML - An implementation of XML-RPC -Version: 0.79 +Version: 0.80 WHAT IS IT @@ -66,49 +66,29 @@ CHANGES +* etc/make_method +Make the build reproducible by dropping timestamps in +make_method output. (Niko Tyni) + * t/40_server.t * t/40_server_xmllibxml.t -* t/41_server_hang.t -* t/60_net_server.t -* t/70_compression_detect.t -* t/90_rt54183_sigpipe.t -* t/util.pl -Test clean-up/fixes to address CPAN test failures. Should -address problems with having IO::Socket::IP acting in place of -IO::Socket::INET and also address some issues with a dynloader -bug being triggered by t/70_compression_detect.t. - -* t/00_load.t -* t/10_data.t -* t/11_base64_fh.t -* t/12_nil.t -* t/13_no_deep_recursion.t -* t/14_datetime_iso8601.t -* t/15_serialize.t -* t/20_xml_parser.t -* t/21_xml_libxml.t -* t/25_parser_negative.t -* t/29_parserfactory.t -* t/30_procedure.t -* t/35_namespaces.t -* t/40_server.t -* t/40_server_xmllibxml.t -* t/41_server_hang.t * t/50_client.t -* t/51_client_with_host_header.t +Fixes for test problems with Strawberry Perl. + +* lib/RPC/XML/Client.pm +Fix leak caused by failing to free Expat parser. We don't want +to return from the method until the parser's been freed. We +therefore need to call $parser->release() before the return +statements caused by request failures. (Tom Grimwood-Taylor) + +* lib/RPC/XML/Server.pm +One socket-opt change, one typo corrected. + +* lib/RPC/XML.pm +Applied patch for numeric regexes and critic cleanup. Addresses +GitHub pull request #10 and RT #111636. + * t/60_net_server.t -* t/90_rt50013_parser_bugs.t -* t/90_rt54183_sigpipe.t -* t/90_rt54494_blessed_refs.t -* t/90_rt58065_allow_nil.t -* t/90_rt58323_push_parser.t -* t/util.pl -Perl::Critic clean-up of test suites. - -* lib/RPC/XML/Parser/XMLParser.pm -Fix to prevent a new sprintf-related warning in 5.21. - -* README -* lib/Apache/RPC/status.code -Merge pull request #8 from jkg/docfixes (James Green). Replace -indirect object notation with direct. +RT #99578: Work-around fix for Net::Server+IO::Socket::IP. If a +system's IPv6 declaration of localhost was before the IPv4 +declaration in the hosts file, this test would fail. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/etc/make_method new/RPC-XML-0.80/etc/make_method --- old/RPC-XML-0.79/etc/make_method 2011-08-15 03:01:11.000000000 +0200 +++ new/RPC-XML-0.80/etc/make_method 2015-06-05 09:15:49.000000000 +0200 @@ -363,7 +363,6 @@ } } - my $date = scalar localtime; my %typemap = ( 'm' => 'method', p => 'procedure', @@ -399,7 +398,7 @@ <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE $tag SYSTEM "rpc-method.dtd"> <!-- - Generated automatically by $cmd $VERSION on $date + Generated automatically by $cmd $VERSION Any changes made here will be lost. --> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/lib/RPC/XML/Client.pm new/RPC-XML-0.80/lib/RPC/XML/Client.pm --- old/RPC-XML-0.79/lib/RPC/XML/Client.pm 2014-02-05 16:32:33.000000000 +0100 +++ new/RPC-XML-0.80/lib/RPC/XML/Client.pm 2015-09-28 07:08:44.000000000 +0200 @@ -406,12 +406,16 @@ $response = $self->useragent->request($reqclone, $cb); if ($message = $response->headers->header('X-Died')) { + $parser->release(); + # One of the die's was triggered return ('CODE' eq ref $self->error_handler) ? $self->error_handler->($message) : $message; } if (! $response->is_success) { + $parser->release(); + $message = "$me: HTTP server error: " . $response->message; return ('CODE' eq ref $self->error_handler) ? $self->error_handler->($message) : $message; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/lib/RPC/XML/Server.pm new/RPC-XML-0.80/lib/RPC/XML/Server.pm --- old/RPC-XML-0.79/lib/RPC/XML/Server.pm 2014-02-06 17:17:58.000000000 +0100 +++ new/RPC-XML-0.80/lib/RPC/XML/Server.pm 2015-06-29 03:27:25.000000000 +0200 @@ -171,7 +171,7 @@ $port = delete $args{port} || q{}; $queue = delete $args{queue} || 5; $http = HTTP::Daemon->new( - Reuse => 1, + ReuseAddr => 1, ($host ? (LocalHost => $host) : ()), ($port ? (LocalPort => $port) : ()), ($queue ? (Listen => $queue) : ()) @@ -690,7 +690,7 @@ }; if ((! $eval_return) && $@) { - warn "Cannot close conection: $@\n"; + warn "Cannot close connection: $@\n"; } undef $conn; # Free up any lingering resources diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/lib/RPC/XML.pm new/RPC-XML-0.80/lib/RPC/XML.pm --- old/RPC-XML-0.79/lib/RPC/XML.pm 2014-02-06 17:19:16.000000000 +0100 +++ new/RPC-XML-0.80/lib/RPC/XML.pm 2016-05-07 18:02:48.000000000 +0200 @@ -41,6 +41,8 @@ ## no critic (ProhibitMultiplePackages) # The data-type package names trigger this one: ## no critic (Capitalization) +# The XML escape map now has CR in it but I don't want to use charnames: +## no critic (ProhibitEscapedCharacters) BEGIN { @@ -67,7 +69,7 @@ RPC_NIL) ], all => [ @EXPORT_OK ]); -$VERSION = '1.60'; +$VERSION = '1.61'; $VERSION = eval $VERSION; ## no critic (ProhibitStringyEval) # Global error string @@ -76,12 +78,12 @@ # These are used for stringifying XML-sensitive characters that may appear # in struct keys: %XMLMAP = ( - q{>} => '>', - q{<} => '<', - q{&} => '&', - q{"} => '"', - q{'} => ''', - "\x0d" => '
' + q{>} => '>', + q{<} => '<', + q{&} => '&', + q{"} => '"', + q{'} => ''', + "\x0d" => '
', ); $XMLRE = join q{} => keys %XMLMAP; $XMLRE = qr/([$XMLRE])/; @@ -159,6 +161,13 @@ # This is a (futile?) attempt to provide a "smart" encoding method that will # take a Perl scalar and promote it to the appropriate RPC::XML::_type_. { + # The regex for ints and floats uses [0-9] instead of \d on purpose, to + # only match ASCII digits. + ## no critic (ProhibitEnumeratedClasses) + # The regex for floats is long, but I don't feel like factoring it out + # right now. + ## no critic (ProhibitComplexRegexes) + my $MAX_INT = 2_147_483_647; my $MIN_INT = -2_147_483_648; my $MAX_BIG_INT = 9_223_372_036_854_775_807; @@ -186,50 +195,50 @@ $seenrefs = bless {}, 'RPC::XML::refmap'; } - foreach (@values) + for my $value (@values) { - if (! defined $_) + if (! defined $value) { $type = $ALLOW_NIL ? RPC::XML::nil->new() : RPC::XML::string->new(q{}); } - elsif (ref $_) + elsif (ref $value) { # Skip any that we've already seen - next if $seenrefs->{$_}++; + next if $seenrefs->{$value}++; - if (blessed($_) && - ($_->isa('RPC::XML::datatype') || $_->isa('DateTime'))) + if (blessed($value) && + ($value->isa('RPC::XML::datatype') || $value->isa('DateTime'))) { # Only if the reference is a datatype or a DateTime # instance, do we short-cut here... - if ($_->isa('RPC::XML::datatype')) + if ($value->isa('RPC::XML::datatype')) { # Pass through any that have already been encoded - $type = $_; + $type = $value; } else { # Must be a DateTime object, convert to ISO8601 $type = RPC::XML::datetime_iso8601 - ->new($_->clone->set_time_zone('UTC')); + ->new($value->clone->set_time_zone('UTC')); } } - elsif (reftype($_) eq 'HASH') + elsif (reftype($value) eq 'HASH') { # Per RT 41063, to catch circular refs I can't delegate # to the struct constructor, I have to create my own # copy of the hash with locally-recursively-encoded # values my %newhash; - for my $key (keys %{$_}) + for my $key (keys %{$value}) { # Forcing this into a list-context *should* make the # test be true even if the return value is a hard # undef. Only if the return value is an empty list # should this evaluate as false... - if (my @value = smart_encode($seenrefs, $_->{$key})) + if (my @value = smart_encode($seenrefs, $value->{$key})) { $newhash{$key} = $value[0]; } @@ -237,65 +246,73 @@ $type = RPC::XML::struct->new(\%newhash); } - elsif (reftype($_) eq 'ARRAY') + elsif (reftype($value) eq 'ARRAY') { # This is a somewhat-ugly approach, but I don't want to - # dereference @$_, but I also want people to be able to + # dereference @$value, but I also want people to be able to # pass array-refs in to this constructor and have them # be treated as single elements, as one would expect # (see RT 35106) - # Per RT 41063, looks like I get to deref $_ after all... + # Per RT 41063, looks like I get to deref $value after all... $type = RPC::XML::array->new( - from => [ smart_encode($seenrefs, @{$_}) ] + from => [ smart_encode($seenrefs, @{$value}) ] ); } - elsif (reftype($_) eq 'SCALAR') + elsif (reftype($value) eq 'SCALAR') { # This is a rare excursion into recursion, since the scalar # nature (de-refed from the object, so no longer magic) # will prevent further recursing. - $type = smart_encode($seenrefs, ${$_}); + $type = smart_encode($seenrefs, ${$value}); } else { # If the user passed in a reference that didn't pass one # of the above tests, we can't do anything with it: - $type = reftype $_; + $type = reftype $value; die "Un-convertable reference: $type, cannot use\n"; } - $seenrefs->{$_}--; + $seenrefs->{$value}--; } # You have to check ints first, because they match the # next pattern (for doubles) too elsif (! $FORCE_STRING_ENCODING && - /^[-+]?\d+$/ && - $_ >= $MIN_BIG_INT && - $_ <= $MAX_BIG_INT) + $value =~ /^[-+]?[0-9]+$/ && + $value >= $MIN_BIG_INT && + $value <= $MAX_BIG_INT) { - if (($_ > $MAX_INT) || ($_ < $MIN_INT)) + if (($value > $MAX_INT) || ($value < $MIN_INT)) { - $type = RPC::XML::i8->new($_); + $type = RPC::XML::i8->new($value); } else { - $type = RPC::XML::int->new($_); + $type = RPC::XML::int->new($value); } } # Pattern taken from perldata(1) elsif (! $FORCE_STRING_ENCODING && - /^[+-]?(?=\d|[.]\d)\d*(?:[.]\d*)?(?:[Ee](?:[+-]?\d+))?$/x && - $_ > $MIN_DOUBLE && - $_ < $MAX_DOUBLE) + $value =~ m{ + ^ + [+-]? + (?=[0-9]|[.][0-9]) + [0-9]* + (?:[.][0-9]*)? + (?:[Ee](?:[+-]?[0-9]+))? + $ + }x && + $value > $MIN_DOUBLE && + $value < $MAX_DOUBLE) { - $type = RPC::XML::double->new($_); + $type = RPC::XML::double->new($value); } - elsif (/$DATETIME_REGEXP/) + elsif ($value =~ /$DATETIME_REGEXP/) { - $type = RPC::XML::datetime_iso8601->new($_); + $type = RPC::XML::datetime_iso8601->new($value); } else { - $type = RPC::XML::string->new($_); + $type = RPC::XML::string->new($value); } push @newvalues, $type; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/t/40_server.t new/RPC-XML-0.80/t/40_server.t --- old/RPC-XML-0.79/t/40_server.t 2014-02-17 17:06:15.000000000 +0100 +++ new/RPC-XML-0.80/t/40_server.t 2015-06-30 09:38:00.000000000 +0200 @@ -173,7 +173,7 @@ my @localhostinfo = gethostbyname 'localhost'; my $local_ip = join q{.} => unpack 'C4', $localhostinfo[4]; my @allhosts = ($local_ip, $localhostinfo[0], split q{ } => $localhostinfo[1]); -for (@allhosts) { s/[.]/\\./g } +for (@allhosts) { s/[.]/[.]/g } # Per RT 27778: For some reason gethostbyname('localhost') does not return # "localhost" on win32 if ($^O eq 'MSWin32' || $^O eq 'cygwin') @@ -182,7 +182,7 @@ } if (none { /localdomain/ } @allhosts) { - push @allhosts, 'localhost\.localdomain'; + push @allhosts, 'localhost[.]localdomain'; } my $allhosts = join q{|} => @allhosts; like($srv->url, qr{http://($allhosts):$port}, @@ -224,7 +224,7 @@ # Here goes... $parser = RPC::XML::ParserFactory->new; $UA = LWP::UserAgent->new; -$req = HTTP::Request->new(POST => "http://localhost:$port/"); +$req = HTTP::Request->new(POST => $srv->url); $child = start_server $srv; $req->header(Content_Type => 'text/xml'); @@ -448,12 +448,11 @@ { croak "Server allocation failed, cannot continue. Message was: $srv"; } -$port = $srv->port; # Did it get all of them? is($srv->list_methods(), scalar(@API_METHODS), 'Correct number of methods (defaults)'); -$req = HTTP::Request->new(POST => "http://localhost:$port/"); +$req = HTTP::Request->new(POST => $srv->url); $child = start_server $srv; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/t/40_server_xmllibxml.t new/RPC-XML-0.80/t/40_server_xmllibxml.t --- old/RPC-XML-0.79/t/40_server_xmllibxml.t 2014-02-17 17:56:11.000000000 +0100 +++ new/RPC-XML-0.80/t/40_server_xmllibxml.t 2015-06-30 09:23:49.000000000 +0200 @@ -121,7 +121,7 @@ # Here goes... $parser = RPC::XML::ParserFactory->new; $UA = LWP::UserAgent->new; -$req = HTTP::Request->new(POST => "http://localhost:$port/"); +$req = HTTP::Request->new(POST => $srv->url); $child = start_server $srv; $req->header(Content_Type => 'text/xml'); @@ -297,11 +297,10 @@ { croak "Server allocation failed, cannot continue. Message was: $srv"; } -$port = $srv->port; # Did it get all of them? is($srv->list_methods(), scalar(@API_METHODS), 'Correct number of methods (defaults)'); -$req = HTTP::Request->new(POST => "http://localhost:$port/"); +$req = HTTP::Request->new(POST => $srv->url); $child = start_server $srv; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/t/50_client.t new/RPC-XML-0.80/t/50_client.t --- old/RPC-XML-0.79/t/50_client.t 2014-02-17 23:18:18.000000000 +0100 +++ new/RPC-XML-0.80/t/50_client.t 2015-06-30 18:28:14.000000000 +0200 @@ -21,7 +21,7 @@ use RPC::XML::Server; use RPC::XML::Client; -my ($dir, $vol, $srv, $child, $port, $cli, $res, $flag); +my ($dir, $vol, $srv, $child, $port, $cli, $res, $flag, $srv_url); ($vol, $dir, undef) = File::Spec->splitpath(File::Spec->rel2abs($0)); $dir = File::Spec->catpath($vol, $dir, q{}); @@ -46,7 +46,7 @@ croak 'No usable port found between 9000 and 11000, skipping'; } $cli = RPC::XML::Client->new("http://localhost:$port"); -$cli->timeout(5); #to prevent long waiting for non-existing server +$cli->timeout(5); # to prevent long waiting for non-existing server isa_ok($cli, 'RPC::XML::Client', '$cli'); # With no server yet at that port, test the failure modes @@ -95,6 +95,14 @@ { croak "Failed to create server: $srv, stopped"; } +# Due to issues with Strawberry Perl on Windows, have to explicitly set the +# endpoint to what the server object thinks it is. Also, because of threading +# issues with Strawberry, we need to save the URL value for later use while +# the server is running. +$srv_url = $srv->url; +$cli->uri($srv_url); + +# Start the server... $child = start_server $srv; # NOW, this should work. Also, set $RPC::XML::ERROR to see if it clears @@ -206,8 +214,8 @@ } # Last tests-- is the uri() method working? -like($cli->uri, qr{http://localhost([.]localdomain)?:$port/?}x, - 'RPC::XML::Client::uri method return value is correct'); +is($cli->uri, $srv_url, + 'RPC::XML::Client::uri method return value is correct'); # does calling it as an accesor change it at all? $cli->uri('http://www.oreilly.com/RPC'); @@ -217,6 +225,10 @@ # Kill the server long enough to add a new method stop_server $child; +# Restore the server URL in the client. Due to some threading issues seen in +# Strawberry Perl, must do this while $srv is not running. +$cli->uri($srv->url); + SKIP: { if ($LWP::VERSION <= 5.800) { @@ -253,7 +265,6 @@ $cli->message_file_thresh(-s $fh1); $cli->message_temp_dir($dir); - $cli->uri("http://localhost:$port/"); $res = $cli->send_request(cmpImg => RPC::XML::base64->new($fh1), RPC::XML::base64->new($fh2)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/RPC-XML-0.79/t/60_net_server.t new/RPC-XML-0.80/t/60_net_server.t --- old/RPC-XML-0.79/t/60_net_server.t 2014-02-17 23:52:37.000000000 +0100 +++ new/RPC-XML-0.80/t/60_net_server.t 2016-05-08 22:10:42.000000000 +0200 @@ -21,7 +21,7 @@ use RPC::XML::Client; my ($dir, $srv, $pid_file, $log_file, $port, $client, $res, @keys, $meth, $list, - $bucket, %seen); + $bucket, %seen, $srv_hostname); if ($^O eq 'MSWin32') { @@ -39,6 +39,21 @@ plan tests => 30; } +# Presently, there is a problem with Net::Server+IO::Socket::IP, when the IPv6 +# entry for 'localhost' comes before the IPv4 entry in /etc/hosts. For now, to +# get through the tests, look for that combination and substitute 127.0.0.1 for +# 'localhost' (and hope they don't have a weird network configuration). +# See RT#105679. +if (eval { load IO::Socket::IP; 1; }) +{ + carp 'Working around an issue with Net::Server+IO::Socket::IP'; + $srv_hostname = '127.0.0.1'; +} +else +{ + $srv_hostname = 'localhost'; +} + (undef, $dir, undef) = File::Spec->splitpath(File::Spec->rel2abs($0)); require File::Spec->catfile($dir, 'util.pl'); @@ -69,7 +84,7 @@ log_level => 4, pid_file => $pid_file, port => $port, - host => 'localhost', + host => $srv_hostname, background => 1); sleep 1; # Allow time for server to spin up # Unless we see "ok 2", we have a problem @@ -331,8 +346,4 @@ carp "WARNING: Opening $pid_file failed: $! (zombie processes may remain)"; } -# If we are exiting cleanly, remove the log file. If we croak'd, we should -# never reach this line: -unlink $log_file; - exit; ++++++ cpanspec.yml ++++++ --- /var/tmp/diff_new_pack.bgHSdd/_old 2019-09-02 12:43:22.569768601 +0200 +++ /var/tmp/diff_new_pack.bgHSdd/_new 2019-09-02 12:43:22.581768599 +0200 @@ -5,13 +5,8 @@ # - source1 # - source2 patches: - #PATCH-FIX-OPENSUSE - r...@suse.de - fix build in chroot/buildservice - RPC-XML-0.60-rev127.dif: - RPC-XML-0.76-extern_ent.dif: #PATCH-FIX-UPSTREAM - co...@suse.de RT#86187 RPC-XML-0.77-fixtest.dif: -p1 - #PATCH-FIX-OPENSUSE - co...@suse.de reproducible builds - RPC-XML-0.78-reproducible.diff: -p1 # foo.patch: -p1 # bar.patch: #preamble: |-