Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Module-ScanDeps for 
openSUSE:Factory checked in at 2023-09-29 21:13:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Module-ScanDeps (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Module-ScanDeps.new.28202 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Module-ScanDeps"

Fri Sep 29 21:13:58 2023 rev:32 rq:1114064 version:1.340.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Module-ScanDeps/perl-Module-ScanDeps.changes    
    2023-08-08 17:43:29.577731200 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Module-ScanDeps.new.28202/perl-Module-ScanDeps.changes
     2023-09-29 21:15:21.245602502 +0200
@@ -1,0 +2,24 @@
+Mon Sep 25 03:06:45 UTC 2023 - Tina Müller <timueller+p...@suse.de>
+
+- updated to 1.34
+   see /usr/share/doc/packages/perl-Module-ScanDeps/Changes
+
+  1.34  2023-09-24
+  - Fix issue #19 (AKA rschupp/PAR-Packer#78): invalid paths in zip file
+    - Restore behaviour from version 1.31 when using "pp --execute ..." or
+      "scandeps.pl --execute ...".
+      When using "scan_deps(execute => 1, ...)", %INC as gleaned from
+      running the script must be sanitized. Contrary to documentation
+      "The  key  is the filename you specified (with module names
+      converted to pathnames)" %INC *may* contain keys that are
+      *absolute pathnames* (or start with "./relativ/path" when
+      "relative/path" is in @PATH). Examples are autosplitted modules
+      (for autosplit.ix and *.al files). pp will pack these absolute
+      paths into the zip (Archive::Zip doesn't complain) which
+      results in strange error messages when the packed executable
+      tries to unpack them under CACHEDIR/inc on Windows.
+      Add t/19-autosplit.t to test for this.
+      Add IPC::Run3 to TEST_REQUIRES, used in t/19-autosplit.t
+  - Add GitHub CI
+
+-------------------------------------------------------------------

Old:
----
  Module-ScanDeps-1.33.tar.gz

New:
----
  Module-ScanDeps-1.34.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Module-ScanDeps.spec ++++++
--- /var/tmp/diff_new_pack.T1fo8S/_old  2023-09-29 21:15:22.277639738 +0200
+++ /var/tmp/diff_new_pack.T1fo8S/_new  2023-09-29 21:15:22.277639738 +0200
@@ -18,9 +18,9 @@
 
 %define cpan_name Module-ScanDeps
 Name:           perl-Module-ScanDeps
-Version:        1.330.0
+Version:        1.340.0
 Release:        0
-%define cpan_version 1.33
+%define cpan_version 1.34
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        Recursively scan Perl code for dependencies
 URL:            https://metacpan.org/release/%{cpan_name}
@@ -28,12 +28,13 @@
 Source1:        cpanspec.yml
 BuildRequires:  perl
 BuildRequires:  perl-macros
+BuildRequires:  perl(IPC::Run3) >= 0.048
 BuildRequires:  perl(Module::Metadata)
 BuildRequires:  perl(Test::Requires)
 BuildRequires:  perl(version)
 Requires:       perl(Module::Metadata)
 Requires:       perl(version)
-Provides:       perl(Module::ScanDeps) = 1.330.0
+Provides:       perl(Module::ScanDeps) = 1.340.0
 Provides:       perl(Module::ScanDeps::Cache)
 %define         __perllib_provides /bin/true
 %{perl_requires}

++++++ Module-ScanDeps-1.33.tar.gz -> Module-ScanDeps-1.34.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-ScanDeps-1.33/Changes 
new/Module-ScanDeps-1.34/Changes
--- old/Module-ScanDeps-1.33/Changes    2023-08-04 17:46:21.000000000 +0200
+++ new/Module-ScanDeps-1.34/Changes    2023-09-24 17:16:36.000000000 +0200
@@ -1,3 +1,26 @@
+1.34  2023-09-24
+
+- Fix issue #19 (AKA rschupp/PAR-Packer#78): invalid paths in zip file
+  
+  - Restore behaviour from version 1.31 when using "pp --execute ..." or
+    "scandeps.pl --execute ...". 
+    
+    When using "scan_deps(execute => 1, ...)", %INC as gleaned from
+    running the script must be sanitized. Contrary to documentation
+    "The  key  is the filename you specified (with module names
+    converted to pathnames)" %INC *may* contain keys that are 
+    *absolute pathnames* (or start with "./relativ/path" when 
+    "relative/path" is in @PATH). Examples are autosplitted modules
+    (for autosplit.ix and *.al files). pp will pack these absolute
+    paths into the zip (Archive::Zip doesn't complain) which
+    results in strange error messages when the packed executable
+    tries to unpack them under CACHEDIR/inc on Windows.
+  
+    Add t/19-autosplit.t to test for this.
+    Add IPC::Run3 to TEST_REQUIRES, used in t/19-autosplit.t
+
+- Add GitHub CI
+
 1.33  2023-08-04
 
 - Recognize Moose/Moo/Mouse style inheritance ("extends") 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-ScanDeps-1.33/MANIFEST 
new/Module-ScanDeps-1.34/MANIFEST
--- old/Module-ScanDeps-1.33/MANIFEST   2023-08-04 17:47:53.000000000 +0200
+++ new/Module-ScanDeps-1.34/MANIFEST   2023-09-24 17:17:42.000000000 +0200
@@ -18,6 +18,7 @@
 t/16-scan_line.t
 t/17-private_methods.t
 t/18-findbin.t
+t/19-autosplit.t
 t/2-static_functional_interface_fake.t
 t/3-static_oo_interface_real.t
 t/4-static_functional_interface_options_fake.t
@@ -26,6 +27,10 @@
 t/7-check-dynaloader.t
 t/8-check_duplicated_entries.t
 t/9-check_path_to_inc_name.t
+t/data/autosplit/auto/Foo/autosplit.ix
+t/data/autosplit/auto/Foo/barnie.al
+t/data/autosplit/auto/Foo/fred.al
+t/data/autosplit/Foo.pm
 t/data/case-insensitive-keys/Foo.pm
 t/data/case-insensitive-keys/Foo2.pm
 t/data/case-insensitive-keys/that_case.pl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-ScanDeps-1.33/META.json 
new/Module-ScanDeps-1.34/META.json
--- old/Module-ScanDeps-1.33/META.json  2023-08-04 17:47:53.000000000 +0200
+++ new/Module-ScanDeps-1.34/META.json  2023-09-24 17:17:42.000000000 +0200
@@ -47,6 +47,7 @@
       },
       "test" : {
          "requires" : {
+            "IPC::Run3" : "0.048",
             "Test::More" : "0",
             "Test::Requires" : "0"
          }
@@ -64,6 +65,6 @@
       },
       "x_MailingList" : "mailto:p...@perl.org";
    },
-   "version" : "1.33",
+   "version" : "1.34",
    "x_serialization_backend" : "JSON::PP version 4.16"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-ScanDeps-1.33/META.yml 
new/Module-ScanDeps-1.34/META.yml
--- old/Module-ScanDeps-1.33/META.yml   2023-08-04 17:47:53.000000000 +0200
+++ new/Module-ScanDeps-1.34/META.yml   2023-09-24 17:17:42.000000000 +0200
@@ -4,6 +4,7 @@
   - 'Audrey Tang <c...@audreyt.org>'
 build_requires:
   ExtUtils::MakeMaker: '0'
+  IPC::Run3: '0.048'
   Test::More: '0'
   Test::Requires: '0'
 configure_requires:
@@ -34,5 +35,5 @@
   MailingList: mailto:p...@perl.org
   bugtracker: https://github.com/rschupp/Module-ScanDeps/issues
   repository: git://github.com/rschupp/Module-ScanDeps.git
-version: '1.33'
+version: '1.34'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-ScanDeps-1.33/Makefile.PL 
new/Module-ScanDeps-1.34/Makefile.PL
--- old/Module-ScanDeps-1.33/Makefile.PL        2021-05-12 10:49:54.000000000 
+0200
+++ new/Module-ScanDeps-1.34/Makefile.PL        2023-09-21 15:06:12.000000000 
+0200
@@ -24,6 +24,7 @@
     TEST_REQUIRES   => {
       'Test::More'       => 0,
       'Test::Requires'   => 0,
+      'IPC::Run3'        => '0.048',
     },
 
     EXE_FILES       => [ 'script/scandeps.pl' ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-ScanDeps-1.33/lib/Module/ScanDeps.pm 
new/Module-ScanDeps-1.34/lib/Module/ScanDeps.pm
--- old/Module-ScanDeps-1.33/lib/Module/ScanDeps.pm     2023-08-04 
17:35:17.000000000 +0200
+++ new/Module-ScanDeps-1.34/lib/Module/ScanDeps.pm     2023-09-21 
15:03:29.000000000 +0200
@@ -4,7 +4,7 @@
 use warnings;
 use vars qw( $VERSION @EXPORT @EXPORT_OK @ISA $CurrentPackage @IncludeLibs 
$ScanFileRE );
 
-$VERSION   = '1.33';
+$VERSION   = '1.34';
 @EXPORT    = qw( scan_deps scan_deps_runtime );
 @EXPORT_OK = qw( scan_line scan_chunk add_deps scan_deps_runtime 
path_to_inc_name );
 
@@ -1280,17 +1280,17 @@
         my $dir = "$inc/$subdir";
         next unless -d $dir;
 
-        # canonicalize $inc as newer versions of File::Find return
-        # a canonicalized $File::Find::name
-        (my $canon = $inc) =~ s|\\|\/|g;
+        # canonicalize $inc (ie. use "/" as filename separator exclusively)
+        # as newer versions of File::Find return a canonicalized 
$File::Find::name
+        (my $canon = $inc) =~ s|\\|/|g;
         File::Find::find(
             sub {
                 return unless -f $_;
                 return if $pm_only and !/\.p[mh]$/i;
-                (my $name = $File::Find::name) =~ s|\\|\/|g;
-                $name =~ s|^\Q$canon\E/||;
+                (my $file = $File::Find::name) =~ s|\\|/|g;
+                (my $name = $file) =~ s|^\Q$canon\E/||;
                 push @files, $pm_only ? $name
-                                      : { file => $File::Find::name, name => 
$name };
+                                      : { file => $file, name => $name };
             },
             $dir
         );
@@ -1581,7 +1581,7 @@
     my $rv = {};
 
     my $incs = join('|', sort { length($b) <=> length($a) }
-                              map { s:\\:/:g; s:^(/.*?)/+$:$1:; quotemeta($_) }
+                              map { s|\\|/|g; s|/+$||; quotemeta($_) }
                                   @{ $info->{'@INC'} });
     my $i = is_insensitive_fs() ? "i" : "";
     my $strip_inc_prefix = qr{^(?$i:$incs)/};
@@ -1589,7 +1589,14 @@
     require File::Spec;
 
     foreach my $key (keys %{ $info->{'%INC'} }) {
-        (my $path = $info->{'%INC'}{$key}) =~ s:\\:/:g;
+        (my $path = $info->{'%INC'}{$key}) =~ s|\\|/|g;
+
+        # NOTE: %INC may contain (as keys) absolute pathnames, 
+        # e.g. for autosplit .ix and .al files. In the latter case,
+        # the key may also start with "./" if found via a relative path in 
@INC.
+        $key =~ s|\\|/|g;
+        $key =~ s|^\./||;
+        $key =~ s/$strip_inc_prefix//;
 
         $rv->{$key} = {
             'used_by' => [],
@@ -1600,7 +1607,7 @@
     }
 
     foreach my $path (@{ $info->{dl_shared_objects} }) {
-        $path =~ s:\\:/:g;
+        $path =~ s|\\|/|g;
         (my $key = $path) =~ s/$strip_inc_prefix//;
 
         $rv->{$key} = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-ScanDeps-1.33/t/19-autosplit.t 
new/Module-ScanDeps-1.34/t/19-autosplit.t
--- old/Module-ScanDeps-1.33/t/19-autosplit.t   1970-01-01 01:00:00.000000000 
+0100
+++ new/Module-ScanDeps-1.34/t/19-autosplit.t   2023-09-22 11:40:28.000000000 
+0200
@@ -0,0 +1,98 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use File::Temp;
+use File::Spec;
+use IPC::Run3;
+
+use Test::More;
+use lib 't/data/autosplit';
+
+BEGIN { use_ok( 'Module::ScanDeps' ); }
+
+sub create_script
+{
+    my ($text) = @_;
+    my ($fh, $filename) = File::Temp::tempfile( UNLINK => 1, SUFFIX => '.pl' );
+    print $fh $text;
+    close $fh;
+    return $filename;
+}
+
+sub test_autosplit
+{
+    my ($tag, $scan, $expected, $text) = @_;
+
+    diag($tag);
+    my $filename = create_script($text);
+    my $rv = $scan->($filename);
+
+    foreach my $mod (@$expected)
+    {
+        ok($rv->{$mod}, "$mod detected");
+    }
+    my @bogus = grep { File::Spec->file_name_is_absolute($_) or m|^\.[/\\]| } 
keys %$rv;
+    is("@bogus", "", "no bogus keys in \$rv");
+}
+
+test_autosplit(
+    'use autosplitted module - static scan',
+    sub { scan_deps(files => [$_[0]], recurse => 1) },
+    [qw(AutoLoader.pm Foo.pm auto/Foo/autosplit.ix auto/Foo/barnie.al 
auto/Foo/fred.al)],
+    'use Foo');
+
+test_autosplit(
+    'use autosplitted module - runtime scan, absolute search path',
+    sub { scan_deps_runtime(files => [$_[0]], recurse => 1, execute => [qw(fee 
fo fum)]) },
+    [qw(AutoLoader.pm Foo.pm auto/Foo/autosplit.ix auto/Foo/barnie.al)],
+    << '...');
+        use Cwd;
+        use lib getcwd().'/t/data/autosplit';
+        my $Foo = "Foo";
+        eval "use $Foo";
+        Foo::blab(@ARGV);
+        Foo::barnie();
+...
+test_autosplit(
+    'use autosplitted module - runtime scan, relative search path',
+    sub { scan_deps_runtime(files => [$_[0]], recurse => 1, execute => 1) },
+    [qw(AutoLoader.pm Foo.pm auto/Foo/autosplit.ix auto/Foo/barnie.al)],
+    << '...');
+        use lib 't/data/autosplit';
+        my $Foo = "Foo";
+        eval "use $Foo";
+        Foo::blab(@ARGV);
+        Foo::barnie();
+...
+
+
+my $scanner = create_script(<< '...');
+    use Module::ScanDeps;
+    my ($file, @args) = @ARGV; 
+    scan_deps_runtime(files => [$file], recurse => 1, execute => \@args);
+...
+my $file = create_script(<< '...');
+        use lib 't/data/autosplit';
+        my $Foo = "Foo";
+        eval "use $Foo";
+        Foo::blab(@ARGV);
+        Foo::barnie();
+...
+my @args = qw(fee fo fum);
+
+# run $file with @args once and capture its output
+my $exp;
+run3([$^X, $scanner, $file, @args], \undef, \$exp);
+is($?, 0, "script ran successfully");
+my $rx = join(".*", map { quotemeta($_) } @args, "barnie!");
+like($exp, qr/$rx/s, "script output");
+
+# run $scanner on $file with @args
+my ($out, $err);
+run3([$^X, "-Mblib", $scanner, $file, @args], \undef, \$out, \$err);
+is($?, 0, "scanner ran successfully");
+is($out, $exp, "scanner output");
+
+done_testing();
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Module-ScanDeps-1.33/t/data/autosplit/Foo.pm 
new/Module-ScanDeps-1.34/t/data/autosplit/Foo.pm
--- old/Module-ScanDeps-1.33/t/data/autosplit/Foo.pm    1970-01-01 
01:00:00.000000000 +0100
+++ new/Module-ScanDeps-1.34/t/data/autosplit/Foo.pm    2023-09-21 
11:35:25.000000000 +0200
@@ -0,0 +1,21 @@
+package Foo;
+
+use strict;
+use warnings;
+
+use AutoLoader 'AUTOLOAD';
+
+sub blab
+{
+    my @blab = @_;
+    print "begin blab\n";
+    print "$_\n" foreach @blab;
+    print "end blab\n";
+}
+
+1;
+
+__END__
+
+sub fred { print "fred!\n" };
+sub barnie { print "barnie!\n" };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Module-ScanDeps-1.33/t/data/autosplit/auto/Foo/autosplit.ix 
new/Module-ScanDeps-1.34/t/data/autosplit/auto/Foo/autosplit.ix
--- old/Module-ScanDeps-1.33/t/data/autosplit/auto/Foo/autosplit.ix     
1970-01-01 01:00:00.000000000 +0100
+++ new/Module-ScanDeps-1.34/t/data/autosplit/auto/Foo/autosplit.ix     
2023-09-21 11:35:04.000000000 +0200
@@ -0,0 +1,6 @@
+# Index created by AutoSplit for Foo.pm
+#    (file acts as timestamp)
+package Foo;
+sub fred  ;
+sub barnie  ;
+1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Module-ScanDeps-1.33/t/data/autosplit/auto/Foo/barnie.al 
new/Module-ScanDeps-1.34/t/data/autosplit/auto/Foo/barnie.al
--- old/Module-ScanDeps-1.33/t/data/autosplit/auto/Foo/barnie.al        
1970-01-01 01:00:00.000000000 +0100
+++ new/Module-ScanDeps-1.34/t/data/autosplit/auto/Foo/barnie.al        
2023-09-21 11:35:04.000000000 +0200
@@ -0,0 +1,9 @@
+# NOTE: Derived from Foo.pm.
+# Changes made here will be lost when autosplit is run again.
+# See AutoSplit.pm.
+package Foo;
+
+#line 19 "Foo.pm (autosplit into auto/Foo/barnie.al)"
+sub barnie { print "barnie!\n" };
+1;
+# end of Foo::barnie
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Module-ScanDeps-1.33/t/data/autosplit/auto/Foo/fred.al 
new/Module-ScanDeps-1.34/t/data/autosplit/auto/Foo/fred.al
--- old/Module-ScanDeps-1.33/t/data/autosplit/auto/Foo/fred.al  1970-01-01 
01:00:00.000000000 +0100
+++ new/Module-ScanDeps-1.34/t/data/autosplit/auto/Foo/fred.al  2023-09-21 
11:35:04.000000000 +0200
@@ -0,0 +1,9 @@
+# NOTE: Derived from Foo.pm.
+# Changes made here will be lost when autosplit is run again.
+# See AutoSplit.pm.
+package Foo;
+
+#line 18 "Foo.pm (autosplit into auto/Foo/fred.al)"
+sub fred { print "fred!\n" };
+# end of Foo::fred
+1;

Reply via email to