From 470e72423635a93e7048538d3dbe9e3055c0031d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 5 Apr 2017 10:37:09 +0200 Subject: [PATCH] Introduce build-condition for gnup1 tests And disable the tests by default because they need a network access. --- perl-CPAN.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/perl-CPAN.spec b/perl-CPAN.spec index b5ee981..09a8975 100644 --- a/perl-CPAN.spec +++ b/perl-CPAN.spec @@ -1,3 +1,7 @@ +# Don not run gnupg1 tests by default, they need network access +# (Socket::inet_aton('pool.sks-keyservers.net')). +%bcond_with perl_CPAN_enables_gnupg_test + Name: perl-CPAN Version: 2.16 Release: 1%{?dist} @@ -109,10 +113,14 @@ BuildRequires: perl(Expect) BuildRequires: perl(Hash::Util) %if !%{defined perl_bootstrap} # Kwalify not yet packaged +%if %{with perl_CPAN_enables_gnupg_test} BuildRequires: perl(Module::Signature) >= 0.66 +%endif BuildRequires: perl(Perl::Version) %endif +%if %{with perl_CPAN_enables_gnupg_test} BuildRequires: perl(Socket) +%endif %if !%{defined perl_bootstrap} BuildRequires: perl(Sort::Versions) # Test::MinimumVersion not used