Compare commits
No commits in common. "c9-beta" and "c10s" have entirely different histories.
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
||||
SOURCES/Net-Ping-2.74.tar.gz
|
||||
/Net-Ping-2.74.tar.gz
|
||||
/Net-Ping-2.75.tar.gz
|
||||
|
||||
@ -1 +0,0 @@
|
||||
fbaacc6f1bd4ceca786201a29592884c9e6ce54a SOURCES/Net-Ping-2.74.tar.gz
|
||||
187
Net-Ping-2.75-Upgrade-to-2.76.patch
Normal file
187
Net-Ping-2.75-Upgrade-to-2.76.patch
Normal file
@ -0,0 +1,187 @@
|
||||
From a37894585ba4894f54a3d35487acafa1350c91fa Mon Sep 17 00:00:00 2001
|
||||
From: Jitka Plesnikova <jplesnik@redhat.com>
|
||||
Date: Thu, 18 May 2023 11:42:29 +0200
|
||||
Subject: [PATCH] Upgrade to 2.76
|
||||
|
||||
---
|
||||
Makefile.PL | 8 ++++----
|
||||
lib/Net/Ping.pm | 2 +-
|
||||
t/000_load.t | 2 +-
|
||||
t/001_new.t | 5 +++++
|
||||
t/010_pingecho.t | 6 +++++-
|
||||
t/450_service.t | 4 ++--
|
||||
t/500_ping_icmp.t | 5 ++---
|
||||
t/501_ping_icmpv6.t | 5 ++---
|
||||
8 files changed, 22 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/Makefile.PL b/Makefile.PL
|
||||
index dadc57f..ebf05a0 100644
|
||||
--- a/Makefile.PL
|
||||
+++ b/Makefile.PL
|
||||
@@ -30,11 +30,11 @@ push @extras,
|
||||
resources => {
|
||||
# TODO: 26 old issues still open at RT
|
||||
# https://rt.cpan.org/Public/Dist/Display.html?Name=Net-Ping
|
||||
- bugtracker => 'https://github.com/rurban/Net-Ping/issues',
|
||||
+ bugtracker => 'https://github.com/Perl/perl5/issues',
|
||||
repository => {
|
||||
type => 'git',
|
||||
- url => 'https://github.com/rurban/Net-Ping.git',
|
||||
- web => 'https://github.com/rurban/Net-Ping',
|
||||
+ url => 'https://github.com/Perl/perl5.git',
|
||||
+ web => 'https://github.com/Perl/perl5',
|
||||
},
|
||||
license => [ 'http://dev.perl.org/licenses/' ],
|
||||
},
|
||||
@@ -55,7 +55,7 @@ WriteMakefile(
|
||||
'Test::Pod' => '1.22',
|
||||
'Test::More' => 0,
|
||||
},
|
||||
- INSTALLDIRS => ($ENV{PERL_CORE} ? 'perl' : 'site'),
|
||||
+ INSTALLDIRS => ( $] < 5.011 ? 'perl' : 'site' ),
|
||||
clean => { FILES => 'Net-Ping-*' },
|
||||
@extras
|
||||
);
|
||||
diff --git a/lib/Net/Ping.pm b/lib/Net/Ping.pm
|
||||
index 0b7be8c..b4c8f2f 100644
|
||||
--- a/lib/Net/Ping.pm
|
||||
+++ b/lib/Net/Ping.pm
|
||||
@@ -22,7 +22,7 @@ use Time::HiRes;
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(pingecho);
|
||||
@EXPORT_OK = qw(wakeonlan);
|
||||
-$VERSION = "2.75";
|
||||
+$VERSION = "2.76";
|
||||
|
||||
# Globals
|
||||
|
||||
diff --git a/t/000_load.t b/t/000_load.t
|
||||
index 4bf05c6..87f55d9 100644
|
||||
--- a/t/000_load.t
|
||||
+++ b/t/000_load.t
|
||||
@@ -12,5 +12,5 @@ BEGIN {
|
||||
use_ok( 'Net::Ping' ) || print "No Net::Ping!\n";
|
||||
}
|
||||
|
||||
-diag( "Testing Net::Ping $Net::Ping::VERSION, Perl $] on $^O, $^X" );
|
||||
+note( "Testing Net::Ping $Net::Ping::VERSION, Perl $], $^X" );
|
||||
|
||||
diff --git a/t/001_new.t b/t/001_new.t
|
||||
index 6b097d7..46965b7 100644
|
||||
--- a/t/001_new.t
|
||||
+++ b/t/001_new.t
|
||||
@@ -1,11 +1,16 @@
|
||||
use warnings;
|
||||
use strict;
|
||||
+use Config;
|
||||
|
||||
BEGIN {
|
||||
unless (my $port = getservbyname('echo', 'tcp')) {
|
||||
print "1..0 \# Skip: no echo port\n";
|
||||
exit;
|
||||
}
|
||||
+ unless ($Config{d_getpbyname}) {
|
||||
+ print "1..0 \# Skip: no getprotobyname\n";
|
||||
+ exit;
|
||||
+ }
|
||||
}
|
||||
|
||||
use Test::More qw(no_plan);
|
||||
diff --git a/t/010_pingecho.t b/t/010_pingecho.t
|
||||
index e26332b..0c3c815 100644
|
||||
--- a/t/010_pingecho.t
|
||||
+++ b/t/010_pingecho.t
|
||||
@@ -1,11 +1,16 @@
|
||||
use warnings;
|
||||
use strict;
|
||||
+use Config;
|
||||
|
||||
BEGIN {
|
||||
unless (my $port = getservbyname('echo', 'tcp')) {
|
||||
print "1..0 \# Skip: no echo port\n";
|
||||
exit;
|
||||
}
|
||||
+ unless ($Config{d_getpbyname}) {
|
||||
+ print "1..0 \# Skip: no getprotobyname\n";
|
||||
+ exit;
|
||||
+ }
|
||||
}
|
||||
|
||||
use Test::More tests => 2;
|
||||
@@ -14,7 +19,6 @@ BEGIN {use_ok('Net::Ping')};
|
||||
TODO: {
|
||||
local $TODO = "Not working on os390 smoker; may be a permissions problem"
|
||||
if $^O eq 'os390';
|
||||
- $TODO = "Not working on freebsd" if $^O eq 'freebsd';
|
||||
my $result = pingecho("127.0.0.1");
|
||||
is($result, 1, "pingecho 127.0.0.1 works");
|
||||
}
|
||||
diff --git a/t/450_service.t b/t/450_service.t
|
||||
index 203d86b..8bfd91e 100644
|
||||
--- a/t/450_service.t
|
||||
+++ b/t/450_service.t
|
||||
@@ -78,7 +78,7 @@ is($p->ping("127.0.0.1"), 1, 'first port is reachable');
|
||||
$p->{port_num} = $port2;
|
||||
|
||||
{
|
||||
- local $TODO = "Believed not to work on $^O" if $^O =~ /^(?:hpux|MSWin32|os390|freebsd)$/;
|
||||
+ local $TODO = "Believed not to work on $^O" if $^O =~ /^(?:MSWin32|os390)$/;
|
||||
is($p->ping("127.0.0.1"), 1, 'second port is reachable');
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ SKIP: {
|
||||
|
||||
{
|
||||
local $TODO = "Believed not to work on $^O"
|
||||
- if $^O =~ /^(?:hpux|MSWin32|os390|freebsd)$/;
|
||||
+ if $^O =~ /^(?:MSWin32|os390)$/;
|
||||
is($p->ack(), '127.0.0.1', 'IP should be reachable');
|
||||
}
|
||||
}
|
||||
diff --git a/t/500_ping_icmp.t b/t/500_ping_icmp.t
|
||||
index 7476f60..e355711 100644
|
||||
--- a/t/500_ping_icmp.t
|
||||
+++ b/t/500_ping_icmp.t
|
||||
@@ -19,14 +19,13 @@ BEGIN {
|
||||
}
|
||||
|
||||
my $is_devel = $ENV{PERL_CORE} || -d ".git" ? 1 : 0;
|
||||
-$ENV{TEST_PING_HOST} = "127.0.0.1" if $ENV{NO_NETWORK_TESTING};
|
||||
# Note this rawsocket test code is considered anti-social in p5p and was removed in
|
||||
# their variant.
|
||||
-# See See https://www.nntp.perl.org/group/perl.perl5.porters/2016/11/msg240707.html
|
||||
+# See http://nntp.perl.org/group/perl.perl5.porters/240707
|
||||
# Problem is that ping_icmp needs root perms, and previous bugs were
|
||||
# never caught. So I rather execute it via sudo in the core test suite
|
||||
# and on devel CPAN dirs, than not at all and risk further bitrot of this API.
|
||||
-if (!Net::Ping::_isroot()) {
|
||||
+if ( 0 && !Net::Ping::_isroot()) { # disable in blead via 7bfdd8260c
|
||||
my $file = __FILE__;
|
||||
my $lib = $ENV{PERL_CORE} ? '-I../../lib' : '-Mblib';
|
||||
if ($is_devel and $Config{ccflags} =~ /fsanitize=address/ and $^O eq 'linux') {
|
||||
diff --git a/t/501_ping_icmpv6.t b/t/501_ping_icmpv6.t
|
||||
index 9b5b8b8..d59d4be 100644
|
||||
--- a/t/501_ping_icmpv6.t
|
||||
+++ b/t/501_ping_icmpv6.t
|
||||
@@ -19,8 +19,7 @@ BEGIN {
|
||||
}
|
||||
|
||||
my $is_devel = $ENV{PERL_CORE} || -d ".git" ? 1 : 0;
|
||||
-$ENV{TEST_PING6_HOST} = "::1" if $ENV{NO_NETWORK_TESTING};
|
||||
-if (!Net::Ping::_isroot()) {
|
||||
+if (0 && !Net::Ping::_isroot()) {
|
||||
my $file = __FILE__;
|
||||
my $lib = $ENV{PERL_CORE} ? '-I../../lib' : '-Mblib';
|
||||
# -n prevents from asking for a password. rather fail then
|
||||
@@ -60,7 +59,7 @@ SKIP: {
|
||||
my $rightip = "2001:4860:4860::8888"; # pingable ip of google's dnsserver
|
||||
# for a firewalled ipv6 network try an optional local ipv6 host
|
||||
$rightip = $ENV{TEST_PING6_HOST} if $ENV{TEST_PING6_HOST};
|
||||
- my $wrongip = "2001:db8::"; # non existing ip
|
||||
+ my $wrongip = "2001:4860:4860::1234"; # non existing ip
|
||||
# diag "Pinging existing IPv6 ";
|
||||
my $result = $p->ping($rightip);
|
||||
if ($result == 1) {
|
||||
--
|
||||
2.40.1
|
||||
|
||||
4
README.md
Normal file
4
README.md
Normal file
@ -0,0 +1,4 @@
|
||||
# perl-Net-Ping
|
||||
|
||||
Net::Ping module contains methods to test the reachability of remote hosts on
|
||||
a network.
|
||||
@ -1,14 +0,0 @@
|
||||
diff -up Net-Ping-2.74/t/200_ping_tcp.t.orig Net-Ping-2.74/t/200_ping_tcp.t
|
||||
--- Net-Ping-2.74/t/200_ping_tcp.t.orig 2020-12-03 12:50:50.645715613 +0100
|
||||
+++ Net-Ping-2.74/t/200_ping_tcp.t 2020-12-03 12:53:14.305039861 +0100
|
||||
@@ -1,8 +1,8 @@
|
||||
use strict;
|
||||
|
||||
BEGIN {
|
||||
- if ($ENV{PERL_CORE}) {
|
||||
- unless ($ENV{PERL_TEST_Net_Ping}) {
|
||||
+ if ($ENV{NO_NETWORK_TESTING} ||
|
||||
+ ($ENV{PERL_CORE} && !$ENV{PERL_TEST_Net_Ping})) {
|
||||
print "1..0 # Skip: network dependent test\n";
|
||||
exit;
|
||||
}
|
||||
@ -1,143 +0,0 @@
|
||||
From ab3c25e921e15aa2923d509a9317610a1e9f1d4e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Wed, 18 Nov 2020 08:42:00 +0100
|
||||
Subject: [PATCH 2/2] Disable all network tests with NO_NETWORK_TESTING=1
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
If a host cannot resolve the host names, the tests fail like:
|
||||
|
||||
getaddrinfo(www.google.com.,,AF_INET) failed - Temporary failure in name resolution at /builddir/build/BUILD/Net-Ping-2.74/blib/lib/Net/Ping.pm line 1925.
|
||||
|
||||
The tests recommend setting PERL_CORE=1, but PERL_CORE has a different
|
||||
meaning.
|
||||
|
||||
This patch recognizes a NO_NETWORK_TESTING environment variable to
|
||||
skip non-localhost tests. This is alike to Test::RequiresInternet. The
|
||||
patch also coerces the remaining tests to use loopback addresses
|
||||
instead.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
t/400_ping_syn.t | 11 +++++------
|
||||
t/410_syn_host.t | 11 +++++------
|
||||
t/420_ping_syn_port.t | 11 +++++------
|
||||
t/500_ping_icmp.t | 1 +
|
||||
t/501_ping_icmpv6.t | 1 +
|
||||
5 files changed, 17 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/t/400_ping_syn.t b/t/400_ping_syn.t
|
||||
index 8409aae..4e22e7c 100644
|
||||
--- a/t/400_ping_syn.t
|
||||
+++ b/t/400_ping_syn.t
|
||||
@@ -1,11 +1,10 @@
|
||||
use strict;
|
||||
|
||||
BEGIN {
|
||||
- if ($ENV{PERL_CORE}) {
|
||||
- unless ($ENV{PERL_TEST_Net_Ping}) {
|
||||
- print "1..0 # Skip: network dependent test\n";
|
||||
- exit;
|
||||
- }
|
||||
+ if ($ENV{NO_NETWORK_TESTING} ||
|
||||
+ ($ENV{PERL_CORE} && !$ENV{PERL_TEST_Net_Ping})) {
|
||||
+ print "1..0 # Skip: network dependent test\n";
|
||||
+ exit;
|
||||
}
|
||||
unless (eval "require Socket") {
|
||||
print "1..0 \# Skip: no Socket\n";
|
||||
@@ -30,7 +29,7 @@ BEGIN {
|
||||
# connection to remote networks, but you still want the tests
|
||||
# to pass, use the following:
|
||||
#
|
||||
-# $ PERL_CORE=1 make test
|
||||
+# $ NO_NETWORK_TESTING=1 make test
|
||||
|
||||
# Hopefully this is never a routeable host
|
||||
my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
||||
diff --git a/t/410_syn_host.t b/t/410_syn_host.t
|
||||
index 15948e2..5d58bda 100644
|
||||
--- a/t/410_syn_host.t
|
||||
+++ b/t/410_syn_host.t
|
||||
@@ -2,11 +2,10 @@
|
||||
use strict;
|
||||
|
||||
BEGIN {
|
||||
- if ($ENV{PERL_CORE}) {
|
||||
- unless ($ENV{PERL_TEST_Net_Ping}) {
|
||||
- print "1..0 # Skip: network dependent test\n";
|
||||
- exit;
|
||||
- }
|
||||
+ if ($ENV{NO_NETWORK_TESTING} ||
|
||||
+ ($ENV{PERL_CORE} && !$ENV{PERL_TEST_Net_Ping})) {
|
||||
+ print "1..0 # Skip: network dependent test\n";
|
||||
+ exit;
|
||||
}
|
||||
unless (eval "require Socket") {
|
||||
print "1..0 \# Skip: no Socket\n";
|
||||
@@ -31,7 +30,7 @@ BEGIN {
|
||||
# connection to remote networks, but you still want the tests
|
||||
# to pass, use the following:
|
||||
#
|
||||
-# $ PERL_CORE=1 make test
|
||||
+# $ NO_NETWORK_TESTING=1 make test
|
||||
|
||||
# Try a few remote servers
|
||||
my %webs;
|
||||
diff --git a/t/420_ping_syn_port.t b/t/420_ping_syn_port.t
|
||||
index 53c153f..6b8d19a 100644
|
||||
--- a/t/420_ping_syn_port.t
|
||||
+++ b/t/420_ping_syn_port.t
|
||||
@@ -2,11 +2,10 @@
|
||||
use strict;
|
||||
|
||||
BEGIN {
|
||||
- if ($ENV{PERL_CORE}) {
|
||||
- unless ($ENV{PERL_TEST_Net_Ping}) {
|
||||
- print "1..0 # Skip: network dependent test\n";
|
||||
- exit;
|
||||
- }
|
||||
+ if ($ENV{NO_NETWORK_TESTING} ||
|
||||
+ ($ENV{PERL_CORE} && !$ENV{PERL_TEST_Net_Ping})) {
|
||||
+ print "1..0 # Skip: network dependent test\n";
|
||||
+ exit;
|
||||
}
|
||||
unless (eval "require Socket") {
|
||||
print "1..0 \# Skip: no Socket\n";
|
||||
@@ -31,7 +30,7 @@ BEGIN {
|
||||
# connection to remote networks, but you still want the tests
|
||||
# to pass, use the following:
|
||||
#
|
||||
-# $ PERL_CORE=1 make test
|
||||
+# $ NO_NETWORK_TESTING=1 make test
|
||||
|
||||
# Hopefully this is never a routeable host
|
||||
my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
||||
diff --git a/t/500_ping_icmp.t b/t/500_ping_icmp.t
|
||||
index dea6588..7e45cc4 100644
|
||||
--- a/t/500_ping_icmp.t
|
||||
+++ b/t/500_ping_icmp.t
|
||||
@@ -19,6 +19,7 @@ BEGIN {
|
||||
}
|
||||
|
||||
my $is_devel = $ENV{PERL_CORE} || -d ".git" ? 1 : 0;
|
||||
+$ENV{TEST_PING_HOST} = "127.0.0.1" if $ENV{NO_NETWORK_TESTING};
|
||||
# Note this rawsocket test code is considered anti-social in p5p and was removed in
|
||||
# their variant.
|
||||
# See http://nntp.perl.org/group/perl.perl5.porters/240707
|
||||
diff --git a/t/501_ping_icmpv6.t b/t/501_ping_icmpv6.t
|
||||
index 165824f..9b5b8b8 100644
|
||||
--- a/t/501_ping_icmpv6.t
|
||||
+++ b/t/501_ping_icmpv6.t
|
||||
@@ -19,6 +19,7 @@ BEGIN {
|
||||
}
|
||||
|
||||
my $is_devel = $ENV{PERL_CORE} || -d ".git" ? 1 : 0;
|
||||
+$ENV{TEST_PING6_HOST} = "::1" if $ENV{NO_NETWORK_TESTING};
|
||||
if (!Net::Ping::_isroot()) {
|
||||
my $file = __FILE__;
|
||||
my $lib = $ENV{PERL_CORE} ? '-I../../lib' : '-Mblib';
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@ -1,102 +0,0 @@
|
||||
From a42c6588e33a1d6d847b60ef3386bfd122ce030b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Wed, 18 Nov 2020 09:49:48 +0100
|
||||
Subject: [PATCH 1/2] Use non-routable addreses for negative tests
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This patch uses the addresses reserved for a documentation purpose
|
||||
which should be unroutable instead of just a random address.
|
||||
|
||||
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
||||
---
|
||||
t/190_alarm.t | 2 +-
|
||||
t/200_ping_tcp.t | 2 +-
|
||||
t/400_ping_syn.t | 2 +-
|
||||
t/410_syn_host.t | 2 +-
|
||||
t/420_ping_syn_port.t | 2 +-
|
||||
t/501_ping_icmpv6.t | 2 +-
|
||||
6 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/t/190_alarm.t b/t/190_alarm.t
|
||||
index 65276a2..f86305c 100644
|
||||
--- a/t/190_alarm.t
|
||||
+++ b/t/190_alarm.t
|
||||
@@ -29,7 +29,7 @@ use Test::More tests => 6;
|
||||
BEGIN {use_ok 'Net::Ping'};
|
||||
|
||||
# Hopefully this is never a routeable host
|
||||
-my $fail_ip = $ENV{NET_PING_FAIL_IP} || "172.29.249.249";
|
||||
+my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
||||
|
||||
eval {
|
||||
my $timeout = 11;
|
||||
diff --git a/t/200_ping_tcp.t b/t/200_ping_tcp.t
|
||||
index e2bfe18..8e8f56d 100644
|
||||
--- a/t/200_ping_tcp.t
|
||||
+++ b/t/200_ping_tcp.t
|
||||
@@ -18,7 +18,7 @@ BEGIN {
|
||||
}
|
||||
|
||||
# Hopefully this is never a routeable host
|
||||
-my $fail_ip = $ENV{NET_PING_FAIL_IP} || "172.29.249.249";
|
||||
+my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
||||
|
||||
# Remote network test using tcp protocol.
|
||||
#
|
||||
diff --git a/t/400_ping_syn.t b/t/400_ping_syn.t
|
||||
index 1ccec9f..8409aae 100644
|
||||
--- a/t/400_ping_syn.t
|
||||
+++ b/t/400_ping_syn.t
|
||||
@@ -33,7 +33,7 @@ BEGIN {
|
||||
# $ PERL_CORE=1 make test
|
||||
|
||||
# Hopefully this is never a routeable host
|
||||
-my $fail_ip = $ENV{NET_PING_FAIL_IP} || "172.29.249.249";
|
||||
+my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
||||
|
||||
# Try a few remote servers
|
||||
my %webs = (
|
||||
diff --git a/t/410_syn_host.t b/t/410_syn_host.t
|
||||
index d84a7eb..15948e2 100644
|
||||
--- a/t/410_syn_host.t
|
||||
+++ b/t/410_syn_host.t
|
||||
@@ -37,7 +37,7 @@ BEGIN {
|
||||
my %webs;
|
||||
BEGIN {
|
||||
# Hopefully this is never a routeable host
|
||||
- my $fail_ip = $ENV{NET_PING_FAIL_IP} || "172.29.249.249";
|
||||
+ my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
||||
|
||||
%webs = (
|
||||
$fail_ip => 0,
|
||||
diff --git a/t/420_ping_syn_port.t b/t/420_ping_syn_port.t
|
||||
index 55ee88a..53c153f 100644
|
||||
--- a/t/420_ping_syn_port.t
|
||||
+++ b/t/420_ping_syn_port.t
|
||||
@@ -34,7 +34,7 @@ BEGIN {
|
||||
# $ PERL_CORE=1 make test
|
||||
|
||||
# Hopefully this is never a routeable host
|
||||
-my $fail_ip = $ENV{NET_PING_FAIL_IP} || "172.29.249.249";
|
||||
+my $fail_ip = $ENV{NET_PING_FAIL_IP} || "192.0.2.0";
|
||||
|
||||
# Try a few remote servers
|
||||
my %webs;
|
||||
diff --git a/t/501_ping_icmpv6.t b/t/501_ping_icmpv6.t
|
||||
index 3d2b789..165824f 100644
|
||||
--- a/t/501_ping_icmpv6.t
|
||||
+++ b/t/501_ping_icmpv6.t
|
||||
@@ -59,7 +59,7 @@ SKIP: {
|
||||
my $rightip = "2001:4860:4860::8888"; # pingable ip of google's dnsserver
|
||||
# for a firewalled ipv6 network try an optional local ipv6 host
|
||||
$rightip = $ENV{TEST_PING6_HOST} if $ENV{TEST_PING6_HOST};
|
||||
- my $wrongip = "2001:4860:4860::1234"; # non existing ip
|
||||
+ my $wrongip = "2001:db8::"; # non existing ip
|
||||
# diag "Pinging existing IPv6 ";
|
||||
my $result = $p->ping($rightip);
|
||||
if ($result == 1) {
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@ -1,106 +0,0 @@
|
||||
Name: perl-Net-Ping
|
||||
Version: 2.74
|
||||
Release: 5%{?dist}
|
||||
Summary: Check a remote host for reachability
|
||||
License: GPL+ or Artistic
|
||||
URL: https://metacpan.org/release/Net-Ping/
|
||||
Source0: https://cpan.metacpan.org/authors/id/R/RU/RURBAN/Net-Ping-%{version}.tar.gz
|
||||
# Use trully non-routable address in tests, proposed to the upstream,
|
||||
# <https://github.com/rurban/Net-Ping/pull/24>
|
||||
Patch0: Net-Ping-2.74-Use-non-routable-addreses-for-negative-tests.patch
|
||||
# Disable Internet tests with NO_NETWORK_TESTING, bug #1898132,
|
||||
# proposed to the upstream, <https://github.com/rurban/Net-Ping/pull/24>
|
||||
Patch1: Net-Ping-2.74-Disable-all-network-tests-with-NO_NETWORK_TESTING-1.patch
|
||||
# Disable Internet tests in 200_ping_tcp, bug #1903747
|
||||
Patch2: Net-Ping-2.74-Disable-all-network-tests-in-200_ping_tcp.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: make
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(:VERSION) >= 5.2
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
||||
BuildRequires: perl(strict)
|
||||
BuildRequires: perl(warnings)
|
||||
# Run-time:
|
||||
BuildRequires: perl(Carp)
|
||||
BuildRequires: perl(constant)
|
||||
BuildRequires: perl(Exporter)
|
||||
BuildRequires: perl(Fcntl)
|
||||
BuildRequires: perl(FileHandle)
|
||||
BuildRequires: perl(IO::Socket::INET)
|
||||
# Net::Ping::External not used at tests
|
||||
BuildRequires: perl(POSIX)
|
||||
BuildRequires: perl(Socket) >= 2.007
|
||||
BuildRequires: perl(Time::HiRes)
|
||||
BuildRequires: perl(vars)
|
||||
# Win32 not used on Linux
|
||||
# Tests:
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(Cwd)
|
||||
BuildRequires: perl(File::Spec)
|
||||
BuildRequires: perl(Test::More)
|
||||
# sudo not used
|
||||
# Optional tests:
|
||||
BuildRequires: perl(:VERSION) >= 5.6
|
||||
# Class::XSAccessor not used
|
||||
BuildRequires: perl(IO::Socket)
|
||||
# List::MoreUtils not used
|
||||
# Module::CPANTS::Kwalitee::Uses not used
|
||||
# Text::CSV_XS not used
|
||||
# Test::CPAN::Meta not used
|
||||
# Test::Kwalitee not used
|
||||
BuildRequires: perl(Test::Pod) >= 1.22
|
||||
# Test::Pod::Coverage not used
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
Requires: perl(IO::Socket::INET)
|
||||
# Keep Net::Ping::External optional
|
||||
Suggests: perl(Net::Ping::External)
|
||||
Conflicts: perl < 4:5.22.0-350
|
||||
|
||||
%description
|
||||
Net::Ping module contains methods to test the reachability of remote hosts on
|
||||
a network.
|
||||
|
||||
%prep
|
||||
%setup -q -n Net-Ping-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
unset PERL_CORE
|
||||
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
%{make_build}
|
||||
|
||||
%install
|
||||
%{make_install}
|
||||
%{_fixperms} $RPM_BUILD_ROOT/*
|
||||
|
||||
%check
|
||||
unset AUTHOR_TESTING IS_MAINTAINER NET_PING_FAIL_IP PERL_TEST_Net_Ping \
|
||||
TEST_PING_HOST TEST_PING6_HOST
|
||||
export NO_NETWORK_TESTING=1
|
||||
make test
|
||||
|
||||
%files
|
||||
%doc Changes README TODO
|
||||
%{perl_vendorlib}/*
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%changelog
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.74-5
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.74-4
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.74-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Thu Dec 03 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.74-2
|
||||
- Disable network tests in 200_tcp_ping
|
||||
|
||||
* Mon Nov 16 2020 Petr Pisar <ppisar@redhat.com> 2.74-1
|
||||
- Specfile autogenerated by cpanspec 1.78.
|
||||
19
gating.yaml
Normal file
19
gating.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
# Fedora
|
||||
--- !Policy
|
||||
id: fedora_policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts:
|
||||
- bodhi_update_push_testing
|
||||
- bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
|
||||
# RHEL
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-*
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
2
perl-Net-Ping.rpmlintrc
Normal file
2
perl-Net-Ping.rpmlintrc
Normal file
@ -0,0 +1,2 @@
|
||||
from Config import *
|
||||
addFilter("-tests\.noarch: W: no-documentatio");
|
||||
184
perl-Net-Ping.spec
Normal file
184
perl-Net-Ping.spec
Normal file
@ -0,0 +1,184 @@
|
||||
%global base_version 2.75
|
||||
# Perform optional tests
|
||||
%bcond_without perl_Net_Ping_enables_optional_test
|
||||
|
||||
Name: perl-Net-Ping
|
||||
Version: 2.76
|
||||
Release: 511%{?dist}
|
||||
Summary: Check a remote host for reachability
|
||||
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
||||
URL: https://metacpan.org/release/Net-Ping/
|
||||
Source0: https://cpan.metacpan.org/authors/id/R/RU/RURBAN/Net-Ping-%{base_version}.tar.gz
|
||||
# Unbundled from perl 5.37.11
|
||||
Patch0: Net-Ping-2.75-Upgrade-to-2.76.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: make
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(:VERSION) >= 5.2
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
||||
BuildRequires: perl(strict)
|
||||
BuildRequires: perl(warnings)
|
||||
# Run-time:
|
||||
BuildRequires: perl(Carp)
|
||||
BuildRequires: perl(constant)
|
||||
BuildRequires: perl(Exporter)
|
||||
BuildRequires: perl(Fcntl)
|
||||
BuildRequires: perl(FileHandle)
|
||||
BuildRequires: perl(IO::Socket::INET)
|
||||
# Net::Ping::External not used at tests
|
||||
BuildRequires: perl(POSIX)
|
||||
BuildRequires: perl(Socket) >= 2.007
|
||||
BuildRequires: perl(Time::HiRes)
|
||||
BuildRequires: perl(vars)
|
||||
# Win32 not used on Linux
|
||||
# Tests:
|
||||
BuildRequires: perl(Config)
|
||||
BuildRequires: perl(Cwd)
|
||||
BuildRequires: perl(File::Spec)
|
||||
BuildRequires: perl(Test::More)
|
||||
# sudo not used
|
||||
%if %{with perl_Net_Ping_enables_optional_test}
|
||||
# Optional tests:
|
||||
BuildRequires: perl(:VERSION) >= 5.6
|
||||
# Class::XSAccessor not used
|
||||
BuildRequires: perl(IO::Socket)
|
||||
# List::MoreUtils not used
|
||||
# Module::CPANTS::Kwalitee::Uses not used
|
||||
# Text::CSV_XS not used
|
||||
# Test::CPAN::Meta not used
|
||||
# Test::Kwalitee not used
|
||||
BuildRequires: perl(Test::Pod) >= 1.22
|
||||
# Test::Pod::Coverage not used
|
||||
%endif
|
||||
Requires: perl(IO::Socket::INET)
|
||||
# Keep Net::Ping::External optional
|
||||
Suggests: perl(Net::Ping::External)
|
||||
Conflicts: perl < 4:5.22.0-350
|
||||
|
||||
%description
|
||||
Net::Ping module contains methods to test the reachability of remote hosts on
|
||||
a network.
|
||||
|
||||
%package tests
|
||||
Summary: Tests for %{name}
|
||||
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Requires: perl-Test-Harness
|
||||
Requires: perl(Socket)
|
||||
Requires: perl(IO::Socket)
|
||||
Requires: perl(IO::Socket::INET)
|
||||
|
||||
%description tests
|
||||
Tests from %{name}. Execute them
|
||||
with "%{_libexecdir}/%{name}/test".
|
||||
|
||||
%prep
|
||||
%setup -q -n Net-Ping-%{base_version}
|
||||
%patch -P0 -p1
|
||||
# Remove author tests
|
||||
rm t/6*.t
|
||||
# Remove appveyor script
|
||||
rm t/appveyor-test.bat
|
||||
# Remove removed files from MANIFEST file
|
||||
perl -i -ne 'print $_ unless m{^(?:t/6.*\.t|appveyor-test\.bat)}' MANIFEST
|
||||
# Help generators to recognize Perl scripts
|
||||
for F in t/*.t; do
|
||||
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F"
|
||||
chmod +x "$F"
|
||||
done
|
||||
|
||||
%build
|
||||
unset PERL_CORE
|
||||
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
||||
%{make_build}
|
||||
|
||||
%install
|
||||
%{make_install}
|
||||
# Install tests
|
||||
mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
||||
cp -a t %{buildroot}%{_libexecdir}/%{name}
|
||||
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
||||
#!/bin/sh
|
||||
unset AUTHOR_TESTING IS_MAINTAINER NET_PING_FAIL_IP PERL_TEST_Net_Ping \
|
||||
TEST_PING_HOST TEST_PING6_HOST
|
||||
export NO_NETWORK_TESTING=1
|
||||
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
|
||||
EOF
|
||||
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
||||
%{_fixperms} %{buildroot}/*
|
||||
|
||||
%check
|
||||
unset AUTHOR_TESTING IS_MAINTAINER NET_PING_FAIL_IP PERL_TEST_Net_Ping \
|
||||
TEST_PING_HOST TEST_PING6_HOST
|
||||
export NO_NETWORK_TESTING=1
|
||||
make test
|
||||
|
||||
%files
|
||||
%doc Changes README TODO
|
||||
%{perl_vendorlib}/*
|
||||
%{_mandir}/man3/*
|
||||
|
||||
%files tests
|
||||
%{_libexecdir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.76-511
|
||||
- Bump release for October 2024 mass rebuild:
|
||||
Resolves: RHEL-64018
|
||||
|
||||
* Thu Jul 18 2024 Jitka Plesnikova <jplesnik@redhat.com> - 2.76-510
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.76-503
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.76-502
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.76-501
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.76-500
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Tue Jul 11 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.76-499
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Thu May 18 2023 Jitka Plesnikova <jplesnik@redhat.com> - 2.76-1
|
||||
- Upgrade to 2.76 as provided in perl-5.37.11
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.75-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Wed Nov 02 2022 Michal Josef Špaček <mspacek@redhat.com> - 2.75-2
|
||||
- Package tests
|
||||
- Unify to use macros
|
||||
- Update license to SPDX format
|
||||
|
||||
* Tue Sep 06 2022 Michal Josef Špaček <mspacek@redhat.com> - 2.75-1
|
||||
- Bump 2.75
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.74-489
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Mon May 30 2022 Jitka Plesnikova <jplesnik@redhat.com> - 2.74-488
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.74-479
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.74-478
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.74-477
|
||||
- Increase release to favour standalone package
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.74-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Thu Dec 03 2020 Jitka Plesnikova <jplesnik@redhat.com> - 2.74-2
|
||||
- Disable network tests in 200_tcp_ping
|
||||
|
||||
* Mon Nov 16 2020 Petr Pisar <ppisar@redhat.com> 2.74-1
|
||||
- Specfile autogenerated by cpanspec 1.78.
|
||||
5
plans/sanity.fmf
Normal file
5
plans/sanity.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: Sanity tests
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (Net-Ping-2.75.tar.gz) = 1884e7c9c0ab562b845c3bc1e3a442f3d44c08ade35845106c265467a4c13de82524400fe834e28f91c55da7bb4027ad7df41449a0c585b67f598d2cd9657ba2
|
||||
11
tests/upstream-tests.fmf
Normal file
11
tests/upstream-tests.fmf
Normal file
@ -0,0 +1,11 @@
|
||||
summary: Upstream tests
|
||||
component: perl-Net-Ping
|
||||
require: perl-Net-Ping-tests
|
||||
test: /usr/libexec/perl-Net-Ping/test
|
||||
enabled: true
|
||||
tag:
|
||||
- rhel-buildroot
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro < rhel-10 or distro < centos-stream-10
|
||||
continue: false
|
||||
Loading…
Reference in New Issue
Block a user