From 85a1ba246b9bbd356f9a4e6a681637e480697b56 Mon Sep 17 00:00:00 2001 From: YellowJacketLinux Date: Sun, 23 Apr 2023 18:17:51 -0700 Subject: [PATCH] set proper minimum ExtUtils::MakeMaker version --- SPECS/perl-Capture-Tiny.spec | 2 +- SPECS/perl-MRO-Compat.spec | 2 +- SPECS/perl-Params-Util.spec | 2 +- SPECS/perl-Test-Warnings.spec | 96 ++++++++++++++--------------------- SPECS/perl-Text-Template.spec | 2 +- SPECS/perl-Try-Tiny.spec | 2 +- SPECS/perl-XML-Parser.spec | 2 +- 7 files changed, 45 insertions(+), 63 deletions(-) diff --git a/SPECS/perl-Capture-Tiny.spec b/SPECS/perl-Capture-Tiny.spec index 922d238..48b53d3 100644 --- a/SPECS/perl-Capture-Tiny.spec +++ b/SPECS/perl-Capture-Tiny.spec @@ -12,7 +12,7 @@ Source0: https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/%{cpanname}-%{versi BuildArch: noarch BuildRequires: perl-devel -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.17 +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 # for test %if 0%{?runtests:1} == 1 BuildRequires: perl(Test::More) >= 0.62 diff --git a/SPECS/perl-MRO-Compat.spec b/SPECS/perl-MRO-Compat.spec index bf4b802..5e11bfd 100644 --- a/SPECS/perl-MRO-Compat.spec +++ b/SPECS/perl-MRO-Compat.spec @@ -12,7 +12,7 @@ URL: https://metacpan.org/pod/MRO::Compat Source0: https://cpan.metacpan.org/authors/id/H/HA/HAARG/%{cpanname}-%{version}.tar.gz BuildRequires: perl-devel -BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 # for test %if 0%{?runtests:1} == 1 BuildRequires: perl(Test::More) perl(warnings) diff --git a/SPECS/perl-Params-Util.spec b/SPECS/perl-Params-Util.spec index b15e22b..b1ef426 100644 --- a/SPECS/perl-Params-Util.spec +++ b/SPECS/perl-Params-Util.spec @@ -18,7 +18,7 @@ URL: https://metacpan.org/pod/Params::Util Source0: https://cpan.metacpan.org/authors/id/R/RE/REHSACK/Params-Util-1.102.tar.gz BuildRequires: perl-devel -BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(Carp) BuildRequires: perl(File::Basename) BuildRequires: perl(File::Copy) diff --git a/SPECS/perl-Test-Warnings.spec b/SPECS/perl-Test-Warnings.spec index 375924a..fadcd75 100644 --- a/SPECS/perl-Test-Warnings.spec +++ b/SPECS/perl-Test-Warnings.spec @@ -1,52 +1,41 @@ -%global cpanname Test-Warnings - -%if %{?repo:1}%{!?repo:0} -%if "%{repo}" == "1.core." -%global norequiremetacheck foo -%global norequirepadwalker bar -%endif -%endif +%global cpanname Test-FailWarnings Name: perl-%{cpanname} -Version: 0.031 +Version: 0.008 Release: %{?repo}0.rc2%{?dist} -Summary: Test for warnings and the lack of them +Summary: Add test failures if warnings are caught BuildArch: noarch Group: Development/Libraries -License: GPL-1.0-or-later or Artistic-1.0-Perl -URL: https://metacpan.org/pod/Test::Warnings -Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/%{cpanname}-%{version}.tar.gz +License: Apache-2.0 +URL: https://metacpan.org/pod/Test::FailWarnings +Source0: https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/%{cpanname}-%{version}.tar.gz BuildRequires: perl-devel -BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 # for test %if 0%{?runtests:1} == 1 -BuildRequires: perl(CPAN::Meta) -BuildRequires: perl(Test::More) >= 0.94 -BuildRequires: perl(CPAN::Meta) -BuildRequires: perl(if) -BuildRequires: perl(Carp) -BuildRequires: perl(Exporter) -BuildRequires: perl(Test::Builder) -BuildRequires: perl(parent) -BuildRequires: perl(strict) +BuildRequires: perl(Test::More) >= 0.96 BuildRequires: perl(warnings) -# suggests -%if 0%{!?norequiremetacheck:1} == 1 -BuildRequires: perl(CPAN::Meta::Check) >= 0.011 +BuildRequires: perl(Capture::Tiny) >= 0.12 +BuildRequires: perl(File::Spec) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(IO::Handle) +BuildRequires: perl(IPC::Open3) +BuildRequires: perl(List::Util) +BuildRequires: perl(constant) +BuildRequires: perl(lib) +BuildRequires: perl(Carp) +BuildRequires: perl(Cwd) +BuildRequires: perl(File::Spec) +BuildRequires: perl(strict) %endif -BuildRequires: perl(CPAN::Meta::Requirements) -%if 0%{!?norequirepadwalker:1} == 1 -BuildRequires: perl(PadWalker) -%endif -BuildRequires: perl(Test::Tester) >= 0.108 -%endif -# runtime +# Runtime Requires: perl(Carp) -Requires: perl(Exporter) -Requires: perl(Test::Builder) -Requires: perl(parent) +Requires: perl(Cwd) +Requires: perl(File::Spec) +Requires: perl(Test::More) >= 0.96 Requires: perl(strict) Requires: perl(warnings) %if 0%{?perl5_API:1} == 1 @@ -54,18 +43,13 @@ Requires: %{perl5_API} %endif %description -If you've ever tried to use Test::NoWarnings to confirm there are no -warnings generated by your tests, combined with the convenience of -done_testing to not have to declare a test count, you'll have discovered -that these two features do not play well together, as the test count -will be calculated before the warnings test is run, resulting in a TAP -error. +This module hooks $SIG{__WARN__} and converts warnings to Test::More +fail() calls. It is designed to be used with done_testing, when you +don't need to know the test count in advance. -This module is intended to be used as a drop-in replacement for -Test::NoWarnings: it also adds an extra test, but runs this test before -done_testing calculates the test count, rather than after. It does this -by hooking into done_testing as well as via an END block. You can declare -a plan, or not, and things will still Just Work. +Just as with Test::NoWarnings, this does not catch warnings if other +things localize $SIG{__WARN__}, as this is designed to catch unhandled +warnings. %prep %setup -n %{cpanname}-%{version} @@ -89,20 +73,18 @@ make install DESTDIR=%{buildroot} %files %defattr(-,root,root,-) %dir %{perl5_vendorlib}/Test -%attr(0444,root,root) %{perl5_vendorlib}/Test/Warnings.pm -%attr(0644,root,root) %{_mandir}/man3/Test::Warnings.3* -%license LICENCE -%doc CONTRIBUTING Changes LICENCE README +%attr(0444,root,root) %{perl5_vendorlib}/Test/FailWarnings.pm +%attr(0644,root,root) %{_mandir}/man3/Test::FailWarnings.3* +%license LICENSE +%doc CONTRIBUTING Changes LICENSE README %doc %{name}-make.test.log %changelog -* Sun Apr 23 2023 Michael A. Peters - 0.031-0.rc2 -- BuildRequire perl-devel -- Conditionally require some optional test dependencies -- Conditionally run tests -- Require %%perl5_API +* Sun Apr 23 2023 Michael A. Peters - 0.008-0.rc3 +- BuildRequires perl-devel +- Conditionally run tests, require %%perl5_API -* Sat Apr 22 2023 Michael A. Peters - 0.031-0.rc1 +* Fri Apr 21 2023 Michael A. Peters - 0.008-0.rc1 - Initial spec file for YJL (RPM bootstrapping LFS/BLFS 11.3) diff --git a/SPECS/perl-Text-Template.spec b/SPECS/perl-Text-Template.spec index 9a54630..dd7b41a 100644 --- a/SPECS/perl-Text-Template.spec +++ b/SPECS/perl-Text-Template.spec @@ -12,7 +12,7 @@ URL: https://metacpan.org/pod/Text::Template Source0: https://cpan.metacpan.org/authors/id/M/MS/MSCHOUT/%{cpanname}-%{version}.tar.gz BuildRequires: perl-devel -BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 # for test %if 0%{?runtests:1} == 1 BuildRequires: perl(Test::More) diff --git a/SPECS/perl-Try-Tiny.spec b/SPECS/perl-Try-Tiny.spec index c7e6446..58e212e 100644 --- a/SPECS/perl-Try-Tiny.spec +++ b/SPECS/perl-Try-Tiny.spec @@ -12,7 +12,7 @@ Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/%{cpanname}-%{version} BuildArch: noarch BuildRequires: perl-devel -BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 # for test %if 0%{?runtests:1} == 1 BuildRequires: perl(Test::More) diff --git a/SPECS/perl-XML-Parser.spec b/SPECS/perl-XML-Parser.spec index 58855a7..30b0591 100644 --- a/SPECS/perl-XML-Parser.spec +++ b/SPECS/perl-XML-Parser.spec @@ -18,7 +18,7 @@ Source0: https://cpan.metacpan.org/authors/id/T/TO/TODDR/%{cpanname}-%{version} BuildRequires: perl-devel BuildRequires: expat-devel -BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 # for test %if 0%{?runtests:1} == 1 BuildRequires: perl(Test::More)