* tar zxvf won't work with Redhat generated compressed tar file
@ 2015-04-20 18:41 Murthy Gandikota
2015-04-20 18:45 ` Bertrand Caplet
` (3 more replies)
0 siblings, 4 replies; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 18:41 UTC (permalink / raw)
To: cygwin
Hi All
I am using Cygwin64. I am getting a file from RedHat in tar + zip format. Currently I am able to unzip it and untar it in 2 steps as follows:
$gunzip mytar.gz
$tar xvf mytar
However, I would like to do the following:
$tar -zxvf mytar.gz
The error message I see is:
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
Can someone please tell me what is the right way?
Thanks
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 18:41 tar zxvf won't work with Redhat generated compressed tar file Murthy Gandikota
@ 2015-04-20 18:45 ` Bertrand Caplet
2015-04-20 18:57 ` Bertrand Caplet
2015-04-20 18:59 ` Murthy Gandikota
2015-04-20 19:22 ` Daniel
` (2 subsequent siblings)
3 siblings, 2 replies; 29+ messages in thread
From: Bertrand Caplet @ 2015-04-20 18:45 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 505 bytes --]
Hey there,
It's not working because you're trying to decompress a tar + gzip
archive with tar zxvf but it's just a gzip archive.
If you first make a tar + gzip archive with :
tar xcvf archive.tar.gz your-files
and then :
tar zxvf archive.tar.gz
It will be ok :-)
Regards,
--
CHUNKZ.NET - script kiddie and computer technician
Bertrand Caplet, Flers (FR)
Feel free to send encrypted/signed messages
Key ID: 37F70C30
GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 18:45 ` Bertrand Caplet
@ 2015-04-20 18:57 ` Bertrand Caplet
2015-04-20 18:59 ` Murthy Gandikota
1 sibling, 0 replies; 29+ messages in thread
From: Bertrand Caplet @ 2015-04-20 18:57 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
> tar xcvf archive.tar.gz your-files
I said tar xcvf for creating archive but it's tar zcvf my bad.
--
CHUNKZ.NET - script kiddie and computer technician
Bertrand Caplet, Flers (FR)
Feel free to send encrypted/signed messages
Key ID: 37F70C30
GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 18:45 ` Bertrand Caplet
2015-04-20 18:57 ` Bertrand Caplet
@ 2015-04-20 18:59 ` Murthy Gandikota
2015-04-20 19:00 ` Bertrand Caplet
1 sibling, 1 reply; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 18:59 UTC (permalink / raw)
To: Bertrand Caplet, cygwin
Did you mean tar zcvf ? It still doesn't work on RedHat and Cygwin64.
Thanks
----------------------------------------
> Date: Mon, 20 Apr 2015 20:44:56 +0200
> From: bertrand.caplet@chunkz.net
> To: cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>
> Hey there,
>
> It's not working because you're trying to decompress a tar + gzip
> archive with tar zxvf but it's just a gzip archive.
>
> If you first make a tar + gzip archive with :
>
> tar xcvf archive.tar.gz your-files
>
> and then :
>
> tar zxvf archive.tar.gz
>
> It will be ok :-)
>
> Regards,
> --
> CHUNKZ.NET - script kiddie and computer technician
> Bertrand Caplet, Flers (FR)
> Feel free to send encrypted/signed messages
> Key ID: 37F70C30
> GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 18:59 ` Murthy Gandikota
@ 2015-04-20 19:00 ` Bertrand Caplet
2015-04-20 19:02 ` Murthy Gandikota
0 siblings, 1 reply; 29+ messages in thread
From: Bertrand Caplet @ 2015-04-20 19:00 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
> Did you mean tar zcvf ? It still doesn't work on RedHat and Cygwin64.
Yes, I meant this. What does not work ? Do you have a error message ?
--
CHUNKZ.NET - script kiddie and computer technician
Bertrand Caplet, Flers (FR)
Feel free to send encrypted/signed messages
Key ID: 37F70C30
GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:00 ` Bertrand Caplet
@ 2015-04-20 19:02 ` Murthy Gandikota
2015-04-20 19:10 ` Joi L. Ellis
0 siblings, 1 reply; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 19:02 UTC (permalink / raw)
To: Bertrand Caplet, cygwin
Got this message from my upstream Linux sender
Please try as well but I previously tried renaming the .tar to .tar.gz (this is an old Linux issue - not knowing a .tar was compressed unless it had .gz too - that I haven't seen required in years) - this had no impact.
----------------------------------------
> Date: Mon, 20 Apr 2015 21:00:34 +0200
> From: bertrand.caplet@chunkz.net
> To: cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>
>> Did you mean tar zcvf ? It still doesn't work on RedHat and Cygwin64.
>
> Yes, I meant this. What does not work ? Do you have a error message ?
>
> --
> CHUNKZ.NET - script kiddie and computer technician
> Bertrand Caplet, Flers (FR)
> Feel free to send encrypted/signed messages
> Key ID: 37F70C30
> GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:02 ` Murthy Gandikota
@ 2015-04-20 19:10 ` Joi L. Ellis
2015-04-20 19:18 ` Bertrand Caplet
2015-04-20 20:45 ` Eric Blake
0 siblings, 2 replies; 29+ messages in thread
From: Joi L. Ellis @ 2015-04-20 19:10 UTC (permalink / raw)
To: Murthy Gandikota, Bertrand Caplet, cygwin
I have an old CentOS system, so I copied an existing gzipped tarball from it to my Cygwin and had no difficulties exploding that file. It had extension '.tgz'. Copied it to '.tar.gz' and still had no issue with it.
What version of RedHat are you using, and what command(s) created the compressed tarball you're having difficulty with?
If you run the 'file' command on the tarball file, what does 'file' say it contains?
rake-0.8.4.tar.gz: gzip compressed data, last modified: Wed Mar 4 07:31:25 2009, from Unix
Note that some flavors of tar don't have a very powerful compression library, and some don't have one at all. For those old ones you may be forced to use gunzip to get the tarball into a form the old tar understands. (My ancient CentOS box has it, though.)
-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of Murthy Gandikota
Sent: Monday, April 20, 2015 14:03
To: Bertrand Caplet; cygwin@sourceware.org
Subject: RE: tar zxvf won't work with Redhat generated compressed tar file
Got this message from my upstream Linux sender
Please try as well but I previously tried renaming the .tar to .tar.gz (this is an old Linux issue - not knowing a .tar was compressed unless it had .gz too - that I haven't seen required in years) - this had no impact.
----------------------------------------
> Date: Mon, 20 Apr 2015 21:00:34 +0200
> From: bertrand.caplet@chunkz.net
> To: cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar
> file
>
>> Did you mean tar zcvf ? It still doesn't work on RedHat and Cygwin64.
>
> Yes, I meant this. What does not work ? Do you have a error message ?
>
> --
> CHUNKZ.NET - script kiddie and computer technician Bertrand Caplet,
> Flers (FR) Feel free to send encrypted/signed messages Key ID:
> 37F70C30 GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:10 ` Joi L. Ellis
@ 2015-04-20 19:18 ` Bertrand Caplet
2015-04-20 19:32 ` Murthy Gandikota
2015-04-20 20:45 ` Eric Blake
1 sibling, 1 reply; 29+ messages in thread
From: Bertrand Caplet @ 2015-04-20 19:18 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]
> I have an old CentOS system, so I copied an existing gzipped tarball from it to my Cygwin and had no difficulties exploding that file. It had extension '.tgz'. Copied it to '.tar.gz' and still had no issue with it.
>
> What version of RedHat are you using, and what command(s) created the compressed tarball you're having difficulty with?
>
> If you run the 'file' command on the tarball file, what does 'file' say it contains?
>
> rake-0.8.4.tar.gz: gzip compressed data, last modified: Wed Mar 4 07:31:25 2009, from Unix
>
> Note that some flavors of tar don't have a very powerful compression library, and some don't have one at all. For those old ones you may be forced to use gunzip to get the tarball into a form the old tar understands. (My ancient CentOS box has it, though.)
I agree with you Joi. Tar relies on content of file not extension.
Murthy, tell us what file yourfile.tar.gz does say ?
--
CHUNKZ.NET - script kiddie and computer technician
Bertrand Caplet, Flers (FR)
Feel free to send encrypted/signed messages
Key ID: 37F70C30
GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 18:41 tar zxvf won't work with Redhat generated compressed tar file Murthy Gandikota
2015-04-20 18:45 ` Bertrand Caplet
@ 2015-04-20 19:22 ` Daniel
2015-04-20 19:36 ` J. David Boyd
2015-04-20 19:35 ` Andrey Repin
2015-04-20 20:06 ` Eric Blake
3 siblings, 1 reply; 29+ messages in thread
From: Daniel @ 2015-04-20 19:22 UTC (permalink / raw)
To: cygwin
Murthy Gandikota wrote:
> Hi All
>
> I am using Cygwin64. I am getting a file from RedHat in tar + zip format. Currently I am able to unzip it and untar it in 2 steps as follows:
>
> $gunzip mytar.gz
> $tar xvf mytar
>
> However, I would like to do the following:
>
> $tar -zxvf mytar.gz
>
> The error message I see is:
>
> tar: This does not look like a tar archive
> tar: Skipping to next header
> tar: Exiting with failure status due to previous errors
>
>
> Can someone please tell me what is the right way?
>
> Thanks
One way to get this error if you download the file through a gzipping
proxy web-server. So you have to drop the 'z' when unzipping.
Daniel
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:18 ` Bertrand Caplet
@ 2015-04-20 19:32 ` Murthy Gandikota
2015-04-20 19:42 ` Bertrand Caplet
0 siblings, 1 reply; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 19:32 UTC (permalink / raw)
To: Bertrand Caplet, cygwin
Ran this command on Cygwin64
$file mytar.gz
mytar.gz: gzip compressed data, from Unix
Did you want me to run this command on Linux?
Thanks
----------------------------------------
> Date: Mon, 20 Apr 2015 21:18:09 +0200
> From: bertrand.caplet@chunkz.net
> To: cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>
>> I have an old CentOS system, so I copied an existing gzipped tarball from it to my Cygwin and had no difficulties exploding that file. It had extension '.tgz'. Copied it to '.tar.gz' and still had no issue with it.
>>
>> What version of RedHat are you using, and what command(s) created the compressed tarball you're having difficulty with?
>>
>> If you run the 'file' command on the tarball file, what does 'file' say it contains?
>>
>> rake-0.8.4.tar.gz: gzip compressed data, last modified: Wed Mar 4 07:31:25 2009, from Unix
>>
>> Note that some flavors of tar don't have a very powerful compression library, and some don't have one at all. For those old ones you may be forced to use gunzip to get the tarball into a form the old tar understands. (My ancient CentOS box has it, though.)
>
> I agree with you Joi. Tar relies on content of file not extension.
> Murthy, tell us what file yourfile.tar.gz does say ?
>
> --
> CHUNKZ.NET - script kiddie and computer technician
> Bertrand Caplet, Flers (FR)
> Feel free to send encrypted/signed messages
> Key ID: 37F70C30
> GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 18:41 tar zxvf won't work with Redhat generated compressed tar file Murthy Gandikota
2015-04-20 18:45 ` Bertrand Caplet
2015-04-20 19:22 ` Daniel
@ 2015-04-20 19:35 ` Andrey Repin
2015-04-20 19:37 ` Murthy Gandikota
2015-04-20 20:06 ` Eric Blake
3 siblings, 1 reply; 29+ messages in thread
From: Andrey Repin @ 2015-04-20 19:35 UTC (permalink / raw)
To: Murthy Gandikota, cygwin
Greetings, Murthy Gandikota!
> Hi All
> I am using Cygwin64. I am getting a file from RedHat in tar + zip format.
> Currently I am able to unzip it and untar it in 2 steps as follows:
> $gunzip mytar.gz
> $tar xvf mytar
> However, I would like to do the following:
> $tar -zxvf mytar.gz
> The error message I see is:
> tar: This does not look like a tar archive
> tar: Skipping to next header
> tar: Exiting with failure status due to previous errors
> Can someone please tell me what is the right way?
tar xvf mytar.gz
I.e. drop filter spec.
tar is smart enough to detect and apply known filters automatically.
--
With best regards,
Andrey Repin
Monday, April 20, 2015 22:23:58
Sorry for my terrible english...
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:22 ` Daniel
@ 2015-04-20 19:36 ` J. David Boyd
0 siblings, 0 replies; 29+ messages in thread
From: J. David Boyd @ 2015-04-20 19:36 UTC (permalink / raw)
To: cygwin
Daniel <daniel@boland.nl> writes:
> Murthy Gandikota wrote:
>> Hi All
>>
>> I am using Cygwin64. I am getting a file from RedHat in tar + zip format. Currently I am able to unzip it and untar it in 2 steps as follows:
>>
>> $gunzip mytar.gz
>> $tar xvf mytar
>>
>> However, I would like to do the following:
>>
>> $tar -zxvf mytar.gz
>>
>> The error message I see is:
>>
>> tar: This does not look like a tar archive
>> tar: Skipping to next header
>> tar: Exiting with failure status due to previous errors
>>
>>
>> Can someone please tell me what is the right way?
>>
>> Thanks
>
> One way to get this error if you download the file through a gzipping
> proxy web-server. So you have to drop the 'z' when unzipping.
>
> Daniel
I think everyone might be misreading. He can extract every thing completely
successfully if he breaks it into 2 commands. It is when he tries to have tar
call gzip that it fails. Are there any known bugs like that in the 64 bit
cygwin tree?
Dave
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:35 ` Andrey Repin
@ 2015-04-20 19:37 ` Murthy Gandikota
2015-04-20 21:05 ` Andrey Repin
0 siblings, 1 reply; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 19:37 UTC (permalink / raw)
To: cygwin
I see same error
$ tar xvf mytar.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
----------------------------------------
> Date: Mon, 20 Apr 2015 22:26:09 +0300
> From: anrdaemon@yandex.ru
> To: murthy64@hotmail.com; cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>
> Greetings, Murthy Gandikota!
>
>> Hi All
>
>> I am using Cygwin64. I am getting a file from RedHat in tar + zip format.
>> Currently I am able to unzip it and untar it in 2 steps as follows:
>
>> $gunzip mytar.gz
>> $tar xvf mytar
>
>> However, I would like to do the following:
>
>> $tar -zxvf mytar.gz
>
>> The error message I see is:
>
>> tar: This does not look like a tar archive
>> tar: Skipping to next header
>> tar: Exiting with failure status due to previous errors
>
>
>> Can someone please tell me what is the right way?
>
> tar xvf mytar.gz
>
> I.e. drop filter spec.
> tar is smart enough to detect and apply known filters automatically.
>
>
> --
> With best regards,
> Andrey Repin
> Monday, April 20, 2015 22:23:58
>
> Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:32 ` Murthy Gandikota
@ 2015-04-20 19:42 ` Bertrand Caplet
2015-04-20 19:53 ` Joi L. Ellis
2015-04-20 19:53 ` Murthy Gandikota
0 siblings, 2 replies; 29+ messages in thread
From: Bertrand Caplet @ 2015-04-20 19:42 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 464 bytes --]
> Ran this command on Cygwin64
>
> $file mytar.gz
> mytar.gz: gzip compressed data, from Unix
>
> Did you want me to run this command on Linux?
>
> Thanks
Well as I said it's a gzip archive not a tar + gzip you can't extract it
with tar.
--
CHUNKZ.NET - script kiddie and computer technician
Bertrand Caplet, Flers (FR)
Feel free to send encrypted/signed messages
Key ID: 37F70C30
GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:42 ` Bertrand Caplet
@ 2015-04-20 19:53 ` Joi L. Ellis
2015-04-20 19:58 ` Murthy Gandikota
2015-04-20 19:53 ` Murthy Gandikota
1 sibling, 1 reply; 29+ messages in thread
From: Joi L. Ellis @ 2015-04-20 19:53 UTC (permalink / raw)
To: Bertrand Caplet, cygwin, murthy64
The 'file' command isn't recursive. If you gzip a tar file, it will only say it's a compressed file, it won't say it's a compressed tar file. See the example I posted myself earlier in the thread.
I had theorized that the original file is zipped, not gzipped, and perhaps the tar command is failing for that reason, but I did some tests with that assumption and it seems tar is able to uncompress a 'zip' format as well as a 'gzip' format.
I really don't have an explanation why tar can't uncompress the file itself, unless (and this is a wild guess on my part) the method used to copy the file from RedHat to Cygwin introduced newline format issues (linux \n vs Windows \r\n). But that doesn't explain to me why manually gunzip before tar works, while tar alone doesn't.
Is this compressed file under discussion something that can be shared? I think it will be useful to see if anyone else running 64bit Cygwin (which I am) can handle that file, or is it an issue limited to this one machine? The Cygwin packages are usually pretty good about getting dependencies installed correctly. I asked ldd for a list of library references for tar and gzip, and neither one referenced libz, which makes me presume they're both statically linked binaries. If so, it wouldn't matter if libz is installed or not.
$ ldd /usr/bin/tar
ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x7ffe15a90000)
KERNEL32.DLL => /cygdrive/c/Windows/system32/KERNEL32.DLL (0x7ffe134d0000)
KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll (0x7ffe12ff0000)
cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x3fc6d0000)
cygintl-8.dll => /usr/bin/cygintl-8.dll (0x3fad80000)
$ ldd /usr/bin/gzip
ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x7ffe15a90000)
KERNEL32.DLL => /cygdrive/c/Windows/system32/KERNEL32.DLL (0x7ffe134d0000)
KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll (0x7ffe12ff0000)
cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
So, I'm back to asking, how is this file being created on redhat? There are a multitude of options to tar, and some of them are incompatible with Cygwin, I think.
-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of Bertrand Caplet
Sent: Monday, April 20, 2015 14:42
To: cygwin@cygwin.com
Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
> Ran this command on Cygwin64
>
> $file mytar.gz
> mytar.gz: gzip compressed data, from Unix
>
> Did you want me to run this command on Linux?
>
> Thanks
Well as I said it's a gzip archive not a tar + gzip you can't extract it with tar.
--
CHUNKZ.NET - script kiddie and computer technician Bertrand Caplet, Flers (FR) Feel free to send encrypted/signed messages Key ID: 37F70C30 GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:42 ` Bertrand Caplet
2015-04-20 19:53 ` Joi L. Ellis
@ 2015-04-20 19:53 ` Murthy Gandikota
1 sibling, 0 replies; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 19:53 UTC (permalink / raw)
To: Bertrand Caplet, cygwin
As I said earlier, if I do it in 2 steps gunzip and tar -xvf, it worked.
The problem surfaces when I try tar -zxvf.
Thanks
----------------------------------------
> Date: Mon, 20 Apr 2015 21:41:54 +0200
> From: bertrand.caplet@chunkz.net
> To: cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>
>> Ran this command on Cygwin64
>>
>> $file mytar.gz
>> mytar.gz: gzip compressed data, from Unix
>>
>> Did you want me to run this command on Linux?
>>
>> Thanks
>
> Well as I said it's a gzip archive not a tar + gzip you can't extract it
> with tar.
> --
> CHUNKZ.NET - script kiddie and computer technician
> Bertrand Caplet, Flers (FR)
> Feel free to send encrypted/signed messages
> Key ID: 37F70C30
> GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:53 ` Joi L. Ellis
@ 2015-04-20 19:58 ` Murthy Gandikota
0 siblings, 0 replies; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 19:58 UTC (permalink / raw)
To: Joi L. Ellis, cygwin
$ ldd /usr/bin/tar
ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x772c0000)
kernel32.dll => /cygdrive/c/Windows/system32/kernel32.dll (0x771a0000)
KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll (0x7fefd0a0000)
cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x3ffb80000)
cygintl-8.dll => /usr/bin/cygintl-8.dll (0x3ffb60000)
$ ldd /usr/bin/gzip
ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x772c0000)
kernel32.dll => /cygdrive/c/Windows/system32/kernel32.dll (0x771a0000)
KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll (0x7fefd0a0000)
cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
I am afraid the tar file can't be shared. I will see if I can ask my provider for a sample.
Thanks
----------------------------------------
> From: jlellis@pavlovmedia.com
> To: bertrand.caplet@chunkz.net; cygwin@cygwin.com; murthy64@hotmail.com
> Subject: RE: tar zxvf won't work with Redhat generated compressed tar file
> Date: Mon, 20 Apr 2015 19:53:15 +0000
>
> The 'file' command isn't recursive. If you gzip a tar file, it will only say it's a compressed file, it won't say it's a compressed tar file. See the example I posted myself earlier in the thread.
>
> I had theorized that the original file is zipped, not gzipped, and perhaps the tar command is failing for that reason, but I did some tests with that assumption and it seems tar is able to uncompress a 'zip' format as well as a 'gzip' format.
>
> I really don't have an explanation why tar can't uncompress the file itself, unless (and this is a wild guess on my part) the method used to copy the file from RedHat to Cygwin introduced newline format issues (linux \n vs Windows \r\n). But that doesn't explain to me why manually gunzip before tar works, while tar alone doesn't.
>
> Is this compressed file under discussion something that can be shared? I think it will be useful to see if anyone else running 64bit Cygwin (which I am) can handle that file, or is it an issue limited to this one machine? The Cygwin packages are usually pretty good about getting dependencies installed correctly. I asked ldd for a list of library references for tar and gzip, and neither one referenced libz, which makes me presume they're both statically linked binaries. If so, it wouldn't matter if libz is installed or not.
>
> $ ldd /usr/bin/tar
> ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x7ffe15a90000)
> KERNEL32.DLL => /cygdrive/c/Windows/system32/KERNEL32.DLL (0x7ffe134d0000)
> KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll (0x7ffe12ff0000)
> cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
> cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x3fc6d0000)
> cygintl-8.dll => /usr/bin/cygintl-8.dll (0x3fad80000)
>
> $ ldd /usr/bin/gzip
> ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x7ffe15a90000)
> KERNEL32.DLL => /cygdrive/c/Windows/system32/KERNEL32.DLL (0x7ffe134d0000)
> KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll (0x7ffe12ff0000)
> cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
>
> So, I'm back to asking, how is this file being created on redhat? There are a multitude of options to tar, and some of them are incompatible with Cygwin, I think.
>
> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of Bertrand Caplet
> Sent: Monday, April 20, 2015 14:42
> To: cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>
>> Ran this command on Cygwin64
>>
>> $file mytar.gz
>> mytar.gz: gzip compressed data, from Unix
>>
>> Did you want me to run this command on Linux?
>>
>> Thanks
>
> Well as I said it's a gzip archive not a tar + gzip you can't extract it with tar.
> --
> CHUNKZ.NET - script kiddie and computer technician Bertrand Caplet, Flers (FR) Feel free to send encrypted/signed messages Key ID: 37F70C30 GPG FP: 134A 4027 518B 5F4D D409 558D BA9B 7BF0 37F7 0C30
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 18:41 tar zxvf won't work with Redhat generated compressed tar file Murthy Gandikota
` (2 preceding siblings ...)
2015-04-20 19:35 ` Andrey Repin
@ 2015-04-20 20:06 ` Eric Blake
2015-04-20 20:15 ` Eric Blake
3 siblings, 1 reply; 29+ messages in thread
From: Eric Blake @ 2015-04-20 20:06 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 968 bytes --]
On 04/20/2015 12:40 PM, Murthy Gandikota wrote:
> Hi All
>
> I am using Cygwin64. I am getting a file from RedHat in tar + zip format. Currently I am able to unzip it and untar it in 2 steps as follows:
>
> $gunzip mytar.gz
> $tar xvf mytar
According to upstream, some compressed tar files can fail to unpack
without this patch:
https://lists.gnu.org/archive/html/bug-tar/2015-02/msg00008.html
which is not yet in the cygwin build. But that email example was for a
tar.bz2 file, whereas yours is tar.gz; also, the fact that your 32-bit
build worked while your 64-bit build failed makes me wonder if it is
something in the code that is not 64-bit clean, rather than that
particular upstream bug.
But I'd need to be able to reproduce the problem locally before I can
provide an updated tar build for cygwin that fixes the problem.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 20:06 ` Eric Blake
@ 2015-04-20 20:15 ` Eric Blake
0 siblings, 0 replies; 29+ messages in thread
From: Eric Blake @ 2015-04-20 20:15 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 417 bytes --]
On 04/20/2015 02:06 PM, Eric Blake wrote:
> But I'd need to be able to reproduce the problem locally before I can
> provide an updated tar build for cygwin that fixes the problem.
As it is, it looks like I'm overdue for a tar build. cygwin tar is
still at 1.27.1, while upstream has released 1.28.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:10 ` Joi L. Ellis
2015-04-20 19:18 ` Bertrand Caplet
@ 2015-04-20 20:45 ` Eric Blake
1 sibling, 0 replies; 29+ messages in thread
From: Eric Blake @ 2015-04-20 20:45 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]
On 04/20/2015 01:10 PM, Joi L. Ellis wrote:
>
> Note that some flavors of tar don't have a very powerful compression library, and some don't have one at all. For those old ones you may be forced to use gunzip to get the tarball into a form the old tar understands. (My ancient CentOS box has it, though.)
GNU tar does NOT use compression libraries; rather, it shells out (via
an equivalent to popen()) to an external program. If you tell tar which
format a file was compressed in, it should try to use that compression
utility without questions; if you omit the compression format, tar knows
enough magic numbers to shell out to the most common default decompressors.
But one thing that MAY be happening is if a newer gzip is at play.
Upstream has reports of tar failing if $GZIP is set in the environment,
since newer gzip explicitly warns about this setup, and the warning may
interfere with tar's use of the output stream from the resulting
decompression:
https://lists.gnu.org/archive/html/bug-tar/2015-03/msg00006.html
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 19:37 ` Murthy Gandikota
@ 2015-04-20 21:05 ` Andrey Repin
2015-04-20 21:08 ` Murthy Gandikota
0 siblings, 1 reply; 29+ messages in thread
From: Andrey Repin @ 2015-04-20 21:05 UTC (permalink / raw)
To: Murthy Gandikota, cygwin
Greetings, Murthy Gandikota!
Please don't top-post. Thank you.
And please no cleartext emails in quoted text.
>>> I am using Cygwin64. I am getting a file from RedHat in tar + zip format.
>>> Currently I am able to unzip it and untar it in 2 steps as follows:
>>
>>> $gunzip mytar.gz
>>> $tar xvf mytar
>>
>>> However, I would like to do the following:
>>
>>> $tar -zxvf mytar.gz
>>
>>> The error message I see is:
>>
>>> tar: This does not look like a tar archive
>>> tar: Skipping to next header
>>> tar: Exiting with failure status due to previous errors
>>
>>
>>> Can someone please tell me what is the right way?
>>
>> tar xvf mytar.gz
>>
>> I.e. drop filter spec.
>> tar is smart enough to detect and apply known filters automatically.
> I see same error
> $ tar xvf mytar.gz
> tar: This does not look like a tar archive
> tar: Skipping to next header
> tar: Exiting with failure status due to previous errors
Then what makes you think it is actually a tar archive?
What
gunzip > mytar < mytar.gz; file mytar
says?
--
With best regards,
Andrey Repin
Monday, April 20, 2015 23:47:50
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 21:05 ` Andrey Repin
@ 2015-04-20 21:08 ` Murthy Gandikota
2015-04-20 21:16 ` Eric Blake
0 siblings, 1 reply; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 21:08 UTC (permalink / raw)
To: cygwin
----------------------------------------
> Date: Mon, 20 Apr 2015 23:50:36 +0300
> From: anrdaemon@yandex.ru
> To: murthy64@hotmail.com; cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>
> Greetings, Murthy Gandikota!
>
> Please don't top-post. Thank you.
> And please no cleartext emails in quoted text.
>
>>>> I am using Cygwin64. I am getting a file from RedHat in tar + zip format.
>>>> Currently I am able to unzip it and untar it in 2 steps as follows:
>>>
>>>> $gunzip mytar.gz
>>>> $tar xvf mytar
>>>
>>>> However, I would like to do the following:
>>>
>>>> $tar -zxvf mytar.gz
>>>
>>>> The error message I see is:
>>>
>>>> tar: This does not look like a tar archive
>>>> tar: Skipping to next header
>>>> tar: Exiting with failure status due to previous errors
>>>
>>>
>>>> Can someone please tell me what is the right way?
>>>
>>> tar xvf mytar.gz
>>>
>>> I.e. drop filter spec.
>>> tar is smart enough to detect and apply known filters automatically.
>
>
>> I see same error
>
>> $ tar xvf mytar.gz
>> tar: This does not look like a tar archive
>> tar: Skipping to next header
>> tar: Exiting with failure status due to previous errors
>
> Then what makes you think it is actually a tar archive?
> What
>
> gunzip> mytar < mytar.gz; file mytar
>
> says?
>
>
> --
> With best regards,
> Andrey Repin
> Monday, April 20, 2015 23:47:50
>
> Sorry for my terrible english...
>
>
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Sorry, didn't notice the top-posting.... here is the output to the command
mytar: gzip compressed data, last modified: Tue Mar 24 03:50:58 2015, from Unix
Thanks
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 21:08 ` Murthy Gandikota
@ 2015-04-20 21:16 ` Eric Blake
2015-04-20 22:00 ` Murthy Gandikota
0 siblings, 1 reply; 29+ messages in thread
From: Eric Blake @ 2015-04-20 21:16 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1494 bytes --]
On 04/20/2015 03:08 PM, Murthy Gandikota wrote:
>>
>>> $ tar xvf mytar.gz
>>> tar: This does not look like a tar archive
>>> tar: Skipping to next header
>>> tar: Exiting with failure status due to previous errors
>>
>> Then what makes you think it is actually a tar archive?
>> What
>>
>> gunzip> mytar < mytar.gz; file mytar
>>
>> says?
>>
> Sorry, didn't notice the top-posting.... here is the output to the command
>
> mytar: gzip compressed data, last modified: Tue Mar 24 03:50:58 2015, from Unix
Then it looks like you have a DOUBLE-compressed file. That is, someone
took a .tar.gz file, and ran THAT through gzip again (which seldom does
anything except make a LARGER file - because the first round of
compression removed any redundancy). Tar cannot read a
double-compressed stream, but breaking things into two steps lets you
get back to a single compressed stream, where the tar call then
auto-decompresses because you weren't supplying an explicit 'z' the
second time around. To prove it, try:
gunzip <mytar.gz >mytar
tar zxvf mytar
and if it still untars with an explicit decompression, then you have
proven that your original file was double-compressed. Also, if I'm
right about double compression, then mytar.gz would likely be slightly
larger than mytar (rather than the usual case of the .gz being
noticeably smaller).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 21:16 ` Eric Blake
@ 2015-04-20 22:00 ` Murthy Gandikota
2015-04-20 23:07 ` Murthy Gandikota
0 siblings, 1 reply; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 22:00 UTC (permalink / raw)
To: Eric Blake, cygwin
----------------------------------------
> Date: Mon, 20 Apr 2015 15:16:43 -0600
> From: eblake@redhat.com
> To: cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>
> On 04/20/2015 03:08 PM, Murthy Gandikota wrote:
>
>>>
>>>> $ tar xvf mytar.gz
>>>> tar: This does not look like a tar archive
>>>> tar: Skipping to next header
>>>> tar: Exiting with failure status due to previous errors
>>>
>>> Then what makes you think it is actually a tar archive?
>>> What
>>>
>>> gunzip> mytar < mytar.gz; file mytar
>>>
>>> says?
>>>
>
>> Sorry, didn't notice the top-posting.... here is the output to the command
>>
>> mytar: gzip compressed data, last modified: Tue Mar 24 03:50:58 2015, from Unix
>
> Then it looks like you have a DOUBLE-compressed file. That is, someone
> took a .tar.gz file, and ran THAT through gzip again (which seldom does
> anything except make a LARGER file - because the first round of
> compression removed any redundancy). Tar cannot read a
> double-compressed stream, but breaking things into two steps lets you
> get back to a single compressed stream, where the tar call then
> auto-decompresses because you weren't supplying an explicit 'z' the
> second time around. To prove it, try:
>
> gunzip <mytar.gz>mytar
> tar zxvf mytar
>
> and if it still untars with an explicit decompression, then you have
> proven that your original file was double-compressed. Also, if I'm
> right about double compression, then mytar.gz would likely be slightly
> larger than mytar (rather than the usual case of the .gz being
> noticeably smaller).
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
Yes, Sir. It did untar properly. So the problem is with the server compressing during the download (I get the file from a http server)?
Thanks a lot for your help
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 22:00 ` Murthy Gandikota
@ 2015-04-20 23:07 ` Murthy Gandikota
2015-04-20 23:35 ` Andrey Repin
` (2 more replies)
0 siblings, 3 replies; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 23:07 UTC (permalink / raw)
To: Eric Blake, cygwin
----------------------------------------
> From: murthy64@hotmail.com
> To: eblake@redhat.com; cygwin@cygwin.com
> Subject: RE: tar zxvf won't work with Redhat generated compressed tar file
> Date: Mon, 20 Apr 2015 22:00:10 +0000
>
>
>
> ----------------------------------------
>> Date: Mon, 20 Apr 2015 15:16:43 -0600
>> From: eblake@redhat.com
>> To: cygwin@cygwin.com
>> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>>
>> On 04/20/2015 03:08 PM, Murthy Gandikota wrote:
>>
>>>>
>>>>> $ tar xvf mytar.gz
>>>>> tar: This does not look like a tar archive
>>>>> tar: Skipping to next header
>>>>> tar: Exiting with failure status due to previous errors
>>>>
>>>> Then what makes you think it is actually a tar archive?
>>>> What
>>>>
>>>> gunzip> mytar < mytar.gz; file mytar
>>>>
>>>> says?
>>>>
>>
>>> Sorry, didn't notice the top-posting.... here is the output to the command
>>>
>>> mytar: gzip compressed data, last modified: Tue Mar 24 03:50:58 2015, from Unix
>>
>> Then it looks like you have a DOUBLE-compressed file. That is, someone
>> took a .tar.gz file, and ran THAT through gzip again (which seldom does
>> anything except make a LARGER file - because the first round of
>> compression removed any redundancy). Tar cannot read a
>> double-compressed stream, but breaking things into two steps lets you
>> get back to a single compressed stream, where the tar call then
>> auto-decompresses because you weren't supplying an explicit 'z' the
>> second time around. To prove it, try:
>>
>> gunzip <mytar.gz>mytar
>> tar zxvf mytar
>>
>> and if it still untars with an explicit decompression, then you have
>> proven that your original file was double-compressed. Also, if I'm
>> right about double compression, then mytar.gz would likely be slightly
>> larger than mytar (rather than the usual case of the .gz being
>> noticeably smaller).
>>
>> --
>> Eric Blake eblake redhat com +1-919-301-3266
>> Libvirt virtualization library http://libvirt.org
>>
>
> Yes, Sir. It did untar properly. So the problem is with the server compressing during the download (I get the file from a http server)?
> Thanks a lot for your help
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
It would be doubly nice if cygwin handled it ;-) It seems gunzip had no problem recognizing the file as double compressed.
Thanks all for the help.
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 23:07 ` Murthy Gandikota
@ 2015-04-20 23:35 ` Andrey Repin
2015-04-20 23:39 ` Gary Johnson
2015-04-21 2:39 ` Eric Blake
2 siblings, 0 replies; 29+ messages in thread
From: Andrey Repin @ 2015-04-20 23:35 UTC (permalink / raw)
To: Murthy Gandikota, cygwin
Greetings, Murthy Gandikota!
>>> anything except make a LARGER file - because the first round of
>>> compression removed any redundancy). Tar cannot read a
>>> double-compressed stream, but breaking things into two steps lets you
>>> get back to a single compressed stream, where the tar call then
>>> auto-decompresses because you weren't supplying an explicit 'z' the
>>> second time around. To prove it, try:
>>>
>>> gunzip <mytar.gz>mytar
>>> tar zxvf mytar
>>>
>>> and if it still untars with an explicit decompression, then you have
>>> proven that your original file was double-compressed. Also, if I'm
>>> right about double compression, then mytar.gz would likely be slightly
>>> larger than mytar (rather than the usual case of the .gz being
>>> noticeably smaller).
>>
>> Yes, Sir. It did untar properly. So the problem is with the server compressing during the download (I get the file from a http server)?
>> Thanks a lot for your help
> It would be doubly nice if cygwin handled it ;-) It seems gunzip had no
> problem recognizing the file as double compressed.
> Thanks all for the help.
This is not expected, nor supported. And is unlikely to ever be supported.
Adding "support" for such cases would easily create a shell bomb, if you nest
packers enough times.
--
With best regards,
Andrey Repin
Tuesday, April 21, 2015 02:31:44
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 23:07 ` Murthy Gandikota
2015-04-20 23:35 ` Andrey Repin
@ 2015-04-20 23:39 ` Gary Johnson
2015-04-20 23:52 ` Murthy Gandikota
2015-04-21 2:39 ` Eric Blake
2 siblings, 1 reply; 29+ messages in thread
From: Gary Johnson @ 2015-04-20 23:39 UTC (permalink / raw)
To: cygwin
On 2015-04-20, Murthy Gandikota wrote:
> >> Then it looks like you have a DOUBLE-compressed file. That is, someone
> >> took a .tar.gz file, and ran THAT through gzip again (which seldom does
> >> anything except make a LARGER file - because the first round of
> >> compression removed any redundancy). Tar cannot read a
> >> double-compressed stream, but breaking things into two steps lets you
> >> get back to a single compressed stream, where the tar call then
> >> auto-decompresses because you weren't supplying an explicit 'z' the
> >> second time around. To prove it, try:
> >>
> >> gunzip <mytar.gz>mytar
> >> tar zxvf mytar
> >>
> >> and if it still untars with an explicit decompression, then you have
> >> proven that your original file was double-compressed. Also, if I'm
> >> right about double compression, then mytar.gz would likely be slightly
> >> larger than mytar (rather than the usual case of the .gz being
> >> noticeably smaller).
> >>
> >> --
> >> Eric Blake eblake redhat com +1-919-301-3266
> >> Libvirt virtualization library http://libvirt.org
> >>
> >
> > Yes, Sir. It did untar properly. So the problem is with the
> > server compressing during the download (I get the file from a
> > http server)?
> > Thanks a lot for your help
> It would be doubly nice if cygwin handled it ;-) It seems gunzip
> had no problem recognizing the file as double compressed.
> Thanks all for the help.
I think you misunderstand. Gunzip decompresses once. As Eric
wrote, tar recognizes compressed files and will decompress them
automatically even without specifying a compression flag such as
'z'. The second decompression is done by tar, not by gunzip.
Regards,
Gary
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* RE: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 23:39 ` Gary Johnson
@ 2015-04-20 23:52 ` Murthy Gandikota
0 siblings, 0 replies; 29+ messages in thread
From: Murthy Gandikota @ 2015-04-20 23:52 UTC (permalink / raw)
To: Gary Johnson, cygwin
----------------------------------------
> Date: Mon, 20 Apr 2015 16:38:49 -0700
> From: garyjohn@spocom.com
> To: cygwin@cygwin.com
> Subject: Re: tar zxvf won't work with Redhat generated compressed tar file
>
> On 2015-04-20, Murthy Gandikota wrote:
>
>>>> Then it looks like you have a DOUBLE-compressed file. That is, someone
>>>> took a .tar.gz file, and ran THAT through gzip again (which seldom does
>>>> anything except make a LARGER file - because the first round of
>>>> compression removed any redundancy). Tar cannot read a
>>>> double-compressed stream, but breaking things into two steps lets you
>>>> get back to a single compressed stream, where the tar call then
>>>> auto-decompresses because you weren't supplying an explicit 'z' the
>>>> second time around. To prove it, try:
>>>>
>>>> gunzip <mytar.gz>mytar
>>>> tar zxvf mytar
>>>>
>>>> and if it still untars with an explicit decompression, then you have
>>>> proven that your original file was double-compressed. Also, if I'm
>>>> right about double compression, then mytar.gz would likely be slightly
>>>> larger than mytar (rather than the usual case of the .gz being
>>>> noticeably smaller).
>>>>
>>>> --
>>>> Eric Blake eblake redhat com +1-919-301-3266
>>>> Libvirt virtualization library http://libvirt.org
>>>>
>>>
>>> Yes, Sir. It did untar properly. So the problem is with the
>>> server compressing during the download (I get the file from a
>>> http server)?
>>> Thanks a lot for your help
>
>> It would be doubly nice if cygwin handled it ;-) It seems gunzip
>> had no problem recognizing the file as double compressed.
>> Thanks all for the help.
>
> I think you misunderstand. Gunzip decompresses once. As Eric
> wrote, tar recognizes compressed files and will decompress them
> automatically even without specifying a compression flag such as
> 'z'. The second decompression is done by tar, not by gunzip.
>
> Regards,
> Gary
>
Got it! Thanks a ton.
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: tar zxvf won't work with Redhat generated compressed tar file
2015-04-20 23:07 ` Murthy Gandikota
2015-04-20 23:35 ` Andrey Repin
2015-04-20 23:39 ` Gary Johnson
@ 2015-04-21 2:39 ` Eric Blake
2 siblings, 0 replies; 29+ messages in thread
From: Eric Blake @ 2015-04-21 2:39 UTC (permalink / raw)
To: Murthy Gandikota, cygwin
On 04/20/2015 05:06 PM, Murthy Gandikota wrote:
>
>
> ----------------------------------------
>> From: murthy64 AT hotmail.com
>> To: eblake AT redhat.com; cygwin AT cygwin.com
No need to CC me - I read the list. Also, no need to include raw emails
in your reply (we not only ask that you avoid top-posts, but also that
you trim to relevent content).
>> Yes, Sir. It did untar properly. So the problem is with the server compressing during the download (I get the file from a http server)?
You may want to report that to the owner of the website you were
downloading from.
>
> It would be doubly nice if cygwin handled it ;-)
I'm not going to add a cygwin-specific patch; you'd get the same
behavior on Linux. If you want to convince upstream to do double
uncompression in a single process, then it will eventually percolate
downstream; but I don't think anyone will want to take on a patch like that.
> It seems gunzip had no problem recognizing the file as double compressed.
No. Your manual gunzip removed one layer of compression, then your tar
command (with or without the 'z') ran a second gunzip to remove the
second layer of compression. There was no single process doing double
uncompression.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2015-04-21 2:39 UTC | newest]
Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20 18:41 tar zxvf won't work with Redhat generated compressed tar file Murthy Gandikota
2015-04-20 18:45 ` Bertrand Caplet
2015-04-20 18:57 ` Bertrand Caplet
2015-04-20 18:59 ` Murthy Gandikota
2015-04-20 19:00 ` Bertrand Caplet
2015-04-20 19:02 ` Murthy Gandikota
2015-04-20 19:10 ` Joi L. Ellis
2015-04-20 19:18 ` Bertrand Caplet
2015-04-20 19:32 ` Murthy Gandikota
2015-04-20 19:42 ` Bertrand Caplet
2015-04-20 19:53 ` Joi L. Ellis
2015-04-20 19:58 ` Murthy Gandikota
2015-04-20 19:53 ` Murthy Gandikota
2015-04-20 20:45 ` Eric Blake
2015-04-20 19:22 ` Daniel
2015-04-20 19:36 ` J. David Boyd
2015-04-20 19:35 ` Andrey Repin
2015-04-20 19:37 ` Murthy Gandikota
2015-04-20 21:05 ` Andrey Repin
2015-04-20 21:08 ` Murthy Gandikota
2015-04-20 21:16 ` Eric Blake
2015-04-20 22:00 ` Murthy Gandikota
2015-04-20 23:07 ` Murthy Gandikota
2015-04-20 23:35 ` Andrey Repin
2015-04-20 23:39 ` Gary Johnson
2015-04-20 23:52 ` Murthy Gandikota
2015-04-21 2:39 ` Eric Blake
2015-04-20 20:06 ` Eric Blake
2015-04-20 20:15 ` Eric Blake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).