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

Bug #12462 invalid tar magic
Submitted: 2007-11-16 19:36 UTC
From: sosa Assigned: mrook
Status: Closed Package: Archive_Tar (version 1.3.2)
PHP Version: Irrelevant OS: Linux
Roadmaps: 1.3.4    
Subscription  


 [2007-11-16 19:36 UTC] sosa (So Sa)
Description: ------------ when unpacking a tar.gz file created with tar_archive it will give a error "invalid tar magic". This happens on some linux settop boxes. After some searching i found the following url http://bugs.busybox.net/view.php?id=262 wich should give you enough information to fix this. If you have more questions please mail me.

Comments

 [2008-03-30 09:59 UTC] vpeter (Peter Vicman)
I think the problem is with the variable $v_magic in function _writeHeader (and probably in others too). This variable must be set to 'ustar' and then it works. I am using this on Dreambox settop box with Gemini 4.3 image.
 [2008-08-26 09:59 UTC] crisp (Tino Zijdel)
Indeed the magic header field should be filled in order for archivers to recognize the correct tar format used. It seems this library is still creating old GNU format tars. The 'magic' identifier for this is 'ustar' followed by 2 spaces followed by a NULL, so in order to fix this all occurences of $v_magic should be set to 'ustar ' (note the space) and all occurences of $v_version should be set to ' ' (single space). It might however be wise to change this implementation to the current GNU format which is POSIX compliant. Ref: http://www.gnu.org/software/tar/manual/tar.html#SEC165
 [2009-08-11 23:22 UTC] mrook (Michiel Rook)
-Status: Open +Status: Closed -Assigned To: +Assigned To: mrook
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.