Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Update PathTools with File::Path dep #16672

Closed
p5pRT opened this issue Aug 26, 2018 · 20 comments
Closed

[PATCH] Update PathTools with File::Path dep #16672

p5pRT opened this issue Aug 26, 2018 · 20 comments
Labels

Comments

@p5pRT
Copy link

p5pRT commented Aug 26, 2018

Migrated from rt.perl.org#133476 (status was 'resolved')

Searchable as RT133476$

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2018

From @mohawk2

This is a bug report for perl from etj@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.26.1.

From d873764f60160678d932bda37809c606f59bfdc7 Mon Sep 17 00​:00​:00 2001
From​: Ed J <etj@​cpan.org>
Date​: Sat, 25 Aug 2018 21​:53​:02 +0100
Subject​: [PATCH] dep File​::Path@​2.02 for t/abs2rel.t

This is needed because Perl 5.8.8 has File​::Path 1.08, which only supports
mkpath([qw(dir1 dir2)], ...), not mkpath(qw(dir1 dir2), ...). That breaks
PathTools/t/abs2rel.t on 5.8.8.


dist/PathTools/Makefile.PL | 1 +
1 file changed, 1 insertion(+)

Inline Patch
diff --git a/dist/PathTools/Makefile.PL b/dist/PathTools/Makefile.PL
index 11e04af523..cb0903688c 100644
--- a/dist/PathTools/Makefile.PL
+++ b/dist/PathTools/Makefile.PL
@@ -36,6 +36,7 @@ WriteMakefile
       'PREREQ_PM' => {
                'Carp' => '0',
                'File::Basename' => '0',
+                'File::Path' => '2.02', # t/abs2rel.t uses 
mkpath(@Dirs,...)   'Scalar​::Util' => '0'\,   \# done\_testing\(\) is used in dist/Cwd/t/Spec\.t   'Test​::More' => 0\.88\, \-\- 2\.17\.1

Flags​:
  category=library
  severity=low
  module=File​::Spec


Site configuration information for perl 5.26.1​:

Configured by osboxes at Thu Dec 7 03​:08​:11 GMT 2017.

Summary of my perl5 (revision 5 version 26 subversion 1) configuration​:

  Platform​:
  osname=linux
  osvers=4.10.0-35-generic
  archname=x86_64-linux
  uname='linux osboxes 4.10.0-35-generic #39~16.04.1-ubuntu smp wed sep 13
09​:02​:42 utc 2017 x86_64 x86_64 x86_64 gnulinux '
  config_args='-de -Dprefix=/home/osboxes/perl5/perlbrew/perls/perl-5.26.1
-Aeval​:scriptdir=/home/osboxes/perl5/perlbrew/perls/perl-5.26.1/bin'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=undef
  usemultiplicity=undef
  use64bitint=define
  use64bitall=define
  uselongdouble=undef
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  Compiler​:
  cc='cc'
  ccflags
='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  optimize='-O2'
  cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='5.4.0 20160609'
  gccosandvers=''
  intsize=4
  longsize=8
  ptrsize=8
  doublesize=8
  byteorder=12345678
  doublekind=3
  d_longlong=define
  longlongsize=8
  d_longdbl=define
  longdblsize=16
  longdblkind=3
  ivtype='long'
  ivsize=8
  nvtype='double'
  nvsize=8
  Off_t='off_t'
  lseeksize=8
  alignbytes=8
  prototype=define
  Linker and Libraries​:
  ld='cc'
  ldflags =' -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
  libs=-lpthread -lnsl -ldb -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.23.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.23'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E'
  cccdlflags='-fPIC'
  lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'

Locally applied patches​:
  Devel​::PatchPerl 1.40


@​INC for perl 5.26.1​:
  /home/osboxes/.perlbrew/libs/perl-5.26.1@​graphql/lib/perl5/5.26.1
  /home/osboxes/.perlbrew/libs/perl-5.26.1@​graphql/lib/perl5/x86_64-linux
  /home/osboxes/.perlbrew/libs/perl-5.26.1@​graphql/lib/perl5
  /home/osboxes/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux
  /home/osboxes/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1
  /home/osboxes/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux
  /home/osboxes/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1


Environment for perl 5.26.1​:
  HOME=/home/osboxes
  LANG=en_GB.UTF-8
  LANGUAGE=en_GB​:en
  LC_COLLATE=POSIX
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/home/osboxes/.perlbrew/libs/perl-5.26.1@​graphql/bin​:/home/osboxes/perl5/perlbrew/bin​:/home/osboxes/perl5/perlbrew/perls/perl-5.26.1/bin​:/home/osboxes/bin​:/home/osboxes/.local/bin​:/usr/local/sbin​:/usr/local/bin​:/usr/sbin​:/usr/bin​:/sbin​:/bin​:/usr/games​:/usr/local/games​:/snap/bin
  PERL5LIB=/home/osboxes/.perlbrew/libs/perl-5.26.1@​graphql/lib/perl5
  PERLBREW_BASHRC_VERSION=0.74
  PERLBREW_HOME=/home/osboxes/.perlbrew
  PERLBREW_LIB=graphql
  PERLBREW_MANPATH=/home/osboxes/.perlbrew/libs/perl-5.26.1@​graphql/man​:/home/osboxes/perl5/perlbrew/perls/perl-5.26.1/man
  PERLBREW_PATH=/home/osboxes/.perlbrew/libs/perl-5.26.1@​graphql/bin​:/home/osboxes/perl5/perlbrew/bin​:/home/osboxes/perl5/perlbrew/perls/perl-5.26.1/bin
  PERLBREW_PERL=perl-5.26.1
  PERLBREW_ROOT=/home/osboxes/perl5/perlbrew
  PERLBREW_VERSION=0.82
  PERL_BADLANG (unset)
  PERL_LOCAL_LIB_ROOT=/home/osboxes/.perlbrew/libs/perl-5.26.1@​graphql
  PERL_MB_OPT=--install_base
/home/osboxes/.perlbrew/libs/perl-5.26.1@​graphql
  PERL_MM_OPT=INSTALL_BASE=/home/osboxes/.perlbrew/libs/perl-5.26.1@​graphql
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2018

From @xsawyerx

Can you rebase this patch against the latest blead? It doesn't apply cleanly at the moment.

Also, if you can attach the patch instead of inlined, it would be easier to apply.

Thank you.

On Sat, 25 Aug 2018 19​:04​:14 -0700, etj@​cpan.org wrote​:

This is a bug report for perl from etj@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.26.1.

From d873764f60160678d932bda37809c606f59bfdc7 Mon Sep 17 00​:00​:00 2001
From​: Ed J <etj@​cpan.org>
Date​: Sat, 25 Aug 2018 21​:53​:02 +0100
Subject​: [PATCH] dep File​::Path@​2.02 for t/abs2rel.t

This is needed because Perl 5.8.8 has File​::Path 1.08, which only supports
mkpath([qw(dir1 dir2)], ...), not mkpath(qw(dir1 dir2), ...). That breaks
PathTools/t/abs2rel.t on 5.8.8.
---
dist/PathTools/Makefile.PL | 1 +
1 file changed, 1 insertion(+)

diff --git a/dist/PathTools/Makefile.PL b/dist/PathTools/Makefile.PL
index 11e04af523..cb0903688c 100644
--- a/dist/PathTools/Makefile.PL
+++ b/dist/PathTools/Makefile.PL
@​@​ -36,6 +36,7 @​@​ WriteMakefile
'PREREQ_PM' => {
'Carp' => '0',
'File​::Basename' => '0',
+ 'File​::Path' => '2.02', # t/abs2rel.t uses
mkpath(@​dirs,...)
'Scalar​::Util' => '0',
# done_testing() is used in dist/Cwd/t/Spec.t
'Test​::More' => 0.88,

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2018

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2018

From @jkeenan

On Sun, 26 Aug 2018 02​:04​:14 GMT, etj@​cpan.org wrote​:

This is a bug report for perl from etj@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.26.1.

From d873764f60160678d932bda37809c606f59bfdc7 Mon Sep 17 00​:00​:00 2001
From​: Ed J <etj@​cpan.org>
Date​: Sat, 25 Aug 2018 21​:53​:02 +0100
Subject​: [PATCH] dep File​::Path@​2.02 for t/abs2rel.t

This is needed because Perl 5.8.8 has File​::Path 1.08, which only supports
mkpath([qw(dir1 dir2)], ...), not mkpath(qw(dir1 dir2), ...). That breaks
PathTools/t/abs2rel.t on 5.8.8.
---
dist/PathTools/Makefile.PL | 1 +
1 file changed, 1 insertion(+)

diff --git a/dist/PathTools/Makefile.PL b/dist/PathTools/Makefile.PL
index 11e04af523..cb0903688c 100644
--- a/dist/PathTools/Makefile.PL
+++ b/dist/PathTools/Makefile.PL
@​@​ -36,6 +36,7 @​@​ WriteMakefile
'PREREQ_PM' => {
'Carp' => '0',
'File​::Basename' => '0',
+ 'File​::Path' => '2.02', # t/abs2rel.t uses
mkpath(@​dirs,...)

If you're going to insert a dependency on File​::Path, please require version 2.15. Earlier versions have had significant security flaws. 2.15 is what we are distributing with perl-5.28.

Thank you very much.

            'Scalar&#8203;::Util' => '0'\,
            \# done\_testing\(\) is used in dist/Cwd/t/Spec\.t
            'Test&#8203;::More' => 0\.88\,

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2018

From @xsawyerx

On 08/26/2018 06​:45 PM, James E Keenan via RT wrote​:

On Sun, 26 Aug 2018 02​:04​:14 GMT, etj@​cpan.org wrote​:

This is a bug report for perl from etj@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.26.1.

From d873764f60160678d932bda37809c606f59bfdc7 Mon Sep 17 00​:00​:00 2001
From​: Ed J <etj@​cpan.org>
Date​: Sat, 25 Aug 2018 21​:53​:02 +0100
Subject​: [PATCH] dep File​::Path@​2.02 for t/abs2rel.t

This is needed because Perl 5.8.8 has File​::Path 1.08, which only supports
mkpath([qw(dir1 dir2)], ...), not mkpath(qw(dir1 dir2), ...). That breaks
PathTools/t/abs2rel.t on 5.8.8.
---
dist/PathTools/Makefile.PL | 1 +
1 file changed, 1 insertion(+)

diff --git a/dist/PathTools/Makefile.PL b/dist/PathTools/Makefile.PL
index 11e04af523..cb0903688c 100644
--- a/dist/PathTools/Makefile.PL
+++ b/dist/PathTools/Makefile.PL
@​@​ -36,6 +36,7 @​@​ WriteMakefile
'PREREQ_PM' => {
'Carp' => '0',
'File​::Basename' => '0',
+ 'File​::Path' => '2.02', # t/abs2rel.t uses
mkpath(@​dirs,...)
If you're going to insert a dependency on File​::Path, please require version 2.15. Earlier versions have had significant security flaws. 2.15 is what we are distributing with perl-5.28.

If it's a dependencies solely for the test, we shouldn't add it in the
Makefile.PL unless a proper version (as Jim notes, 2.15) is already
available in an older version of Perl (at least older than $LATEST).

In this case, it seems we can just add it as an optional dependency to
the test itself without incurring a full dependency for the distribution.

Thoughts?

1 similar comment
@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2018

From @xsawyerx

On 08/26/2018 06​:45 PM, James E Keenan via RT wrote​:

On Sun, 26 Aug 2018 02​:04​:14 GMT, etj@​cpan.org wrote​:

This is a bug report for perl from etj@​cpan.org,
generated with the help of perlbug 1.40 running under perl 5.26.1.

From d873764f60160678d932bda37809c606f59bfdc7 Mon Sep 17 00​:00​:00 2001
From​: Ed J <etj@​cpan.org>
Date​: Sat, 25 Aug 2018 21​:53​:02 +0100
Subject​: [PATCH] dep File​::Path@​2.02 for t/abs2rel.t

This is needed because Perl 5.8.8 has File​::Path 1.08, which only supports
mkpath([qw(dir1 dir2)], ...), not mkpath(qw(dir1 dir2), ...). That breaks
PathTools/t/abs2rel.t on 5.8.8.
---
dist/PathTools/Makefile.PL | 1 +
1 file changed, 1 insertion(+)

diff --git a/dist/PathTools/Makefile.PL b/dist/PathTools/Makefile.PL
index 11e04af523..cb0903688c 100644
--- a/dist/PathTools/Makefile.PL
+++ b/dist/PathTools/Makefile.PL
@​@​ -36,6 +36,7 @​@​ WriteMakefile
'PREREQ_PM' => {
'Carp' => '0',
'File​::Basename' => '0',
+ 'File​::Path' => '2.02', # t/abs2rel.t uses
mkpath(@​dirs,...)
If you're going to insert a dependency on File​::Path, please require version 2.15. Earlier versions have had significant security flaws. 2.15 is what we are distributing with perl-5.28.

If it's a dependencies solely for the test, we shouldn't add it in the
Makefile.PL unless a proper version (as Jim notes, 2.15) is already
available in an older version of Perl (at least older than $LATEST).

In this case, it seems we can just add it as an optional dependency to
the test itself without incurring a full dependency for the distribution.

Thoughts?

@p5pRT
Copy link
Author

p5pRT commented Aug 26, 2018

From @mohawk2

Also would it be better as a TEST_REQUIRES rather than a PREREQ_PM? (with EUMM version-checking as appropriate)

Sorry about the space-mangled and non-attached patch. Had a nightmare getting the report filed at all. Is it deliberate there's no web interface to file Perl bugs, or is it just that I'm dumb and couldn't find it?

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2018

From @haarg

On Sun, Aug 26, 2018 at 4​:04 AM etj@​cpan.org (via RT)
<perlbug-followup@​perl.org> wrote​:

This is needed because Perl 5.8.8 has File​::Path 1.08, which only supports
mkpath([qw(dir1 dir2)], ...), not mkpath(qw(dir1 dir2), ...). That breaks
PathTools/t/abs2rel.t on 5.8.8.

I think a better solution is to just use the older style signature.
Adding a prereq adds a circular dependency that can trip up some
toolchains.

Alternate patch is attached.

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2018

From @haarg

0001-fix-mkpath-call-to-be-compatible-with-older-File-Pat.patch
From 1f07971186b71bd83633d10392075a30be6d9090 Mon Sep 17 00:00:00 2001
From: Graham Knop <[email protected]>
Date: Mon, 27 Aug 2018 11:12:05 +0200
Subject: [PATCH] fix mkpath call to be compatible with older File::Path

mkpath can be called multiple ways, but most aren't supported by very
old versions of File::Path.  A prerequisite could be added on a newer
version of the module that that supports the new call signature, but
this introduces a circular dependency.  While theoretically this
dependency should be resolvable, since the File::Spec prereq listed in
File::Path is version 0, some toolchains (in particular older CPAN.pm)
will fail to do so.

There isn't any particular advantage to using the new call signature, so
a simple solution is to adjust the test to use the older style.
---
 dist/PathTools/t/abs2rel.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 mode change 100644 => 100755 dist/PathTools/t/abs2rel.t

diff --git a/dist/PathTools/t/abs2rel.t b/dist/PathTools/t/abs2rel.t
old mode 100644
new mode 100755
index b77a1c2715..b813e3d1a6
--- a/dist/PathTools/t/abs2rel.t
+++ b/dist/PathTools/t/abs2rel.t
@@ -25,7 +25,7 @@ sub test_rel2abs {
         File::Spec->catdir('first_sub_dir',  'sub_sub_dir'),
         'second_sub_dir'
     );
-    mkpath(@subdirs, { mode => 0711 })
+    mkpath(\@subdirs, 0, 0711)
         or die "Unable to mkpath: $!";
 
     open my $OUT2, '>',
-- 
2.18.0

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2018

From @xsawyerx

Definitely better than our suggestions. Thank you. I'll apply this today.

On 08/27/2018 12​:26 PM, Graham Knop wrote​:

On Sun, Aug 26, 2018 at 4​:04 AM etj@​cpan.org (via RT)
<perlbug-followup@​perl.org> wrote​:

This is needed because Perl 5.8.8 has File​::Path 1.08, which only supports
mkpath([qw(dir1 dir2)], ...), not mkpath(qw(dir1 dir2), ...). That breaks
PathTools/t/abs2rel.t on 5.8.8.
I think a better solution is to just use the older style signature.
Adding a prereq adds a circular dependency that can trip up some
toolchains.

Alternate patch is attached.

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2018

From @jkeenan

On Mon, 27 Aug 2018 10​:12​:24 GMT, xsawyerx@​gmail.com wrote​:

Definitely better than our suggestions. Thank you. I'll apply this
today.

On 08/27/2018 12​:26 PM, Graham Knop wrote​:

On Sun, Aug 26, 2018 at 4​:04 AM etj@​cpan.org (via RT)
<perlbug-followup@​perl.org> wrote​:

This is needed because Perl 5.8.8 has File​::Path 1.08, which only
supports
mkpath([qw(dir1 dir2)], ...), not mkpath(qw(dir1 dir2), ...). That
breaks
PathTools/t/abs2rel.t on 5.8.8.
I think a better solution is to just use the older style signature.
Adding a prereq adds a circular dependency that can trip up some
toolchains.

Alternate patch is attached.

Would that resolve https://rt.cpan.org/Ticket/Display.html?id=123210 ?

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2018

From @mohawk2

On Mon, 27 Aug 2018 03​:12​:24 -0700, xsawyerx@​gmail.com wrote​:

Definitely better than our suggestions. Thank you. I'll apply this
today.

On 08/27/2018 12​:26 PM, Graham Knop wrote​:

On Sun, Aug 26, 2018 at 4​:04 AM etj@​cpan.org (via RT)
<perlbug-followup@​perl.org> wrote​:

This is needed because Perl 5.8.8 has File​::Path 1.08, which only
supports
mkpath([qw(dir1 dir2)], ...), not mkpath(qw(dir1 dir2), ...). That
breaks
PathTools/t/abs2rel.t on 5.8.8.
I think a better solution is to just use the older style signature.
Adding a prereq adds a circular dependency that can trip up some
toolchains.

Alternate patch is attached.

I agree this is a better solution!

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2018

From @xsawyerx

On 08/27/2018 12​:26 PM, Graham Knop wrote​:

On Sun, Aug 26, 2018 at 4​:04 AM etj@​cpan.org (via RT)
<perlbug-followup@​perl.org> wrote​:

This is needed because Perl 5.8.8 has File​::Path 1.08, which only supports
mkpath([qw(dir1 dir2)], ...), not mkpath(qw(dir1 dir2), ...). That breaks
PathTools/t/abs2rel.t on 5.8.8.
I think a better solution is to just use the older style signature.
Adding a prereq adds a circular dependency that can trip up some
toolchains.

Alternate patch is attached.

Merged. Pushed.

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2018

From @mohawk2

On Mon, 27 Aug 2018 13​:56​:33 -0700, xsawyerx@​gmail.com wrote​:

Merged. Pushed.

Could you indicate when a new CPAN PathTools release is likely?

@p5pRT
Copy link
Author

p5pRT commented Aug 28, 2018

From @xsawyerx

On 08/28/2018 12​:04 AM, etj@​cpan.org via RT wrote​:

On Mon, 27 Aug 2018 13​:56​:33 -0700, xsawyerx@​gmail.com wrote​:

Merged. Pushed.
Could you indicate when a new CPAN PathTools release is likely?

A few days at the latest.

1 similar comment
@p5pRT
Copy link
Author

p5pRT commented Aug 28, 2018

From @xsawyerx

On 08/28/2018 12​:04 AM, etj@​cpan.org via RT wrote​:

On Mon, 27 Aug 2018 13​:56​:33 -0700, xsawyerx@​gmail.com wrote​:

Merged. Pushed.
Could you indicate when a new CPAN PathTools release is likely?

A few days at the latest.

@p5pRT
Copy link
Author

p5pRT commented Aug 29, 2018

From @xsawyerx

On 08/28/2018 09​:01 AM, Sawyer X wrote​:

On 08/28/2018 12​:04 AM, etj@​cpan.org via RT wrote​:

On Mon, 27 Aug 2018 13​:56​:33 -0700, xsawyerx@​gmail.com wrote​:

Merged. Pushed.
Could you indicate when a new CPAN PathTools release is likely?
A few days at the latest.

And PathTools 3.75 is out.

@p5pRT
Copy link
Author

p5pRT commented Aug 29, 2018

@xsawyerx - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented May 22, 2019

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release today of Perl 5.30.0, this and 160 other issues have been
resolved.

Perl 5.30.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.30.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT
Copy link
Author

p5pRT commented May 22, 2019

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant