[Libosinfo] [PATCH] NetBSD: add NetBSD 6.x / 7.x data

Christophe Fergeau cfergeau at redhat.com
Wed Feb 14 10:44:48 UTC 2018


Hey Vicente, thanks for the patches!

Could you also provide a patch for libosinfo to add test data for these
ISOs? You can generate them with
"iso_name=./NetBSD-6.0-amd64.iso isoinfo -d -i $iso_name >$iso_name.txt"

On Tue, Feb 06, 2018 at 03:13:59PM -0200, Vicente Chaves de Melo wrote:
> ---
>  data/os/netbsd.org/netbsd-6.0.xml.in | 75 ++++++++++++++++++++++++++++++++++++
>  data/os/netbsd.org/netbsd-6.1.xml.in | 75 ++++++++++++++++++++++++++++++++++++
>  data/os/netbsd.org/netbsd-7.0.xml.in | 75 ++++++++++++++++++++++++++++++++++++
>  data/os/netbsd.org/netbsd-7.1.xml.in | 75 ++++++++++++++++++++++++++++++++++++
>  4 files changed, 300 insertions(+)
>  create mode 100644 data/os/netbsd.org/netbsd-6.0.xml.in
>  create mode 100644 data/os/netbsd.org/netbsd-6.1.xml.in
>  create mode 100644 data/os/netbsd.org/netbsd-7.0.xml.in
>  create mode 100644 data/os/netbsd.org/netbsd-7.1.xml.in
> 
> diff --git a/data/os/netbsd.org/netbsd-6.0.xml.in b/data/os/netbsd.org/netbsd-6.0.xml.in
> new file mode 100644
> index 0000000..9897d59
> --- /dev/null
> +++ b/data/os/netbsd.org/netbsd-6.0.xml.in
> @@ -0,0 +1,75 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<libosinfo version="0.0.1">
> +
> +  <os id="http://netbsd.org/netbsd/6.0">
> +    <short-id>netbsd6.0</short-id>
> +    <name>NetBSD 6.0</name>
> +    <name xml:lang="ca">NetBSD 6.0</name>
> +    <name xml:lang="de">NetBSD 6.0</name>
> +    <name xml:lang="es">NetBSD 6.0</name>
> +    <name xml:lang="fr">NetBSD 6.0</name>
> +    <name xml:lang="ja">NetBSD 6.0</name>
> +    <name xml:lang="pl">NetBSD 6.0</name>
> +    <name xml:lang="pt_BR">NetBSD 6.0</name>
> +    <name xml:lang="uk">NetBSD 6.0</name>

The translations do not belong in the .xml.in files, but in the .po
files. They are then merged in the XML data as part of the .xml.in ->
.xml transformation.

> +    <version>6.0</version>
> +    <vendor>NetBSD Project</vendor>
> +    <vendor xml:lang="ca">Projecte NetBSD</vendor>
> +    <vendor xml:lang="de">NetBSD-Projekt</vendor>
> +    <vendor xml:lang="es">NetBSD Project</vendor>
> +    <vendor xml:lang="fr">NetBSD Project</vendor>
> +    <vendor xml:lang="ja">NetBSD プロジェクト</vendor>
> +    <vendor xml:lang="pl">Projekt NetBSD</vendor>
> +    <vendor xml:lang="pt_BR">Projeto NetBSD</vendor>
> +    <vendor xml:lang="uk">Проект NetBSD</vendor>
> +    <family>netbsd</family>
> +    <distro>netbsd</distro>
> +    <upgrades id="http://netbsd.org/netbsd/5.0"/>
> +    <derives-from id="http://netbsd.org/netbsd/5.0"/>
> +
> +    <release-date>2012-10-13</release-date>
> +    

There are stray whitespace here in all 4 files, please remove them.

> +    <media arch="x86_64">
> +      <url>ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.0/images/NetBSD-6.0-amd64.iso</url>

I'd favour the https:// urls https://cdn.netbsd.org/pub/NetBSD/NetBSD-6.0/images/NetBSD-6.0-amd64.iso

> +      <iso>
> +        <system-id>NetBSD</system-id>
> +        <volume-id>NETBSD_60</volume-id>
> +      </iso>
> +    </media>
> +    <media arch="x86_64">
> +      <url>ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.0/amd64/installation/cdrom/boot.iso</url>
> +      <iso>
> +        <system-id>NetBSD</system-id>
> +        <volume-id>NETBSD_60</volume-id>
> +      </iso>
> +    </media>
> +    <media arch="x86_64">
> +      <url>ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.0/amd64/installation/cdrom/boot-com.iso</url>
> +      <iso>
> +        <system-id>NetBSD</system-id>
> +        <volume-id>NETBSD_60</volume-id>
> +      </iso>
> +    </media>    

Stray whitespaces at the end of this line too.
What are these boot.iso and boot-com.iso images?



> +    <media arch="i686">
> +      <url>ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.0/images/NetBSD-6.0-i386.iso</url>
> +      <iso>
> +        <system-id>NetBSD</system-id>
> +        <volume-id>NETBSD_60</volume-id>
> +      </iso>
> +    </media>
> +    <media arch="i686">
> +      <url>ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.0/i386/installation/cdrom/boot.iso</url>
> +      <iso>
> +        <system-id>NetBSD</system-id>
> +        <volume-id>NETBSD_60</volume-id>
> +      </iso>
> +    </media>

Here the system-id/volume-id are the same as for the x86_64 image, which
means libosinfo will be unable to know which arch the iso is. You can
use <volume-size> in order to differentiate between the 2.

> diff --git a/data/os/netbsd.org/netbsd-7.0.xml.in b/data/os/netbsd.org/netbsd-7.0.xml.in
> new file mode 100644
> index 0000000..b4eb414
> --- /dev/null
> +++ b/data/os/netbsd.org/netbsd-7.0.xml.in
> @@ -0,0 +1,75 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<libosinfo version="0.0.1">
> +
> +  <os id="http://netbsd.org/netbsd/7.0">
> +    <short-id>netbsd7.0</short-id>
> +    <name>NetBSD 7.0</name>
> +    <name xml:lang="ca">NetBSD 7.0</name>
> +    <name xml:lang="de">NetBSD 7.0</name>
> +    <name xml:lang="es">NetBSD 7.0</name>
> +    <name xml:lang="fr">NetBSD 7.0</name>
> +    <name xml:lang="ja">NetBSD 7.0</name>
> +    <name xml:lang="pl">NetBSD 7.0</name>
> +    <name xml:lang="pt_BR">NetBSD 7.0</name>
> +    <name xml:lang="uk">NetBSD 7.0</name>
> +    <version>7.0</version>
> +    <vendor>NetBSD Project</vendor>
> +    <vendor xml:lang="ca">Projecte NetBSD</vendor>
> +    <vendor xml:lang="de">NetBSD-Projekt</vendor>
> +    <vendor xml:lang="es">NetBSD Project</vendor>
> +    <vendor xml:lang="fr">NetBSD Project</vendor>
> +    <vendor xml:lang="ja">NetBSD プロジェクト</vendor>
> +    <vendor xml:lang="pl">Projekt NetBSD</vendor>
> +    <vendor xml:lang="pt_BR">Projeto NetBSD</vendor>
> +    <vendor xml:lang="uk">Проект NetBSD</vendor>
> +    <family>netbsd</family>
> +    <distro>netbsd</distro>
> +    <upgrades id="http://netbsd.org/netbsd/6.0"/>
> +    <derives-from id="http://netbsd.org/netbsd/6.0"/>

6.0, not 6.1?

> diff --git a/data/os/netbsd.org/netbsd-7.1.xml.in b/data/os/netbsd.org/netbsd-7.1.xml.in
> new file mode 100644
> index 0000000..c03fcfd
> --- /dev/null
> +++ b/data/os/netbsd.org/netbsd-7.1.xml.in
> @@ -0,0 +1,75 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<libosinfo version="0.0.1">
> +
> +  <os id="http://netbsd.org/netbsd/7.1">
> +    <short-id>netbsd7.1</short-id>
> +    <name>NetBSD 7.1</name>
> +    <name xml:lang="ca">NetBSD 7.1</name>
> +    <name xml:lang="de">NetBSD 7.1</name>
> +    <name xml:lang="es">NetBSD 7.1</name>
> +    <name xml:lang="fr">NetBSD 7.1</name>
> +    <name xml:lang="ja">NetBSD 7.1</name>
> +    <name xml:lang="pl">NetBSD 7.1</name>
> +    <name xml:lang="pt_BR">NetBSD 7.1</name>
> +    <name xml:lang="uk">NetBSD 7.1</name>
> +    <version>7.1</version>
> +    <vendor>NetBSD Project</vendor>
> +    <vendor xml:lang="ca">Projecte NetBSD</vendor>
> +    <vendor xml:lang="de">NetBSD-Projekt</vendor>
> +    <vendor xml:lang="es">NetBSD Project</vendor>
> +    <vendor xml:lang="fr">NetBSD Project</vendor>
> +    <vendor xml:lang="ja">NetBSD プロジェクト</vendor>
> +    <vendor xml:lang="pl">Projekt NetBSD</vendor>
> +    <vendor xml:lang="pt_BR">Projeto NetBSD</vendor>
> +    <vendor xml:lang="uk">Проект NetBSD</vendor>
> +    <family>netbsd</family>
> +    <distro>netbsd</distro>
> +    <upgrades id="http://netbsd.org/netbsd/6.0"/>
> +    <derives-from id="http://netbsd.org/netbsd/6.0"/>

Same comment about 6.0 VS 7.0 here. I see there has been a 7.1.1
release, maybe this could be added as well?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20180214/fa1f9382/attachment.sig>


More information about the Libosinfo mailing list