GNOME Bugzilla – Bug 557802
add support for compressed cpio archives
Last modified: 2020-11-11 19:12:08 UTC
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 <email@example.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.
Created attachment 121302 [details]
uncompressed cpio archive
Created attachment 121303 [details]
gzip compressed archive
Created attachment 121304 [details] [review]
patch which solves the issue with cpio archives without compression
I have been studying the source for file-roller and have found out that file-foller is not capable of handling compressed CPIO archives. Studying the file fr-command-tar shows that most of the code regarding compression of tar archives, more or less, could be replicated to fr-command-cpio.
Are somebody doing this at the moment, or have plains for doing things in the near future?
If both questions are answered with a no I will offer my assistance to solve this issue - as a CPIO man this issue bugs me too:-)
Created attachment 121398 [details] [review]
patch to solve missing feature for handling compressed CPIO archives
As I only have access to gzip, bzip and bzip2 my patch does only handle these compressions. I have created all code for handling other compression programs too but since I have not been able to verify that it works properly I have therefore commented out all code which does not relate to gzip, bzip or bzip2 in my patch.
first of all thanks for the patch. However your patch is for version 2.22, can you please provide a patch for version 2.24 ? If not, when I'll have some time I'll do the convertion myself.
(In reply to comment #6)
> first of all thanks for the patch. However your patch is for version 2.22, can
> you please provide a patch for version 2.24 ? If not, when I'll have some time
> I'll do the convertion myself.
I have created a patch for 2.24 as well -> http://bugzilla.gnome.org/show_bug.cgi?id=558023
I also think my patch for 2.22 should be added since 2.22 are used in Debian Lenny and Ubuntu < 8.10. You could surely count in Suse, Redhat, Fedora etc.
(In reply to comment #7)
> Hi Paolo,
> I also think my patch for 2.22 should be added since 2.22 are used in Debian
> Lenny and Ubuntu < 8.10. You could surely count in Suse, Redhat, Fedora etc.
Forgot to mention: There is still a bug in file-roller vis-a-vis CPIO archives concerning extracting selected files which I have not been able to track down. The command generated by file-roller to extract selected files is correct in that sense that if you copy the command created by file-roller to the command line the files are extracted as expected. This behavour dates back in time as long as I have been able to test it and since the command created is correct it must be some internal error in file-roller. I suspect that the command created actually never is executed by file-roller! You might have an idea?
Any update on patch status ? Whether they are merged in source tree ?
(In reply to comment #9)
> Any update on patch status ? Whether they are merged in source tree ?
The patch has not been merged and no comments what so ever from upstream!
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.
If you still use file-roller and if you still see this bug / want this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/file-roller/-/issues/
Thank you for creating this report and we are sorry it could not be implemented (volunteer workforce and time is limited).