From aec61269c19170866853343f54d7e313eb33417c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 29 May 2017 10:00:16 +0200 Subject: [PATCH] 7.26 bump --- .gitignore | 1 + ...meta-versions-of-META_ADD-META_MERGE.patch | 148 ++++++++++++++++++ perl-ExtUtils-MakeMaker.spec | 18 ++- sources | 2 +- 4 files changed, 160 insertions(+), 9 deletions(-) create mode 100644 ExtUtils-MakeMaker-7.26-check-specifies-meta-versions-of-META_ADD-META_MERGE.patch diff --git a/.gitignore b/.gitignore index 032982f..79a6065 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ /ExtUtils-MakeMaker-7.18.tar.gz /ExtUtils-MakeMaker-7.22.tar.gz /ExtUtils-MakeMaker-7.24.tar.gz +/ExtUtils-MakeMaker-7.26.tar.gz diff --git a/ExtUtils-MakeMaker-7.26-check-specifies-meta-versions-of-META_ADD-META_MERGE.patch b/ExtUtils-MakeMaker-7.26-check-specifies-meta-versions-of-META_ADD-META_MERGE.patch new file mode 100644 index 0000000..979be28 --- /dev/null +++ b/ExtUtils-MakeMaker-7.26-check-specifies-meta-versions-of-META_ADD-META_MERGE.patch @@ -0,0 +1,148 @@ +From ac0ac1465c475550721983a9dd46a65a334d2d86 Mon Sep 17 00:00:00 2001 +From: Graham Knop +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ř +--- + 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 + diff --git a/perl-ExtUtils-MakeMaker.spec b/perl-ExtUtils-MakeMaker.spec index e182243..9d41408 100644 --- a/perl-ExtUtils-MakeMaker.spec +++ b/perl-ExtUtils-MakeMaker.spec @@ -1,11 +1,10 @@ %global cpan_name ExtUtils-MakeMaker Name: perl-%{cpan_name} -Version: 7.24 -Release: 2%{?dist} +Version: 7.26 +Release: 1%{?dist} Summary: Create a module Makefile License: GPL+ or Artistic -Group: Development/Libraries URL: http://search.cpan.org/dist/%{cpan_name}/ Source0: http://www.cpan.org/authors/id/B/BI/BINGOS/%{cpan_name}-%{version}.tar.gz # Do not set RPATH to perl shared-library modules by default. Bug #773622. @@ -19,9 +18,10 @@ 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: findutils BuildRequires: make BuildRequires: perl BuildRequires: perl-generators @@ -127,7 +127,6 @@ Dougherty and the perl5-porters. %package -n perl-ExtUtils-Command Summary: Perl routines to replace common UNIX commands in Makefiles License: GPL+ or Artistic -Group: Development/Libraries BuildArch: noarch Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(Carp) @@ -145,7 +144,6 @@ easier to deal with in Makefiles. %package -n perl-ExtUtils-MM-Utils Summary: ExtUtils::MM methods without dependency on ExtUtils::MakeMaker License: GPL+ or Artistic -Group: Development/Libraries BuildArch: noarch Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) @@ -162,6 +160,7 @@ 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 @@ -173,12 +172,11 @@ rm -rf lib/ExtUtils/MakeMaker/Locale.pm sed -i -e '/^lib\/ExtUtils\/MakeMaker\/Locale\.pm/ d' MANIFEST %build -BUILDING_AS_PACKAGE=1 perl Makefile.PL INSTALLDIRS=vendor +BUILDING_AS_PACKAGE=1 perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 make %{?_smp_mflags} %install make pure_install DESTDIR=$RPM_BUILD_ROOT -find $RPM_BUILD_ROOT -type f -name .packlist -delete %{_fixperms} $RPM_BUILD_ROOT/* %check @@ -208,6 +206,10 @@ make test %{_mandir}/man3/ExtUtils::MM::Utils.* %changelog +* Mon May 29 2017 Petr Pisar - 7.26-1 +- 7.26 bump +- Fix META generation (CPAN RT#121913) + * Sat Feb 11 2017 Fedora Release Engineering - 7.24-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index bc0d48b..b4a5c86 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -15c67ba2ea2c9e20a3d976b738adb113 ExtUtils-MakeMaker-7.24.tar.gz +SHA512 (ExtUtils-MakeMaker-7.26.tar.gz) = a13a502d2e234020dc3901c7b7925d6256c3b378c10dffc56651333177385341df7dcfb6d3c875d610099611467f974566d81bba4c427a1dae638bddfb605e27