Hello community,
here is the log from the commit of package perl-IO-Socket-INET6 for openSUSE:Factory
checked in at Mon Jul 19 15:04:04 CEST 2010.
--------
--- perl-IO-Socket-INET6/perl-IO-Socket-INET6.changes 2010-03-26 11:44:09.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-IO-Socket-INET6/perl-IO-Socket-INET6.changes 2010-07-16 17:32:10.000000000 +0200
@@ -1,0 +2,10 @@
+Fri Jul 16 15:08:28 CEST 2010 - anicka@suse.cz
+
+- update to 2.65
+ * Add a fix for t/io_multihomed6.t to make sure ok 3 will be
+ printed before ok 4
+ * Applied a modified patch to t/io_multihomed6.t to correct
+ the test on Fedora 10 and others
+ * Solved "problems with multihomed and family order"
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
IO-Socket-INET6-2.61.tar.bz2
New:
----
IO-Socket-INET6-2.65.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-IO-Socket-INET6.spec ++++++
--- /var/tmp/diff_new_pack.ChIcD2/_old 2010-07-19 15:03:50.000000000 +0200
+++ /var/tmp/diff_new_pack.ChIcD2/_new 2010-07-19 15:03:50.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package perl-IO-Socket-INET6 (Version 2.61)
+# spec file for package perl-IO-Socket-INET6 (Version 2.65)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,7 +20,7 @@
Name: perl-IO-Socket-INET6
BuildRequires: perl-Socket6
-Version: 2.61
+Version: 2.65
Release: 1
Requires: perl = %{perl_version}
Requires: perl-Socket6
++++++ IO-Socket-INET6-2.61.tar.bz2 -> IO-Socket-INET6-2.65.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IO-Socket-INET6-2.61/ChangeLog new/IO-Socket-INET6-2.65/ChangeLog
--- old/IO-Socket-INET6-2.61/ChangeLog 2010-03-25 09:45:16.000000000 +0100
+++ new/IO-Socket-INET6-2.65/ChangeLog 2010-06-11 11:54:10.000000000 +0200
@@ -1,3 +1,29 @@
+2010-06-11 Shlomi Fish
+ * Add a fix for t/io_multihomed6.t to make sure
+ ok 3 will be printed before ok 4. due to many failures in the tests.
+ Such as:
+ - http://www.cpantesters.org/cpan/report/07413426-b19f-3f77-b713-d32bba55d77f
+ * New Release IO-Socket-INET6-2.65
+
+2010-06-08 Shlomi Fish
+ * Applied a patch to fix t/io_multihomed6.t on old Perls / old Linux
+ distributions:
+ - https://rt.cpan.org/Ticket/Display.html?id=58198
+ - Thanks to Paul.
+ * New Release IO-Socket-INET6-2.64
+
+2010-05-29 Shlomi Fish
+ * Applied a modified patch to t/io_multihomed6.t to correct the test
+ on Fedora 10 and others:
+ - https://rt.cpan.org/Public/Bug/Display.html?id=57676
+ * New Release IO-Socket-INET6-2.63
+
+2010-05-20 Shlomi Fish
+ * Solved "problems with multihomed and family order"
+ - https://rt.cpan.org/Ticket/Display.html?id=57676
+ - Thanks to Steffen Ullrich
+ * New Release IO-Socket-INET6-2.62
+
2010-03-25 Shlomi Fish
* Fix the inet_pton / inet_ntop import warnings:
- https://rt.cpan.org/Ticket/Display.html?id=55901
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IO-Socket-INET6-2.61/META.yml new/IO-Socket-INET6-2.65/META.yml
--- old/IO-Socket-INET6-2.61/META.yml 2010-03-25 09:45:16.000000000 +0100
+++ new/IO-Socket-INET6-2.65/META.yml 2010-06-11 11:54:10.000000000 +0200
@@ -8,7 +8,7 @@
Test::More: 0
configure_requires:
Module::Build: 0.36
-generated_by: 'Module::Build version 0.3603'
+generated_by: 'Module::Build version 0.3607'
keywords:
- inet6
- input
@@ -27,7 +27,7 @@
provides:
IO::Socket::INET6:
file: lib/IO/Socket/INET6.pm
- version: 2.61
+ version: 2.65
requires:
Carp: 0
Errno: 0
@@ -40,4 +40,4 @@
resources:
license: http://dev.perl.org/licenses/
repository: http://svn.berlios.de/svnroot/repos/web-cpan/IO-Socket-INET6/
-version: 2.61
+version: 2.65
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IO-Socket-INET6-2.61/Makefile.PL new/IO-Socket-INET6-2.65/Makefile.PL
--- old/IO-Socket-INET6-2.61/Makefile.PL 2010-03-25 09:45:16.000000000 +0100
+++ new/IO-Socket-INET6-2.65/Makefile.PL 2010-06-11 11:54:10.000000000 +0200
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.3603
+# Note: this file was auto-generated by Module::Build::Compat version 0.3607
use ExtUtils::MakeMaker;
WriteMakefile
(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IO-Socket-INET6-2.61/lib/IO/Socket/INET6.pm new/IO-Socket-INET6-2.65/lib/IO/Socket/INET6.pm
--- old/IO-Socket-INET6-2.61/lib/IO/Socket/INET6.pm 2010-03-25 09:45:16.000000000 +0100
+++ new/IO-Socket-INET6-2.65/lib/IO/Socket/INET6.pm 2010-06-11 11:54:10.000000000 +0200
@@ -27,7 +27,7 @@
use Errno;
@ISA = qw(IO::Socket);
-$VERSION = "2.61";
+$VERSION = "2.65";
#Purpose: allow protocol independent protocol and original interface.
my $EINVAL = exists(&Errno::EINVAL) ? Errno::EINVAL() : 1;
@@ -177,16 +177,21 @@
}
my @flr;
- for( my $l=0;$l<@lres;$l+=5) {
- my $fam_listen = $lres[$l];
- my $lsockaddr = $lres[$l+3];
- if (@rres) {
- # collect all combinations whith the same family in lres and rres
- for( my $r=0;$r<@rres;$r+=5 ) {
- next if $rres[0] != $fam_listen; # must be same family
- push @flr,[ $fam_listen,$lsockaddr,$rres[$r+3] ];
+ if (@rres) {
+ # collect all combinations whith the same family in lres and rres
+ # the order we search should be defined by the order of @rres,
+ # not @lres!
+ for( my $r=0;$r<@rres;$r+=5 ) {
+ for( my $l=0;$l<@lres;$l+=5) {
+ my $fam_listen = $lres[$l];
+ next if $rres[$r] != $fam_listen; # must be same family
+ push @flr,[ $fam_listen,$lres[$l+3],$rres[$r+3] ];
}
- } else {
+ }
+ } else {
+ for( my $l=0;$l<@lres;$l+=5) {
+ my $fam_listen = $lres[$l];
+ my $lsockaddr = $lres[$l+3];
# collect only the binding side
push @flr,[ $fam_listen,$lsockaddr ];
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/IO-Socket-INET6-2.61/t/io_multihomed6.t new/IO-Socket-INET6-2.65/t/io_multihomed6.t
--- old/IO-Socket-INET6-2.61/t/io_multihomed6.t 2010-03-25 09:45:16.000000000 +0100
+++ new/IO-Socket-INET6-2.65/t/io_multihomed6.t 2010-06-11 11:54:10.000000000 +0200
@@ -1,9 +1,12 @@
-#!./perl
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
BEGIN {
unless(grep /blib/, @INC) {
- chdir 't' if -d 't';
- @INC = '../lib';
+ chdir 't' if -d 't';
+ unshift @INC,'../lib';
}
}
@@ -11,93 +14,169 @@
BEGIN {
if(-d "lib" && -f "TEST") {
- my $reason;
- if (! $Config{'d_fork'}) {
- $reason = 'no fork';
- }
- elsif ($Config{'extensions'} !~ /\bSocket\b/) {
- $reason = 'Socket extension unavailable';
- }
- elsif ($Config{'extensions'} !~ /\bSocket6\b/) {
- $reason = 'Socket6 extension unavailable';
- }
- elsif ($Config{'extensions'} !~ /\bIO\b/) {
- $reason = 'IO extension unavailable';
- }
- if ($reason) {
- print "1..0 # Skip: $reason\n";
- exit 0;
+ my $reason;
+ if (! $Config{'d_fork'}) {
+ $reason = 'no fork';
+ }
+ elsif ($Config{'extensions'} !~ /\bSocket\b/) {
+ $reason = 'Socket extension unavailable';
+ }
+ elsif ($Config{'extensions'} !~ /\bSocket6\b/) {
+ $reason = 'Socket6 extension unavailable';
+ }
+ elsif ($Config{'extensions'} !~ /\bIO\b/) {
+ $reason = 'IO extension unavailable';
+ }
+ if ($reason) {
+ print "1..0 # SKIP $reason\n";
+ exit 0;
}
}
if ($^O eq 'MSWin32') {
- print "1..0 # Skip: accept() fails for IPv6 under MSWin32\n";
+ print "1..0 # SKIP accept() fails for IPv6 under MSWin32\n";
exit 0;
}
}
-$| = 1;
+# check that localhost resolves to 127.0.0.1 and ::1
+# otherwise the test will not work
+use Socket;
+use Socket6;
-print "1..5\n";
+{
+ my %resolved_addresses;
-eval {
- $SIG{ALRM} = sub { die; };
- alarm 60;
-};
+ my @r = getaddrinfo('localhost',1);
-# Okey:
-# To check the Multihome strategy, let's try the next :
-# Open a IPv4 server on a given port.
-# then, try a client on unspecified family -AF_UNSPEC-
-# The multihomed socket will try then firstly IPv6, fail,
-# and then IPv4.
-package main;
+ if (@r < 5) {
+ print "1..0 # SKIP getaddrinfo('localhost',1) failed: $r[0]\n";
+ exit 0;
+ }
-use IO::Socket::INET6;
+ while (@r) {
+ my @values = splice(@r,0,5);
+ my ($fam,$addr) = @values[0,3];
+ $addr =
+ (
+ ($fam == AF_INET)
+ ? ( (unpack_sockaddr_in($addr))[1] )
+ : ( (unpack_sockaddr_in6($addr))[1] )
+ );
+ $resolved_addresses{inet_ntop($fam,$addr)}++;
+ }
+ if (! $resolved_addresses{'127.0.0.1'} || ! $resolved_addresses{'::1'}) {
+ print "1..0 # SKIP localhost does not resolve to both 127.0.0.1 and ::1\n";
+ exit 0;
+ }
+}
-$listen = IO::Socket::INET6->new(Listen => 2,
- # 8080 is a commonly used port
- # so we're using a more obscure port
- # instead.
- LocalPort => 28083,
- Family => AF_INET,
- Proto => 'tcp',
- Timeout => 5,
- ) or die "$@";
+use IO::Socket::INET6;
-print "ok 1\n";
+$| = 1;
+print "1..8\n";
-$port = $listen->sockport;
+eval {
+ $SIG{ALRM} = sub { die; };
+ alarm 60;
+};
-if($pid = fork()) {
+# find out if the host prefers inet or inet6 by offering
+# both and checking where it connects
+my ($port,@srv);
+for my $addr ( '127.0.0.1','::1' ) {
+ push @srv,
+ IO::Socket::INET6->new(
+ Listen => 2,
+ LocalAddr => $addr,
+ LocalPort => $port,
+ ) or die "listen on $addr port $port: $!";
+ $port ||= $srv[-1]->sockport;
+}
- $sock = $listen->accept() or die "$!";
- print "ok 2\n";
+print "ok 1\n";
- print $sock->getline();
- print $sock "ok 4\n";
+if (my $pid = fork()) {
+ my $vec = '';
+ vec($vec,fileno($_),1) = 1 for(@srv);
+ select($vec,undef,undef,5) or die $!;
+
+ # connected to first, not second
+ my ($first,$second) = vec($vec,fileno($srv[0]),1) ? @srv[0,1]:@srv[1,0];
+ my $cl = $first->accept or die $!;
+
+ # listener should not work for next connect
+ # so it needs to try second
+ close($first);
+
+ # make sure established connection works
+ my $fam0 = ( $cl->sockdomain == AF_INET ) ? 'inet':'inet6';
+ print {$cl} "ok 2 # $fam0\n";
+ print $cl->getline(); # ok 3
+ # So we'll be sure ok 3 has already been printed.
+ print {$cl} "Move on, will ya!\n";
+ close($cl);
+
+ # ... ok 4 comes when client fails to connect to first
+
+ # wait for connect on second and make sure it works
+ $vec = '';
+ vec($vec,fileno($second),1) = 1;
+ if ( select($vec,undef,undef,5)) {
+ my $cl2 = $second->accept or die $!;
+ my $fam1 = ( $cl2->sockdomain == AF_INET ) ? 'inet':'inet6';
+ print {$cl2} "ok 5 # $fam1\n";
+ print $cl2->getline(); # ok 6
+ close($cl2);
+
+ # should be different families
+ print "not " if $fam0 eq $fam1;
+ print "ok 7\n";
+ }
waitpid($pid,0);
+ print "ok 8\n";
- $sock->close;
-
- print "ok 5\n";
-
-} elsif(defined $pid) {
-
- $sock = IO::Socket::INET6->new(PeerPort => $port,
- Proto => 'tcp',
- PeerAddr => 'localhost',
- MultiHomed => 1,
- Timeout => 1,
- ) or die "$@";
-
- print $sock "ok 3\n";
- sleep(1); # race condition
- print $sock->getline();
-
- $sock->close;
+} elsif (defined $pid) {
+ close($_) for (@srv);
+ # should work because server is listening on inet and inet6
+ my $cl = IO::Socket::INET6->new(
+ PeerPort => $port,
+ PeerAddr => 'localhost',
+ Timeout => 5,
+ ) or die "$@";
+
+ print $cl->getline(); # ok 2
+ print {$cl} "ok 3\n";
+ # So we'll be sure ok 3 has already been printed.
+ $cl->getline();
+ close($cl);
+
+ # this should not work because listener is closed
+ if ( $cl = IO::Socket::INET6->new(
+ PeerPort => $port,
+ PeerAddr => 'localhost',
+ Timeout => 5,
+ )) {
+ print "not ok 4\n";
+ exit;
+ }
+ print "ok 4\n";
+ # but same thing with multihoming should work because server
+ # is still listening on the other family
+ $cl = IO::Socket::INET6->new(
+ PeerPort => $port,
+ PeerAddr => 'localhost',
+ Timeout => 5,
+ MultiHomed => 1,
+ ) or do {
+ print "not ok 5\n";
+ exit;
+ };
+ print $cl->getline(); # ok 5
+ print {$cl} "ok 6\n";
exit;
+
} else {
- die;
+ die $!; # fork failed
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org