Bug #19289 [Com]: Invalid tar file generated
| From: | slusarz@curecanti.org | Date: | Thu, 16 Feb 2012 20:27:14 +0000 |
| Subject: | Bug #19289 [Com]: Invalid tar file generated | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8282@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19289&edit=1
ID: 19289
Comment by: slusarz@curecanti.org
Reported By: slusarz at curecanti dot org
Summary: Invalid tar file generated
Status: Open
Type: Bug
Package: Archive_Tar
Operating System: Linux
Package Version: 1.3.8
PHP Version: 5.3.10
Roadmap Versions:
New Comment:
Looks like there is no way of attaching a file, so here's a link:
http://www.curecanti.org/data/test.tgz
Previous Comments:
------------------------------------------------------------------------
[2012-02-16 20:24:48] slusarz
slusarz@bigworm % pear list
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.8 stable
slusarz@bigworm % pear list Archive_Tar
Installed Files For Archive_Tar
===============================
Type Install Path
php /httpd/lib/php/pear/Archive/Tar.php
doc /httpd/lib/php/pear/doc/Archive_Tar/docs/Archive_Tar.txt
Can verify this is the only copy of Archive_Tar on the system:
slusarz@bigworm % locate Archive/Tar
/httpd/lib/php/pear/Archive/Tar.php
/usr/share/perl5/core_perl/Archive/Tar
/usr/share/perl5/core_perl/Archive/Tar.pm
/usr/share/perl5/core_perl/Archive/Tar/Constant.pm
/usr/share/perl5/core_perl/Archive/Tar/File.pm
I will try rebuilding PHP from scratch (make distclean) to see if that
helps.... Nope, still broken. (and installation of PHP guarantees that
the latest version of Archive_Tar is installed).
I will attach the output from my example script.
------------------------------------------------------------------------
[2012-02-16 18:41:58] mrook
Can you please verify the installed version of Archive_Tar? Using your
test script I
can't reproduce the error. Also, a similar bug was reported and fixed
(#5452).
------------------------------------------------------------------------
[2012-02-13 06:38:06] slusarz
Description:
------------
Discovered when packaging a PEAR release for the Horde project... the
tgz file was created but attempting to decompress the file would give
the error "tar: A lone zero block at #".
Test script to reproduce is below.
Test script:
---------------
@unlink('test1.txt');
file_put_contents('test1.txt', 'a');
@unlink('test2.txt');
file_put_contents('test2.txt', 'b');
require_once 'Archive/Tar.php';
@unlink('test.tgz');
$a = new Archive_Tar('test.tgz', 'gz');
$a->createModify(array('test1.txt'), '');
$a->addModify(array('test2.txt'), '');
Expected result:
----------------
After running test script, test.tgz file is created.
Attempting to untar, this is the output:
slusarz@bigworm % tar zxvf test.tgz
test2.txt
tar: A lone zero block at 3
Actual result:
--------------
Verified that adding the '-i' option to tar (--ignore zeros) fixes
decompression:
slusarz@bigworm % tar zxvfi test.tgz
test1.txt
test2.txt
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19289&edit=1