Bug 589643

Summary: gtar: This does not look like a tar archive
Product: Red Hat Enterprise Linux 6 Reporter: Lubos Kocman <lkocman>
Component: tarAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: kklic, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-11 14:16:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
problematic archive none

Description Lubos Kocman 2010-05-06 15:33:43 UTC
Created attachment 412095 [details]
problematic archive

Description of problem:

I'm trying to un-archive attached archive via Archive Manager or gtar and I'm getting:

Archive Manager:

/bin/gtar: This does not look like a tar archive
/bin/gtar: Skipping to next header
/bin/gtar: Exiting with failure status due to previous errors

gtar (the same output)

[lkocman@dhcp-31-5 test]$ gtar -xzf redhat-logo.tar.gz 
gtar: This does not look like a tar archive
gtar: Skipping to next header
gtar: Exiting with failure status due to previous errors

If I'll use 

[lkocman@dhcp-31-5 test]$ gunzip -dc redhat-logo.tar.gz | tar -xf -
tar: Archive is compressed. Use -z option
tar: Error is not recoverable: exiting now

# This works

[lkocman@dhcp-31-5 test]$ gunzip -dc redhat-logo.tar.gz | tar -xzf -
[lkocman@dhcp-31-5 test]$ 

[lkocman@dhcp-31-5 test]$ gunzip redhat-logo.tar.gz 
[lkocman@dhcp-31-5 test]$ tar -xvf redhat-logo.tar 
redhat-logo.bmp
redhat-logo.gif
redhat-logo.ico
redhat-logo.jpg
redhat-logo.pcx
redhat-logo.png
redhat-logo.pnm
redhat-logo.ras
redhat-logo.svg
redhat-logo.tga
redhat-logo.tiff
redhat-logo.wbmp
redhat-logo.xbm
redhat-logo.xpm




Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Download mentioned archive
2. Try to use gtar or Archive Manager to uncompress archive.
  
Actual results:

gtar: This does not look like a tar archive

Expected results:

uncompressed archive

Additional info:

problem was reproduced on i686,x86_64 (others were not tested)

tar-1.23-1.el6.i686
file-roller-2.28.2-2.el6.i686

[lkocman@dhcp-31-5 test]$ uname -r
2.6.32-23.el6.i686

[lkocman@dhcp-31-5 test]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Workstation release 6.0 Beta (Santiago)


Used archive file is in attachments

Comment 2 RHEL Program Management 2010-05-06 17:25:11 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Ondrej Vasik 2010-05-11 13:21:31 UTC
Confirmed ... 
I'm able to create such archives with gzip - tar is not able to recognize archive header in those files - if the only one file is present in the .tar.gz archive . The same is for e.g. midnight commander archive viewer. Adding gzip maintainer to cc to check whether the issue is in tar or gzip. 
Easily reproducible by gzip -c <file> | tar tz .

Comment 4 Ondrej Vasik 2010-05-11 13:29:46 UTC
Additionally - by `gzip -c <several files> >archive.tar.gz` I was easily able to create archive which shows:
gzip -lv archive.tar.gz 
method  crc     date  time           compressed        uncompressed  ratio uncompressed_name
defla 73a9f53f May 11 15:16               22210               14256 -55.6% archive.tar
(archive.tar file is probably corrupted as I can't extract it).

Comment 5 Ondrej Vasik 2010-05-11 14:12:47 UTC
Probably notabug in tar, but misuse of gzip/some suffix magic ... sorry for confusing comment#3/#4 - maybe the same or similar confusion like archive creator.
Most probably NOTABUG - as if you gunzip the archive, you have .tar which is still gzip-compressed, so it looks like double gzip compression and only suffix magic. To be sure it would be necessary to know how the archive was created.