[Libosinfo] [osinfo-db PATCH] RFC: schema: Add "purpose" attribute to medias

Felipe Borges felipe10borges at gmail.com
Thu Dec 20 10:09:54 UTC 2018


On Sat, Nov 17, 2018 at 6:25 PM Cole Robinson <crobinso at redhat.com> wrote:
>
> 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

I think Cole raised some very good points. I feel that with these
changes we would get close to the point where having an unique ID to
address a specific media will make a bit of sense.

Something like: "http://redhat.com/rhel7.6/x86_64/server"

Yet I don't know what could be the best approach to handle
collisions/duplicates, but for me these changes are already a
significant evolution over the current state of things. Boxes being
able to suggest the download of a "desktop" is a big win even
considering that we would have live/net-install/dvd medias all mixed
up. We could actually group them smartly in the UI.

All in all, I appreciate the effort to provide a nice API and I
apologize if you folk feel that we are requesting too many
Boxes-specific changes.

>
> 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
>
> _______________________________________________
> Libosinfo mailing list
> Libosinfo at redhat.com
> https://www.redhat.com/mailman/listinfo/libosinfo




More information about the Libosinfo mailing list