diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2011-11-18 20:11:08 +0000 |
---|---|---|
committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2011-11-18 20:11:08 +0000 |
commit | aad9a0d95876a1e047abeb721551e5d86a3c1e62 (patch) | |
tree | 7a7e6f9a5a263f0964f764fa006a2d6e0ab045e3 | |
parent | 54172f843dd1c7e46e2884f3ae1338dd49640448 (diff) | |
download | perl-aad9a0d95876a1e047abeb721551e5d86a3c1e62.tar.gz |
Update IO-Compress to CPAN version 2.042
[DELTA]
2.042 17 November 2011
* IO::Compress::Zip
- Added exUnixN option to allow creation of the "ux" extra field.
This allows 32-bit UID/GID to be stored.
- In one-shot mode use exUnixN rather than exUnix2 for the UID/GID.
* IO::Compress::Zlib::Extra::parseExtraField
- Fixed bad test for length of ID field
[RT# 72329 & #72505]
34 files changed, 242 insertions, 161 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 3fa4754675..48ad761df8 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1034,7 +1034,7 @@ use File::Glob qw(:case); 'IO-Compress' => { 'MAINTAINER' => 'pmqs', - 'DISTRIBUTION' => 'PMQS/IO-Compress-2.040.tar.gz', + 'DISTRIBUTION' => 'PMQS/IO-Compress-2.042.tar.gz', 'FILES' => q[cpan/IO-Compress], 'EXCLUDED' => [ qr{t/Test/} ], 'UPSTREAM' => 'cpan', diff --git a/cpan/IO-Compress/Changes b/cpan/IO-Compress/Changes index b71ee2ff68..1f0e5b4dbb 100644 --- a/cpan/IO-Compress/Changes +++ b/cpan/IO-Compress/Changes @@ -1,6 +1,17 @@ CHANGES ------- + 2.042 17 November 2011 + + * IO::Compress::Zip + - Added exUnixN option to allow creation of the "ux" extra field. + This allows 32-bit UID/GID to be stored. + - In one-shot mode use exUnixN rather than exUnix2 for the UID/GID. + + * IO::Compress::Zlib::Extra::parseExtraField + - Fixed bad test for length of ID field + [RT# 72329 & #72505] + 2.040 28 October 2011 * t/105oneshot-zip-only.t diff --git a/cpan/IO-Compress/Makefile.PL b/cpan/IO-Compress/Makefile.PL index 8d4f391333..b8725a3df4 100644 --- a/cpan/IO-Compress/Makefile.PL +++ b/cpan/IO-Compress/Makefile.PL @@ -3,7 +3,7 @@ use strict ; require 5.004 ; -$::VERSION = '2.040' ; +$::VERSION = '2.042' ; use private::MakeUtil; use ExtUtils::MakeMaker 5.16 ; diff --git a/cpan/IO-Compress/README b/cpan/IO-Compress/README index 6ce4705ffb..368234d7aa 100644 --- a/cpan/IO-Compress/README +++ b/cpan/IO-Compress/README @@ -1,9 +1,9 @@ IO-Compress - Version 2.040 + Version 2.042 - 28th october 2011 + 17th November 2011 Copyright (c) 1995-2011 Paul Marquess. All rights reserved. This program is free software; you can redistribute it @@ -89,7 +89,7 @@ To help me help you, I need all of the following information: If you haven't installed IO-Compress then search IO::Compress::Gzip.pm for a line like this: - $VERSION = "2.040" ; + $VERSION = "2.042" ; 2. If you are having problems building IO-Compress, send me a complete log of what happened. Start by unpacking the IO-Compress diff --git a/cpan/IO-Compress/lib/Compress/Zlib.pm b/cpan/IO-Compress/lib/Compress/Zlib.pm index 9051218ae2..212c6e0747 100644 --- a/cpan/IO-Compress/lib/Compress/Zlib.pm +++ b/cpan/IO-Compress/lib/Compress/Zlib.pm @@ -7,17 +7,17 @@ use Carp ; use IO::Handle ; use Scalar::Util qw(dualvar); -use IO::Compress::Base::Common 2.040 ; -use Compress::Raw::Zlib 2.040 ; -use IO::Compress::Gzip 2.040 ; -use IO::Uncompress::Gunzip 2.040 ; +use IO::Compress::Base::Common 2.042 ; +use Compress::Raw::Zlib 2.042 ; +use IO::Compress::Gzip 2.042 ; +use IO::Uncompress::Gunzip 2.042 ; use strict ; use warnings ; use bytes ; our ($VERSION, $XS_VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); -$VERSION = '2.040'; +$VERSION = '2.042'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -453,7 +453,7 @@ sub inflate package Compress::Zlib ; -use IO::Compress::Gzip::Constants 2.040 ; +use IO::Compress::Gzip::Constants 2.042 ; sub memGzip($) { diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm index ec4daa158a..c2d3e131c0 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm @@ -4,13 +4,13 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.040 qw(:Status); +use IO::Compress::Base::Common 2.042 qw(:Status); #use Compress::Bzip2 ; -use Compress::Raw::Bzip2 2.040 ; +use Compress::Raw::Bzip2 2.042 ; our ($VERSION); -$VERSION = '2.040'; +$VERSION = '2.042'; sub mkCompObject { diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm index 94f2ad28b5..74dead0ef4 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Deflate.pm @@ -4,12 +4,12 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.040 qw(:Status); +use IO::Compress::Base::Common 2.042 qw(:Status); -use Compress::Raw::Zlib 2.040 qw(Z_OK Z_FINISH MAX_WBITS) ; +use Compress::Raw::Zlib 2.042 qw(Z_OK Z_FINISH MAX_WBITS) ; our ($VERSION); -$VERSION = '2.040'; +$VERSION = '2.042'; sub mkCompObject { diff --git a/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm b/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm index ef040fa014..8a97740bab 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Adapter/Identity.pm @@ -4,10 +4,10 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.040 qw(:Status); +use IO::Compress::Base::Common 2.042 qw(:Status); our ($VERSION); -$VERSION = '2.040'; +$VERSION = '2.042'; sub mkCompObject { diff --git a/cpan/IO-Compress/lib/IO/Compress/Base.pm b/cpan/IO-Compress/lib/IO/Compress/Base.pm index f0690daeab..464f401956 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Base.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Base.pm @@ -6,7 +6,7 @@ require 5.004 ; use strict ; use warnings; -use IO::Compress::Base::Common 2.040 ; +use IO::Compress::Base::Common 2.042 ; use IO::File qw(SEEK_SET SEEK_END); ; use Scalar::Util qw(blessed readonly); @@ -20,7 +20,7 @@ use bytes; our (@ISA, $VERSION); @ISA = qw(Exporter IO::File); -$VERSION = '2.040'; +$VERSION = '2.042'; #Can't locate object method "SWASHNEW" via package "utf8" (perhaps you forgot to load "utf8"?) at .../ext/Compress-Zlib/Gzip/blib/lib/Compress/Zlib/Common.pm line 16. diff --git a/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm b/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm index a78800798a..5778d4f429 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Base/Common.pm @@ -11,7 +11,7 @@ use File::GlobMapper; require Exporter; our ($VERSION, @ISA, @EXPORT, %EXPORT_TAGS, $HAS_ENCODE); @ISA = qw(Exporter); -$VERSION = '2.040'; +$VERSION = '2.042'; @EXPORT = qw( isaFilehandle isaFilename whatIsInput whatIsOutput isaFileGlobString cleanFileGlobString oneTarget diff --git a/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm b/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm index 9ff61ca833..f6767875e9 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Bzip2.pm @@ -5,16 +5,16 @@ use warnings; use bytes; require Exporter ; -use IO::Compress::Base 2.040 ; +use IO::Compress::Base 2.042 ; -use IO::Compress::Base::Common 2.040 qw(createSelfTiedObject); -use IO::Compress::Adapter::Bzip2 2.040 ; +use IO::Compress::Base::Common 2.042 qw(createSelfTiedObject); +use IO::Compress::Adapter::Bzip2 2.042 ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bzip2Error); -$VERSION = '2.040'; +$VERSION = '2.042'; $Bzip2Error = ''; @ISA = qw(Exporter IO::Compress::Base); @@ -51,7 +51,7 @@ sub getExtraParams { my $self = shift ; - use IO::Compress::Base::Common 2.040 qw(:Parse); + use IO::Compress::Base::Common 2.042 qw(:Parse); return ( 'BlockSize100K' => [0, 1, Parse_unsigned, 1], diff --git a/cpan/IO-Compress/lib/IO/Compress/Deflate.pm b/cpan/IO-Compress/lib/IO/Compress/Deflate.pm index a29e0e2d12..c8b8f5e5c0 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Deflate.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Deflate.pm @@ -6,16 +6,16 @@ use bytes; require Exporter ; -use IO::Compress::RawDeflate 2.040 ; +use IO::Compress::RawDeflate 2.042 ; -use Compress::Raw::Zlib 2.040 ; -use IO::Compress::Zlib::Constants 2.040 ; -use IO::Compress::Base::Common 2.040 qw(createSelfTiedObject); +use Compress::Raw::Zlib 2.042 ; +use IO::Compress::Zlib::Constants 2.042 ; +use IO::Compress::Base::Common 2.042 qw(createSelfTiedObject); our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $DeflateError); -$VERSION = '2.040'; +$VERSION = '2.042'; $DeflateError = ''; @ISA = qw(Exporter IO::Compress::RawDeflate); diff --git a/cpan/IO-Compress/lib/IO/Compress/Gzip.pm b/cpan/IO-Compress/lib/IO/Compress/Gzip.pm index 5835961e74..b9d3149e6b 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Gzip.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Gzip.pm @@ -8,12 +8,12 @@ use warnings; use bytes; -use IO::Compress::RawDeflate 2.040 ; +use IO::Compress::RawDeflate 2.042 ; -use Compress::Raw::Zlib 2.040 ; -use IO::Compress::Base::Common 2.040 qw(:Status :Parse createSelfTiedObject); -use IO::Compress::Gzip::Constants 2.040 ; -use IO::Compress::Zlib::Extra 2.040 ; +use Compress::Raw::Zlib 2.042 ; +use IO::Compress::Base::Common 2.042 qw(:Status :Parse createSelfTiedObject); +use IO::Compress::Gzip::Constants 2.042 ; +use IO::Compress::Zlib::Extra 2.042 ; BEGIN { @@ -27,7 +27,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $GzipError); -$VERSION = '2.040'; +$VERSION = '2.042'; $GzipError = '' ; @ISA = qw(Exporter IO::Compress::RawDeflate); diff --git a/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm index 65aff3c9c6..6e87905932 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm @@ -9,7 +9,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT, %GZIP_OS_Names); our ($GZIP_FNAME_INVALID_CHAR_RE, $GZIP_FCOMMENT_INVALID_CHAR_RE); -$VERSION = '2.040'; +$VERSION = '2.042'; @ISA = qw(Exporter); diff --git a/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm b/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm index f4c519db1b..5d3a029f9a 100644 --- a/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm +++ b/cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm @@ -7,16 +7,16 @@ use warnings; use bytes; -use IO::Compress::Base 2.040 ; -use IO::Compress::Base::Common 2.040 qw(:Status createSelfTiedObject); -use IO::Compress::Adapter::Deflate 2.040 ; +use IO::Compress::Base 2.042 ; +use IO::Compress::Base::Common 2.042 qw(:Status createSelfTiedObject); +use IO::Compress::Adapter::Deflate 2.042 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %DEFLATE_CONSTANTS, %EXPORT_TAGS, $RawDeflateError); -$VERSION = '2.040'; +$VERSION = '2.042'; $RawDeflateError = ''; @ISA = qw(Exporter IO::Compress::Base); @@ -142,8 +142,8 @@ sub getZlibParams { my $self = shift ; - use IO::Compress::Base::Common 2.040 qw(:Parse); - use Compress::Raw::Zlib 2.040 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); + use IO::Compress::Base::Common 2.042 qw(:Parse); + use Compress::Raw::Zlib 2.042 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); return ( diff --git a/cpan/IO-Compress/lib/IO/Compress/Zip.pm b/cpan/IO-Compress/lib/IO/Compress/Zip.pm index 1971bcb591..dc36a5d6fc 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Zip.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Zip.pm @@ -4,27 +4,28 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.040 qw(:Status createSelfTiedObject); -use IO::Compress::RawDeflate 2.040 ; -use IO::Compress::Adapter::Deflate 2.040 ; -use IO::Compress::Adapter::Identity 2.040 ; -use IO::Compress::Zlib::Extra 2.040 ; -use IO::Compress::Zip::Constants 2.040 ; +use IO::Compress::Base::Common 2.042 qw(:Status createSelfTiedObject); +use IO::Compress::RawDeflate 2.042 ; +use IO::Compress::Adapter::Deflate 2.042 ; +use IO::Compress::Adapter::Identity 2.042 ; +use IO::Compress::Zlib::Extra 2.042 ; +use IO::Compress::Zip::Constants 2.042 ; use File::Spec(); +use Config; -use Compress::Raw::Zlib 2.040 qw(crc32) ; +use Compress::Raw::Zlib 2.042 qw(crc32) ; BEGIN { eval { require IO::Compress::Adapter::Bzip2 ; - import IO::Compress::Adapter::Bzip2 2.040 ; + import IO::Compress::Adapter::Bzip2 2.042 ; require IO::Compress::Bzip2 ; - import IO::Compress::Bzip2 2.040 ; + import IO::Compress::Bzip2 2.042 ; } ; eval { require IO::Compress::Adapter::Lzma ; - import IO::Compress::Adapter::Lzma 2.036 ; + import IO::Compress::Adapter::Lzma 2.042 ; require IO::Compress::Lzma ; - import IO::Compress::Lzma 2.040 ; + import IO::Compress::Lzma 2.042 ; } ; } @@ -33,7 +34,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $ZipError); -$VERSION = '2.040'; +$VERSION = '2.042'; $ZipError = ''; @ISA = qw(Exporter IO::Compress::RawDeflate); @@ -265,10 +266,20 @@ sub mkHeader $ctlExtra .= mkExtendedTime($param->value('MTime')); } - if ( $param->value('UID') && $osCode == ZIP_OS_CODE_UNIX) + if ( $osCode == ZIP_OS_CODE_UNIX ) { - $extra .= mkUnix2Extra( $param->value('UID'), $param->value('GID')); - $ctlExtra .= mkUnix2Extra(); + if ( $param->value('want_exUnixN') ) + { + my $ux3 = mkUnixNExtra( @{ $param->value('want_exUnixN') }); + $extra .= $ux3; + $ctlExtra .= $ux3; + } + + if ( $param->value('exUnix2') ) + { + $extra .= mkUnix2Extra( @{ $param->value('exUnix2') }); + $ctlExtra .= mkUnix2Extra(); + } } $extFileAttr = $param->value('ExtAttr') @@ -544,16 +555,20 @@ sub ckParams $got->value("CTime", $timeRef->[2]); } - # Unix2 Extended Attribute - if ($got->parsed('exUnix2') ) { - my $timeRef = $got->value('exUnix2'); - if ( defined $timeRef) { - return $self->saveErrorString(undef, "exUnix2 not a 2-element array ref") - if ref $timeRef ne 'ARRAY' || @$timeRef != 2; + # Unix2/3 Extended Attribute + for my $name (qw(exUnix2 exUnixN)) + { + if ($got->parsed($name) ) { + my $idRef = $got->value($name); + if ( defined $idRef) { + return $self->saveErrorString(undef, "$name not a 2-element array ref") + if ref $idRef ne 'ARRAY' || @$idRef != 2; + } + + $got->value("UID", $idRef->[0]); + $got->value("GID", $idRef->[1]); + $got->value("want_$name", $idRef); } - - $got->value("UID", $timeRef->[0]); - $got->value("GID", $timeRef->[1]); } *$self->{ZipData}{AnyZip64} = 1 @@ -626,8 +641,8 @@ sub getExtraParams { my $self = shift ; - use IO::Compress::Base::Common 2.040 qw(:Parse); - use Compress::Raw::Zlib 2.040 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); + use IO::Compress::Base::Common 2.042 qw(:Parse); + use Compress::Raw::Zlib 2.042 qw(Z_DEFLATED Z_DEFAULT_COMPRESSION Z_DEFAULT_STRATEGY); my @Bzip2 = (); @@ -655,6 +670,7 @@ sub getExtraParams 'Time' => [0, 1, Parse_any, undef], 'exTime' => [0, 1, Parse_any, undef], 'exUnix2' => [0, 1, Parse_any, undef], + 'exUnixN' => [0, 1, Parse_any, undef], 'ExtAttr' => [0, 1, Parse_any, $Compress::Raw::Zlib::gzip_os_code == 3 ? 0100644 << 16 @@ -716,6 +732,7 @@ sub getFileInfo $params->value('ExtAttr' => $attr); } + $params->value('want_exUnixN', [$uid, $gid]); $params->value('UID' => $uid) ; $params->value('GID' => $gid) ; @@ -756,6 +773,23 @@ sub mkUnix2Extra $ids); } +sub mkUnixNExtra +{ + my $uid = shift; + my $gid = shift; + + # Assumes UID/GID are 32-bit + my $ids ; + $ids .= pack "C", 1; # version + $ids .= pack "C", $Config{uidsize}; + $ids .= pack "V", $uid; + $ids .= pack "C", $Config{gidsize}; + $ids .= pack "V", $gid; + + return IO::Compress::Zlib::Extra::mkSubField(ZIP_EXTRA_ID_INFO_ZIP_UNIXN, + $ids); +} + # from Archive::Zip sub _unixToDosTime # Archive::Zip::Member @@ -914,10 +948,10 @@ See L<File::GlobMapper|File::GlobMapper> for more details. If the C<$input> parameter is any other type, C<undef> will be returned. In addition, if C<$input> is a simple filename, the default values for -the C<Name>, C<Time>, C<ExtAttr> and C<exTime> options will be sourced from that file. +the C<Name>, C<Time>, C<ExtAttr>, C<exUnixN> and C<exTime> options will be sourced from that file. If you do not want to use these defaults they can be overridden by -explicitly setting the C<Name>, C<Time>, C<ExtAttr> and C<exTime> options or by setting the +explicitly setting the C<Name>, C<Time>, C<ExtAttr>, C<exUnixN> and C<exTime> options or by setting the C<Minimal> parameter. =head3 The C<$output> parameter @@ -1300,18 +1334,37 @@ By default no extended time field is created. =item C<< exUnix2 => [$uid, $gid] >> This option expects an array reference with exactly two elements: C<$uid> -and C<$gid>. These values correspond to the numeric user ID and group ID -of the owner of the files respectively. +and C<$gid>. These values correspond to the numeric User ID (UID) and Group ID +(GID) of the owner of the files respectively. When the C<exUnix2> option is present it will trigger the creation of a -Unix2 extra field (ID is "Ux") in the local zip. This will be populated -with C<$uid> and C<$gid>. In addition an empty Unix2 extra field will also -be created in the central zip header +Unix2 extra field (ID is "Ux") in the local zip header. This will be populated +with C<$uid> and C<$gid>. An empty Unix2 extra field will also +be created in the central zip header. + +Note - The UID & GID are stored as 16-bit +integers in the "Ux" field. Use C<< exUnixN >> if your UID or GID are +32-bit. If the C<Minimal> option is set to true, this option will be ignored. By default no Unix2 extra field is created. +=item C<< exUnixN => [$uid, $gid] >> + +This option expects an array reference with exactly two elements: C<$uid> +and C<$gid>. These values correspond to the numeric User ID (UID) and Group ID +(GID) of the owner of the files respectively. + +When the C<exUnixN> option is present it will trigger the creation of a +UnixN extra field (ID is "ux") in bothe the local and central zip headers. +This will be populated with C<$uid> and C<$gid>. +The UID & GID are stored as 32-bit integers. + +If the C<Minimal> option is set to true, this option will be ignored. + +By default no UnixN extra field is created. + =item C<< Comment => $comment >> Stores the contents of C<$comment> in the Central File Header of @@ -1420,6 +1473,9 @@ Alternatively the list of subfields can by supplied as a scalar, thus ExtraField => $rawdata +In this case C<IO::Compress::Zip> will check that C<$rawdata> consists of +zero or more conformant sub-fields. + The Extended Time field (ID "UT"), set using the C<exTime> option, and the Unix2 extra field (ID "Ux), set using the C<exUnix2> option, are examples of extra fields. @@ -1432,7 +1488,8 @@ The maximum size of an extra field 65535 bytes. If specified, this option will disable the creation of all extra fields in the zip local and central headers. So the C<exTime>, C<exUnix2>, -C<ExtraFieldLocal> and C<ExtraFieldCentral> options will be ignored. +C<exUnixN>, C<ExtraFieldLocal> and C<ExtraFieldCentral> options will +be ignored. This parameter defaults to 0. diff --git a/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm index 82172bcc11..bdeb22e1f1 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm @@ -7,7 +7,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT, %ZIP_CM_MIN_VERSIONS); -$VERSION = '2.040'; +$VERSION = '2.042'; @ISA = qw(Exporter); @@ -38,7 +38,7 @@ $VERSION = '2.040'; ZIP_EXTRA_ID_ZIP64 ZIP_EXTRA_ID_EXT_TIMESTAMP ZIP_EXTRA_ID_INFO_ZIP_UNIX2 - ZIP_EXTRA_ID_INFO_ZIP_UNIXn + ZIP_EXTRA_ID_INFO_ZIP_UNIXN ZIP_EXTRA_ID_INFO_ZIP_Upath ZIP_EXTRA_ID_INFO_ZIP_Ucom ZIP_EXTRA_ID_JAVA_EXE @@ -95,7 +95,7 @@ use constant ZIP_OS_CODE_DEFAULT => 3; use constant ZIP_EXTRA_ID_ZIP64 => pack "v", 1; use constant ZIP_EXTRA_ID_EXT_TIMESTAMP => "UT"; use constant ZIP_EXTRA_ID_INFO_ZIP_UNIX2 => "Ux"; -use constant ZIP_EXTRA_ID_INFO_ZIP_UNIXn => "ux"; +use constant ZIP_EXTRA_ID_INFO_ZIP_UNIXN => "ux"; use constant ZIP_EXTRA_ID_INFO_ZIP_Upath => "up"; use constant ZIP_EXTRA_ID_INFO_ZIP_Ucom => "uc"; use constant ZIP_EXTRA_ID_JAVA_EXE => pack "v", 0xCAFE; diff --git a/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm b/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm index 9342e58963..be81dabc4b 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm @@ -9,7 +9,7 @@ require Exporter; our ($VERSION, @ISA, @EXPORT); -$VERSION = '2.040'; +$VERSION = '2.042'; @ISA = qw(Exporter); diff --git a/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm b/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm index 96bd5aaad2..218a0d1ee9 100644 --- a/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm +++ b/cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm @@ -8,9 +8,9 @@ use bytes; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS); -$VERSION = '2.040'; +$VERSION = '2.042'; -use IO::Compress::Gzip::Constants 2.040 ; +use IO::Compress::Gzip::Constants 2.042 ; sub ExtraFieldError { @@ -174,7 +174,6 @@ sub parseExtraField return parseRawExtra($dataRef, undef, 1, $gzipMode); } - #my $data = $$dataRef; my $data = $dataRef; my $out = '' ; @@ -195,7 +194,7 @@ sub parseExtraField return ExtraFieldError("Not even number of elements") unless @$data % 2 == 0; - for (my $ix = 0; $ix <= length(@$data) -1 ; $ix += 2) { + for (my $ix = 0; $ix <= @$data -1 ; $ix += 2) { my $bad = validateExtraFieldPair([$data->[$ix], $data->[$ix+1]], $strict, $gzipMode) ; diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm index 173a51dd38..4a00fe2648 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Bunzip2.pm @@ -4,12 +4,12 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.040 qw(:Status); +use IO::Compress::Base::Common 2.042 qw(:Status); -use Compress::Raw::Bzip2 2.040 ; +use Compress::Raw::Bzip2 2.042 ; our ($VERSION, @ISA); -$VERSION = '2.040'; +$VERSION = '2.042'; sub mkUncompObject { diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm index a4205fd9d6..7d14534cd2 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Identity.pm @@ -4,14 +4,14 @@ use warnings; use strict; use bytes; -use IO::Compress::Base::Common 2.040 qw(:Status); +use IO::Compress::Base::Common 2.042 qw(:Status); use IO::Compress::Zip::Constants ; our ($VERSION); -$VERSION = '2.040'; +$VERSION = '2.042'; -use Compress::Raw::Zlib 2.040 (); +use Compress::Raw::Zlib 2.042 (); sub mkUncompObject { diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm index ed0d173618..bd28bf49a7 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Adapter/Inflate.pm @@ -4,11 +4,11 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.040 qw(:Status); -use Compress::Raw::Zlib 2.040 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS); +use IO::Compress::Base::Common 2.042 qw(:Status); +use Compress::Raw::Zlib 2.042 qw(Z_OK Z_BUF_ERROR Z_STREAM_END Z_FINISH MAX_WBITS); our ($VERSION); -$VERSION = '2.040'; +$VERSION = '2.042'; diff --git a/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm index 20d9c844c4..54e5733b13 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm @@ -6,22 +6,22 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.040 qw(createSelfTiedObject); +use IO::Compress::Base::Common 2.042 qw(createSelfTiedObject); -use IO::Uncompress::Adapter::Inflate 2.040 (); +use IO::Uncompress::Adapter::Inflate 2.042 (); -use IO::Uncompress::Base 2.040 ; -use IO::Uncompress::Gunzip 2.040 ; -use IO::Uncompress::Inflate 2.040 ; -use IO::Uncompress::RawInflate 2.040 ; -use IO::Uncompress::Unzip 2.040 ; +use IO::Uncompress::Base 2.042 ; +use IO::Uncompress::Gunzip 2.042 ; +use IO::Uncompress::Inflate 2.042 ; +use IO::Uncompress::RawInflate 2.042 ; +use IO::Uncompress::Unzip 2.042 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyInflateError); -$VERSION = '2.040'; +$VERSION = '2.042'; $AnyInflateError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -48,7 +48,7 @@ sub anyinflate sub getExtraParams { - use IO::Compress::Base::Common 2.040 qw(:Parse); + use IO::Compress::Base::Common 2.042 qw(:Parse); return ( 'RawInflate' => [1, 1, Parse_boolean, 0] ) ; } diff --git a/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm b/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm index 24343f5a10..979f892473 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/AnyUncompress.pm @@ -4,16 +4,16 @@ use strict; use warnings; use bytes; -use IO::Compress::Base::Common 2.040 qw(createSelfTiedObject); +use IO::Compress::Base::Common 2.042 qw(createSelfTiedObject); -use IO::Uncompress::Base 2.040 ; +use IO::Uncompress::Base 2.042 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError); -$VERSION = '2.040'; +$VERSION = '2.042'; $AnyUncompressError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -27,22 +27,22 @@ Exporter::export_ok_tags('all'); BEGIN { - eval ' use IO::Uncompress::Adapter::Inflate 2.040 ;'; - eval ' use IO::Uncompress::Adapter::Bunzip2 2.040 ;'; - eval ' use IO::Uncompress::Adapter::LZO 2.040 ;'; - eval ' use IO::Uncompress::Adapter::Lzf 2.040 ;'; - eval ' use IO::Uncompress::Adapter::UnLzma 2.020 ;'; - eval ' use IO::Uncompress::Adapter::UnXz 2.020 ;'; - - eval ' use IO::Uncompress::Bunzip2 2.040 ;'; - eval ' use IO::Uncompress::UnLzop 2.040 ;'; - eval ' use IO::Uncompress::Gunzip 2.040 ;'; - eval ' use IO::Uncompress::Inflate 2.040 ;'; - eval ' use IO::Uncompress::RawInflate 2.040 ;'; - eval ' use IO::Uncompress::Unzip 2.040 ;'; - eval ' use IO::Uncompress::UnLzf 2.040 ;'; - eval ' use IO::Uncompress::UnLzma 2.040 ;'; - eval ' use IO::Uncompress::UnXz 2.040 ;'; + eval ' use IO::Uncompress::Adapter::Inflate 2.042 ;'; + eval ' use IO::Uncompress::Adapter::Bunzip2 2.042 ;'; + eval ' use IO::Uncompress::Adapter::LZO 2.042 ;'; + eval ' use IO::Uncompress::Adapter::Lzf 2.042 ;'; + eval ' use IO::Uncompress::Adapter::UnLzma 2.042 ;'; + eval ' use IO::Uncompress::Adapter::UnXz 2.042 ;'; + + eval ' use IO::Uncompress::Bunzip2 2.042 ;'; + eval ' use IO::Uncompress::UnLzop 2.042 ;'; + eval ' use IO::Uncompress::Gunzip 2.042 ;'; + eval ' use IO::Uncompress::Inflate 2.042 ;'; + eval ' use IO::Uncompress::RawInflate 2.042 ;'; + eval ' use IO::Uncompress::Unzip 2.042 ;'; + eval ' use IO::Uncompress::UnLzf 2.042 ;'; + eval ' use IO::Uncompress::UnLzma 2.042 ;'; + eval ' use IO::Uncompress::UnXz 2.042 ;'; } sub new @@ -60,7 +60,7 @@ sub anyuncompress sub getExtraParams { - use IO::Compress::Base::Common 2.040 qw(:Parse); + use IO::Compress::Base::Common 2.042 qw(:Parse); return ( 'RawInflate' => [1, 1, Parse_boolean, 0] , 'UnLzma' => [1, 1, Parse_boolean, 0] ) ; } diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Base.pm b/cpan/IO-Compress/lib/IO/Uncompress/Base.pm index 7be469fa2c..7747bfeed2 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Base.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Base.pm @@ -9,12 +9,12 @@ our (@ISA, $VERSION, @EXPORT_OK, %EXPORT_TAGS); @ISA = qw(Exporter IO::File); -$VERSION = '2.040'; +$VERSION = '2.042'; use constant G_EOF => 0 ; use constant G_ERR => -1 ; -use IO::Compress::Base::Common 2.040 ; +use IO::Compress::Base::Common 2.042 ; use IO::File ; use Symbol; diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm b/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm index 0cc72ebbdf..8b47ce3659 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm @@ -4,15 +4,15 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.040 qw(:Status createSelfTiedObject); +use IO::Compress::Base::Common 2.042 qw(:Status createSelfTiedObject); -use IO::Uncompress::Base 2.040 ; -use IO::Uncompress::Adapter::Bunzip2 2.040 ; +use IO::Uncompress::Base 2.042 ; +use IO::Uncompress::Adapter::Bunzip2 2.042 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $Bunzip2Error); -$VERSION = '2.040'; +$VERSION = '2.042'; $Bunzip2Error = ''; @ISA = qw( Exporter IO::Uncompress::Base ); @@ -40,7 +40,7 @@ sub getExtraParams { my $self = shift ; - use IO::Compress::Base::Common 2.040 qw(:Parse); + use IO::Compress::Base::Common 2.042 qw(:Parse); return ( 'Verbosity' => [1, 1, Parse_boolean, 0], diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm b/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm index 5ce8508e8b..79542e5c39 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm @@ -9,12 +9,12 @@ use strict ; use warnings; use bytes; -use IO::Uncompress::RawInflate 2.040 ; +use IO::Uncompress::RawInflate 2.042 ; -use Compress::Raw::Zlib 2.040 qw( crc32 ) ; -use IO::Compress::Base::Common 2.040 qw(:Status createSelfTiedObject); -use IO::Compress::Gzip::Constants 2.040 ; -use IO::Compress::Zlib::Extra 2.040 ; +use Compress::Raw::Zlib 2.042 qw( crc32 ) ; +use IO::Compress::Base::Common 2.042 qw(:Status createSelfTiedObject); +use IO::Compress::Gzip::Constants 2.042 ; +use IO::Compress::Zlib::Extra 2.042 ; require Exporter ; @@ -28,7 +28,7 @@ Exporter::export_ok_tags('all'); $GunzipError = ''; -$VERSION = '2.040'; +$VERSION = '2.042'; sub new { @@ -47,7 +47,7 @@ sub gunzip sub getExtraParams { - use IO::Compress::Base::Common 2.040 qw(:Parse); + use IO::Compress::Base::Common 2.042 qw(:Parse); return ( 'ParseExtra' => [1, 1, Parse_boolean, 0] ) ; } diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm index 6a6ca8ca57..597cd247c8 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm @@ -5,15 +5,15 @@ use strict ; use warnings; use bytes; -use IO::Compress::Base::Common 2.040 qw(:Status createSelfTiedObject); -use IO::Compress::Zlib::Constants 2.040 ; +use IO::Compress::Base::Common 2.042 qw(:Status createSelfTiedObject); +use IO::Compress::Zlib::Constants 2.042 ; -use IO::Uncompress::RawInflate 2.040 ; +use IO::Uncompress::RawInflate 2.042 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $InflateError); -$VERSION = '2.040'; +$VERSION = '2.042'; $InflateError = ''; @ISA = qw( Exporter IO::Uncompress::RawInflate ); diff --git a/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm b/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm index 33cff78572..b091a6cbba 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm @@ -5,16 +5,16 @@ use strict ; use warnings; use bytes; -use Compress::Raw::Zlib 2.040 ; -use IO::Compress::Base::Common 2.040 qw(:Status createSelfTiedObject); +use Compress::Raw::Zlib 2.042 ; +use IO::Compress::Base::Common 2.042 qw(:Status createSelfTiedObject); -use IO::Uncompress::Base 2.040 ; -use IO::Uncompress::Adapter::Inflate 2.040 ; +use IO::Uncompress::Base 2.042 ; +use IO::Uncompress::Adapter::Inflate 2.042 ; require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $RawInflateError); -$VERSION = '2.040'; +$VERSION = '2.042'; $RawInflateError = ''; @ISA = qw( Exporter IO::Uncompress::Base ); diff --git a/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm b/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm index 054490f91a..a782b62627 100644 --- a/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm +++ b/cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm @@ -9,14 +9,14 @@ use warnings; use bytes; use IO::File; -use IO::Uncompress::RawInflate 2.040 ; -use IO::Compress::Base::Common 2.040 qw(:Status createSelfTiedObject); -use IO::Uncompress::Adapter::Inflate 2.040 ; -use IO::Uncompress::Adapter::Identity 2.040 ; -use IO::Compress::Zlib::Extra 2.040 ; -use IO::Compress::Zip::Constants 2.040 ; +use IO::Uncompress::RawInflate 2.042 ; +use IO::Compress::Base::Common 2.042 qw(:Status createSelfTiedObject); +use IO::Uncompress::Adapter::Inflate 2.042 ; +use IO::Uncompress::Adapter::Identity 2.042 ; +use IO::Compress::Zlib::Extra 2.042 ; +use IO::Compress::Zip::Constants 2.042 ; -use Compress::Raw::Zlib 2.040 qw(crc32) ; +use Compress::Raw::Zlib 2.042 qw(crc32) ; BEGIN { @@ -31,7 +31,7 @@ require Exporter ; our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $UnzipError, %headerLookup); -$VERSION = '2.040'; +$VERSION = '2.042'; $UnzipError = ''; @ISA = qw(Exporter IO::Uncompress::RawInflate); @@ -64,7 +64,7 @@ sub unzip sub getExtraParams { - use IO::Compress::Base::Common 2.040 qw(:Parse); + use IO::Compress::Base::Common 2.042 qw(:Parse); return ( diff --git a/cpan/IO-Compress/t/000prereq.t b/cpan/IO-Compress/t/000prereq.t index 312ec77558..13417aa66c 100644 --- a/cpan/IO-Compress/t/000prereq.t +++ b/cpan/IO-Compress/t/000prereq.t @@ -25,7 +25,7 @@ BEGIN if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - my $VERSION = '2.040'; + my $VERSION = '2.042'; my @NAMES = qw( Compress::Raw::Bzip2 Compress::Raw::Zlib diff --git a/cpan/IO-Compress/t/004gziphdr.t b/cpan/IO-Compress/t/004gziphdr.t index 2ef9459785..14071f9f20 100644 --- a/cpan/IO-Compress/t/004gziphdr.t +++ b/cpan/IO-Compress/t/004gziphdr.t @@ -20,7 +20,7 @@ BEGIN { if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 }; - plan tests => 915 + $extra ; + plan tests => 918 + $extra ; use_ok('Compress::Raw::Zlib') ; use_ok('IO::Compress::Gzip::Constants') ; @@ -972,6 +972,20 @@ EOM } } + + { + # RT #72329 + my $error = 'Error with ExtraField Parameter: ' . + 'SubField ID not two chars long' ; + my $buffer ; + my $x ; + eval { $x = new IO::Compress::Gzip \$buffer, + -ExtraField => [ at => 'mouse', bad => 'dog'] ; + }; + like $@, mkErr("$error"); + like $GzipError, "/$error/"; + ok ! $x ; + } } diff --git a/cpan/IO-Compress/t/050interop-gzip.t b/cpan/IO-Compress/t/050interop-gzip.t index b9c8da273a..27c1d7db8c 100644 --- a/cpan/IO-Compress/t/050interop-gzip.t +++ b/cpan/IO-Compress/t/050interop-gzip.t @@ -97,7 +97,7 @@ BEGIN { } # Handle spaces in path to gzip - $GZIP = "\"$GZIP\"" if $GZIP =~ /\s/; + $GZIP = "\"$GZIP\"" if defined $GZIP && $GZIP =~ /\s/; plan(skip_all => "Cannot find $name") if ! $GZIP ; diff --git a/pod/perldelta.pod b/pod/perldelta.pod index c731d6f94f..071b20a173 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -203,7 +203,7 @@ L<Compress::Raw::Zlib> has been upgraded from version 2.037 to version 2.042. =item * -L<Compress::Zlib> has been upgraded from version 2.037 to version 2.040. +L<Compress::Zlib> has been upgraded from version 2.037 to version 2.042. =item * |