From 5f35be06a26bcd94a358ac022ee1e187ed496680c74b39bd987b6aec75281e14 Mon Sep 17 00:00:00 2001 From: Michael Calmer Date: Sun, 5 May 2013 12:09:05 +0000 Subject: [PATCH] - update to version 0.77 * Make RPC::XML::Server work with Net::Server again, after the API changes of Net::Server 2.x. * Correct handling of dateTime parameters * Add port to Host header in client requests. * Fix spelling error in man page * improve tests - remove unused patches which are unused since a long time * RPC-XML-0.53-ext-daemon-and-header-cb.dif * RPC-XML-0.60-fix-utf8.dif OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-RPC-XML?expand=0&rev=23 --- RPC-XML-0.53-ext-daemon-and-header-cb.dif | 77 ----------------------- RPC-XML-0.60-fix-utf8.dif | 23 ------- RPC-XML-0.60-rev127.dif | 10 +-- RPC-XML-0.76.tar.gz | 3 - RPC-XML-0.77.tar.gz | 3 + perl-RPC-XML.changes | 15 +++++ perl-RPC-XML.spec | 18 +++--- 7 files changed, 30 insertions(+), 119 deletions(-) delete mode 100644 RPC-XML-0.53-ext-daemon-and-header-cb.dif delete mode 100644 RPC-XML-0.60-fix-utf8.dif delete mode 100644 RPC-XML-0.76.tar.gz create mode 100644 RPC-XML-0.77.tar.gz diff --git a/RPC-XML-0.53-ext-daemon-and-header-cb.dif b/RPC-XML-0.53-ext-daemon-and-header-cb.dif deleted file mode 100644 index 8d67030..0000000 --- a/RPC-XML-0.53-ext-daemon-and-header-cb.dif +++ /dev/null @@ -1,77 +0,0 @@ -Index: lib/RPC/XML/Server.pm -=================================================================== ---- lib/RPC/XML/Server.pm.orig -+++ lib/RPC/XML/Server.pm -@@ -136,6 +136,11 @@ sub new - $self->{__host} = $args{host} || ''; - $self->{__port} = $args{port} || ''; - delete @args{qw(host port)}; -+ } elsif( ref($args{http_daemon}) ) { -+ $self->{__daemon} = $args{http_daemon}; -+ $self->{__http_header_parsing_cb} = $args{http_header_parsing_cb}; -+ delete $args{http_daemon}; -+ delete $args{http_header_parsing_cb}; - } - else - { -@@ -154,9 +159,10 @@ sub new - $self->{__host} = $URI->host; - $self->{__port} = $URI->port; - $self->{__daemon} = $http; -+ $self->{__http_header_parsing_cb} = $args{http_header_parsing_cb}; - - # Remove those we've processed -- delete @args{qw(host port queue)}; -+ delete @args{qw(host port queue http_header_parsing_cb)}; - } - $resp = HTTP::Response->new(); - return "${class}::new: Unable to create HTTP::Response object" -@@ -533,6 +539,23 @@ If a message is to be spooled to a tempo - specific directory in which to open those files. If this is not given, then - the C method from the B package is used, instead. - -+=item daemon -+ -+you can provide a daemon object here, so RPC::XML::Server will not use -+it's own HTTP::Daemon but your provided daemon object. -+This parameter is optional. -+ -+=item http_header_parsing_cb -+ -+must be a code reference which will be called before anything else happens -+to the HTTP data stream. It can be used to parse the HTTP header for HTTP -+authentication checks and stuff like that. -+This callback function will get the request object (HTTP::Request) -+and the connection object (HTTP::Daemon::Clientconn) as parameters. -+If the callback function does not return a true value, no further processing -+of the request will be done. -+This parameter is optional. -+ - =back - - Any other keys in the options hash not explicitly used by the constructor are -@@ -1124,7 +1147,6 @@ Randy J. Ray - - =cut - --__END__ - - ############################################################################### - # -@@ -1445,6 +1467,11 @@ sub process_request - $peerhost = $conn->peerhost; - while ($req = $conn->get_request('headers only')) - { -+ if( ref($self->{__http_header_parsing_cb}) eq 'CODE' ) { -+ # we terminate connection unless header parsing -+ # returns a true value -+ next unless( $self->{__http_header_parsing_cb}->( $req, $conn ) ); -+ } - if ($req->method eq 'HEAD') - { - # The HEAD method will be answered with our return headers, -@@ -2152,3 +2179,4 @@ sub timeout - } - return $old_timeout; - } -+__END__ diff --git a/RPC-XML-0.60-fix-utf8.dif b/RPC-XML-0.60-fix-utf8.dif deleted file mode 100644 index 5e4e5c6..0000000 --- a/RPC-XML-0.60-fix-utf8.dif +++ /dev/null @@ -1,23 +0,0 @@ -Index: RPC-XML-0.67/lib/RPC/XML.pm -=================================================================== ---- RPC-XML-0.67.orig/lib/RPC/XML.pm -+++ RPC-XML-0.67/lib/RPC/XML.pm -@@ -1023,7 +1023,9 @@ sub as_string - { - my $self = shift; - -- '' . $self->SUPER::as_string . ''; -+ my $text = '' . $self->SUPER::as_string . ''; -+ utf8::downgrade($text) if(utf8::is_utf8($text)); -+ $text; - } - - # Again, only differs from struct in that it has some extra wrapped around it. -@@ -1314,6 +1316,7 @@ sub as_string - ''; - } - $text .= ''; -+ utf8::downgrade($text) if(utf8::is_utf8($text)); - - $text; - } diff --git a/RPC-XML-0.60-rev127.dif b/RPC-XML-0.60-rev127.dif index 7b2bf88..4003520 100644 --- a/RPC-XML-0.60-rev127.dif +++ b/RPC-XML-0.60-rev127.dif @@ -1,8 +1,8 @@ Index: t/40_server.t =================================================================== ---- t/40_server.t.orig 2010-10-22 10:15:38.000000000 +0200 -+++ t/40_server.t 2011-03-22 07:35:52.549287223 +0100 -@@ -63,8 +63,9 @@ isa_ok($srv, 'RPC::XML::Server', '$srv<2 +--- t/40_server.t.orig ++++ t/40_server.t +@@ -164,8 +164,9 @@ isa_ok($srv, 'RPC::XML::Server', '$srv<2 # 22/09/2008 - Just allow for anything the user has attached to this address. # Aliases keep causing this test to falsely fail. my @localhostinfo = gethostbyname('localhost'); @@ -15,8 +15,8 @@ Index: t/40_server.t # "localhost" on win32 Index: t/40_server_xmllibxml.t =================================================================== ---- t/40_server_xmllibxml.t.orig 2010-10-22 10:15:38.000000000 +0200 -+++ t/40_server_xmllibxml.t 2011-03-22 07:36:56.583394893 +0100 +--- t/40_server_xmllibxml.t.orig ++++ t/40_server_xmllibxml.t @@ -80,8 +80,9 @@ isa_ok($srv, 'RPC::XML::Server', '$srv<2 # 22/09/2008 - Just allow for anything the user has attached to this address. # Aliases keep causing this test to falsely fail. diff --git a/RPC-XML-0.76.tar.gz b/RPC-XML-0.76.tar.gz deleted file mode 100644 index 0251b2f..0000000 --- a/RPC-XML-0.76.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bde9e1de5d550badaf03e2670c7b760212d41601e0d2a157c107d55972adb0cc -size 203771 diff --git a/RPC-XML-0.77.tar.gz b/RPC-XML-0.77.tar.gz new file mode 100644 index 0000000..2808087 --- /dev/null +++ b/RPC-XML-0.77.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e38c5d131e8c29f41ca39ac1e4b7abd33ed1c9b417e0d8ac1c24a056ce7e6f5a +size 205679 diff --git a/perl-RPC-XML.changes b/perl-RPC-XML.changes index bc0c74f..2991cf5 100644 --- a/perl-RPC-XML.changes +++ b/perl-RPC-XML.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sun May 5 12:05:08 UTC 2013 - mc@suse.com + +- update to version 0.77 + * Make RPC::XML::Server work with Net::Server again, + after the API changes of Net::Server 2.x. + * Correct handling of dateTime parameters + * Add port to Host header in client requests. + * Fix spelling error in man page + * improve tests +- remove unused patches which are unused since a long time + * RPC-XML-0.53-ext-daemon-and-header-cb.dif + * RPC-XML-0.60-fix-utf8.dif + + ------------------------------------------------------------------- Mon Jun 4 18:12:08 CEST 2012 - mls@suse.de diff --git a/perl-RPC-XML.spec b/perl-RPC-XML.spec index ea133ca..eeb0c6e 100644 --- a/perl-RPC-XML.spec +++ b/perl-RPC-XML.spec @@ -1,7 +1,7 @@ # # spec file for package perl-RPC-XML # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: perl-RPC-XML -Version: 0.76 +Version: 0.77 Release: 0 %define cpan_name RPC-XML Summary: A set of classes for core data, message and XML handling @@ -25,13 +25,9 @@ License: GPL-1.0+ or Artistic-1.0 Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/RPC-XML/ Source: http://www.cpan.org/authors/id/R/RJ/RJRAY/RPC-XML-%{version}.tar.gz -# UNCLEAR -Source1: RPC-XML-0.53-ext-daemon-and-header-cb.dif -# UNCLEAR -Source2: RPC-XML-0.60-fix-utf8.dif #PATCH-FIX-OPENSUSE - ro@suse.de - fix build in chroot/buildservice -Patch2: RPC-XML-0.60-rev127.dif -Patch3: RPC-XML-0.76-extern_ent.dif +Patch1: RPC-XML-0.60-rev127.dif +Patch2: RPC-XML-0.76-extern_ent.dif BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(File::Spec) >= 0.8 @@ -40,12 +36,12 @@ BuildRequires: perl(Scalar::Util) >= 1.19 BuildRequires: perl(XML::LibXML) >= 1.70 BuildRequires: perl(XML::Parser) >= 2.31 BuildRequires: perl(constant) >= 1.03 -Requires: perl(constant) >= 1.03 Requires: perl(File::Spec) >= 0.8 Requires: perl(LWP) >= 5.834 Requires: perl(Scalar::Util) >= 1.19 Requires: perl(XML::LibXML) >= 1.70 Requires: perl(XML::Parser) >= 2.31 +Requires: perl(constant) >= 1.03 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %{perl_requires} @@ -66,8 +62,8 @@ RPC::XML::Server manpage, respectively. %prep %setup -q -n %{cpan_name}-%{version} -%patch2 -p0 -%patch3 +%patch1 -p0 +%patch2 %build %{__perl} Makefile.PL INSTALLDIRS=vendor