Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.13

Bug #3694 "lone zero block" when untarring packages
Submitted: 2005-03-03 17:29 UTC Modified: 2005-03-04 15:42 UTC
From: justinpatrin Assigned: vblavet
Status: Wont fix Package: Archive_Tar
PHP Version: 4.3.10 OS: Linux (Gentoo)
Roadmaps: (Not assigned)    
Subscription  


 [2005-03-03 17:29 UTC] justinpatrin
Description: ------------ This is probably an Archive_Tar bug but I'm filing it here as I'm not sure. Related to bug #1759. When I create a package with "pear package" and then untzr the resulting archive I get: "tar: A lone zero block at xxx" where xxx changes depending on the package. All of the files seem to untar ok, but I'm worried that something might be or get corrupted. I've seen this off and on for a while but I'm currently using PEAR 1.4.0a4 and Archive_Tar 1.2.

Comments

 [2005-03-03 17:50 UTC] cellog
we don't do anything magical when creating the tar, perhaps Vincent can shed some light on this one?
 [2005-03-04 03:03 UTC] vblavet
Hello ! A Tar file is made of several 512 bytes bocks. This means that if a compressed file is less than 512 we need to pad the block. May be Archive_Tar is buggy and add a full 512 pad block trying to pad with a full block. I can check that but can you send me an package that shows the pb ? (vincent at phpconcept net).
 [2005-03-04 10:25 UTC] justinpatrin
DB_DataObject_FormBuilder's latest release (0.11.5) has this. Just download it and "tar zxvf DB_DataObject_FormBuilder..."
 [2005-03-04 15:42 UTC] vblavet
The problem seems to come from specific tar implementation. Not only PEAR packages are impacte by this warning (this is only a warning). For more detailled info see logged bug in debian about this tar "bug" : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=235820 However it seems that the tar archives from Archive_Tar (and other tar implementations) are not absolutly completly POSIX compliant. I tries to figure out what is wrong without success. So I changed the status to "Wont fix". If I find a clue, of course I will change the code. Notice that pear installer is using Archive_Tar and will not produce this kind of warning.
 [2005-09-19 07:55 UTC] akorthaus at web dot de
I have posted a patch for this issue here: http://pear.php.net/bugs/bug.php?id=5452
 [2006-07-26 12:28 UTC] xy dot spam at packetflood dot net (xy)
I was able to fix my issue by recompiling php4 with the following options: "cli pcre expat zlib" I was missing 'expat' and was causing both PEAR-PEAR and any other PEAR packages to not complete the install. I had mistaken "lone zero block" for the issue I was having where the packages would not install. I still get the error, but the install finishes successfully.
 [2012-12-27 17:29 UTC] ameyer2 (Alan Meyer)
It appears that the problem, at least for Archive_tar, is that Archive_Tar is appending a single block of zeros at the end of the archive when the more recent tar packages expect there to be two such blocks. See: http://www.gnu.org/software/tar/manual/html_node/Standard.html and search for "zero" which explains the POSIX standard termination, or http://en.wikipedia.org/wiki/Tar_%28computing%29 It looks like all that needs to be done to make Archive_Tar compliant is to output two 512 byte blocks of zeros instead of just one - an easy fix. Andreas Korthaus posted a a patch that adds just one line to Archive_Tar and looks like it should fix the problem for that package (see the comment two above this one.) Can someone incorporate that in the official Archive_Tar distribution? Thanks.