aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-server-starter/fix-localhost.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-09-29 10:13:07 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-09-29 10:14:59 +0000
commit4422d8b53d4edecb5f214d205f3ab9c0f3ee64a4 (patch)
tree1a51d1556d86d922f105b100ddbfcad60e760665 /main/perl-server-starter/fix-localhost.patch
parent6b5978e17b26e57f1ab9f1691b4a910d3c865309 (diff)
downloadaports-4422d8b53d4edecb5f214d205f3ab9c0f3ee64a4.tar.bz2
aports-4422d8b53d4edecb5f214d205f3ab9c0f3ee64a4.tar.xz
main/perl-server-starter: fix tests on vserver builders
vserver does not let 0.0.0.0 bind to 127.0.0.1, where as the client assumed to connect 127.0.0.1. this fixes the tests to connect to 'localhost' which is usually the vserver specific dummy0 address where 0.0.0.0 bind is redirected to.
Diffstat (limited to 'main/perl-server-starter/fix-localhost.patch')
-rw-r--r--main/perl-server-starter/fix-localhost.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/main/perl-server-starter/fix-localhost.patch b/main/perl-server-starter/fix-localhost.patch
new file mode 100644
index 0000000000..3e60f579db
--- /dev/null
+++ b/main/perl-server-starter/fix-localhost.patch
@@ -0,0 +1,69 @@
+--- Server-Starter-0.11.orig/inc/Test/TCP.pm
++++ Server-Starter-0.11/inc/Test/TCP.pm
+@@ -32,7 +32,7 @@
+ next if _check_port($port);
+ my $sock = IO::Socket::INET->new(
+ Listen => 5,
+- LocalAddr => '127.0.0.1',
++ LocalAddr => 'localhost',
+ LocalPort => $port,
+ Proto => 'tcp',
+ (($^O eq 'MSWin32') ? () : (ReuseAddr => 1)),
+@@ -90,7 +90,7 @@
+
+ my $remote = IO::Socket::INET->new(
+ Proto => 'tcp',
+- PeerAddr => '127.0.0.1',
++ PeerAddr => 'localhost',
+ PeerPort => $port,
+ );
+ if ($remote) {
+--- Server-Starter-0.11.orig/t/01-starter.t
++++ Server-Starter-0.11/t/01-starter.t
+@@ -31,7 +31,7 @@
+ my $buf;
+ #sleep 1;
+ my $sock = IO::Socket::INET->new(
+- PeerAddr => "127.0.0.1:$port",
++ PeerAddr => "localhost:$port",
+ Proto => 'tcp',
+ );
+ ok($sock, 'connect');
+@@ -61,7 +61,7 @@
+ 'signal sent on hup',
+ );
+ $sock = IO::Socket::INET->new(
+- PeerAddr => "127.0.0.1:$port",
++ PeerAddr => "localhost:$port",
+ Proto => 'tcp',
+ );
+ ok($sock, 'reconnect');
+--- Server-Starter-0.11.orig/t/02-startfail.t
++++ Server-Starter-0.11/t/02-startfail.t
+@@ -20,7 +20,7 @@
+ sleep 3;
+ {
+ my $sock = IO::Socket::INET->new(
+- PeerAddr => "127.0.0.1:$port",
++ PeerAddr => "localhost:$port",
+ Proto => 'tcp',
+ );
+ ok($sock, 'connect');
+@@ -33,7 +33,7 @@
+ sleep 1;
+ {
+ my $sock = IO::Socket::INET->new(
+- PeerAddr => "127.0.0.1:$port",
++ PeerAddr => "localhost:$port",
+ Proto => 'tcp',
+ );
+ ok($sock, 'connect');
+@@ -47,7 +47,7 @@
+ sleep 5;
+ {
+ my $sock = IO::Socket::INET->new(
+- PeerAddr => "127.0.0.1:$port",
++ PeerAddr => "localhost:$port",
+ Proto => 'tcp',
+ );
+ ok($sock, 'connect');