diff --git a/debian/patches/0001-Disable-getaddrinfo-3-AI_ADDRCONFIG-for-localhost-an.patch b/debian/patches/0001-Disable-getaddrinfo-3-AI_ADDRCONFIG-for-localhost-an.patch deleted file mode 100644 index b377e74..0000000 --- a/debian/patches/0001-Disable-getaddrinfo-3-AI_ADDRCONFIG-for-localhost-an.patch +++ /dev/null @@ -1,91 +0,0 @@ -Subject: [PATCH] Disable getaddrinfo(3) AI_ADDRCONFIG for localhost and IPv4 - numeric addresses - -AI_ADDRCONFIG can be a bad default for systems with a dual protocol -loopback device but just IPv6 connectivity. In such a case, -getaddrinfo(3) on 127.0.0.1 or 0.0.0.0 will fail with EAI_ADDRFAMILY -even though the loopback device is able to handle them. - -Origin: vendor -Bug: https://rt.cpan.org/Public/Bug/Display.html?id=132760 -Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=132760 -From: Niko Tyni -Reviewed-by: gregor herrmann -Last-Update: 2023-10-29 - ---- - lib/IO/Socket/IP.pm | 24 +++++++++++++++++++++--- - 1 file changed, 21 insertions(+), 3 deletions(-) - ---- a/lib/IO/Socket/IP.pm -+++ b/lib/IO/Socket/IP.pm -@@ -26,6 +26,7 @@ - ); - my $AF_INET6 = eval { Socket::AF_INET6() }; # may not be defined - my $AI_ADDRCONFIG = eval { Socket::AI_ADDRCONFIG() } || 0; -+my $AI_NUMERICHOST = eval { Socket::AI_NUMERICHOST() } || 0; - use POSIX qw( dup2 ); - use Errno qw( EINVAL EINPROGRESS EISCONN ENOTCONN ETIMEDOUT EWOULDBLOCK EOPNOTSUPP ); - -@@ -414,6 +415,8 @@ - my ( $arg ) = @_; - - my %hints; -+ my $localflags; -+ my $peerflags; - my @localinfos; - my @peerinfos; - -@@ -425,9 +428,20 @@ - - if( defined $arg->{GetAddrInfoFlags} ) { - $hints{flags} = $arg->{GetAddrInfoFlags}; -+ $localflags = $arg->{GetAddrInfoFlags}; -+ $peerflags = $arg->{GetAddrInfoFlags}; - } - else { -- $hints{flags} = $AI_ADDRCONFIG; -+ if (defined $arg->{LocalHost} and $arg->{LocalHost} =~ /^\d+\.\d+\.\d+\.\d+$/) { -+ $localflags = $AI_NUMERICHOST; -+ } else { -+ $localflags = $AI_ADDRCONFIG; -+ } -+ if (defined $arg->{PeerHost} and $arg->{PeerHost} =~ /^\d+\.\d+\.\d+\.\d+$/) { -+ $peerflags = $AI_NUMERICHOST; -+ } elsif (defined $arg->{PeerHost} and $arg->{PeerHost} ne 'localhost') { -+ $peerflags = $AI_ADDRCONFIG; -+ } - } - - if( defined( my $family = $arg->{Family} ) ) { -@@ -484,6 +498,7 @@ - my $fallback_port = $1; - - my %localhints = %hints; -+ $localhints{flags} = $localflags; - $localhints{flags} |= AI_PASSIVE; - ( my $err, @localinfos ) = getaddrinfo( $host, $service, \%localhints ); - -@@ -512,10 +527,12 @@ - defined $service and $service =~ s/\((\d+)\)$// and - my $fallback_port = $1; - -- ( my $err, @peerinfos ) = getaddrinfo( $host, $service, \%hints ); -+ my %peerhints = %hints; -+ $peerhints{flags} = $peerflags; -+ ( my $err, @peerinfos ) = getaddrinfo( $host, $service, \%peerhints ); - - if( $err and defined $fallback_port ) { -- ( $err, @peerinfos ) = getaddrinfo( $host, $fallback_port, \%hints ); -+ ( $err, @peerinfos ) = getaddrinfo( $host, $fallback_port, \%peerhints ); - } - - if( $err ) { -@@ -595,6 +612,7 @@ - # If there wasn't, use getaddrinfo()'s AI_ADDRCONFIG side-effect to guess a - # suitable family first. - else { -+ $hints{flags} |= $AI_ADDRCONFIG; - ( my $err, @infos ) = getaddrinfo( "", "0", \%hints ); - if( $err ) { - $IO::Socket::errstr = $@ = "$err"; diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index c3efc82..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -skip-internet-test -0001-Disable-getaddrinfo-3-AI_ADDRCONFIG-for-localhost-an.patch diff --git a/debian/patches/skip-internet-test b/debian/patches/skip-internet-test deleted file mode 100644 index 2fd48e5..0000000 --- a/debian/patches/skip-internet-test +++ /dev/null @@ -1,23 +0,0 @@ -Subject: Skip internet test -Origin: vendor -Forwarded: not-needed -From: Dominique Dumont -Reviewed-by: gregor herrmann -Last-Update: 2023-10-29 - -skip test that connects to internet ---- - t/31nonblocking-connect-internet.t | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/t/31nonblocking-connect-internet.t -+++ b/t/31nonblocking-connect-internet.t -@@ -3,7 +3,7 @@ - use v5.14; - use warnings; - --use Test::More; -+use Test::More skip_all => 'cannot connect to internet with Debian build systems'; - - use IO::Socket::IP; - diff --git a/debian/source/format b/debian/source/format index 163aaf8..89ae9db 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native)