commit perl-Starman for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Starman for openSUSE:Factory checked in at 2023-09-29 21:14:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Starman (Old) and /work/SRC/openSUSE:Factory/.perl-Starman.new.28202 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-Starman" Fri Sep 29 21:14:16 2023 rev:4 rq:1114047 version:0.4017 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Starman/perl-Starman.changes 2022-09-27 20:14:53.389952980 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Starman.new.28202/perl-Starman.changes 2023-09-29 21:15:52.134716977 +0200 @@ -1,0 +2,10 @@ +Thu Sep 14 03:09:01 UTC 2023 - Tina Müller <timueller+perl@suse.de> + +- updated to 0.4017 + see /usr/share/doc/packages/perl-Starman/Changes + + 0.4017 2023-09-13 13:27:02 PDT + - Handle EINTR when doing sysread calls (Rob Mueller) #148 + - Requires perl 5.14 + +------------------------------------------------------------------- Old: ---- Starman-0.4016.tar.gz New: ---- Starman-0.4017.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Starman.spec ++++++ --- /var/tmp/diff_new_pack.46zXy9/_old 2023-09-29 21:15:53.306759264 +0200 +++ /var/tmp/diff_new_pack.46zXy9/_new 2023-09-29 21:15:53.306759264 +0200 @@ -1,7 +1,7 @@ # # spec file for package perl-Starman # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define cpan_name Starman Name: perl-Starman -Version: 0.4016 +Version: 0.4017 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: High-performance preforking PSGI/Plack web server @@ -97,7 +97,8 @@ %prep %autosetup -n %{cpan_name}-%{version} -find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644 + +find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644 %build perl Build.PL --installdirs=vendor ++++++ Starman-0.4016.tar.gz -> Starman-0.4017.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Starman-0.4016/Changes new/Starman-0.4017/Changes --- old/Starman-0.4016/Changes 2022-09-13 19:11:36.000000000 +0200 +++ new/Starman-0.4017/Changes 2023-09-13 22:27:04.000000000 +0200 @@ -1,5 +1,9 @@ Revision history for Perl extension Starman +0.4017 2023-09-13 13:27:02 PDT + - Handle EINTR when doing sysread calls (Rob Mueller) #148 + - Requires perl 5.14 + 0.4016 2022-09-13 10:11:34 PDT - Add psgix.informational callback #146 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Starman-0.4016/MANIFEST new/Starman-0.4017/MANIFEST --- old/Starman-0.4016/MANIFEST 2022-09-13 19:11:36.000000000 +0200 +++ new/Starman-0.4017/MANIFEST 2023-09-13 22:27:04.000000000 +0200 @@ -19,6 +19,7 @@ t/chunked_termination.t t/chunked_zero_length.t t/early-hints.t +t/eintr.t t/expect.t t/findbin.psgi t/harakiri.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Starman-0.4016/META.json new/Starman-0.4017/META.json --- old/Starman-0.4016/META.json 2022-09-13 19:11:36.000000000 +0200 +++ new/Starman-0.4017/META.json 2023-09-13 22:27:04.000000000 +0200 @@ -4,7 +4,7 @@ "Tatsuhiko Miyagawa <miyagawa@bulknews.net>" ], "dynamic_config" : 0, - "generated_by" : "Dist::Milla version v1.0.21, Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Milla version v1.0.22, Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -34,7 +34,7 @@ }, "develop" : { "requires" : { - "Dist::Milla" : "v1.0.21", + "Dist::Milla" : "v1.0.22", "LWP::Protocol::https" : "0", "Test::Pod" : "1.41" } @@ -76,7 +76,7 @@ "web" : "https://github.com/miyagawa/Starman" } }, - "version" : "0.4016", + "version" : "0.4017", "x_contributors" : [ "Adam Guthrie <adam.guthrie@dvlgames.com>", "Alex Vandiver <alex@chmrr.net>", @@ -103,6 +103,7 @@ "Robert Olson <olson@mcs.anl.gov>", "Robert Rothenberg <rrwo@cpan.org>", "Robert Sedlacek <r.sedlacek@shadowcat.co.uk>", + "Rob Mueller <robm@fastmailteam.com>", "Slobodan Mi\u0161kovi\u0107 <slobodan@miskovic.ca>", "spleenjack <spleenjack@gmail.com>", "Tatsuhiko Miyagawa <tmiyagawa@fastly.com>", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Starman-0.4016/META.yml new/Starman-0.4017/META.yml --- old/Starman-0.4016/META.yml 2022-09-13 19:11:36.000000000 +0200 +++ new/Starman-0.4017/META.yml 2023-09-13 22:27:04.000000000 +0200 @@ -9,7 +9,7 @@ configure_requires: Module::Build::Tiny: '0.034' dynamic_config: 0 -generated_by: 'Dist::Milla version v1.0.21, Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Milla version v1.0.22, Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -37,7 +37,7 @@ bugtracker: https://github.com/miyagawa/Starman/issues homepage: https://github.com/miyagawa/Starman repository: https://github.com/miyagawa/Starman.git -version: '0.4016' +version: '0.4017' x_contributors: - 'Adam Guthrie <adam.guthrie@dvlgames.com>' - 'Alex Vandiver <alex@chmrr.net>' @@ -64,6 +64,7 @@ - 'Robert Olson <olson@mcs.anl.gov>' - 'Robert Rothenberg <rrwo@cpan.org>' - 'Robert Sedlacek <r.sedlacek@shadowcat.co.uk>' + - 'Rob Mueller <robm@fastmailteam.com>' - 'Slobodan Mišković <slobodan@miskovic.ca>' - 'spleenjack <spleenjack@gmail.com>' - 'Tatsuhiko Miyagawa <tmiyagawa@fastly.com>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Starman-0.4016/lib/Starman/Server.pm new/Starman-0.4017/lib/Starman/Server.pm --- old/Starman-0.4016/lib/Starman/Server.pm 2022-09-13 19:11:36.000000000 +0200 +++ new/Starman-0.4017/lib/Starman/Server.pm 2023-09-13 22:27:04.000000000 +0200 @@ -348,7 +348,7 @@ last if $self->{client}->{inputbuf} ne '' && $self->{client}->{inputbuf} =~ /$CR?$LF$CR?$LF/s; # If not, read some data - my $read = sysread $self->{server}->{client}, my $buf, CHUNKSIZE; + my $read = _sysread($self->{server}->{client}, my $buf, CHUNKSIZE); if ( !defined $read || $read == 0 ) { die "Read error: $!\n"; @@ -409,7 +409,7 @@ my $chunk = delete $self->{client}->{inputbuf}; return ($chunk, length $chunk); } - my $read = sysread $self->{server}->{client}, my($chunk), CHUNKSIZE; + my $read = _sysread($self->{server}->{client}, my($chunk), CHUNKSIZE); return ($chunk, $read); }; @@ -580,6 +580,13 @@ } } +sub _sysread { + while (1) { + my $len = sysread $_[0], $_[1], $_[2]; + return $len if defined $len or $! != EINTR; + } +} + sub _write_informational { my ($conn, $code, $headers) = @_; my $message = HTTP::Status::status_message($code); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Starman-0.4016/lib/Starman.pm new/Starman-0.4017/lib/Starman.pm --- old/Starman-0.4016/lib/Starman.pm 2022-09-13 19:11:36.000000000 +0200 +++ new/Starman-0.4017/lib/Starman.pm 2023-09-13 22:27:04.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use 5.008_001; -our $VERSION = '0.4016'; +our $VERSION = '0.4017'; 1; __END__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Starman-0.4016/t/eintr.t new/Starman-0.4017/t/eintr.t --- old/Starman-0.4016/t/eintr.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Starman-0.4017/t/eintr.t 2023-09-13 22:27:04.000000000 +0200 @@ -0,0 +1,74 @@ +use strict; +use Starman::Server; +use Plack::Test; +use HTTP::Request; +use Test::More; +use File::Temp qw(tempfile); +use Time::HiRes qw(sleep); + +my $fh = tempfile; +$fh->autoflush(1); + +# When a child handles our request, write it's pid to the temp file +{ + no warnings 'redefine'; + my $old_process_request = \&Starman::Server::process_request; + *Starman::Server::process_request = sub { + seek $fh, 0, 0; + print $fh $$; + goto &$old_process_request; + }; +} + +$Plack::Test::Impl = "Server"; +$ENV{PLACK_SERVER} = 'Starman'; + +my $app = sub { + my $env = shift; + my $body; + my $clen = $env->{CONTENT_LENGTH}; + while ($clen > 0) { + $env->{'psgi.input'}->read(my $buf, $clen) or last; + $clen -= length $buf; + $body .= $buf; + } + return [ 200, [ 'Content-Type', 'text/plain', 'X-Content-Length', $env->{CONTENT_LENGTH} ], [ $body ] ]; +}; + +test_psgi $app, sub { + my $cb = shift; + + my $c = 0; + + my $req = HTTP::Request->new(POST => "http://localhost/"); + $req->content(sub { + $c++; + + # Send some chunked content + return "abcde" if $c == 1; + + # Child should be processing request, get pid + seek $fh, 0, 0; + sysread $fh, my $pid, 100; + + # Ensure child is waiting on a sysread + sleep 0.1; + + kill 'HUP', $pid if $pid; + + # Ensure child received HUP before sending more data + sleep 0.1; + + # Now send it some more content + return "abcde" if $c <= 5; + + return undef; + }); + + my $res = $cb->($req); + + # We should have got 5 x 5 bytes or 25 bytes total + is $res->header('X-Content-Length'), 25; +}; + +done_testing;
participants (1)
-
Source-Sync