7.28 bump

This commit is contained in:
Petr Písař 2017-05-31 08:10:13 +02:00
parent aec61269c1
commit dab34cb33d
4 changed files with 6 additions and 153 deletions

1
.gitignore vendored
View File

@ -30,3 +30,4 @@
/ExtUtils-MakeMaker-7.22.tar.gz
/ExtUtils-MakeMaker-7.24.tar.gz
/ExtUtils-MakeMaker-7.26.tar.gz
/ExtUtils-MakeMaker-7.28.tar.gz

View File

@ -1,148 +0,0 @@
From ac0ac1465c475550721983a9dd46a65a334d2d86 Mon Sep 17 00:00:00 2001
From: Graham Knop <haarg@haarg.org>
Date: Sun, 28 May 2017 11:16:46 +0200
Subject: [PATCH] check specifies meta versions of META_ADD/META_MERGE before
upgrading
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We need the meta spec version as specified in each META_ fragment to use
as a default for the other. Since we are upgrading the fragments
in-place, the meta version of META_ADD would always register as 2. This
would result in META_MERGE always defaulting to being processed as 2,
unless it had a meta-spec version specified itself.
Pre-calculate the spec versions to use as defaults prior to making any
modifications to the fragments, so our upgrade process doen't affect the
expected versions.
Fixes RT#121913.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
lib/ExtUtils/MM_Any.pm | 3 ++-
t/metafile_data.t | 58 +++++++++++++++++++++++++++++++++++++++++++++-----
2 files changed, 55 insertions(+), 6 deletions(-)
diff --git a/lib/ExtUtils/MM_Any.pm b/lib/ExtUtils/MM_Any.pm
index 7bf7034..15e8f1a 100644
--- a/lib/ExtUtils/MM_Any.pm
+++ b/lib/ExtUtils/MM_Any.pm
@@ -1329,8 +1329,9 @@ sub metafile_data {
# needs to be based on the original version
my $v1_add = _metaspec_version($meta_add) !~ /^2/;
+ my ($add_v, $merge_v) = map _metaspec_version($_), $meta_add, $meta_merge;
for my $frag ($meta_add, $meta_merge) {
- my $def_v = _metaspec_version($frag == $meta_add ? $meta_merge : $meta_add);
+ my $def_v = $frag == $meta_add ? $merge_v : $add_v;
$frag = CPAN::Meta::Converter->new($frag, default_version => $def_v)->upgrade_fragment;
}
diff --git a/t/metafile_data.t b/t/metafile_data.t
index acf621a..bb3670a 100644
--- a/t/metafile_data.t
+++ b/t/metafile_data.t
@@ -17,7 +17,7 @@ use File::Temp;
use Cwd;
use MakeMaker::Test::Utils;
-plan tests => 33;
+plan tests => 35;
require ExtUtils::MM_Any;
sub mymeta_ok {
@@ -268,6 +268,54 @@ my @GENERIC_OUT = (
);
is_deeply $mm->metafile_data(
{
+ resources => {
+ homepage => "https://metacpan.org/release/ExtUtils-MakeMaker",
+ repository => "http://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker",
+ },
+ },
+ { @METASPEC14 },
+ ), {
+ prereqs => { @REQ20 },
+ resources => {
+ homepage => "https://metacpan.org/release/ExtUtils-MakeMaker",
+ repository => {
+ url => "http://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker",
+ },
+ },
+ @GENERIC_OUT,
+ }, 'META_ADD takes meta version 1.4 from META_MERGE';
+}
+
+{
+ my $mm = $new_mm->(
+ @GENERIC_IN,
+ );
+ is_deeply $mm->metafile_data(
+ { @METASPEC14 },
+ {
+ resources => {
+ homepage => "https://metacpan.org/release/ExtUtils-MakeMaker",
+ repository => "http://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker",
+ },
+ },
+ ), {
+ prereqs => { @REQ20 },
+ resources => {
+ homepage => "https://metacpan.org/release/ExtUtils-MakeMaker",
+ repository => {
+ url => "http://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker",
+ },
+ },
+ @GENERIC_OUT,
+ }, 'META_MERGE takes meta version 1.4 from META_ADD';
+}
+
+{
+ my $mm = $new_mm->(
+ @GENERIC_IN,
+ );
+ is_deeply $mm->metafile_data(
+ {
'configure_requires' => {
'Fake::Module1' => 1,
},
@@ -280,14 +328,14 @@ my @GENERIC_OUT = (
},
},
},
- { 'meta-spec' => { 'version' => 2 }, }
+ { @METASPEC20 },
), {
prereqs => {
@REQ20,
test => { requires => { "Fake::Module2" => 2, }, },
},
@GENERIC_OUT,
- }, 'META_ADD takes meta version from META_MERGE';
+ }, 'META_ADD takes meta version 2 from META_MERGE';
}
{
@@ -295,7 +343,7 @@ my @GENERIC_OUT = (
@GENERIC_IN,
);
is_deeply $mm->metafile_data(
- { 'meta-spec' => { 'version' => 2 }, },
+ { @METASPEC20 },
{
'configure_requires' => {
'Fake::Module1' => 1,
@@ -315,7 +363,7 @@ my @GENERIC_OUT = (
test => { requires => { "Fake::Module2" => 2, }, },
},
@GENERIC_OUT,
- }, 'META_MERGE takes meta version from META_ADD';
+ }, 'META_MERGE takes meta version 2 from META_ADD';
}
# Test _REQUIRES key priority over META_ADD
--
2.9.4

View File

@ -1,7 +1,7 @@
%global cpan_name ExtUtils-MakeMaker
Name: perl-%{cpan_name}
Version: 7.26
Version: 7.28
Release: 1%{?dist}
Summary: Create a module Makefile
License: GPL+ or Artistic
@ -18,8 +18,6 @@ Patch2: %{cpan_name}-7.04-Unbundle-version.patch
Patch3: %{cpan_name}-7.22-Unbundle-Encode-Locale.patch
# Provide maybe_command independently, bug #1129443
Patch4: %{cpan_name}-7.11-Provide-ExtUtils-MM-methods-as-standalone-ExtUtils-M.patch
# Fix META generation, CPAN RT#121913, in upstream after 7.26
Patch5: %{cpan_name}-7.26-check-specifies-meta-versions-of-META_ADD-META_MERGE.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: make
@ -160,7 +158,6 @@ is an overkill for small subroutines.
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
# Remove bundled modules
rm -rf bundled
sed -i -e '/^bundled\// d' MANIFEST
@ -206,6 +203,9 @@ make test
%{_mandir}/man3/ExtUtils::MM::Utils.*
%changelog
* Wed May 31 2017 Petr Pisar <ppisar@redhat.com> - 7.28-1
- 7.28 bump
* Mon May 29 2017 Petr Pisar <ppisar@redhat.com> - 7.26-1
- 7.26 bump
- Fix META generation (CPAN RT#121913)

View File

@ -1 +1 @@
SHA512 (ExtUtils-MakeMaker-7.26.tar.gz) = a13a502d2e234020dc3901c7b7925d6256c3b378c10dffc56651333177385341df7dcfb6d3c875d610099611467f974566d81bba4c427a1dae638bddfb605e27
SHA512 (ExtUtils-MakeMaker-7.28.tar.gz) = 9ccdf00118b4e6f049db3d7eea637dc52adb3e4acc878cad10b6ed26b6af8fb5c8633fcd575a2116dff3d8f8ca8802110bb7e1932b331a759746e16eaf2826eb