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

[Libosinfo] [PATCH osinfo-db 0/2] <tree arch="unknown"> fallback

<tree> elements in the OS DB serve two broad purposes:

1) track public URLs, so apps can easily look up an install URL and
   associated metadata like relative initrd/kernel paths
2) track <treeinfo> matching data, so users can use guess_os_by_tree
   with their own URL, and get an OS object back

Every <tree> needs an explicit @arch value associated. This makes
thoroughly covering case #2 difficult, because it requires enumerating
ever supported OS arch in a <tree> block. This is useful to do for
OS that have public URLs, because we want to enumerate those anyways.
But for distros without public URLs (RHEL), getting coverage for #2
requires adding a bunch of <tree> stubs for each supported @arch for
not much gain.

Additionally consider Fedora, which has primary architectures
(aarch64, armv7hl, x86_64) and secondary architectures like ppc64le.
The latter aren't necessarily considered official releases, so it's
debatable whether to enumerate their install URLs in the fedora OS
entries. However it's still useful to detect the URL as 'fedora',
so virt-install attempts with a manually passed URL get proper defaults

This series makes it easier to add a catchall <tree> entry that is
arch independent by specifying arch="unknown", and demonstrates using
it to get treeinfo detection coverage for rhel5.

One point: I don't think this arch=unknown will cause problems for API
users. For case #1, users won't be interacting with this <tree>
because it doesn't have any URL listed. For case #2, the user will
already have to call osinfo_tree_create_from_location which will
give a tree with relevant arch/kernel/initrd data parsed out of
the treeinfo, and they should use that OsinfoTree object and not the
OsinfoTree returned by guess_os_by_tree

Cole Robinson (2):
  schema: Allow arch=unknown
  rhel5: add tree information

 data/os/redhat.com/rhel-5.10.xml.in | 7 +++++++
 data/os/redhat.com/rhel-5.11.xml.in | 7 +++++++
 data/os/redhat.com/rhel-5.4.xml.in  | 7 +++++++
 data/os/redhat.com/rhel-5.5.xml.in  | 7 +++++++
 data/os/redhat.com/rhel-5.6.xml.in  | 7 +++++++
 data/os/redhat.com/rhel-5.7.xml.in  | 7 +++++++
 data/os/redhat.com/rhel-5.8.xml.in  | 7 +++++++
 data/os/redhat.com/rhel-5.9.xml.in  | 7 +++++++
 data/schema/osinfo.rng.in           | 1 +
 9 files changed, 57 insertions(+)


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