[Libosinfo] [PATCH 2/4] recognize Mageia 4

Christophe Fergeau cfergeau at redhat.com
Fri Mar 25 21:23:45 UTC 2016


On Fri, Mar 25, 2016 at 10:05:57PM +0100, Christophe Fergeau wrote:
> From: Thierry Vignaud <thierry.vignaud at gmail.com>
> 
> ---
>  data/os/mageia.org/mageia-4.xml.in                 | 67 ++++++++++++++++++++++
>  data/os/mageia.org/mageia-unknown.xml.in           |  8 +--
>  po/POTFILES.in                                     |  1 +
>  .../Mageia-4-LiveCD-GNOME-en-i586-CD.iso.txt       | 29 ++++++++++
>  .../Mageia-4-LiveCD-KDE4-en-i586-CD.iso.txt        | 29 ++++++++++
>  .../Mageia-4-LiveDVD-GNOME-i586-DVD.iso.txt        | 29 ++++++++++
>  .../Mageia-4-LiveDVD-GNOME-x86_64-DVD.iso.txt      | 29 ++++++++++
>  .../mageia4/Mageia-4-LiveDVD-KDE4-i586-DVD.iso.txt | 29 ++++++++++
>  .../Mageia-4-LiveDVD-KDE4-x86_64-DVD.iso.txt       | 29 ++++++++++
>  .../mageia/mageia4/Mageia-4-dual-DVD.iso.txt       | 29 ++++++++++
>  .../mageia/mageia4/Mageia-4-i586-DVD.iso.txt       | 29 ++++++++++
>  .../mageia/mageia4/Mageia-4-x86_64-DVD.iso.txt     | 29 ++++++++++
>  12 files changed, 333 insertions(+), 4 deletions(-)
>  create mode 100644 data/os/mageia.org/mageia-4.xml.in
>  create mode 100644 test/isodata/mageia/mageia4/Mageia-4-LiveCD-GNOME-en-i586-CD.iso.txt
>  create mode 100644 test/isodata/mageia/mageia4/Mageia-4-LiveCD-KDE4-en-i586-CD.iso.txt
>  create mode 100644 test/isodata/mageia/mageia4/Mageia-4-LiveDVD-GNOME-i586-DVD.iso.txt
>  create mode 100644 test/isodata/mageia/mageia4/Mageia-4-LiveDVD-GNOME-x86_64-DVD.iso.txt
>  create mode 100644 test/isodata/mageia/mageia4/Mageia-4-LiveDVD-KDE4-i586-DVD.iso.txt
>  create mode 100644 test/isodata/mageia/mageia4/Mageia-4-LiveDVD-KDE4-x86_64-DVD.iso.txt
>  create mode 100644 test/isodata/mageia/mageia4/Mageia-4-dual-DVD.iso.txt
>  create mode 100644 test/isodata/mageia/mageia4/Mageia-4-i586-DVD.iso.txt
>  create mode 100644 test/isodata/mageia/mageia4/Mageia-4-x86_64-DVD.iso.txt
> 
> diff --git a/data/os/mageia.org/mageia-4.xml.in b/data/os/mageia.org/mageia-4.xml.in
> new file mode 100644
> index 0000000..5c1c9bb
> --- /dev/null
> +++ b/data/os/mageia.org/mageia-4.xml.in
> @@ -0,0 +1,67 @@
> +<libosinfo version="0.0.1">
> +  <os id="http://mageia.org/mageia/4">
> +    <short-id>mageia4</short-id>
> +    <_name>Mageia 4</_name>
> +    <_vendor>Mageia</_vendor>
> +    <family>linux</family>
> +    <distro>mageia</distro>
> +    <version>4</version>
> +    <derives-from id="http://mageia.org/mageia/3"/>
> +    <release-date>2014-02-01</release-date>
> +    <eol-date>2015-09-19</eol-date>
> +
> +    <media arch="i686">
> +      <variant id="net-install"/>

If you use variants, you need to define it first, for example fedora
has:

<variant id="netinst">
  <_name>Fedora 21</_name>
</variant>


> +      <url>ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/4/i586/install/images/boot.iso</url>

Any reason this is not
https://www.mageia.org/en/downloads/get/?q=Mageia-5-Boot-i586-CD.iso ?
(I've changed this locally)

> +      <iso>
> +        <volume-id>Mga Boot ISO</volume-id>
> +      </iso>
> +      <kernel>isolinux/i386/vmlinuz</kernel>
> +      <initrd>isolinux/i386/all.rdz</initrd>
> +    </media>
> +
> +    <media arch="x86_64">
> +      <variant id="net-install"/>
> +      <url>ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/4/x86_64/install/images/boot.iso</url>
> +      <iso>
> +        <volume-id>Mageia 4 x86_64 Netinstall</volume-id>
> +      </iso>
> +      <kernel>isolinux/x86_64/vmlinuz</kernel>
> +      <initrd>isolinux/x86_64/all.rdz</initrd>
> +    </media>
> +
> +    <media arch="i686">
> +      <url>https://www.mageia.org/en/downloads/get/?q=Mageia-4-i586-DVD.iso</url>

Actually these links are not direct links to ISO images, but to a
webpage allowing to get the ISO image, I think the database usually
contains direct links to the ISO. I don't know if mageia provides such
link? (ie something similar to
http://download.fedoraproject.org/pub/fedora/linux/releases/21/Workstation/i386/iso/Fedora-Live-Workstation-i686-21-5.iso
which redirects to a mirror with the ISO if needed).

> +<!--
> +      <url>http://www.mageia.org/fr/downloads/get/?q=Mageia-4-dual-CD.iso</url>
> +-->
> +      <iso>
> +        <volume-id>Mageia-4(-i586)?</volume-id>
> +      </iso>
> +      <kernel>isolinux/i386/vmlinuz</kernel>
> +      <initrd>isolinux/i386/all.rdz</initrd>
> +    </media>
> +    <media arch="x86_64">
> +      <url>https://www.mageia.org/en/downloads/get/?q=Mageia-4-x86_64-DVD.iso</url>
> +<!--
> +      <url>http://www.mageia.org/fr/downloads/get/?q=Mageia-4-dual-CD.iso</url>
> +-->
> +      <iso>
> +        <volume-id>Mageia-4(-x86_64)?</volume-id>

Both this regexp and the i586 one are going to match 'Mageia-4'
I understand you do that as the dual ISO is valid for both x86_64 and
i586, but this means the arch of matching 'Mageia-4' will be more or
less random. I'd make the i586 match stricter, and only let the x86_64
regexp match the dual ISO.

> +      </iso>
> +      <kernel>isolinux/x86_64/vmlinuz</kernel>
> +      <initrd>isolinux/x86_64/all.rdz</initrd>
> +    </media>
> +    <media live="true" arch="i686">
> +      <url>http://www.mageia.org/fr/downloads/get/?q=Mageia-4-LiveDVD-KDE4-i586-DVD.iso</url>
> +<!--
> +      <url>http://www.mageia.org/fr/downloads/get/?q=Mageia-4-LiveDVD-GNOME-i586-DVD.iso</url>
> +      <url>http://www.mageia.org/fr/downloads/get/?q=Mageia-4-LiveCD-KDE4-en-i586-CD.iso</url>
> +      <url>http://www.mageia.org/fr/downloads/get/?q=Mageia-4-LiveCD-GNOME-en-i586-CD.iso</url>
> +-->
> +      <iso>
> +        <volume-id>Mageia-4-(GNOME|KDE4)-Live(CD|DVD)</volume-id>
> +      </iso>
> +    </media>
> +  </os>
> +</libosinfo>
> diff --git a/data/os/mageia.org/mageia-unknown.xml.in b/data/os/mageia.org/mageia-unknown.xml.in
> index 5eff18c..859f4ea 100644
> --- a/data/os/mageia.org/mageia-unknown.xml.in
> +++ b/data/os/mageia.org/mageia-unknown.xml.in
> @@ -7,7 +7,7 @@
>      <family>linux</family>
>      <distro>mageia</distro>
>      <version>unknown</version>
> -    <derives-from id="http://mageia.org/mageia/3"/>
> +    <derives-from id="http://mageia.org/mageia/4"/>
>  
>      <media arch="i686">
>        <variant id="net-install"/>
> @@ -32,7 +32,7 @@
>      <media arch="i686">
>        <variant id="regular-installer"/>
>        <iso>
> -        <volume-id>Mageia-[4-9]-.*i586</volume-id>
> +        <volume-id>Mageia-[5-9]-.*i586</volume-id>
>        </iso>
>        <kernel>isolinux/i386/vmlinuz</kernel>
>        <initrd>isolinux/i386/all.rdz</initrd>
> @@ -41,7 +41,7 @@
>      <media arch="x86_64">
>        <variant id="regular-installer"/>
>        <iso>
> -        <volume-id>Mageia-[4-9].*x86_64</volume-id>
> +        <volume-id>Mageia-[5-9].*x86_64</volume-id>
>        </iso>
>        <kernel>isolinux/x86_64/vmlinuz</kernel>
>        <initrd>isolinux/x86_64/all.rdz</initrd>
> @@ -51,7 +51,7 @@
>      <media live="true" arch="x86_64">
>        <variant id="live"/>
>        <iso>
> -        <volume-id>Mageia-[4-9]-(GNOME|KDE4)-Live(CD|DVD)</volume-id>
> +        <volume-id>Mageia-[5-9]-(GNOME|KDE4)-Live(CD|DVD)</volume-id>
>        </iso>
>      </media>
>    </os>

I find it a bit odd to introduce the -unkown file, and then change it in
all the following patches. I've moved the introduction of the -unknown
file to the end of the series.

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


More information about the Libosinfo mailing list