summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2021-07-27 14:05:58 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2021-07-27 14:05:58 +0100
commitfbc41327d5599cf49e8f0c5a8e5395b52adf7d2c (patch)
treeb4a7ab5cdaced50031c2046647882acbaf97fa70 /cpan
parent0f43d404c75f5908ab84ef2cbb066838130b760a (diff)
downloadperl-fbc41327d5599cf49e8f0c5a8e5395b52adf7d2c.tar.gz
Update Archive-Tar to CPAN version 2.40
[DELTA] 2.40 27/07/2021 (KHW && ATOOMIC) - Generalize for EBCDIC - Update GitHub workflow with deprecated add-path
Diffstat (limited to 'cpan')
-rw-r--r--cpan/Archive-Tar/lib/Archive/Tar.pm2
-rw-r--r--cpan/Archive-Tar/lib/Archive/Tar/Constant.pm7
-rw-r--r--cpan/Archive-Tar/lib/Archive/Tar/File.pm2
-rw-r--r--cpan/Archive-Tar/t/02_methods.t41
-rw-r--r--cpan/Archive-Tar/t/04_resolved_issues.t5
-rw-r--r--cpan/Archive-Tar/t/05_iter.t6
-rw-r--r--cpan/Archive-Tar/t/09_roundtrip.t2
7 files changed, 51 insertions, 14 deletions
diff --git a/cpan/Archive-Tar/lib/Archive/Tar.pm b/cpan/Archive-Tar/lib/Archive/Tar.pm
index 91311619d7..476e646e44 100644
--- a/cpan/Archive-Tar/lib/Archive/Tar.pm
+++ b/cpan/Archive-Tar/lib/Archive/Tar.pm
@@ -31,7 +31,7 @@ use vars qw[$DEBUG $error $VERSION $WARN $FOLLOW_SYMLINK $CHOWN $CHMOD
$DEBUG = 0;
$WARN = 1;
$FOLLOW_SYMLINK = 0;
-$VERSION = "2.38";
+$VERSION = "2.40";
$CHOWN = 1;
$CHMOD = 1;
$SAME_PERMISSIONS = $> == 0 ? 1 : 0;
diff --git a/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm b/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm
index 825f2b1656..6f293a2f49 100644
--- a/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm
+++ b/cpan/Archive-Tar/lib/Archive/Tar/Constant.pm
@@ -8,7 +8,7 @@ use vars qw[$VERSION @ISA @EXPORT];
BEGIN {
require Exporter;
- $VERSION = '2.38';
+ $VERSION = '2.40';
@ISA = qw[Exporter];
require Time::Local if $^O eq "MacOS";
@@ -88,7 +88,10 @@ use constant XZ => do { !$ENV{'PERL5_AT_NO_XZ'} and
};
use constant GZIP_MAGIC_NUM => qr/^(?:\037\213|\037\235)/;
-use constant BZIP_MAGIC_NUM => qr/^BZh\d/;
+
+ # ASCII: B Z h 0 9
+use constant BZIP_MAGIC_NUM => qr/^\x42\x5A\x68[\x30-\x39]/;
+
use constant XZ_MAGIC_NUM => qr/^\xFD\x37\x7A\x58\x5A\x00/;
use constant CAN_CHOWN => sub { ($> == 0 and $^O ne "MacOS" and $^O ne "MSWin32") };
diff --git a/cpan/Archive-Tar/lib/Archive/Tar/File.pm b/cpan/Archive-Tar/lib/Archive/Tar/File.pm
index be380a5eb1..c361f046d7 100644
--- a/cpan/Archive-Tar/lib/Archive/Tar/File.pm
+++ b/cpan/Archive-Tar/lib/Archive/Tar/File.pm
@@ -11,7 +11,7 @@ use Archive::Tar::Constant;
use vars qw[@ISA $VERSION];
#@ISA = qw[Archive::Tar];
-$VERSION = '2.38';
+$VERSION = '2.40';
### set value to 1 to oct() it during the unpack ###
diff --git a/cpan/Archive-Tar/t/02_methods.t b/cpan/Archive-Tar/t/02_methods.t
index bff2f615eb..19d9212422 100644
--- a/cpan/Archive-Tar/t/02_methods.t
+++ b/cpan/Archive-Tar/t/02_methods.t
@@ -165,11 +165,21 @@ chmod 0644, $COMPRESS_FILE;
}
}
+my $ebcdic_skip_msg = "File contains an alien character set";
+
### read tests ###
-{ my @to_try = ($TAR_FILE);
- push @to_try, $TGZ_FILE if $Class->has_zlib_support;
- push @to_try, $TBZ_FILE if $Class->has_bzip2_support;
- push @to_try, $TXZ_FILE if $Class->has_xz_support;
+SKIP: {
+ my @to_try;
+
+ if (ord 'A' == 65) {
+ push @to_try, $TAR_FILE;
+ push @to_try, $TGZ_FILE if $Class->has_zlib_support;
+ push @to_try, $TBZ_FILE if $Class->has_bzip2_support;
+ push @to_try, $TXZ_FILE if $Class->has_xz_support;
+ }
+ else {
+ skip $ebcdic_skip_msg, 4;
+ }
for my $type( @to_try ) {
@@ -352,7 +362,11 @@ chmod 0644, $COMPRESS_FILE;
}
### rename/replace_content tests ###
-{ my $tar = $Class->new;
+
+SKIP: {
+ skip $ebcdic_skip_msg, 9 if ord "A" != 65;
+
+ my $tar = $Class->new;
my $from = 'c';
my $to = 'e';
@@ -383,7 +397,10 @@ chmod 0644, $COMPRESS_FILE;
}
### remove tests ###
-{ my $remove = 'c';
+SKIP: {
+ skip $ebcdic_skip_msg, 3 if ord "A" != 65;
+
+ my $remove = 'c';
my $tar = $Class->new;
ok( $tar->read( $TAR_FILE ), "Read in '$TAR_FILE'" );
@@ -399,6 +416,8 @@ chmod 0644, $COMPRESS_FILE;
### write + read + extract tests ###
SKIP: { ### pesky warnings
+ skip $ebcdic_skip_msg, 326 if ord "A" != 65;
+
skip('no IO::String', 326) if !$Archive::Tar::HAS_PERLIO &&
!$Archive::Tar::HAS_PERLIO &&
!$Archive::Tar::HAS_IO_STRING &&
@@ -508,7 +527,10 @@ SKIP: { ### pesky warnings
### limited read + extract tests ###
-{ my $tar = $Class->new;
+SKIP: { ### pesky warnings
+ skip $ebcdic_skip_msg, 8 if ord "A" != 65;
+
+ my $tar = $Class->new;
my @files = $tar->read( $TAR_FILE, 0, { limit => 1 } );
my $obj = $files[0];
@@ -549,7 +571,10 @@ SKIP: { ### pesky warnings
### clear tests ###
-{ my $tar = $Class->new;
+SKIP: { ### pesky warnings
+ skip $ebcdic_skip_msg, 3 if ord "A" != 65;
+
+ my $tar = $Class->new;
my @files = $tar->read( $TAR_FILE );
my $cnt = $tar->list_files();
diff --git a/cpan/Archive-Tar/t/04_resolved_issues.t b/cpan/Archive-Tar/t/04_resolved_issues.t
index 4991d9a67b..fc713cd0a0 100644
--- a/cpan/Archive-Tar/t/04_resolved_issues.t
+++ b/cpan/Archive-Tar/t/04_resolved_issues.t
@@ -157,7 +157,10 @@ use_ok( $FileClass );
### bug #43513: [PATCH] Accept wrong checksums from SunOS and HP-UX tar
### like GNU tar does. See here for details:
### http://www.gnu.org/software/tar/manual/tar.html#SEC139
-{ ok( 1, "Testing bug 43513" );
+SKIP: {
+ skip "File contains an alien character set", 5 if ord "A" != 65;
+
+ ok( 1, "Testing bug 43513" );
my $src = File::Spec->catfile( qw[src header signed.tar] );
my $tar = $Class->new;
diff --git a/cpan/Archive-Tar/t/05_iter.t b/cpan/Archive-Tar/t/05_iter.t
index 3f80e94588..dc20bd3e6d 100644
--- a/cpan/Archive-Tar/t/05_iter.t
+++ b/cpan/Archive-Tar/t/05_iter.t
@@ -1,9 +1,11 @@
BEGIN { chdir 't' if -d 't' }
-use Test::More 'no_plan';
+use Test::More;
use strict;
use lib '../lib';
+plan skip_all => "File contains an alien character set" if ord "A" != 65;
+
my $Class = 'Archive::Tar';
my $FClass = 'Archive::Tar::File';
my $File = 'src/long/bar.tar';
@@ -63,3 +65,5 @@ for my $index ( \0, 0 .. $#Expect ) {
$dotest->("all");
}
}
+
+done_testing;
diff --git a/cpan/Archive-Tar/t/09_roundtrip.t b/cpan/Archive-Tar/t/09_roundtrip.t
index 3e612ef9c8..a82cd5b8eb 100644
--- a/cpan/Archive-Tar/t/09_roundtrip.t
+++ b/cpan/Archive-Tar/t/09_roundtrip.t
@@ -4,6 +4,8 @@ use Test::More;
use strict;
use lib '../lib';
+plan skip_all => "Files contain an alien character set" if ord "A" != 65;
+
use File::Spec ();
use File::Temp qw( tempfile );