Blob Blame History Raw
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.