pghmcfc pushed to perl-Package-DeprecationManager (master). "Update to 0.14 (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 21 11:26:30 UTC 2015


>From d839973514f68945848fb9408d564424b823f531 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul at city-fan.org>
Date: Tue, 21 Apr 2015 12:12:06 +0100
Subject: Update to 0.14

- New upstream release 0.14
  - Use any() from List::Util 1.33+ instead of List::MoreUtils
- Add patch to use List::MoreUtils::any() on old distributions where we don't
  have List::Util 1.33+
- Add patch to support building without Test::Code::TidyAll
- Classify buildreqs by usage
- Update patches as needed
- Use %license where possible
- Don't try to do the author or release tests for RHEL builds

diff --git a/Package-DeprecationManager-0.12-old-Test::More.patch b/Package-DeprecationManager-0.12-old-Test::More.patch
deleted file mode 100644
index a9ed10d..0000000
--- a/Package-DeprecationManager-0.12-old-Test::More.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- t/basic.t
-+++ t/basic.t
-@@ -2,12 +2,14 @@ use strict;
- use warnings;
- 
- use Test::Fatal;
--use Test::More 0.88;
-+use Test::More;
- 
- use Test::Requires {
-     'Test::Output' => '0.16',
- };
- 
-+plan tests => 25;
-+
- {
-     like(
-         exception {
-@@ -218,5 +220,3 @@ use Test::Requires {
-         q{},
-         'no deprecation warning for second call to My::Package1::foo()';
- }
--
--done_testing();
---- t/compile.t
-+++ t/compile.t
-@@ -1,9 +1,7 @@
- use strict;
- use warnings;
- 
--use Test::More 0.88;
-+use Test::More tests => 1;
- 
- eval "require Package::DeprecationManager";
- ok( ! $@, 'no errors loading require Package::DeprecationManager' );
--
--done_testing();
---- t/release-cpan-changes.t
-+++ t/release-cpan-changes.t
-@@ -1,15 +1,11 @@
- #!perl
- 
-+use Test::More;
-+
- BEGIN {
--  unless ($ENV{RELEASE_TESTING}) {
--    require Test::More;
--    Test::More::plan(skip_all => 'these tests are for release candidate testing');
--  }
-+    plan skip_all => 'these tests are for release candidate testing' unless ($ENV{RELEASE_TESTING});
-+    eval 'use Test::CPAN::Changes';
-+    plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
- }
- 
--
--use Test::More;
--eval 'use Test::CPAN::Changes';
--plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
- changes_ok();
--done_testing();
diff --git a/Package-DeprecationManager-0.12-stopwords.patch b/Package-DeprecationManager-0.12-stopwords.patch
deleted file mode 100644
index 91c053a..0000000
--- a/Package-DeprecationManager-0.12-stopwords.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- t/release-pod-spell.t
-+++ t/release-pod-spell.t
-@@ -31,3 +31,4 @@
- PayPal
- Rolsky
- api
-+deprecations
diff --git a/Package-DeprecationManager-0.14-no-Test::Code::TidyAll.patch b/Package-DeprecationManager-0.14-no-Test::Code::TidyAll.patch
new file mode 100644
index 0000000..ec8824c
--- /dev/null
+++ b/Package-DeprecationManager-0.14-no-Test::Code::TidyAll.patch
@@ -0,0 +1,16 @@
+--- t/release-tidyall.t
++++ t/release-tidyall.t
+@@ -9,9 +9,12 @@ BEGIN {
+ 
+ # This file was automatically generated by Dist::Zilla::Plugin::Test::TidyAll
+ 
+-use Test::Code::TidyAll 0.24;
+ use Test::More 0.88;
+ 
++eval 'use Test::Code::TidyAll 0.24;';
++plan skip_all => 'Test::Code::TidyAll 0.24 required for testing tidiness'
++    if $@;
++
+ tidyall_ok();
+ 
+ done_testing();
diff --git a/Package-DeprecationManager-0.14-old-List::Util.patch b/Package-DeprecationManager-0.14-old-List::Util.patch
new file mode 100644
index 0000000..b053717
--- /dev/null
+++ b/Package-DeprecationManager-0.14-old-List::Util.patch
@@ -0,0 +1,55 @@
+--- lib/Package/DeprecationManager.pm
++++ lib/Package/DeprecationManager.pm
+@@ -6,7 +6,7 @@ use warnings;
+ our $VERSION = '0.14';
+ 
+ use Carp qw( croak );
+-use List::Util 1.33 qw( any );
++use List::MoreUtils qw( any );
+ use Params::Util qw( _HASH0 );
+ use Sub::Install;
+ 
+--- Makefile.PL
++++ Makefile.PL
+@@ -19,7 +19,7 @@ my %WriteMakefileArgs = (
+   "NAME" => "Package::DeprecationManager",
+   "PREREQ_PM" => {
+     "Carp" => 0,
+-    "List::Util" => "1.33",
++    "List::MoreUtils" => "0",
+     "Params::Util" => 0,
+     "Sub::Install" => 0,
+     "strict" => 0,
+--- META.json
++++ META.json
+@@ -39,7 +39,7 @@
+       "runtime" : {
+          "requires" : {
+             "Carp" : "0",
+-            "List::Util" : "1.33",
++            "List::MoreUtils" : "0",
+             "Params::Util" : "0",
+             "Sub::Install" : "0",
+             "strict" : "0",
+--- META.yml
++++ META.yml
+@@ -26,7 +26,7 @@ provides:
+     version: '0.14'
+ requires:
+   Carp: '0'
+-  List::Util: '1.33'
++  List::MoreUtils: '0'
+   Params::Util: '0'
+   Sub::Install: '0'
+   strict: '0'
+--- t/00-report-prereqs.dd
++++ t/00-report-prereqs.dd
+@@ -24,7 +24,7 @@ do { my $x = {
+        'runtime' => {
+                       'requires' => {
+                                       'Carp' => '0',
+-                                      'List::Util' => '1.33',
++                                      'List::MoreUtils' => '0',
+                                       'Params::Util' => '0',
+                                       'Sub::Install' => '0',
+                                       'strict' => '0',
diff --git a/Package-DeprecationManager-0.14-old-Test::More.patch b/Package-DeprecationManager-0.14-old-Test::More.patch
new file mode 100644
index 0000000..580fb10
--- /dev/null
+++ b/Package-DeprecationManager-0.14-old-Test::More.patch
@@ -0,0 +1,133 @@
+--- t/author-eol.t
++++ t/author-eol.t
+@@ -11,7 +11,7 @@ use warnings;
+ 
+ # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.17
+ 
+-use Test::More 0.88;
++use Test::More;
+ use Test::EOL;
+ 
+ my @files = (
+@@ -33,5 +33,6 @@ my @files = (
+     't/release-tidyall.t'
+ );
+ 
++plan tests => scalar @files;
++
+ eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files;
+-done_testing;
+--- t/author-no-tabs.t
++++ t/author-no-tabs.t
+@@ -11,7 +11,7 @@ use warnings;
+ 
+ # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.13
+ 
+-use Test::More 0.88;
++use Test::More;
+ use Test::NoTabs;
+ 
+ my @files = (
+@@ -33,5 +33,6 @@ my @files = (
+     't/release-tidyall.t'
+ );
+ 
++plan tests => scalar @files;
++
+ notabs_ok($_) foreach @files;
+-done_testing;
+--- t/basic.t
++++ t/basic.t
+@@ -2,12 +2,14 @@ use strict;
+ use warnings;
+ 
+ use Test::Fatal;
+-use Test::More 0.88;
++use Test::More;
+ 
+ use Test::Requires {
+     'Test::Output' => '0.16',
+ };
+ 
++plan tests => 25;
++
+ {
+     ## no critic (BuiltinFunctions::ProhibitStringyEval, ErrorHandling::RequireCheckingReturnValueOfEval)
+     like(
+@@ -272,4 +274,3 @@ use Test::Requires {
+     );
+ }
+ 
+-done_testing();
+--- t/release-cpan-changes.t
++++ t/release-cpan-changes.t
+@@ -1,19 +1,16 @@
+ #!perl
+ 
++use Test::More;
++
+ BEGIN {
+-  unless ($ENV{RELEASE_TESTING}) {
+-    require Test::More;
+-    Test::More::plan(skip_all => 'these tests are for release candidate testing');
+-  }
++    plan skip_all => 'these tests are for release candidate testing' unless ($ENV{RELEASE_TESTING});
++    eval 'use Test::CPAN::Changes';
++    plan skip_all => 'Test::CPAN::Changes required for this test' if $@;
+ }
+ 
+ 
+ use strict;
+ use warnings;
+ 
+-use Test::More 0.96 tests => 2;
+-use_ok('Test::CPAN::Changes');
+-subtest 'changes_ok' => sub {
+-    changes_file_ok('Changes');
+-};
+-done_testing();
++plan tests => 4;
++changes_file_ok('Changes');
+--- t/release-pod-coverage.t
++++ t/release-pod-coverage.t
+@@ -10,7 +10,7 @@ BEGIN {
+ # This file was automatically generated by Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable.
+ 
+ use Test::Pod::Coverage 1.08;
+-use Test::More 0.88;
++use Test::More;
+ 
+ BEGIN {
+     if ( $] <= 5.008008 ) {
+@@ -49,4 +49,3 @@ for my $module ( sort @modules ) {
+     );
+ }
+ 
+-done_testing();
+--- t/release-test-version.t
++++ t/release-test-version.t
+@@ -26,5 +26,6 @@ push @imports, $params
+ 
+ Test::Version->import(@imports);
+ 
+-version_all_ok;
+-done_testing;
++plan tests => 3;
++
++version_all_ok();
+--- t/release-tidyall.t
++++ t/release-tidyall.t
+@@ -9,7 +9,7 @@ BEGIN {
+ 
+ # This file was automatically generated by Dist::Zilla::Plugin::Test::TidyAll
+ 
+-use Test::More 0.88;
++use Test::More;
+ 
+ eval 'use Test::Code::TidyAll 0.24;';
+ plan skip_all => 'Test::Code::TidyAll 0.24 required for testing tidiness'
+@@ -17,4 +17,3 @@ plan skip_all => 'Test::Code::TidyAll 0.
+ 
+ tidyall_ok();
+ 
+-done_testing();
diff --git a/Package-DeprecationManager-0.14-stopwords.patch b/Package-DeprecationManager-0.14-stopwords.patch
new file mode 100644
index 0000000..9798195
--- /dev/null
+++ b/Package-DeprecationManager-0.14-stopwords.patch
@@ -0,0 +1,8 @@
+--- t/author-pod-spell.t
++++ t/author-pod-spell.t
+@@ -38,3 +38,5 @@ bobtfish
+ lib
+ Package
+ DeprecationManager
++PayPal
++ve
diff --git a/perl-Package-DeprecationManager.spec b/perl-Package-DeprecationManager.spec
index 9d85d85..b5fdc17 100644
--- a/perl-Package-DeprecationManager.spec
+++ b/perl-Package-DeprecationManager.spec
@@ -1,45 +1,71 @@
 # We need to patch the test suite if we have an old version of Test::More
-%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
+%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.96) ? 1 : 0);' 2>/dev/null || echo 0)
 
-# Test::CPAN::Changes isn't available in EPEL-6 either, due to requirement of perl(version) ≥ 0.79
-%global cpan_changes_available %(expr 0%{?fedora} + 0%{?rhel} '>' 6)
+# CPAN::Meta isn't available in EPEL < 7 due to requirement of perl(version) ≥ 0.88
+%global cpan_meta_available %(expr 0%{?fedora} + 0%{?rhel} '>' 6)
+
+# TODO: BR: perl(Test::Code::TidyAll) >= 0.24 when available
+# NOTE: BR: perl(Test::Pod::No404s) not included as it requires network access
 
 Name:		perl-Package-DeprecationManager
-Version:	0.13
-Release:	11%{?dist}
+Version:	0.14
+Release:	1%{?dist}
 Summary:	Manage deprecation warnings for your distribution
 Group:		Development/Libraries
 License:	Artistic 2.0
 URL:		http://search.cpan.org/dist/Package-DeprecationManager/
 Source0:	http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Package-DeprecationManager-%{version}.tar.gz
-Patch1:		Package-DeprecationManager-0.12-old-Test::More.patch
-Patch3:		Package-DeprecationManager-0.12-stopwords.patch
+Patch0:		Package-DeprecationManager-0.14-no-Test::Code::TidyAll.patch
+Patch1:		Package-DeprecationManager-0.14-old-List::Util.patch
+Patch2:		Package-DeprecationManager-0.14-old-Test::More.patch
+Patch3:		Package-DeprecationManager-0.14-stopwords.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildArch:	noarch
-BuildRequires:	perl(Carp)
+# Module Build
+BuildRequires:	perl
 BuildRequires:	perl(ExtUtils::MakeMaker)
+# Module Runtime
+BuildRequires:	perl(Carp)
+%if 0%{?fedora} < 21 || 0%{?rhel} < 8
 BuildRequires:	perl(List::MoreUtils)
+%else
+BuildRequires:	perl(List::Util)
+%endif
 BuildRequires:	perl(Params::Util)
-BuildRequires:	perl(Pod::Coverage::TrustPod)
+BuildRequires:	perl(strict)
 BuildRequires:	perl(Sub::Install)
-%if %{cpan_changes_available}
-BuildRequires:	perl(Test::CPAN::Changes)
-%endif
-BuildRequires:	perl(Test::EOL)
+BuildRequires:	perl(warnings)
+# Test Suite
+BuildRequires:	perl(File::Spec)
+BuildRequires:	perl(IO::Handle)
+BuildRequires:	perl(IPC::Open3)
 BuildRequires:	perl(Test::Fatal)
 BuildRequires:	perl(Test::More)
-BuildRequires:	perl(Test::NoTabs)
-BuildRequires:	perl(Test::Output)
-BuildRequires:	perl(Test::Pod)
-BuildRequires:	perl(Test::Pod::Coverage)
 BuildRequires:	perl(Test::Requires)
-BuildRequires:	perl(Test::Spelling)
-# Can't use aspell-en from EPEL-7 as BR: for RHEL-7 package so skip the spell
-# check test there; test would fail rather than skip without Test::Spelling so
-# we need to keep that as a buildreq
-%if 0%{?rhel} < 7
-BuildRequires:	aspell-en
+# Optional Tests
+%if %{cpan_meta_available}
+BuildRequires:	perl(CPAN::Meta) >= 2.120900
+BuildRequires:	perl(CPAN::Meta::Prereqs)
+%endif
+%if 0%{?fedora} || 0%{?rhel} > 6
+BuildRequires:	perl(Test::Output) >= 0.16
 %endif
+%if 0%{!?perl_bootstrap:1} && ! 0%{?rhel}
+# Author Tests
+BuildRequires:	perl(Pod::Wordlist)
+BuildRequires:	perl(Test::EOL)
+BuildRequires:	perl(Test::NoTabs)
+BuildRequires:	perl(Test::Spelling), hunspell-en
+# Release Tests
+BuildRequires:	perl(Pod::Coverage::TrustPod)
+BuildRequires:	perl(Test::CPAN::Changes) >= 0.19
+BuildRequires:	perl(Test::Pod) >= 1.41
+BuildRequires:	perl(Test::Pod::Coverage) >= 1.08
+BuildRequires:	perl(Test::Pod::LinkCheck)
+BuildRequires:	perl(Test::Portability::Files)
+BuildRequires:	perl(Test::Version) >= 1.002
+%endif
+# Runtime
 Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 
 %description
@@ -52,12 +78,20 @@ the version when that feature was deprecated.
 %prep
 %setup -q -n Package-DeprecationManager-%{version}
 
-# Fix tests for Test::More prior to 0.88
-%if %{old_test_more}
+# Test::Code::TidyAll not yet available in Fedora
+%patch0
+
+# We need to patch the module if we have an old version of List::Util
+%if 0%{?fedora} < 21 || 0%{?rhel} < 8
 %patch1
 %endif
 
-# "deprecations" not a common dictionary word
+# Fix tests for Test::More prior to 0.96
+%if %{old_test_more}
+%patch2
+%endif
+
+# "PayPal" not a common dictionary word
 %patch3
 
 %build
@@ -71,17 +105,37 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} \;
 %{_fixperms} %{buildroot}
 
 %check
-make test RELEASE_TESTING=1
+%if 0%{!?perl_bootstrap:1} && ! 0%{?rhel}
+make test AUTHOR_TESTING=1 RELEASE_TESTING=1
+%else
+make test
+%endif
 
 %clean
 rm -rf %{buildroot}
 
 %files
-%doc Changes LICENSE README
+%if 0%{?_licensedir:1}
+%license LICENSE
+%else
+%doc LICENSE
+%endif
+%doc Changes README.md
 %{perl_vendorlib}/Package/
-%{_mandir}/man3/Package::DeprecationManager.3pm*
+%{_mandir}/man3/Package::DeprecationManager.3*
 
 %changelog
+* Tue Apr 21 2015 Paul Howarth <paul at city-fan.org> - 0.14-1
+- Update to 0.14
+  - Use any() from List::Util 1.33+ instead of List::MoreUtils
+- Add patch to use List::MoreUtils::any() on old distributions where we don't
+  have List::Util 1.33+
+- Add patch to support building without Test::Code::TidyAll
+- Classify buildreqs by usage
+- Update patches as needed
+- Use %%license where possible
+- Don't try to do the author or release tests for RHEL builds
+
 * Fri Aug 29 2014 Jitka Plesnikova <jplesnik at redhat.com> - 0.13-11
 - Perl 5.20 rebuild
 
diff --git a/sources b/sources
index 60d3828..a9a9ec3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-f81ae3c0f9bcac048eb4bff348b79f67  Package-DeprecationManager-0.13.tar.gz
+e15e14a4e3f914eff937a55549692f51  Package-DeprecationManager-0.14.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/perl-Package-DeprecationManager.git/commit/?h=master&id=d839973514f68945848fb9408d564424b823f531


More information about the perl-devel mailing list