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

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

 [2005-03-03 22: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.


 [2005-03-03 22: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 08: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 15: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 20: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" : 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 12:55 UTC] akorthaus at web dot de
I have posted a patch for this issue here:
 [2006-07-26 17: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 22: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: and search for "zero" which explains the POSIX standard termination, or 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.