From 19d216e2ab3454c9c0f99d40e5da106626fb6aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 5 Jun 2019 18:12:32 +0200 Subject: [PATCH] Stop requiring dependencies of release tests --- ...ending-on-release-tests-dependencies.patch | 125 ++++++++++++++++++ perl-Locale-Codes.spec | 18 ++- 2 files changed, 136 insertions(+), 7 deletions(-) create mode 100644 Locale-Codes-3.61-Stop-depending-on-release-tests-dependencies.patch diff --git a/Locale-Codes-3.61-Stop-depending-on-release-tests-dependencies.patch b/Locale-Codes-3.61-Stop-depending-on-release-tests-dependencies.patch new file mode 100644 index 0000000..23be415 --- /dev/null +++ b/Locale-Codes-3.61-Stop-depending-on-release-tests-dependencies.patch @@ -0,0 +1,125 @@ +From b8b0219939f6695b70acc147eb24769eaff30e8d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Wed, 5 Jun 2019 18:01:10 +0200 +Subject: [PATCH] Stop depending on release tests dependencies +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Because RELEASE_NOTES does not exist by default, it does not make +sense to depend on module that are actually not used. + +Signed-off-by: Petr Písař +--- + Makefile.PL | 6 ------ + t/_pod.t | 13 ++++++++----- + t/_pod_coverage.t | 13 ++++++++----- + t/_version.t | 14 +++++++++----- + 4 files changed, 25 insertions(+), 21 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index 8ef6ecd..85b205e 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -22,14 +22,8 @@ my %script_prereq = ( + ); + + my %test_prereq = ( +- 'Cwd' => '0', +- 'File::Basename' => '0', +- 'File::Find::Rule' => '0', +- 'IO::File' => '0', + 'Test::Inter' => '1.09', + 'Test::More' => '0', +- 'Test::Pod' => '1.00', +- 'Test::Pod::Coverage' => '1.00', + ); + + my %config_prereq = ( +diff --git a/t/_pod.t b/t/_pod.t +index 8d5e351..aea7d0c 100755 +--- a/t/_pod.t ++++ b/t/_pod.t +@@ -3,15 +3,18 @@ + use warnings 'all'; + use strict; + use Test::More; ++ ++BEGIN { ++ # Don't run tests for installs ++ unless ($ENV{RELEASE_TESTING}) { ++ plan skip_all => 'Author tests not required for installation (set RELEASE_TESTING to test)'; ++ } ++} ++ + use File::Basename; + use Cwd 'abs_path'; + use Test::Pod 1.00; + +-# Don't run tests for installs +-unless ($ENV{RELEASE_TESTING}) { +- plan skip_all => 'Author tests not required for installation (set RELEASE_TESTING to test)'; +-} +- + # Figure out the directories. This comes from Test::Inter. + + my($moddir,$testdir,$libdir); +diff --git a/t/_pod_coverage.t b/t/_pod_coverage.t +index 9255d3b..88d27f9 100755 +--- a/t/_pod_coverage.t ++++ b/t/_pod_coverage.t +@@ -3,15 +3,18 @@ + use warnings 'all'; + use strict; + use Test::More; ++ ++BEGIN { ++ # Don't run tests for installs ++ unless ($ENV{RELEASE_TESTING}) { ++ plan skip_all => 'Author tests not required for installation (set RELEASE_TESTING to test)'; ++ } ++} ++ + use File::Basename; + use Cwd 'abs_path'; + use Test::Pod::Coverage 1.00; + +-# Don't run tests for installs +-unless ($ENV{RELEASE_TESTING}) { +- plan skip_all => 'Author tests not required for installation (set RELEASE_TESTING to test)'; +-} +- + # Figure out the directories. This comes from Test::Inter. + + my($moddir,$testdir,$libdir); +diff --git a/t/_version.t b/t/_version.t +index fe31123..9d6c112 100755 +--- a/t/_version.t ++++ b/t/_version.t +@@ -3,14 +3,18 @@ + use warnings 'all'; + use strict; + use Test::Inter; +-use IO::File; +-use File::Find::Rule; +-my $ti = new Test::Inter $0; ++my $ti; + +-unless ($ENV{RELEASE_TESTING}) { +- $ti->skip_all('Author tests not required for installation (set RELEASE_TESTING to test)'); ++BEGIN { ++ $ti = new Test::Inter $0; ++ unless ($ENV{RELEASE_TESTING}) { ++ $ti->skip_all('Author tests not required for installation (set RELEASE_TESTING to test)'); ++ } + } + ++use IO::File; ++use File::Find::Rule; ++ + # Figure out what module we are in. A module is in a directory: + # My-Mod-Name-1.00 + # It includes any number of .pm files, each of which contain a single +-- +2.20.1 + diff --git a/perl-Locale-Codes.spec b/perl-Locale-Codes.spec index 2a6a5f1..0e7fe0a 100644 --- a/perl-Locale-Codes.spec +++ b/perl-Locale-Codes.spec @@ -5,6 +5,9 @@ Summary: Distribution of modules to handle locale codes License: GPL+ or Artistic URL: https://metacpan.org/release/Locale-Codes Source0: https://cpan.metacpan.org/authors/id/S/SB/SBECK/Locale-Codes-%{version}.tar.gz +# Stop requiring dependencies of release tests, proposed to upstream +# +Patch0: Locale-Codes-3.61-Stop-depending-on-release-tests-dependencies.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: make @@ -22,15 +25,15 @@ BuildRequires: perl(Exporter) BuildRequires: perl(if) BuildRequires: perl(utf8) # Tests: -BuildRequires: perl(Cwd) -BuildRequires: perl(File::Basename) -BuildRequires: perl(File::Find::Rule) -BuildRequires: perl(IO::File) -BuildRequires: perl(lib) +# Cwd not used +# File::Basename not used +# File::Find::Rule not used +# IO::File not used +# lib not used BuildRequires: perl(Test::Inter) >= 1.09 BuildRequires: perl(Test::More) -BuildRequires: perl(Test::Pod) >= 1.00 -BuildRequires: perl(Test::Pod::Coverage) >= 1.00 +# Test::Pod 1.00 not used +# Test::Pod::Coverage 1.00 not used Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) # deprecate not used on perl < 5.27.7 @@ -45,6 +48,7 @@ including languages, countries, currency, etc. %prep %setup -q -n Locale-Codes-%{version} +%patch0 -p1 chmod -x examples/* %build