[Libosinfo] [osinfo-db PATCH] RFC: schema: Add "purpose" attribute to medias
Cole Robinson
crobinso at redhat.com
Sat Nov 17 16:58:40 UTC 2018
On 11/15/2018 07:36 AM, Fabiano Fidêncio wrote:
> Several distros follow the approach of realeasing ISOs that would be
> focused on Desktop or Server usage. In order to allow Apps to sort the
> ISOs they have according to its "purpose" let's add an additional
> argument to the media element in order to make this distinction.
>
> An example of the XML would be:
> <media arch="i686" purpose="server">
> <url>http://old-releases.ubuntu.com/releases/zesty/ubuntu-17.04-server-i386.iso</url>
> <iso>
> <volume-id>Ubuntu-Server 17.04(.\d)? i386</volume-id>
> </iso>
> <kernel>install/vmlinuz</kernel>
> <initrd>install/initrd.gz</initrd>
> </media>
>
> Again, the "purpose" attribute is optional and may have the following
> values: server, desktop, or generic.
>
> "generic" is the value chosen in case it's not defined.
>
> https://gitlab.com/libosinfo/libosinfo/issues/7
>
> Is this approach reasonable? I'd like to get some feedback here before
> implenting the libosinfo side of this. :-)
>
Seems reasonable to me, but I'm trying to think of how apps/boxes will
consume this. Let's imagine how we will use this to annotate some
current os entries:
Ubuntu 18.04: There's one desktop media listed, and multiple server
media, but all with distinct arch. So the combo of purpose+arch is
always unique only matches one media entry
Fedora 29: There's two possible purpose=desktop and two purpose=server
media entries here, the netinst versions and the non-netinst versions.
What does boxes do here? Does it offer both media options to the user?
If it only wants to show the non-netinst, how does it do that filtering
in a maintainable way?
CentOS: Ships both a LiveKDE and LiveGNOME which would both get
purpose=desktop annotations I suppose. The other piece of media is
Everything which I guess is just purpose=generic. What would gnome-boxes
do in this case?
Fedora Atomic: this isn't exposed in osinfo yet but I'm bringing it up
as another potential future data point: if it's a fedora-X variant then
that's an additional piece of ISO media we would likely label
purpose=server. rhel-atomic is a separate OS entry though so maybe
fedora would follow that pattern
Food for thought
Thanks,
Cole
> Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
> ---
> data/schema/osinfo.rng.in | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/data/schema/osinfo.rng.in b/data/schema/osinfo.rng.in
> index 6693391..e09d43b 100644
> --- a/data/schema/osinfo.rng.in
> +++ b/data/schema/osinfo.rng.in
> @@ -337,6 +337,14 @@
> </element>
> </define>
>
> + <define name='purposenames'>
> + <choice>
> + <value>generic</value>
> + <value>desktop</value>
> + <value>server</value>
> + </choice>
> + </define>
> +
> <define name='media'>
> <element name='media'>
> <attribute name='arch'>
> @@ -362,6 +370,11 @@
> <ref name='bool'/>
> </attribute>
> </optional>
> + <optional>
> + <attribute name='purpose'>
> + <ref name='purposenames'/>
> + </attribute>
> + </optional>
> <interleave>
> <optional>
> <element name='variant'>
>
- Cole
More information about the Libosinfo
mailing list