From aad9a0d95876a1e047abeb721551e5d86a3c1e62 Mon Sep 17 00:00:00 2001 From: Chris 'BinGOs' Williams Date: Fri, 18 Nov 2011 20:11:08 +0000 Subject: 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] --- Porting/Maintainers.pl | 2 +- cpan/IO-Compress/Changes | 11 ++ cpan/IO-Compress/Makefile.PL | 2 +- cpan/IO-Compress/README | 6 +- cpan/IO-Compress/lib/Compress/Zlib.pm | 12 +- cpan/IO-Compress/lib/IO/Compress/Adapter/Bzip2.pm | 6 +- .../IO-Compress/lib/IO/Compress/Adapter/Deflate.pm | 6 +- .../lib/IO/Compress/Adapter/Identity.pm | 4 +- cpan/IO-Compress/lib/IO/Compress/Base.pm | 4 +- cpan/IO-Compress/lib/IO/Compress/Base/Common.pm | 2 +- cpan/IO-Compress/lib/IO/Compress/Bzip2.pm | 10 +- cpan/IO-Compress/lib/IO/Compress/Deflate.pm | 10 +- cpan/IO-Compress/lib/IO/Compress/Gzip.pm | 12 +- cpan/IO-Compress/lib/IO/Compress/Gzip/Constants.pm | 2 +- cpan/IO-Compress/lib/IO/Compress/RawDeflate.pm | 12 +- cpan/IO-Compress/lib/IO/Compress/Zip.pm | 125 +++++++++++++++------ cpan/IO-Compress/lib/IO/Compress/Zip/Constants.pm | 6 +- cpan/IO-Compress/lib/IO/Compress/Zlib/Constants.pm | 2 +- cpan/IO-Compress/lib/IO/Compress/Zlib/Extra.pm | 7 +- .../lib/IO/Uncompress/Adapter/Bunzip2.pm | 6 +- .../lib/IO/Uncompress/Adapter/Identity.pm | 6 +- .../lib/IO/Uncompress/Adapter/Inflate.pm | 6 +- cpan/IO-Compress/lib/IO/Uncompress/AnyInflate.pm | 18 +-- .../IO-Compress/lib/IO/Uncompress/AnyUncompress.pm | 40 +++---- cpan/IO-Compress/lib/IO/Uncompress/Base.pm | 4 +- cpan/IO-Compress/lib/IO/Uncompress/Bunzip2.pm | 10 +- cpan/IO-Compress/lib/IO/Uncompress/Gunzip.pm | 14 +-- cpan/IO-Compress/lib/IO/Uncompress/Inflate.pm | 8 +- cpan/IO-Compress/lib/IO/Uncompress/RawInflate.pm | 10 +- cpan/IO-Compress/lib/IO/Uncompress/Unzip.pm | 18 +-- cpan/IO-Compress/t/000prereq.t | 2 +- cpan/IO-Compress/t/004gziphdr.t | 16 ++- cpan/IO-Compress/t/050interop-gzip.t | 2 +- pod/perldelta.pod | 2 +- 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 for more details. If the C<$input> parameter is any other type, C will be returned. In addition, if C<$input> is a simple filename, the default values for -the C, C