Bug 252821 - KTar has incorrect archive contents
Summary: KTar has incorrect archive contents
Status: RESOLVED WORKSFORME
Alias: None
Product: kio
Classification: Unmaintained
Component: tar (other bugs)
Version First Reported In: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Mario Bensi
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2010-09-30 07:30 UTC by Robby Stephenson
Modified: 2018-10-28 03:19 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Possible deficient tar.gz file (17.76 KB, application/x-tar)
2010-09-30 07:30 UTC, Robby Stephenson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robby Stephenson 2010-09-30 07:30:29 UTC
Created attachment 52098 [details]
Possible deficient tar.gz file

Version:           SVN (using Devel) 
OS:                Linux

I have a tar.gz created by a separate, non-KDE application. The file is expected to have a top-level file along with an images/ directory with several image files in it. Using the tar command on the file shows:

robby@homebase:~> tar tvzf out.tar.gz 
-rw------- robby/users   25686 2010-09-29 20:18 collection.gcs
drwxr-xr-x robby/users       0 2010-09-29 20:18 images
-rw-r--r-- robby/users    6962 2010-09-29 20:18 images/gcstar_0.jpg
-rw-r--r-- robby/users    5739 2010-09-29 20:18 images/gcstar_1.jpg

But using the ktartest command from kdecore/tests shows:

robby@homebase:~> kde/build/kdelibs/kdecore/tests/ktartest out.tar.gz 
mode=0000600 robby users collection.gcs 25686 isdir=0
mode=0000644 robby users gcstar_0.jpg 6962 isdir=0
mode=0000644 robby users gcstar_1.jpg 5739 isdir=0
mode=0040755 robby users images 0 isdir=1

which appears to show that the image files are not in the images/ directory. I had been using KTar in an application and discovered the issue, and then used the ktartest command to verify it.

Am I reading that right?  Perhaps the tar.gz file is somehow incorrect, but tar is able to work around it?

I'll attach the out.tar.gz to the bug report.



Reproducible: Always
Comment 1 Raphael Kubo da Costa 2010-10-01 06:41:37 UTC
This one might be related to bug 249526. I had a quick look at the gunzipped tar file, and it seems to be ustar-compressed.
Comment 2 Robby Stephenson 2010-10-01 07:34:27 UTC
Oh, I thought I'd done a KTar search before I reported the bug, but I guess it wasn't a good one. Feel free to close this as a duplicate. Thanks for the pointer.
Comment 3 Raphael Kubo da Costa 2010-10-01 17:06:42 UTC
I'm not sure this is really a duplicate -- the bug report I mentioned
was related to file paths which were too long. However, it might be
the case that the lack of support for those other tar formats can
cause other problems, too.

It needs further investigation...
Comment 4 Robby Stephenson 2010-10-01 19:19:40 UTC
A little more info...it could be that the out.tar file that I attached has some problems, even thought tar can deal with it...

--------------
robby@homebase:~> tartest < out.tar         
tartest 1.12 (x86_64-suse-linux-gnu)

Copyright (C) 2002 Jörg Schilling
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Testing for POSIX.1-1990 TAR compliance...
Warning: non octal character ' ' (0x20) found in field 't_size[0]'
Warning: non octal character ' ' (0x20) found in field 't_size[1]'
Warning: non octal character ' ' (0x20) found in field 't_size[2]'
Warning: non octal character ' ' (0x20) found in field 't_size[3]'
Warning: non octal character ' ' (0x20) found in field 't_size[4]'
Warning: non octal character ' ' (0x20) found in field 't_size[5]'
Warning: non octal character ' ' (0x20) found in field 't_chksum[0]'
*** Failing Filename 'collection.gcs'
Warning: non octal character ' ' (0x20) found in field 't_size[0]'
Warning: non octal character ' ' (0x20) found in field 't_size[1]'
Warning: non octal character ' ' (0x20) found in field 't_size[2]'
Warning: non octal character ' ' (0x20) found in field 't_size[3]'
Warning: non octal character ' ' (0x20) found in field 't_size[4]'
Warning: non octal character ' ' (0x20) found in field 't_size[5]'
Warning: non octal character ' ' (0x20) found in field 't_size[6]'
Warning: non octal character ' ' (0x20) found in field 't_size[7]'
Warning: non octal character ' ' (0x20) found in field 't_size[8]'
Warning: non octal character ' ' (0x20) found in field 't_size[9]'
Warning: non octal character ' ' (0x20) found in field 't_chksum[0]'
*** Failing Filename 'images'
Warning: non octal character ' ' (0x20) found in field 't_size[0]'
Warning: non octal character ' ' (0x20) found in field 't_size[1]'
Warning: non octal character ' ' (0x20) found in field 't_size[2]'
Warning: non octal character ' ' (0x20) found in field 't_size[3]'
Warning: non octal character ' ' (0x20) found in field 't_size[4]'
Warning: non octal character ' ' (0x20) found in field 't_size[5]'
Warning: non octal character ' ' (0x20) found in field 't_chksum[0]'
*** Failing Filename 'images/gcstar_0.jpg'
Warning: non octal character ' ' (0x20) found in field 't_size[0]'
Warning: non octal character ' ' (0x20) found in field 't_size[1]'
Warning: non octal character ' ' (0x20) found in field 't_size[2]'
Warning: non octal character ' ' (0x20) found in field 't_size[3]'
Warning: non octal character ' ' (0x20) found in field 't_size[4]'
Warning: non octal character ' ' (0x20) found in field 't_size[5]'
Warning: non octal character ' ' (0x20) found in field 't_chksum[0]'
*** Failing Filename 'images/gcstar_1.jpg'
Found 1st EOF block at 81
Found 2nd EOF block at 82
>>> Archive is not POSIX.1-1990 TAR standard compliant.
Comment 5 Raphael Kubo da Costa 2010-10-01 19:58:50 UTC
By the way, do you know how this tar file was created?
Comment 6 Robby Stephenson 2010-10-02 03:29:13 UTC
(In reply to comment #5)
> By the way, do you know how this tar file was created?

It's from the GCstar application, which appears to use the Archive::Tar and Compress::Zlib perl modules to create the file.
Comment 7 Julian Steinmann 2018-08-05 18:27:17 UTC
Can you also reproduce this bug with a compliant .tar? If yes, we should definitely move the report over to kio-extras. If not, I'd propose to close this bug as the effort would probably too big assuming that only non-compliant .tar's are affected.
Comment 8 Andrew Crouthamel 2018-09-28 03:08:39 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Andrew Crouthamel 2018-10-28 03:19:19 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!