Re: [osinfo-db/libosinfo PATCH 0/6] Add support to images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 31, 2018 at 10:45:32PM +0100, Fabiano Fidêncio wrote:
> This patchset adds support to images entries as part of the "os" entry
> in a very similar way that's already done for both medias and trees.
> 
> It's important to note that in order to do so, we've added a libguestfs
> dependency used when creating an OsinfoImage from location (more details
> in the second patch of the series).
> 
> An example of how the XML will look like is:
> <os>
>   <image arch="x86_64">
>     <variant id="cloud"/>
>     <url>https://download/foo/bar.img</url>
>     <product-name>Ditro Foo (Cloud Edition)</product-name>
>   </image>
> </os>
> 
> Last but not least, I'm cc'ing here Richard Jones and Pino Toscano in
> order to get their input in the libguestfs bits ... mainly to know
> whether explicitly depending on libguestfs is a good idea or not (and,
> if not, to get some feedback on different approaches that could be
> taken).

I don't like the dependancy on libguestfs here, because I don't
think it is actually adding any value to libosinfo in this way,
while being a very significant dependency.

If the application has an OS and wants to find the URL, then they can
just query the osinfo DB and get the URL so they don't need libguestfs.
This part of your proposal wrt recording <image> XML is fine.

If the application has a URL and wants to find the OS, then the public
libguestfs API already provides that feature, so I don't see a major
benefit in wrapping this again. Just let apps call the libguestfs API
directly with the image URL allowing them full flexibility it has.

For ISO and install tree identification, we've recorded identifying
metadata in the osinfo database. eg ISO header regexes, and treeinfo
file regexes. IMHO if we did want todo image detection in osinfo we
should be doing the same by providing identifying metadata in the
osinfo database.

ie the osinfo db would contain regex matches to do done against
files such as /etc/os-release (or lsb-release, redhat-release, etc).

ie essentially encode the file content probing rules that libguestfs
has, as osinfo DB information, so that it becomes user extendable in
the normal way we do for ISO/install tree. Admittedly the image probing
rules are significantly more complicated than ISO/install tree probiing
rules, but I think it is doable if we wanted to. It ultimately just
comes down to a (very large) set of file content matches.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux