[NTLUG:Discuss] tar problem -- bad browsers that remove the .gz extension (but not the compression)

Bryan J. Smith b.j.smith at ieee.org
Sun Jul 25 18:50:58 CDT 2004


Robert Pearson wrote:  
> I found this at---
> http://lists.gnu.org/archive/html/bug-tar/2004-01/msg00037.html
> The Question---
> I downloaded moneydance_other.tar.tar from
> moneydance.com/install_unix.shtml.

How the heck did you get that name?
I don't see anything of the sort.
Sounds like your browser dorked up the filename.
Applying a little "professional negligence"* (i.e., running MS IE ;-).

[ *NOTE:   I'm not picking on you, because 90% of the world still runs MS
IE as well.  I just consider it "professional negligence" for an IT
professional to use it.  And I've never been afraid to tell executives
at Fortune 100, even a Fortune 20, that exact statement. ]

> When I tried to install it on my system (Xandros 2.0) I got the following
> error:
> Report bugs to <address at bogus.example.com>.
> Picaron:/usr/local# tar xf moneydance_*.tar -C /usr/local/
> tar: This does not look like a tar archive
> tar: Skipping to next header
> tar: Archive contains obsolescent base-64 headers
> tar: Error exit delayed from previous errors

That's because your browser removed gzip as an extension, e.g.,

 $ file mytar.tar.gz
 mytar.tar.gz: gzip compressed data, was "mytar.tar", from Unix

 $ tar tf mytar.tar.gz
 tar: This does not look like a tar archive
 tar: Skipping to next header
 tar: Archive contains obsolescent base-64 headers
 tar: Error exit delayed from previous errors

 $ tar tzf mytar.tar.gz
 (works)

> The Reply---
> Please, use newer version of GNU tar. Version 1.13.25 should work OK
> (available from ftp://alpha.gnu.org/gnu/tar)

Um, er, no.  I'm ...

 $ rpm -q tar
 tar-1.13.25-12

Maybe your distro adds a patch?

Now there _is_ a new Tar 1.14 (1.13.9x) under development that adds full
POSIX 2001 ustar compliance.  Maybe they've added logic that autodetects
the gzip compression -- it's not that hard -- so you don't get the
error if you forget the "z" option.

Right now GNU Tar 1.13 is somewhat of a "bastard."  I don't recommend
you use it to create new archives.  It only supports either the old
"ustar" POSIX 1988 (yes, 88) format which has serious limitations, or
its own, non-POSIX/non-ustar compliant format to overcome them (uses
them as necessary).

The new POSIX 2001 standard addresses those limitations in a semi-POSIX
1988 compatible form.  So until GNU Tar 1.14 is out, I recommend you use
either "pax" or "star."

The nice thing about "star" is that it supports most of the major GNU
options as well as GNU Tar 1.1x non-standard format.


-- 
     Linux Enthusiasts call me anti-Linux.
   Windows Enthusisats call me anti-Microsoft.
 They both must be correct because I have over a
decade of experience with both in mission critical
environments, resulting in a bigotry dedicated to
 mitigating risk and focusing on technologies ...
           not products or vendors
--------------------------------------------------
Bryan J. Smith, E.I.            b.j.smith at ieee.org





More information about the Discuss mailing list