Skip Menu |

This queue is for tickets about the Archive-Tar CPAN distribution.

Report information
The Basics
Id: 59700
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Archive-Tar

People
Owner: BINGOS [...] cpan.org
Requestors: CHORNY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.64
Fixed in: (no value)



Subject: add "CPAN mode" to allow uploading to PAUSE
Added option -C to allow archives created with ptar to be uploaded to PAUSE in case of Windows or world +w permissions on unix.. -- Alexandr Ciornii, http://chorny.net
Subject: ptar
Download ptar
application/octet-stream 2.8k

Message body not shown because it is not plain text.

Subject: ptar.patch
--- ptar.dist 2010-07-26 08:31:19.750000000 +0300 +++ ptar 2010-07-26 07:59:37.734375000 +0300 @@ -7,7 +7,7 @@ use Data::Dumper; my $opts = {}; -getopts('Ddcvzthxf:I', $opts) or die usage(); +getopts('Ddcvzthxf:IC', $opts) or die usage(); ### show the help message ### die usage() if $opts->{h}; @@ -40,8 +40,14 @@ $file->fdopen(fileno(STDOUT),"w"); } - Archive::Tar->create_archive( $file, $compress, @files ); - + my $tar = Archive::Tar->new; + $tar->add_files(@files); + if( $opts->{C} ) { + for my $f ($tar->get_files) { + $f->mode($f->mode & ~022); # chmod go-w + } + } + $tar->write($file, $compress); } else { if ($file eq '-') { use IO::Handle; @@ -81,7 +87,7 @@ =head1 SYNOPSIS - ptar -c [-v] [-z] [-f ARCHIVE_FILE | -] FILE FILE ... + ptar -c [-v] [-z] [-C] [-f ARCHIVE_FILE | -] FILE FILE ... ptar -x [-v] [-z] [-f ARCHIVE_FILE | -] ptar -t [-z] [-f ARCHIVE_FILE | -] ptar -h @@ -95,6 +101,7 @@ z Read/Write zlib compressed ARCHIVE_FILE (not always available) v Print filenames as they are added or extraced from ARCHIVE_FILE h Prints this help message + C CPAN mode - drop 022 from permissions =head1 SEE ALSO
According to my records this was resolved with version 1.66 * important changes in version 1.66 26/07/2010 - Applied a patch from Alexandr Ciornii [RT#59699] to Makefile.PL which produces better META.yml - Apply a patch from Alexandr Ciornii to ptar [RT#59700]: Adds option -C to allow archives created with ptar to be uploaded to PAUSE in case of Windows or world +w permissions on unix. * important changes in version 1.64 09/07/2010 - Removed the PERL_CORE specific chdir from all the tests - Apply a patch from David Muir Sharnoff RT #58916, "skip files via a callback and limit memory use when skipping files" - Apply a patch from Daphne Pfister RT #59150 "Assumes all references filename are IO::Handle's instead of trying to stringify." Many thanks.