diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-09-29 10:13:07 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-09-29 10:14:59 +0000 |
commit | 4422d8b53d4edecb5f214d205f3ab9c0f3ee64a4 (patch) | |
tree | 1a51d1556d86d922f105b100ddbfcad60e760665 /main/perl-server-starter | |
parent | 6b5978e17b26e57f1ab9f1691b4a910d3c865309 (diff) | |
download | aports-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')
-rw-r--r-- | main/perl-server-starter/APKBUILD | 17 | ||||
-rw-r--r-- | main/perl-server-starter/fix-localhost.patch | 69 |
2 files changed, 83 insertions, 3 deletions
diff --git a/main/perl-server-starter/APKBUILD b/main/perl-server-starter/APKBUILD index e1613a863d..bbb3c076d9 100644 --- a/main/perl-server-starter/APKBUILD +++ b/main/perl-server-starter/APKBUILD @@ -12,14 +12,20 @@ license="GPL PerlArtistic" cpandepends="perl-proc-wait3 perl-list-moreutils perl-scope-guard" cpanmakedepends="perl-test-tcp" depends="$cpandepends" -makedepends="perl-dev $cpanmakedepends" +makedepends="perl-dev $depends $cpanmakedepends" subpackages="$pkgname-doc" -source="http://search.cpan.org/CPAN/authors/id/K/KA/KAZUHO/$_pkgreal-$pkgver.tar.gz" +source="http://search.cpan.org/CPAN/authors/id/K/KA/KAZUHO/$_pkgreal-$pkgver.tar.gz + fix-localhost.patch" _builddir="$srcdir/$_pkgreal-$pkgver" prepare() { cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor } @@ -34,4 +40,9 @@ package() { find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete } -md5sums="037d75831a23ca76cd306d678b20332e Server-Starter-0.11.tar.gz" +md5sums="037d75831a23ca76cd306d678b20332e Server-Starter-0.11.tar.gz +5fa38b3941457855ffaa6f290281b1bb fix-localhost.patch" +sha256sums="8e9911b259533ae6941c10c2e4dd353d4ba510505118ad01c52e88c8b8e072bb Server-Starter-0.11.tar.gz +65b56ba55877047f584f092a66fdd57da5c7ac1728cd003b42bdff44021c79e8 fix-localhost.patch" +sha512sums="e8097968987d0aa0c789cbb052a0ef9c862900c38ae33043356c9e2cd62e75ccca236f7e10c3be4d3d6a2c24a6673b7353f491c8ae358dab7454878e8f583d0e Server-Starter-0.11.tar.gz +cbb926734c2c539a9ca93bdecd710c13992e0f2929797cb9e158489a66e7fa0cd89f6c48cb3ba7e341c7f98694d795eaed2c421468f23edddb309f17be211dcb fix-localhost.patch" 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'); |