[Libosinfo] [osinfo-db PATCH 18/23] rhel-7.6: Add tree information

Cole Robinson crobinso at redhat.com
Thu Feb 28 17:54:10 UTC 2019


On 2/26/19 11:06 AM, Fabiano Fidêncio wrote:
> Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
> ---
>  data/os/redhat.com/rhel-7.6.xml.in | 49 ++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
> 
> diff --git a/data/os/redhat.com/rhel-7.6.xml.in b/data/os/redhat.com/rhel-7.6.xml.in
> index 1098c77..c67a3c8 100644
> --- a/data/os/redhat.com/rhel-7.6.xml.in
> +++ b/data/os/redhat.com/rhel-7.6.xml.in
> @@ -14,6 +14,13 @@
>  
>      <release-date>2018-10-30</release-date>
>  
> +    <variant id="server">
> +      <name>Red Hat Enterprise Linux 7.6 (Server)</name>
> +    </variant>
> +    <variant id="workstation">
> +      <name>Red Hat Enterprise Linux 7.6 (Workstation)</name>
> +    </variant>
> +
>      <media arch="x86_64">
>        <iso>
>          <system-id>LINUX</system-id>
> @@ -51,11 +58,53 @@
>         </iso>
>       </media>
>  
> +    <tree arch="ppc64">
> +      <variant id="server"/>
> +      <treeinfo>
> +        <family>Red Hat Enterprise Linux</family>
> +        <version>7.6</version>
> +        <arch>ppc64</arch>
> +        <variant>Server</variant>
> +      </treeinfo>
> +    </tree>
> +
> +    <tree arch="ppc64le">
> +      <variant id="server"/>
> +      <treeinfo>
> +        <family>Red Hat Enterprise Linux</family>
> +        <version>7.6</version>
> +        <arch>ppc64le</arch>
> +        <variant>Server</variant>
> +      </treeinfo>
> +    </tree>
> +
> +    <tree arch="s390x">
> +      <variant id="server"/>
> +      <treeinfo>
> +        <family>Red Hat Enterprise Linux</family>
> +        <version>7.6</version>
> +        <arch>s390x</arch>
> +        <variant>Server</variant>
> +      </treeinfo>
> +    </tree>
> +
> +    <tree arch="x86_64">
> +      <variant id="server"/>
> +      <treeinfo>
> +        <family>Red Hat Enterprise Linux</family>
> +        <version>7.6</version>
> +        <arch>x86_64</arch>
> +        <variant>Server</variant>
> +      </treeinfo>
> +    </tree>
> +
>      <tree arch="x86_64">
> +      <variant id="workstation"/>
>        <treeinfo>
>          <family>Red Hat Enterprise Linux</family>
>          <version>7.6</version>
>          <arch>x86_64</arch>
> +        <variant>Workstation</variant>
>        </treeinfo>
>      </tree>
>  
> 

This last addition is problematic. Internally I see other rhel7 variant
trees, at least Client and ComputeNode. Previously we would match
against those, but now detection will fail because we are explicitly
only looking for variant=Workstation|Server. This patch series is still
an improvement so it could go in if we drop this bit.

But I think we need a bit of a larger rethink. We shouldn't need to
whitelist every single variant and architecture just for tree detection
to work. For example in Fedora there are unofficial work in progress
distro trees for archs like risc-v, and aarch64 before it. They aren't
official Fedora archs yet but they have expected treeinfo fields, they
just don't match against any official Fedora arch. If we were more
flexible we could automatically accept them.

One solution would be to have a top level fallback <treeinfo> block, not
tied to any <tree>, that only lists <family> and <version>. If detection
doesn't match any explicit <tree>, but matches the fallback <treeinfo>,
we can generate a tree object and return it to the user, filling in
<arch> for example.

- Cole




More information about the Libosinfo mailing list