From fa58a1a99e9db8b656ef2899a15f5c32a907e595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 11 May 2017 10:41:01 +0200 Subject: [PATCH] Upgrade to 3.34 as provided in perl-5.25.12 --- ...-avoid-loading-optional-modules-from.patch | 10 - ExtUtils-ParseXS-3.31-Upgrade-to-3.34.patch | 275 ++++++++++++++++++ perl-ExtUtils-ParseXS.spec | 18 +- 3 files changed, 284 insertions(+), 19 deletions(-) delete mode 100644 ExtUtils-ParseXS-3.31-CVE-2016-1238-avoid-loading-optional-modules-from.patch create mode 100644 ExtUtils-ParseXS-3.31-Upgrade-to-3.34.patch diff --git a/ExtUtils-ParseXS-3.31-CVE-2016-1238-avoid-loading-optional-modules-from.patch b/ExtUtils-ParseXS-3.31-CVE-2016-1238-avoid-loading-optional-modules-from.patch deleted file mode 100644 index 1e75e40..0000000 --- a/ExtUtils-ParseXS-3.31-CVE-2016-1238-avoid-loading-optional-modules-from.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff -up ExtUtils-ParseXS/lib/ExtUtils/xsubpp.cve ExtUtils-ParseXS/lib/ExtUtils/xsubpp ---- ExtUtils-ParseXS/lib/ExtUtils/xsubpp.cve 2016-02-05 16:26:05.000000000 +0100 -+++ ExtUtils-ParseXS/lib/ExtUtils/xsubpp 2016-08-02 13:39:39.791316159 +0200 -@@ -1,5 +1,6 @@ - #!perl - use 5.006; -+BEGIN { pop @INC if $INC[-1] eq '.' } - use strict; - eval { - require ExtUtils::ParseXS; diff --git a/ExtUtils-ParseXS-3.31-Upgrade-to-3.34.patch b/ExtUtils-ParseXS-3.31-Upgrade-to-3.34.patch new file mode 100644 index 0000000..db0f194 --- /dev/null +++ b/ExtUtils-ParseXS-3.31-Upgrade-to-3.34.patch @@ -0,0 +1,275 @@ +From 4b2815b7f0ba35a832937015abbdf3c14e6b5db6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 11 May 2017 10:34:43 +0200 +Subject: [PATCH] Upgrade to 3.34 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Unbundled from perl-5.25.12. + +Signed-off-by: Petr Písař +--- + lib/ExtUtils/ParseXS.pm | 4 ++-- + lib/ExtUtils/ParseXS.pod | 2 +- + lib/ExtUtils/ParseXS/Constants.pm | 2 +- + lib/ExtUtils/ParseXS/CountLines.pm | 2 +- + lib/ExtUtils/ParseXS/Eval.pm | 2 +- + lib/ExtUtils/ParseXS/Utilities.pm | 4 ++-- + lib/ExtUtils/Typemaps.pm | 12 ++++++------ + lib/ExtUtils/Typemaps/Cmd.pm | 2 +- + lib/ExtUtils/Typemaps/InputMap.pm | 2 +- + lib/ExtUtils/Typemaps/OutputMap.pm | 2 +- + lib/ExtUtils/Typemaps/Type.pm | 2 +- + lib/ExtUtils/xsubpp | 1 + + t/001-basic.t | 1 + + t/002-more.t | 1 + + t/003-usage.t | 1 + + 15 files changed, 22 insertions(+), 18 deletions(-) + +diff --git a/lib/ExtUtils/ParseXS.pm b/lib/ExtUtils/ParseXS.pm +index 32d74e1..5aec25d 100644 +--- a/lib/ExtUtils/ParseXS.pm ++++ b/lib/ExtUtils/ParseXS.pm +@@ -11,7 +11,7 @@ use Symbol; + + our $VERSION; + BEGIN { +- $VERSION = '3.31'; ++ $VERSION = '3.34'; + } + use ExtUtils::ParseXS::Constants $VERSION; + use ExtUtils::ParseXS::CountLines $VERSION; +@@ -686,7 +686,7 @@ EOF + var => $_, + do_setmagic => $self->{DoSetMagic}, + do_push => undef, +- } ) for grep $self->{in_out}->{$_} =~ /OUT$/, keys %{ $self->{in_out} }; ++ } ) for grep $self->{in_out}->{$_} =~ /OUT$/, sort keys %{ $self->{in_out} }; + + my $prepush_done; + # all OUTPUT done, so now push the return value on the stack +diff --git a/lib/ExtUtils/ParseXS.pod b/lib/ExtUtils/ParseXS.pod +index 6bec014..80bf13f 100644 +--- a/lib/ExtUtils/ParseXS.pod ++++ b/lib/ExtUtils/ParseXS.pod +@@ -20,7 +20,7 @@ ExtUtils::ParseXS - converts Perl XS code into C code + optimize => 1, + prototypes => 1, + ); +- ++ + # Legacy non-OO interface using a singleton: + use ExtUtils::ParseXS qw(process_file); + process_file( filename => 'foo.xs' ); +diff --git a/lib/ExtUtils/ParseXS/Constants.pm b/lib/ExtUtils/ParseXS/Constants.pm +index 2319a24..dfc74de 100644 +--- a/lib/ExtUtils/ParseXS/Constants.pm ++++ b/lib/ExtUtils/ParseXS/Constants.pm +@@ -3,7 +3,7 @@ use strict; + use warnings; + use Symbol; + +-our $VERSION = '3.31'; ++our $VERSION = '3.34'; + + =head1 NAME + +diff --git a/lib/ExtUtils/ParseXS/CountLines.pm b/lib/ExtUtils/ParseXS/CountLines.pm +index 222a95c..98251a8 100644 +--- a/lib/ExtUtils/ParseXS/CountLines.pm ++++ b/lib/ExtUtils/ParseXS/CountLines.pm +@@ -1,7 +1,7 @@ + package ExtUtils::ParseXS::CountLines; + use strict; + +-our $VERSION = '3.31'; ++our $VERSION = '3.34'; + + our $SECTION_END_MARKER; + +diff --git a/lib/ExtUtils/ParseXS/Eval.pm b/lib/ExtUtils/ParseXS/Eval.pm +index 7315332..833753b 100644 +--- a/lib/ExtUtils/ParseXS/Eval.pm ++++ b/lib/ExtUtils/ParseXS/Eval.pm +@@ -2,7 +2,7 @@ package ExtUtils::ParseXS::Eval; + use strict; + use warnings; + +-our $VERSION = '3.31'; ++our $VERSION = '3.34'; + + =head1 NAME + +diff --git a/lib/ExtUtils/ParseXS/Utilities.pm b/lib/ExtUtils/ParseXS/Utilities.pm +index 41a9f6d..b2e8cb8 100644 +--- a/lib/ExtUtils/ParseXS/Utilities.pm ++++ b/lib/ExtUtils/ParseXS/Utilities.pm +@@ -5,7 +5,7 @@ use Exporter; + use File::Spec; + use ExtUtils::ParseXS::Constants (); + +-our $VERSION = '3.31'; ++our $VERSION = '3.34'; + + our (@ISA, @EXPORT_OK); + @ISA = qw(Exporter); +@@ -472,7 +472,7 @@ S_croak_xs_usage(const CV *const cv, const char *const params) + Perl_croak_nocontext("Usage: %s(%s)", gvname, params); + } else { + /* Pants. I don't think that it should be possible to get here. */ +- Perl_croak_nocontext("Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params); ++ Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params); + } + } + #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE +diff --git a/lib/ExtUtils/Typemaps.pm b/lib/ExtUtils/Typemaps.pm +index 48d623e..51af88c 100644 +--- a/lib/ExtUtils/Typemaps.pm ++++ b/lib/ExtUtils/Typemaps.pm +@@ -2,7 +2,7 @@ package ExtUtils::Typemaps; + use 5.006001; + use strict; + use warnings; +-our $VERSION = '3.31'; ++our $VERSION = '3.34'; + + require ExtUtils::ParseXS; + require ExtUtils::ParseXS::Constants; +@@ -22,7 +22,7 @@ ExtUtils::Typemaps - Read/Write/Modify Perl/XS typemap files + # $typemap = ExtUtils::Typemaps->new(); + # alternatively create an in-memory typemap by parsing a string + # $typemap = ExtUtils::Typemaps->new(string => $sometypemap); +- ++ + # add a mapping + $typemap->add_typemap(ctype => 'NV', xstype => 'T_NV'); + $typemap->add_inputmap( +@@ -33,13 +33,13 @@ ExtUtils::Typemaps - Read/Write/Modify Perl/XS typemap files + ); + $typemap->add_string(string => $typemapstring); + # will be parsed and merged +- ++ + # remove a mapping (same for remove_typemap and remove_outputmap...) + $typemap->remove_inputmap(xstype => 'SomeType'); +- ++ + # save a typemap to a file + $typemap->write(file => 'anotherfile.map'); +- ++ + # merge the other typemap into this one + $typemap->merge(typemap => $another_typemap); + +@@ -536,7 +536,7 @@ sub get_outputmap { + + Write the typemap to a file. Optionally takes a C argument. If given, the + typemap will be written to the specified file. If not, the typemap is written +-to the currently stored file name (see C<-Efile> above, this defaults to the file ++to the currently stored file name (see L above, this defaults to the file + it was read from if any). + + =cut +diff --git a/lib/ExtUtils/Typemaps/Cmd.pm b/lib/ExtUtils/Typemaps/Cmd.pm +index ffed504..c9491a1 100644 +--- a/lib/ExtUtils/Typemaps/Cmd.pm ++++ b/lib/ExtUtils/Typemaps/Cmd.pm +@@ -2,7 +2,7 @@ package ExtUtils::Typemaps::Cmd; + use 5.006001; + use strict; + use warnings; +-our $VERSION = '3.31'; ++our $VERSION = '3.34'; + + use ExtUtils::Typemaps; + +diff --git a/lib/ExtUtils/Typemaps/InputMap.pm b/lib/ExtUtils/Typemaps/InputMap.pm +index 86c646d..ff620d8 100644 +--- a/lib/ExtUtils/Typemaps/InputMap.pm ++++ b/lib/ExtUtils/Typemaps/InputMap.pm +@@ -2,7 +2,7 @@ package ExtUtils::Typemaps::InputMap; + use 5.006001; + use strict; + use warnings; +-our $VERSION = '3.31'; ++our $VERSION = '3.34'; + + =head1 NAME + +diff --git a/lib/ExtUtils/Typemaps/OutputMap.pm b/lib/ExtUtils/Typemaps/OutputMap.pm +index 32cf9f9..c454c48 100644 +--- a/lib/ExtUtils/Typemaps/OutputMap.pm ++++ b/lib/ExtUtils/Typemaps/OutputMap.pm +@@ -2,7 +2,7 @@ package ExtUtils::Typemaps::OutputMap; + use 5.006001; + use strict; + use warnings; +-our $VERSION = '3.31'; ++our $VERSION = '3.34'; + + =head1 NAME + +diff --git a/lib/ExtUtils/Typemaps/Type.pm b/lib/ExtUtils/Typemaps/Type.pm +index abe93cb..764e4b6 100644 +--- a/lib/ExtUtils/Typemaps/Type.pm ++++ b/lib/ExtUtils/Typemaps/Type.pm +@@ -4,7 +4,7 @@ use strict; + use warnings; + require ExtUtils::Typemaps; + +-our $VERSION = '3.31'; ++our $VERSION = '3.34'; + + =head1 NAME + +diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp +index e2ac71a..d596cdf 100644 +--- a/lib/ExtUtils/xsubpp ++++ b/lib/ExtUtils/xsubpp +@@ -1,5 +1,6 @@ + #!perl + use 5.006; ++BEGIN { pop @INC if $INC[-1] eq '.' } + use strict; + eval { + require ExtUtils::ParseXS; +diff --git a/t/001-basic.t b/t/001-basic.t +index 9b2d204..04ba981 100644 +--- a/t/001-basic.t ++++ b/t/001-basic.t +@@ -11,6 +11,7 @@ my ($source_file, $obj_file, $lib_file); + require_ok( 'ExtUtils::ParseXS' ); + + chdir('t') if -d 't'; ++push @INC, '.'; + + use Carp; $SIG{__WARN__} = \&Carp::cluck; + +diff --git a/t/002-more.t b/t/002-more.t +index e4a68f2..4aaa3ab 100644 +--- a/t/002-more.t ++++ b/t/002-more.t +@@ -17,6 +17,7 @@ require_ok( 'ExtUtils::ParseXS' ); + ExtUtils::ParseXS->import('process_file'); + + chdir 't' if -d 't'; ++push @INC, '.'; + + use Carp; $SIG{__WARN__} = \&Carp::cluck; + +diff --git a/t/003-usage.t b/t/003-usage.t +index bfe10ac..00dfe0b 100644 +--- a/t/003-usage.t ++++ b/t/003-usage.t +@@ -18,6 +18,7 @@ my ($source_file, $obj_file, $lib_file, $module); + require_ok( 'ExtUtils::ParseXS' ); + + chdir('t') if -d 't'; ++push @INC, '.'; + + use Carp; $SIG{__WARN__} = \&Carp::cluck; + +-- +2.9.3 + diff --git a/perl-ExtUtils-ParseXS.spec b/perl-ExtUtils-ParseXS.spec index d8a11df..f30ee1b 100644 --- a/perl-ExtUtils-ParseXS.spec +++ b/perl-ExtUtils-ParseXS.spec @@ -2,26 +2,24 @@ Name: perl-ExtUtils-ParseXS # Epoch to compete with perl.spec Epoch: 1 -Version: 3.31 -Release: 368%{?dist} +Version: 3.34 +Release: 1%{?dist} Summary: Module and a script for converting Perl XS code into C code License: GPL+ or Artistic -Group: Development/Libraries URL: http://search.cpan.org/dist/ExtUtils-ParseXS/ Source0: http://www.cpan.org/authors/id/S/SM/SMUELLER/ExtUtils-ParseXS-%{base_version}.tar.gz # Unbundled from perl 5.24.0 Patch0: ExtUtils-ParseXS-3.30-Upgrade-to-3.31.patch -# Avoid loading optional modules from default . (CVE-2016-1238) -Patch1: ExtUtils-ParseXS-3.31-CVE-2016-1238-avoid-loading-optional-modules-from.patch +# Unbundled from perl 5.25.12 +Patch1: ExtUtils-ParseXS-3.31-Upgrade-to-3.34.patch BuildArch: noarch BuildRequires: coreutils -BuildRequires: findutils BuildRequires: make BuildRequires: perl BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl(Config) -BuildRequires: perl(ExtUtils::MakeMaker) >= 6.46 +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(File::Spec) BuildRequires: perl(strict) BuildRequires: perl(warnings) @@ -59,12 +57,11 @@ the glue necessary to let Perl access those functions. %patch1 -p1 %build -perl Makefile.PL INSTALLDIRS=vendor +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/* # Do not install xsubpp twice, RT#117289 rm $RPM_BUILD_ROOT%{perl_vendorlib}/ExtUtils/xsubpp @@ -81,6 +78,9 @@ make test %{_mandir}/man3/* %changelog +* Thu May 11 2017 Petr Pisar - 1:3.34-1 +- Upgrade to 3.34 as provided in perl-5.25.12 + * Sat Feb 11 2017 Fedora Release Engineering - 1:3.31-368 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild