summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-perl/ParaDNS/files')
-rw-r--r--dev-perl/ParaDNS/files/ParaDNS-2.0-net-dns-compat.patch42
-rw-r--r--dev-perl/ParaDNS/files/ParaDNS-2.0-no-network.patch38
2 files changed, 80 insertions, 0 deletions
diff --git a/dev-perl/ParaDNS/files/ParaDNS-2.0-net-dns-compat.patch b/dev-perl/ParaDNS/files/ParaDNS-2.0-net-dns-compat.patch
new file mode 100644
index 000000000000..9e35d75e3759
--- /dev/null
+++ b/dev-perl/ParaDNS/files/ParaDNS-2.0-net-dns-compat.patch
@@ -0,0 +1,42 @@
+From 0edb7527fb17c313c17c1c2572d9c454040677a2 Mon Sep 17 00:00:00 2001
+From: Andy Jones <andy_jones@outgun.com>
+Date: Thu, 28 Aug 2014 15:37:01 +0100
+Subject: Support newer Net::DNS::Resolver
+
+Bug: https://rt.cpan.org/Ticket/Display.html?id=98386
+---
+ lib/ParaDNS/Resolver.pm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/ParaDNS/Resolver.pm b/lib/ParaDNS/Resolver.pm
+index e147602..1a3f5dd 100644
+--- a/lib/ParaDNS/Resolver.pm
++++ b/lib/ParaDNS/Resolver.pm
+@@ -40,7 +40,7 @@ sub new {
+ }
+ }
+ else {
+- foreach my $ns (@{ $res->{nameservers} }) {
++ foreach my $ns ( $res->nameservers ) {
+ trace(2, "Using nameserver $ns:$res->{port}\n");
+ my $dst_sockaddr = sockaddr_in($res->{'port'}, inet_aton($ns));
+ push @{$self->{dst}}, $dst_sockaddr;
+@@ -216,7 +216,6 @@ sub event_read {
+ my $res = $self->{res};
+
+ while (my $packet = $res->bgread($sock)) {
+- my $err = $res->errorstring;
+ my $answers = 0;
+ my $header = $packet->header;
+ my $id = $header->id;
+@@ -278,6 +277,7 @@ sub event_read {
+ $answers++;
+ }
+ if (!$answers) {
++ my $err = $res->errorstring || $packet->header->rcode;
+ if ($err eq "NXDOMAIN") {
+ # trace("found => NXDOMAIN\n");
+ $qobj->run_callback("NXDOMAIN");
+--
+2.15.1
+
diff --git a/dev-perl/ParaDNS/files/ParaDNS-2.0-no-network.patch b/dev-perl/ParaDNS/files/ParaDNS-2.0-no-network.patch
new file mode 100644
index 000000000000..5103230cc532
--- /dev/null
+++ b/dev-perl/ParaDNS/files/ParaDNS-2.0-no-network.patch
@@ -0,0 +1,38 @@
+From 257b6b9764858cdbca2e0d6b95e688bb92ae0b05 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <kentnl@gentoo.org>
+Date: Wed, 27 Dec 2017 16:19:05 +1300
+Subject: Fence for NO_NETWORK_TESTING
+
+---
+ t/00basic.t | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/t/00basic.t b/t/00basic.t
+index e9ceaf5..108e0ec 100644
+--- a/t/00basic.t
++++ b/t/00basic.t
+@@ -1,10 +1,15 @@
+ #!/usr/bin/perl -w
+
+-use Test::More tests => 5;
++
++use Test::More tests => 6;
+
+ $|++;
+
+ use_ok('ParaDNS');
++use_ok('ParaDNS::Resolver');
++
++SKIP: {
++ skip "NO_NETWORK_TESTING set", 4 if $ENV{NO_NETWORK_TESTING};
+
+ my $done = 0;
+
+@@ -59,3 +64,4 @@ ParaDNS->new(
+
+ Danga::Socket->EventLoop;
+
++}
+--
+2.15.1
+