Bug 320806

Summary: ark extract corrupted files (which actually are not corrupt)
Product: [Applications] ark Reporter: Damian Ivanov <damianatorrpm>
Component: generalAssignee: Raphael Kubo da Costa <rakuco>
Status: RESOLVED FIXED    
Severity: major CC: damianatorrpm, elvis.angelaccio, rdieter
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 15.12.0
Sentry Crash Report:

Description Damian Ivanov 2013-06-06 09:10:17 UTC
Hi,

Found a bug in how ark and file-roller sees rpm's:

Download:
http://download.opensuse.org/repositories/games/openSUSE_12.3/x86_64/frozen-bubble-2.212-41.1.x86_64.rpm

1) extract it via rpm2cpio
2) extract it via ark or file roller into a different directory

Ark and file-roller extract some of the files as 0bytes but they
should be kilobytes.
Exapmle:
frozen-bubble/usr/share/frozen-bubble/gfx/menu/anims/1pgame_0001.png
if you view or extract it with file-roller or ark the file is 0bytes,
if you do it with rpm2cpio it is 1.9KiB(like it should be)

This happens with about 20 files in this package and it happens always
with the same files. Also happens with locally build rpm.

PS: I entered major priority because I banged my head a few hours why my rpm is bad and rebuilt a dozen times...

Regards,
Damian

Reproducible: Always
Comment 1 Elvis Angelaccio 2015-10-19 14:07:09 UTC
Hi, the link to the rpm is dead. Can you provide another one or upload that archive here?
Comment 2 Elvis Angelaccio 2015-12-02 21:05:25 UTC
Still waiting for the rpm file or link. Marking as NEEDSINFO.
Comment 3 Damian Ivanov 2015-12-04 10:03:17 UTC
Maybe next time on a bug where a file archiver/extracter corrupts data you respond earlier than 2 and a half years? :)

BUG persists:
http://download.opensuse.org/tumbleweed/repo/oss/suse/x86_64/frozen-bubble-2.212-11.1.x86_64.rpm
Comment 4 Elvis Angelaccio 2015-12-04 10:08:46 UTC
(In reply to Damian Ivanov from comment #3)
> Maybe next time on a bug where a file archiver/extracter corrupts data you
> respond earlier than 2 and a half years? :)
> 
> BUG persists:
> http://download.opensuse.org/tumbleweed/repo/oss/suse/x86_64/frozen-bubble-2.
> 212-11.1.x86_64.rpm
Yeah, sorry for that (I've been working on Ark for only a year).
Thanks for the link, I will investigate.
Comment 5 Elvis Angelaccio 2015-12-04 22:09:15 UTC
Hi again. Indeed those png files cannot be extracted by Ark. Good news is, error handling of the libarchive plugin (which is used for .rpm archives) has been recently improved. So Ark 15.12 is able to warn the user that some of those files could not be extracted: http://imgur.com/1ecORQs

Ideally, this issue should be reported against libarchive. However, i'm marking it as FIXED and not as UPSTREAM, because indeed libarchive was (at least) reporting that an error occurred and Ark was ignoring it.
Comment 6 Damian Ivanov 2015-12-05 05:26:29 UTC
At the time of reporting there was no warning for that just corrupted files.
Good to hear this is partly fixed.

Currently affected by the same issue is file-roller (gnome's ark) and they have even no warning:
https://bugzilla.gnome.org/show_bug.cgi?id=701699

Despite my criticism for the long time to response I want to thank you for your time working on Ark/kde Elvis.

https://github.com/libarchive/libarchive/issues/621