pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/perl5 perl5: Compare inode numbers as string. Bum...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c84aa59a5a09
branches: trunk
changeset: 453390:c84aa59a5a09
user: rin <rin%pkgsrc.org@localhost>
date: Sat May 29 13:04:21 2021 +0000
description:
perl5: Compare inode numbers as string. Bump revision.
PR pkg/55997
Internal stat() function for perl stores inode number as string, if it
cannot be represented by host's integer. However, unfortunately, some
components compare them as integer.
Therefore, if 64-bit integers are not supported, files cannot be handled,
whose inode number is larger than UINT32_MAX.
Usually, inode numbers on real filesystems are well below UINT32_MAX. But,
inode numbers larger than UINT32_MAX are assigned for tmpfs on LP64 kernels.
This results in build failures for perl on COMPAT_NETBSD32 if working
directory is tmpfs, and perl-64bitint and friends are not specified.
Now, inode numbers are compared as string, which works just fine even if
64-bit integers are not supported.
Cherry-picked from upstream. See https://github.com/Perl/perl5/pull/18788
and related pull-requests for more details.
diffstat:
lang/perl5/Makefile | 4 +-
lang/perl5/distinfo | 6 +-
lang/perl5/patches/patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__Unix.pm | 21 ++-
lang/perl5/patches/patch-dist_PathTools_Cwd.pm | 70 ++++++++++
lang/perl5/patches/patch-lib_File_Copy.pm | 16 ++
5 files changed, 108 insertions(+), 9 deletions(-)
diffs (176 lines):
diff -r 9201b5179fc4 -r c84aa59a5a09 lang/perl5/Makefile
--- a/lang/perl5/Makefile Sat May 29 11:00:08 2021 +0000
+++ b/lang/perl5/Makefile Sat May 29 13:04:21 2021 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.270 2021/05/24 19:52:35 wiz Exp $
+# $NetBSD: Makefile,v 1.271 2021/05/29 13:04:21 rin Exp $
-PKGREVISION= 1
+PKGREVISION= 2
.include "license.mk"
.include "Makefile.common"
diff -r 9201b5179fc4 -r c84aa59a5a09 lang/perl5/distinfo
--- a/lang/perl5/distinfo Sat May 29 11:00:08 2021 +0000
+++ b/lang/perl5/distinfo Sat May 29 13:04:21 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.170 2021/05/24 17:46:25 wiz Exp $
+$NetBSD: distinfo,v 1.171 2021/05/29 13:04:21 rin Exp $
SHA1 (perl-5.34.0.tar.xz) = d461e206a1dca5e79d39e77debf0b564f6d77d37
RMD160 (perl-5.34.0.tar.xz) = ea671a6789db48db0036f763b5068db67be951d0
@@ -9,11 +9,13 @@
SHA1 (patch-caretx.c) = b76b4175a58123fa4dfd2adf36b2207dcb6cf65a
SHA1 (patch-cflags.SH) = e940e4452768ccc1bdf21d435094e7efffceb925
SHA1 (patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__BeOS.pm) = 79e5aeccfa272ca5ec08bffc616d8053ae90ac51
-SHA1 (patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__Unix.pm) = 3a2b39c9eb903e68ef7d03ae448c51c147c19aa1
+SHA1 (patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__Unix.pm) = 7b1caaea7327ebf492f8cde6b459286ecf7dd5ad
SHA1 (patch-cpan_ExtUtils-MakeMaker_t_MM__BeOS.t) = 9b0e7ab85fdab4887b1754599a8879bd7d9f36cc
+SHA1 (patch-dist_PathTools_Cwd.pm) = 2a62c7e7a71c103138d9960578431cab0f49435b
SHA1 (patch-hints_cygwin.sh) = 1b21d927d6b7379754c4cd64a2b05d3632c35470
SHA1 (patch-hints_linux.sh) = 4baa8f80695687abb53d4f4e1830cf86db5b2bf7
SHA1 (patch-hints_netbsd.sh) = 0d549a48800372d75fe34b783529a78cba90f646
SHA1 (patch-hints_solaris__2.sh) = 364a28ca57dbabe1f902b601e336532996db6a0e
SHA1 (patch-installperl) = b129d64cc17b898b44fe6282b8b1df36e342d0ef
+SHA1 (patch-lib_File_Copy.pm) = 99304793777e37ae13aa71607906e7648dcdbc65
SHA1 (patch-numeric.c) = 53dc8da40ad21d97072e8e2000f0a16c3353ff41
diff -r 9201b5179fc4 -r c84aa59a5a09 lang/perl5/patches/patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__Unix.pm
--- a/lang/perl5/patches/patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__Unix.pm Sat May 29 11:00:08 2021 +0000
+++ b/lang/perl5/patches/patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__Unix.pm Sat May 29 13:04:21 2021 +0000
@@ -1,10 +1,12 @@
-$NetBSD: patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__Unix.pm,v 1.1 2019/04/23 09:27:46 adam Exp $
+$NetBSD: patch-cpan_ExtUtils-MakeMaker_lib_ExtUtils_MM__Unix.pm,v 1.2 2021/05/29 13:04:21 rin Exp $
* $Is{NetBSD} and $Is{Interix} are unified into $Is{BSD}.
* Ignore installed packlist when creating new packlist.
+* Compare inode numbers as string to fix pkg/55997. Cherry-picked from
+ upstream. See https://github.com/Perl/perl5/pull/18788 for more details.
---- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm.orig 2017-04-19 13:37:05.000000000 +0000
-+++ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
+--- cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm.orig 2021-05-13 17:40:25.661784701 +0900
++++ cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm 2021-05-13 17:40:29.734082886 +0900
@@ -28,8 +28,6 @@ BEGIN {
$Is{VMS} = $^O eq 'VMS';
$Is{OSF} = $^O eq 'dec_osf';
@@ -14,7 +16,7 @@
$Is{SunOS4} = $^O eq 'sunos';
$Is{Solaris} = $^O eq 'solaris';
$Is{SunOS} = $Is{SunOS4} || $Is{Solaris};
-@@ -1022,7 +1020,7 @@ sub xs_make_dynamic_lib {
+@@ -1059,7 +1057,7 @@ sub xs_make_dynamic_lib {
push(@m," \$(RM_F) \$\@\n");
my $libs = '$(LDLOADLIBS)';
@@ -23,7 +25,16 @@
# Use nothing on static perl platforms, and to the flags needed
# to link against the shared libperl library on shared perl
# platforms. We peek at lddlflags to see if we need -Wl,-R
-@@ -2264,7 +2262,7 @@ pure_vendor_install :: all
+@@ -1314,7 +1312,7 @@ sub _fixin_replace_shebang {
+ if ($self->maybe_command($origcmd) && grep { $_ eq $origdir } @absdirs) {
+ my ($odev, $oino) = stat $origcmd;
+ my ($idev, $iino) = stat $interpreter;
+- if ($odev == $idev && $oino == $iino) {
++ if ($odev == $idev && $oino eq $iino) {
+ warn "$origcmd is the same as $interpreter, leaving alone"
+ if $Verbose;
+ $interpreter = $origcmd;
+@@ -2351,7 +2349,7 @@ pure_vendor_install :: all
$(NOECHO) $(MOD_INSTALL) \
};
push @m,
diff -r 9201b5179fc4 -r c84aa59a5a09 lang/perl5/patches/patch-dist_PathTools_Cwd.pm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/perl5/patches/patch-dist_PathTools_Cwd.pm Sat May 29 13:04:21 2021 +0000
@@ -0,0 +1,70 @@
+$NetBSD: patch-dist_PathTools_Cwd.pm,v 1.1 2021/05/29 13:04:21 rin Exp $
+
+Compare inode numbers as string to fix pkg/55997. Cherry-picked from
+upstream. See https://github.com/Perl/perl5/pull/18788 for more details.
+
+--- dist/PathTools/Cwd.pm.orig 2021-05-13 17:22:53.506472893 +0900
++++ dist/PathTools/Cwd.pm 2021-05-13 17:23:02.173970018 +0900
+@@ -275,7 +275,7 @@
+ ($odev, $oino) = ($cdev, $cino);
+ CORE::chdir('..') || return undef;
+ ($cdev, $cino) = stat('.');
+- last if $odev == $cdev && $oino == $cino;
++ last if $odev == $cdev && $oino eq $cino;
+ opendir(DIR, '.') || return undef;
+ for (;;) {
+ $direntry = readdir(DIR);
+@@ -284,7 +284,7 @@
+ next if $direntry eq '..';
+
+ ($tdev, $tino) = lstat($direntry);
+- last unless $tdev != $odev || $tino != $oino;
++ last unless $tdev != $odev || $tino ne $oino;
+ }
+ closedir(DIR);
+ return undef unless defined $direntry; # should never happen
+@@ -298,7 +298,7 @@
+ && CORE::chdir($1) or return undef;
+ ($cdev, $cino) = stat('.');
+ die "Unstable directory path, current directory changed unexpectedly"
+- if $cdev != $orig_cdev || $cino != $orig_cino;
++ if $cdev != $orig_cdev || $cino ne $orig_cino;
+ $path;
+ }
+ if (not defined &fastcwd) { *fastcwd = \&fastcwd_ }
+@@ -315,7 +315,7 @@
+ if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'dos' and $^O ne 'MSWin32') {
+ my($dd,$di) = stat('.');
+ my($pd,$pi) = stat($ENV{'PWD'});
+- if (!defined $dd or !defined $pd or $di != $pi or $dd != $pd) {
++ if (!defined $dd or !defined $pd or $di ne $pi or $dd != $pd) {
+ $ENV{'PWD'} = cwd();
+ }
+ }
+@@ -328,7 +328,7 @@
+ if ($^O ne 'MSWin32' and $ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|s) {
+ my($pd,$pi) = stat($2);
+ my($dd,$di) = stat($1);
+- if (defined $pd and defined $dd and $di == $pi and $dd == $pd) {
++ if (defined $pd and defined $dd and $di eq $pi and $dd == $pd) {
+ $ENV{'PWD'}="$2$3";
+ }
+ }
+@@ -430,7 +430,7 @@
+ $! = $e;
+ return undef;
+ }
+- if ($pst[0] == $cst[0] && $pst[1] == $cst[1])
++ if ($pst[0] == $cst[0] && $pst[1] eq $cst[1])
+ {
+ $dir = undef;
+ }
+@@ -448,7 +448,7 @@
+ $tst[0] = $pst[0]+1 unless (@tst = lstat("$dotdots/$dir"))
+ }
+ while ($dir eq '.' || $dir eq '..' || $tst[0] != $pst[0] ||
+- $tst[1] != $pst[1]);
++ $tst[1] ne $pst[1]);
+ }
+ $cwd = (defined $dir ? "$dir" : "" ) . "/$cwd" ;
+ closedir(PARENT);
diff -r 9201b5179fc4 -r c84aa59a5a09 lang/perl5/patches/patch-lib_File_Copy.pm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/perl5/patches/patch-lib_File_Copy.pm Sat May 29 13:04:21 2021 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-lib_File_Copy.pm,v 1.1 2021/05/29 13:04:21 rin Exp $
+
+Compare inode numbers as string to fix pkg/55997. Cherry-picked from
+upstream. See https://github.com/Perl/perl5/pull/18788 for more details.
+
+--- lib/File/Copy.pm.orig 2020-12-18 19:04:36.000000000 +0900
++++ lib/File/Copy.pm 2021-05-13 17:06:58.528282999 +0900
+@@ -104,7 +104,7 @@
+ my @fs = stat($from);
+ if (@fs) {
+ my @ts = stat($to);
+- if (@ts && $fs[0] == $ts[0] && $fs[1] == $ts[1] && !-p $from) {
++ if (@ts && $fs[0] == $ts[0] && $fs[1] eq $ts[1] && !-p $from) {
+ carp("'$from' and '$to' are identical (not copied)");
+ return 0;
+ }
Home |
Main Index |
Thread Index |
Old Index