After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 558023 - Fails to handle cpio archives created with libarchive
Fails to handle cpio archives created with libarchive
Status: RESOLVED FIXED
Product: file-roller
Classification: Applications
Component: general
2.24.x
Other Linux
: Normal critical
: ---
Assigned To: Paolo Bacchilega
file-roller-maint
: 558016 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-10-26 22:32 UTC by Michael Rasmussen
Modified: 2010-08-26 08:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Cumulative patch to solve both issues. (11.52 KB, patch)
2008-10-27 21:56 UTC, Michael Rasmussen
none Details | Review
A small bug in the privous patch (11.28 KB, patch)
2008-10-27 22:15 UTC, Michael Rasmussen
none Details | Review
fixes bug related to extracting selected files (365 bytes, patch)
2008-10-28 01:30 UTC, Michael Rasmussen
none Details | Review
more secure way of handling extract selected (2.59 KB, patch)
2008-10-28 21:10 UTC, Michael Rasmussen
none Details | Review

Description Michael Rasmussen 2008-10-26 22:32:16 UTC
+++ This bug was initially created as a clone of Bug #557802 +++

CPIO archives created with libarchive is not handled correct in file-foller. Even if the file list is shown, and this file list reviels that files contains data opening the same files from within file-roller for instance with gedit displays empty files.

Using gzip to compress those same archives semi crashes file-roller.

Taken those same archives a feeding plain old CPIO with them shows no problems what so ever.

I have a hunch to where the bug is to be found. The reason, IMHO, is caused by the fact that the archives in question is all created preserving absolute file names so the behavour shown by file-roller is simply displaying the archives index but then fails utterly when trying to find out where those files contained in the archive is placed after they have been copied to the file system.

A have attached to example archives which proofes the above.

PS. the archives is created with a plugin, I have written myself, for claws-mail so if somebody wants a first hand knowledge of the problem grab claws-mail + claws-mail-extra-plugin. The application is available in any GNU/Linux and *BSD distribution.

This insitense was first reported to bugs.debian.org: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502785

One of the Ubuntu maintainers, Emilio Pozuelo Monfort <pochu@ubuntu.com>, has verified that this behavour also is an issue with file-roller 2.24.

If you need any further input or want me to provide a small dedicated code example involving libarchive please let me know.
Comment 1 Michael Rasmussen 2008-10-26 22:33:57 UTC
2 patches provided to solve the issue is uploaded to http://bugzilla.gnome.org/show_bug.cgi?id=557802
Comment 2 Michael Rasmussen 2008-10-27 21:56:34 UTC
Created attachment 121479 [details] [review]
Cumulative patch to solve both issues.

This patch contains fixes for both handling archives with absolute file names as well as handling compressed CPIO archives. Again, I am only able to verify gzip and bzip2 so commented out the code I have made for handling other compressions too.
Comment 3 Michael Rasmussen 2008-10-27 22:15:19 UTC
Created attachment 121481 [details] [review]
A small bug in the privous patch
Comment 4 Michael Rasmussen 2008-10-28 01:30:59 UTC
Created attachment 121488 [details] [review]
fixes bug related to extracting selected files

This patch requires adding my previous patch to solve compressed CPIO archives.
It solves the issue which prevents extracting selected files when CPIO archives has absolute file names.
Comment 5 Michael Rasmussen 2008-10-28 21:10:09 UTC
Created attachment 121539 [details] [review]
more secure way of handling extract selected

This patch is more secure and is more true to file-roller's GObject nature.
Comment 6 Paolo Bacchilega 2010-08-26 08:48:39 UTC
*** Bug 558016 has been marked as a duplicate of this bug. ***
Comment 7 Paolo Bacchilega 2010-08-26 08:50:42 UTC
This problem has been fixed in the development version.  I found an easier way to fix the problem, thanks for your patch and sorry for the delay.