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 720741 - Port from iso-read to libarchive
Port from iso-read to libarchive
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: installer
unspecified
Other Linux
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on: 730640
Blocks:
 
 
Reported: 2013-12-19 13:31 UTC by Zeeshan Ali
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
iso-extractor: Use libarchive for extraction (1.10 KB, patch)
2014-06-01 16:47 UTC, Lasse Schuirmann
committed Details | Review

Description Zeeshan Ali 2013-12-19 13:31:53 UTC
Follow-up from IRC:

<hadess> [15:14:49] zeenix, why do you use iso-read instead of libarchive directly for boxes?
<zeenix> hadess: does it do UDFs now? if thats there now, we can use it
<zeenix> hadess: the API wasn't very intuitive at all last i checked and not very vala-friendly so it wont be a trivial port
<hadess> zeenix, no, but the main difference would be filenames, which you can easily work-around
<hadess> the API is a bit raw, but it's better than shelling out
<hadess> zeenix, did you check that the shell argv parameters are escaped properly?
<zeenix> hadess: don't think so, no :(
<zeenix> i did test it though
<zeenix> hm.. actually this code path is no longer used for UDFs 
<hadess> right, it'll work if you don't have any funny characters in the iso name :)
Comment 1 Lasse Schuirmann 2014-05-27 07:35:06 UTC
This is related to
https://code.google.com/p/libarchive/issues/detail?id=362
and Bug #730640 (which introduces a simple libarchive wrapper to Boxes).

I think we should use iso-read until the libarchive bug is at least further investigated.
Comment 2 Lasse Schuirmann 2014-05-27 11:12:41 UTC
The problem does probably lie in the hardlinks in the archive. (See
https://code.google.com/p/libarchive/issues/detail?id=362
again.)

This seems to be a rather complex matter:
https://github.com/libarchive/libarchive/wiki/Hardlinks

Therefore I propose to postpone the hardlink issue for the libarchive wrapper (I want to concentrate on the project goals right now).

We could solve this bug through simply change the kernel and initrd paths to the real files instead of the hardlinks. Then it would be really simple to replace the iso-read dependency with libarchive. (In fact I did this already locally, this was when I found the hardlink-bug.)
Comment 3 Lasse Schuirmann 2014-05-27 12:38:40 UTC
[Reference]
The libarchive wrapper is tracked here:
https://bugzilla.gnome.org/show_bug.cgi?id=730640
Comment 4 Zeeshan Ali 2014-05-28 18:34:47 UTC
(In reply to comment #2)
> The problem does probably lie in the hardlinks in the archive. (See
> https://code.google.com/p/libarchive/issues/detail?id=362
> again.)
> 
> This seems to be a rather complex matter:
> https://github.com/libarchive/libarchive/wiki/Hardlinks
> 
> Therefore I propose to postpone the hardlink issue for the libarchive wrapper
> (I want to concentrate on the project goals right now).
> 
> We could solve this bug through simply change the kernel and initrd paths to
> the real files instead of the hardlinks. Then it would be really simple to
> replace the iso-read dependency with libarchive. (In fact I did this already
> locally, this was when I found the hardlink-bug.)

I don't quite follow. First you say its complicated and then you say the solution is simple. Isn't it the ISO that is using the hardlinks rather than us?
Comment 5 Zeeshan Ali 2014-05-28 18:35:36 UTC
(In reply to comment #3)
> [Reference]
> The libarchive wrapper is tracked here:
> https://bugzilla.gnome.org/show_bug.cgi?id=730640

You want to put it as dependency of this bug then.
Comment 6 Lasse Schuirmann 2014-05-28 19:09:01 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > The problem does probably lie in the hardlinks in the archive. (See
> > https://code.google.com/p/libarchive/issues/detail?id=362
> > again.)
> > 
> > This seems to be a rather complex matter:
> > https://github.com/libarchive/libarchive/wiki/Hardlinks
> > 
> > Therefore I propose to postpone the hardlink issue for the libarchive wrapper
> > (I want to concentrate on the project goals right now).
> > 
> > We could solve this bug through simply change the kernel and initrd paths to
> > the real files instead of the hardlinks. Then it would be really simple to
> > replace the iso-read dependency with libarchive. (In fact I did this already
> > locally, this was when I found the hardlink-bug.)
> 
> I don't quite follow. First you say its complicated and then you say the
> solution is simple. Isn't it the ISO that is using the hardlinks rather than
> us?

Sorry for being so unclear.

There are two possible solutions for this bug.

1. [simple] Change the path in libosinfo to the real file instead of the hardlink

2. [complicated] Change the libarchive wrapper to support hardlinks

My proposal was to do the 1st so that we can use libarchive for this and do 2nd later because I don't have time for this right now.
Comment 7 Lasse Schuirmann 2014-05-28 19:10:47 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > [Reference]
> > The libarchive wrapper is tracked here:
> > https://bugzilla.gnome.org/show_bug.cgi?id=730640
> 
> You want to put it as dependency of this bug then.

I dont think I have the access level here to do such a thing.
Comment 8 Lasse Schuirmann 2014-05-28 19:18:50 UTC
Im(In reply to comment #7)
> (In reply to comment #5)
> > (In reply to comment #3)
> > > [Reference]
> > > The libarchive wrapper is tracked here:
> > > https://bugzilla.gnome.org/show_bug.cgi?id=730640
> > 
> > You want to put it as dependency of this bug then.
> 
> I dont think I have the access level here to do such a thing.

nm... Found it. Sorry for the noise.
Comment 9 Zeeshan Ali 2014-05-28 21:47:41 UTC
(In reply to comment #6)
> (In reply to comment #4)
> > (In reply to comment #2)
> > > The problem does probably lie in the hardlinks in the archive. (See
> > > https://code.google.com/p/libarchive/issues/detail?id=362
> > > again.)
> > > 
> > > This seems to be a rather complex matter:
> > > https://github.com/libarchive/libarchive/wiki/Hardlinks
> > > 
> > > Therefore I propose to postpone the hardlink issue for the libarchive wrapper
> > > (I want to concentrate on the project goals right now).
> > > 
> > > We could solve this bug through simply change the kernel and initrd paths to
> > > the real files instead of the hardlinks. Then it would be really simple to
> > > replace the iso-read dependency with libarchive. (In fact I did this already
> > > locally, this was when I found the hardlink-bug.)
> > 
> > I don't quite follow. First you say its complicated and then you say the
> > solution is simple. Isn't it the ISO that is using the hardlinks rather than
> > us?
> 
> Sorry for being so unclear.
> 
> There are two possible solutions for this bug.
> 
> 1. [simple] Change the path in libosinfo to the real file instead of the
> hardlink
> 
> 2. [complicated] Change the libarchive wrapper to support hardlinks
> 
> My proposal was to do the 1st so that we can use libarchive for this and do 2nd
> later because I don't have time for this right now.

Yeah, that makes perfect sense. Please do provide the required libosinfo patch.
Comment 10 Lasse Schuirmann 2014-05-29 16:36:59 UTC
> Yeah, that makes perfect sense. Please do provide the required libosinfo patch.

Done. I'll provide the needed patches once the libosinfo patch is applied.
Comment 11 Lasse Schuirmann 2014-06-01 09:22:02 UTC
Short update: The libarchive wrapper tracked on Bug#730640 got hardlink support. I already tested the wrapper with the fedora initrd hardlink (works ;)).
Comment 12 Lasse Schuirmann 2014-06-01 16:47:06 UTC
Created attachment 277694 [details] [review]
iso-extractor: Use libarchive for extraction

Note that you have to apply the patches from Bug#730640 first for this to work. In my testcases this worked without problems.
Comment 13 Zeeshan Ali 2014-06-24 18:26:00 UTC
Review of attachment 277694 [details] [review]:

ack
Comment 14 Zeeshan Ali 2014-08-01 11:00:44 UTC
Attachment 277694 [details] pushed as b3342f6 - iso-extractor: Use libarchive for extraction