Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

tar xvzf angular-1.0.1.tgz fails #1226

Closed
ghost opened this issue Aug 2, 2012 · 7 comments
Closed

tar xvzf angular-1.0.1.tgz fails #1226

ghost opened this issue Aug 2, 2012 · 7 comments

Comments

@ghost
Copy link

ghost commented Aug 2, 2012

$tar xvzf angular-1.0.1.tgz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

I can't tell if I'm just screwing up every which way with tar, or if the file has been corrupted. What am I doing wrong?

@IgorMinar
Copy link
Contributor

It works for me on Mac.

~$ curl -O http://code.angularjs.org/1.0.1/angular-1.0.1.tgz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2946k  100 2946k    0     0   440k      0  0:00:06  0:00:06 --:--:--  476k
~$ md5 angular-1.0.1.tgz 
MD5 (angular-1.0.1.tgz) = a2be8ef9a31c5269c21e79c776bbdd3f
~$ tar -xvzf angular-1.0.1.tgz 
x ./
x ./angular-1.0.1/
...
...
...

I'm going to close this unless you can repro the issue. Also please check the md5 hash to verify that your file is not corrupted.

@dplassgit
Copy link

Same thing happened to me on Ubuntu. gunzip then tar worked though.

@eMBee
Copy link

eMBee commented Aug 13, 2012

the problem is that the file is compressed twice:
$ ls -l Download/angular-1.0.1.tgz
-rw-rw-r-- 1 me me 3016474 2012-08-13 18:20 Download/angular-1.0.1.tgz

$ file Download/angular-1.0.1.tgz
Download/angular-1.0.1.tgz: gzip compressed data, from Unix

$ tar tzvf Download/angular-1.0.1.tgz
tar: This does not look like a tar archive

$ gunzip -v Download/angular-1.0.1.tgz
Download/angular-1.0.1.tgz: 0.0% -- replaced with Download/angular-1.0.1.tar
$ ls -l Download/angular-1.0.1.tar
-rw-rw-r-- 1 me me 3017355 2012-08-13 18:20 Download/angular-1.0.1.tar

$ file Download/angular-1.0.1.tar
Download/angular-1.0.1.tar: gzip compressed data, from Unix, last modified: Mon Jun 25 23:19:55 2
012

$ tar tvf Download/angular-1.0.1.tar
works... (aparently tar tries to decompress even without the z option)
$ tar tzvf Download/angular-1.0.1.tar
also works...

$ mv Download/angular-1.0.1.tar Download/angular-1.0.1.tgz
$ gunzip -v Download/angular-1.0.1.tgz
Download/angular-1.0.1.tgz: 50.0% -- replaced with Download/angular-1.0.1.tar

$ ls -l Download/angular-1.0.1.tar
-rw-rw-r-- 1 me me 6031360 2012-08-13 18:20 Download/angular-1.0.1.tar

$ file Download/angular-1.0.1.tar
Download/angular-1.0.1.tar: POSIX tar archive

$ tar tzvf Download/angular-1.0.1.tar
gzip: stdin: not in gzip format (as expected, it's no longer compressed)

@IgorMinar
Copy link
Contributor

@eMBee the file is definitely not compressed twice.

We use the following command in our Rakefile to create it:

  %x(tar -czf #{path_to(tarball)} -C #{path_to('pkg')} .)

I think that there is some kind of incompatibility between the mac and linux version of tar, which while weird, is plausible.

$ tar --version
bsdtar 2.8.3 - libarchive 2.8.3

we can try using gnutar:

$ gnutar --version
tar (GNU tar) 1.17
Copyright (C) 2007 Free Software Foundation, Inc.

and see if that makes a difference, or just use zip and get the windows-friendly benefit in addition to fixing the linux issues.

@IgorMinar IgorMinar reopened this Aug 20, 2012
@eMBee
Copy link

eMBee commented Aug 21, 2012

please take a look at the filesize when it is uncompressed the first time.
it only changes a little. and then check the resulting filetype.

i can't imagine how an incompatibility causes gnutar to have to decompress twice.
perhaps the resulting tarfile is compressed again when it's prepared for upload and the checksum is being created.

i can't find a script that calls 'rake package' though, so maybe that's done manually

@IgorMinar
Copy link
Contributor

we definitely don't compress twice. I don't know what's the problem, so I'm just going to switch to zip

IgorMinar added a commit that referenced this issue Aug 29, 2012
- restructure rake tasks

  this splits up the concatination and minification into two
  tasks so that we can just build angular.js quickly without wasting
  time with minification which is often not needed when just debugging
  some issue on 3rd party site.

- use symlinks when creating final zip file

- switch from btar to zip

- get rid of version numbers from filenames

- rewrite version numbers in all index files

Closes #1226
@mernen
Copy link
Contributor

mernen commented Sep 10, 2012

@IgorMinar Just noticed the readme needs to be updated, too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants