Hello community,
here is the log from the commit of package perl-PAR-Packer for openSUSE:Factory
checked in at 2020-03-19 19:53:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-PAR-Packer (Old)
and /work/SRC/openSUSE:Factory/.perl-PAR-Packer.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-PAR-Packer"
Thu Mar 19 19:53:15 2020 rev:16 rq:786469 version:1.050
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-PAR-Packer/perl-PAR-Packer.changes
2019-12-12 09:23:18.795274223 +0100
+++
/work/SRC/openSUSE:Factory/.perl-PAR-Packer.new.3160/perl-PAR-Packer.changes
2020-03-19 19:54:39.468278435 +0100
@@ -1,0 +2,39 @@
+Thu Mar 19 03:14:14 UTC 2020 - <[email protected]>
+
+- updated to 1.050
+ see /usr/share/doc/packages/perl-PAR-Packer/Changes
+
+ 1.050 2020-03-18
+
+ - Rethink use of Filter::PodStrip.
+
+ Do not add directives
+
+ #line 1 "file"
+
+ to packed modules except for "embdeded" files.
+ We still add these directives to "embedded" files as these are extracted
+ with mangled names which makes it hard to make sense of warn() or die()
messages
+ caused by them. These are all core modules and don't reference __FILE__.
+
+ This should make use of __FILE__ in packed modules work without
+ workarounds. __FILE__ is typically used to refer to installed non-module
+ resources, e.g.
+
+ # MIME::Types
+ my $db = File::Spec->catfile(dirname(__FILE__), 'types.db');
+
+ # Mozilla::CA
+ my $ca_file = File::Spec->catfile(dirname(__FILE__), "CA", "cacert.pem");
+
+ # Mojo::File (__FILE__ used implicitly by caller())
+ sub curfile { __PACKAGE__->new(Cwd::realpath((caller)[1])) }
+
+ Hence, remove known workarounds from Filter::PatchContent and add a test.
+
+ - Fix RT#130685: core module detection doesn't work with -Duserelocatableinc
+
+ Original patch by [email protected], thanx!
+ Added a test for this.
+
+-------------------------------------------------------------------
Old:
----
PAR-Packer-1.049.tar.gz
New:
----
PAR-Packer-1.050.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-PAR-Packer.spec ++++++
--- /var/tmp/diff_new_pack.xK9BYc/_old 2020-03-19 19:54:40.084278457 +0100
+++ /var/tmp/diff_new_pack.xK9BYc/_new 2020-03-19 19:54:40.088278457 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-PAR-Packer
#
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: perl-PAR-Packer
-Version: 1.049
+Version: 1.050
Release: 0
%define cpan_name PAR-Packer
Summary: PAR Packager
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
-URL: https://metacpan.org/release/%{cpan_name}
+Url: https://metacpan.org/release/%{cpan_name}
Source0:
https://cpan.metacpan.org/authors/id/R/RS/RSCHUPP/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -68,7 +68,7 @@
%prep
%setup -q -n %{cpan_name}-%{version}
-find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
+find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path
"*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
++++++ PAR-Packer-1.049.tar.gz -> PAR-Packer-1.050.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/Changes new/PAR-Packer-1.050/Changes
--- old/PAR-Packer-1.049/Changes 2019-05-31 13:54:06.000000000 +0200
+++ new/PAR-Packer-1.050/Changes 2020-03-18 09:06:22.000000000 +0100
@@ -1,3 +1,36 @@
+1.050 2020-03-18
+
+- Rethink use of Filter::PodStrip.
+
+ Do not add directives
+
+ #line 1 "file"
+
+ to packed modules except for "embdeded" files.
+ We still add these directives to "embedded" files as these are extracted
+ with mangled names which makes it hard to make sense of warn() or die()
messages
+ caused by them. These are all core modules and don't reference __FILE__.
+
+ This should make use of __FILE__ in packed modules work without
+ workarounds. __FILE__ is typically used to refer to installed non-module
+ resources, e.g.
+
+ # MIME::Types
+ my $db = File::Spec->catfile(dirname(__FILE__), 'types.db');
+
+ # Mozilla::CA
+ my $ca_file = File::Spec->catfile(dirname(__FILE__), "CA", "cacert.pem");
+
+ # Mojo::File (__FILE__ used implicitly by caller())
+ sub curfile { __PACKAGE__->new(Cwd::realpath((caller)[1])) }
+
+ Hence, remove known workarounds from Filter::PatchContent and add a test.
+
+- Fix RT#130685: core module detection doesn't work with -Duserelocatableinc
+
+ Original patch by [email protected], thanx!
+ Added a test for this.
+
1.049 2019-05-31
- Fix RT#129312: Code signing for OSX
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/MANIFEST
new/PAR-Packer-1.050/MANIFEST
--- old/PAR-Packer-1.049/MANIFEST 2019-05-31 13:55:13.000000000 +0200
+++ new/PAR-Packer-1.050/MANIFEST 2020-03-18 09:12:16.000000000 +0100
@@ -69,6 +69,7 @@
t/40-packer_cd_option.t
t/80-doublecolon.t
t/85-crt-glob.t
+t/85-myfile.t
t/90-rt101800.t
t/90-rt103861.t
t/90-rt104560.t
@@ -79,11 +80,13 @@
t/90-rt122949.t
t/90-rt127064.t
t/90-rt129312.t
+t/90-rt130685.t
t/90-rt59710.t
t/Double/Colon.pm
t/Double/Colon/Barnie.pm
t/Double/Colon/Foo/Bar/Quux.pm
t/Double/Colon/Fred.pm
+t/Myfile.pm
t/test-proc
t/utils.pl
META.yml Module YAML meta-data (added by
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/META.json
new/PAR-Packer-1.050/META.json
--- old/PAR-Packer-1.049/META.json 2019-05-31 13:55:12.000000000 +0200
+++ new/PAR-Packer-1.050/META.json 2020-03-18 09:12:16.000000000 +0100
@@ -78,6 +78,6 @@
},
"x_MailingList" : "mailto:[email protected]"
},
- "version" : "1.049",
- "x_serialization_backend" : "JSON::PP version 2.97001"
+ "version" : "1.050",
+ "x_serialization_backend" : "JSON::PP version 4.02"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/META.yml
new/PAR-Packer-1.050/META.yml
--- old/PAR-Packer-1.049/META.yml 2019-05-31 13:55:12.000000000 +0200
+++ new/PAR-Packer-1.050/META.yml 2020-03-18 09:12:16.000000000 +0100
@@ -48,5 +48,5 @@
MailingList: mailto:[email protected]
bugtracker: https://rt.cpan.org/Dist/Display.html?Queue=PAR-Packer
repository: git://github.com/rschupp/PAR-Packer.git
-version: '1.049'
+version: '1.050'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/lib/PAR/Filter/PatchContent.pm
new/PAR-Packer-1.050/lib/PAR/Filter/PatchContent.pm
--- old/PAR-Packer-1.049/lib/PAR/Filter/PatchContent.pm 2016-12-04
16:33:39.000000000 +0100
+++ new/PAR-Packer-1.050/lib/PAR/Filter/PatchContent.pm 2020-03-08
23:54:55.000000000 +0100
@@ -26,14 +26,6 @@
'$is_dosish = ' =>
'$is_dosish = $^O eq \'cygwin\' || ',
],
- 'MIME/Types.pm' => [
- 'File::Spec->catfile(dirname(__FILE__),' =>
- 'File::Spec->catfile($ENV{PAR_TEMP}, qw(inc lib MIME),',
- ],
- 'Mozilla/CA.pm' => [
- 'File::Spec->catfile(dirname(__FILE__), "CA", "cacert.pem")' =>
- 'File::Spec->catfile($ENV{PAR_TEMP}, qw(inc lib Mozilla CA
cacert.pem))',
- ],
'Pod/Usage.pm' => [
' = $0' =>
' = $ENV{PAR_0} || $0',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/lib/PAR/Packer.pm
new/PAR-Packer-1.050/lib/PAR/Packer.pm
--- old/PAR-Packer-1.049/lib/PAR/Packer.pm 2019-04-29 13:51:32.000000000
+0200
+++ new/PAR-Packer-1.050/lib/PAR/Packer.pm 2020-03-18 08:52:16.000000000
+0100
@@ -3,7 +3,7 @@
use strict;
use warnings;
-our $VERSION = '1.049';
+our $VERSION = '1.050';
=head1 NAME
@@ -35,6 +35,7 @@
use Module::ScanDeps ();
use PAR ();
use PAR::Filter ();
+use PAR::Filter::PodStrip ();
use constant OPTIONS => {
'a|addfile:s@' => 'Additional files to pack',
@@ -821,8 +822,9 @@
# generate a selective set of filters from the options passed in via -F
my $mod_filter = _generate_filter($opt, 'F');
- (my $privlib = $Config{privlib}) =~ s{\\}{/}g;
- (my $archlib = $Config{archlib}) =~ s{\\}{/}g;
+ my ($privlib, $archlib) = map { (my $lib = $_) =~ s{\\}{/}g; $lib }
+ @Config{qw(privlibexp archlibexp)};
+
foreach my $pfile (sort grep length $map{$_}, keys %map) {
next if !$opt->{B} and (
($map{$pfile} eq "$privlib/$pfile") or
@@ -957,7 +959,6 @@
filter => PAR::Filter->new($filter)
};
}
- my $podstrip = PAR::Filter->new('PodStrip');
my $filtersub = sub {
my $ref = shift;
@@ -975,7 +976,7 @@
# PodStrip by default, overridden by -F or $ENV{PAR_VERBATIM}
if ($filtered == 1 and not $verbatim) {
- $ref = $podstrip->apply($ref, $name);
+ $ref = PAR::Filter::PodStrip->apply($ref, '');
}
return $ref;
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/myldr/par_pl2c.pl
new/PAR-Packer-1.050/myldr/par_pl2c.pl
--- old/PAR-Packer-1.049/myldr/par_pl2c.pl 2019-05-17 20:54:06.000000000
+0200
+++ new/PAR-Packer-1.050/myldr/par_pl2c.pl 2020-03-08 23:54:55.000000000
+0100
@@ -10,7 +10,7 @@
my $slurp = do { local $/ = undef; <STDIN> };
-PAR::Filter::PodStrip->new->apply(\$slurp);
+PAR::Filter::PodStrip->apply(\$slurp, '');
print "const char *$var =\n";
foreach (split(/\n/, $slurp))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/script/par.pl
new/PAR-Packer-1.050/script/par.pl
--- old/PAR-Packer-1.049/script/par.pl 2019-05-19 16:28:43.000000000 +0200
+++ new/PAR-Packer-1.050/script/par.pl 2020-03-08 23:54:55.000000000 +0100
@@ -497,7 +497,7 @@
my $loader = scalar <_FH>;
if (!$ENV{PAR_VERBATIM} and $loader =~ /^(?:#!|\@rem)/) {
require PAR::Filter::PodStrip;
- PAR::Filter::PodStrip->new->apply(\$loader, $0)
+ PAR::Filter::PodStrip->apply(\$loader, $0);
}
foreach my $key (sort keys %env) {
my $val = $env{$key} or next;
@@ -578,7 +578,7 @@
$content = <FILE>;
close FILE;
- PAR::Filter::PodStrip->new->apply(\$content, $file)
+ PAR::Filter::PodStrip->apply(\$content, "<embedded>/$name")
if !$ENV{PAR_VERBATIM} and $name =~ /\.(?:pm|ix|al)$/i;
PAR::Filter::PatchContent->new->apply(\$content, $file, $name);
@@ -793,7 +793,7 @@
$ctx->addfile($fh);
close($fh);
$ctx->hexdigest;
- } // $mtime;
+ } || $mtime;
$stmpdir .= "$Config{_delim}cache-$digest";
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/t/85-myfile.t
new/PAR-Packer-1.050/t/85-myfile.t
--- old/PAR-Packer-1.049/t/85-myfile.t 1970-01-01 01:00:00.000000000 +0100
+++ new/PAR-Packer-1.050/t/85-myfile.t 2020-03-18 09:10:27.000000000 +0100
@@ -0,0 +1,38 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Cwd;
+use File::Spec::Functions;
+
+use Test::More;
+require "./t/utils.pl";
+
+plan tests => 6;
+
+my $exe = pp_ok(-I => "t", -e => <<'...');
+use Cwd;
+use Data::Dumper;
+use Myfile;
+my $data =
+{
+ par_temp => Cwd::realpath($ENV{PAR_TEMP}),
+ from_file => Myfile::from_file(),
+ from_caller => Myfile::from_caller(),
+};
+print Data::Dumper->new([$data], ['data'])->Useqq(1)->Dump;
+...
+
+my ($out, $err) = run_ok($exe);
+
+our $data;
+eval($out);
+
+my $exp_file = catfile($data->{par_temp}, qw( inc lib Myfile.pm ));
+$exp_file =~ s{\\}{/}g if $^O eq 'MSWin32';
+
+is($data->{from_file}, $exp_file, "expected source path from __FILE__");
+ok(-e $data->{from_file}, "file __FILE__ exists");
+is($data->{from_caller}, $exp_file, "expected source path from (caller)[1]");
+ok(-e $data->{from_caller}, "file (caller)[1] exists");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/t/90-rt130685.t
new/PAR-Packer-1.050/t/90-rt130685.t
--- old/PAR-Packer-1.049/t/90-rt130685.t 1970-01-01 01:00:00.000000000
+0100
+++ new/PAR-Packer-1.050/t/90-rt130685.t 2020-03-18 08:51:01.000000000
+0100
@@ -0,0 +1,51 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Config;
+use Cwd;
+use Archive::Zip qw( :ERROR_CODES :CONSTANTS );
+
+use Test::More;
+require "./t/utils.pl";
+
+# check that "pp -p" (without "-B") implies "pack no core modules"
+
+my @core_modules = qw( Carp Exporter File::Glob List::Util );
+
+plan tests => 2 * @core_modules;
+
+# Note: There may be dual-life core modules installed.
+# PAR::Packer won't consider them "core" unless it finds them in
$Config{archlibexp}
+# or $Config{privlibexp}.
+
+my ($privlib, $archlib) = map { (my $lib = $_) =~ s{\\}{/}g; $lib }
+ @Config{qw(privlibexp archlibexp)};
+
+foreach my $mod (@core_modules)
+{
+ (my $file = "$mod.pm") =~ s{::}{/}g;
+ require $file;
+ (my $path = Cwd::realpath($INC{$file})) =~ s{\\}{/}g;
+ diag("found core module $mod in $path");
+
+ SKIP:
+ {
+ if ($path eq "$privlib/$file" || $path eq "$archlib/$file")
+ {
+ # check that "pp -p ..." doesn't contain "lib/$file"
+ my $par = pp_ok(-p => -e => "use $mod;");
+
+ my $zip = Archive::Zip->new();
+ $zip->read($par) == AZ_OK
+ or die qq[can't open par file "$par"];
+
+ ok(!$zip->memberNamed("lib/$file"), ".par file doesn't contain
core module $mod");
+ }
+ else
+ {
+ skip "your $mod is not a core module (according to PAR::Packer)",
2;
+ }
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/PAR-Packer-1.049/t/Myfile.pm
new/PAR-Packer-1.050/t/Myfile.pm
--- old/PAR-Packer-1.049/t/Myfile.pm 1970-01-01 01:00:00.000000000 +0100
+++ new/PAR-Packer-1.050/t/Myfile.pm 2020-03-08 23:54:55.000000000 +0100
@@ -0,0 +1,11 @@
+package Myfile;
+
+use strict;
+use warnings;
+use Cwd;
+
+sub from_caller { Cwd::realpath(_from_caller()) }
+sub _from_caller { (caller)[1] }
+sub from_file { Cwd::realpath(__FILE__) }
+
+1;