[Libosinfo] [osinfo-db PATCH] haiku: Change the family name to "haiku"

2019-02-14 Thread Fabiano Fidêncio
After a discussion with one of the developers of the Haiku project, it's
been pointed out that "haiku" should *not* used "beos" as family and,
most likely, "haiku" would be a more appropriate family name.

Signed-off-by: Fabiano Fidêncio 
---
 data/os/haiku-os.org/haiku-nightly.xml.in| 2 +-
 data/os/haiku-os.org/haiku-r1alpha1.xml.in   | 2 +-
 data/os/haiku-os.org/haiku-r1alpha2.xml.in   | 2 +-
 data/os/haiku-os.org/haiku-r1alpha3.xml.in   | 2 +-
 data/os/haiku-os.org/haiku-r1alpha4.1.xml.in | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/data/os/haiku-os.org/haiku-nightly.xml.in 
b/data/os/haiku-os.org/haiku-nightly.xml.in
index 629bdce..4dfd660 100644
--- a/data/os/haiku-os.org/haiku-nightly.xml.in
+++ b/data/os/haiku-os.org/haiku-nightly.xml.in
@@ -4,7 +4,7 @@
 <_name>Haiku Nightly
 nightly
 <_vendor>Haiku, Inc.
-beos
+haiku
 haiku
 http://haiku-os.org/haiku/r1alpha4.1"/>
 http://haiku-os.org/haiku/r1alpha4.1"/>
diff --git a/data/os/haiku-os.org/haiku-r1alpha1.xml.in 
b/data/os/haiku-os.org/haiku-r1alpha1.xml.in
index af9301f..70b02a2 100644
--- a/data/os/haiku-os.org/haiku-r1alpha1.xml.in
+++ b/data/os/haiku-os.org/haiku-r1alpha1.xml.in
@@ -4,7 +4,7 @@
 <_name>Haiku R1/Alpha1
 r1alpha1
 <_vendor>Haiku, Inc.
-beos
+haiku
 haiku
 
 2009-09-14
diff --git a/data/os/haiku-os.org/haiku-r1alpha2.xml.in 
b/data/os/haiku-os.org/haiku-r1alpha2.xml.in
index 52d0ede..b2fdf23 100644
--- a/data/os/haiku-os.org/haiku-r1alpha2.xml.in
+++ b/data/os/haiku-os.org/haiku-r1alpha2.xml.in
@@ -4,7 +4,7 @@
 <_name>Haiku R1/Alpha2
 r1alpha2
 <_vendor>Haiku, Inc.
-beos
+haiku
 haiku
 http://haiku-os.org/haiku/r1alpha1"/>
 http://haiku-os.org/haiku/r1alpha1"/>
diff --git a/data/os/haiku-os.org/haiku-r1alpha3.xml.in 
b/data/os/haiku-os.org/haiku-r1alpha3.xml.in
index 12bdd78..86f3614 100644
--- a/data/os/haiku-os.org/haiku-r1alpha3.xml.in
+++ b/data/os/haiku-os.org/haiku-r1alpha3.xml.in
@@ -4,7 +4,7 @@
 <_name>Haiku R1/Alpha3
 r1alpha3
 <_vendor>Haiku, Inc.
-beos
+haiku
 haiku
 http://haiku-os.org/haiku/r1alpha2"/>
 http://haiku-os.org/haiku/r1alpha2"/>
diff --git a/data/os/haiku-os.org/haiku-r1alpha4.1.xml.in 
b/data/os/haiku-os.org/haiku-r1alpha4.1.xml.in
index 1fb3dba..db3b829 100644
--- a/data/os/haiku-os.org/haiku-r1alpha4.1.xml.in
+++ b/data/os/haiku-os.org/haiku-r1alpha4.1.xml.in
@@ -4,7 +4,7 @@
 <_name>Haiku R1/Alpha4.1
 r1alpha4.1
 <_vendor>Haiku, Inc.
-beos
+haiku
 haiku
 http://haiku-os.org/haiku/r1alpha3"/>
 http://haiku-os.org/haiku/r1alpha3"/>
-- 
1.8.3.1

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH v2 00/13] Fix kernel/initrd of Ubuntu (desktop) ISOs

2019-02-14 Thread Cole Robinson
On 2/11/19 3:43 AM, Fabiano Fidêncio wrote:
> Ubuntu's ISOs do not have their initrd/kernel files named consistently
> accross the releases. Let's fix those for desktop ISOs according to:
> 

Reviewed-by: Cole Robinson 

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [libosinfo PATCH] pureos: Add test data for pureos8

2019-02-14 Thread Cole Robinson
On 2/12/19 2:49 PM, Fabiano Fidêncio wrote:
> Signed-off-by: Fabiano Fidêncio 
> ---
>  ...0-gnome-live_20180904-amd64.hybrid.iso.txt | 29 +++
>  ...0-gnome-live_20181210-amd64.hybrid.iso.txt | 29 +++
>  ...0-gnome-live_20190128-amd64.hybrid.iso.txt | 29 +++
>  ...0-gnome-live_20190210-amd64.hybrid.iso.txt | 29 +++
>  4 files changed, 116 insertions(+)
>  create mode 100644 
> tests/isodata/pureos/pureos8/pureos-8.0-gnome-live_20180904-amd64.hybrid.iso.txt
>  create mode 100644 
> tests/isodata/pureos/pureos8/pureos-8.0-gnome-live_20181210-amd64.hybrid.iso.txt
>  create mode 100644 
> tests/isodata/pureos/pureos8/pureos-8.0-gnome-live_20190128-amd64.hybrid.iso.txt
>  create mode 100644 
> tests/isodata/pureos/pureos8/pureos-8.0-gnome-live_20190210-amd64.hybrid.iso.txt

Reviewed-by: Cole Robinson 

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 9/9] centos7: Increase the recommended ram size

2019-02-14 Thread Cole Robinson
On 12/21/18 9:09 AM, Fabiano Fidêncio wrote:
> When doing installation from "tree" we need at least 2GB of RAM in order
> to decompress the needed files, otherwise the kickstart installation
> will just fail.
> 
> Signed-off-by: Fabiano Fidêncio 
> ---
>  data/os/centos.org/centos-7.0.xml.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Cole Robinson 

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 8/9] centos: Add "centos7" as short-id

2019-02-14 Thread Cole Robinson
On 12/21/18 9:09 AM, Fabiano Fidêncio wrote:
> Signed-off-by: Fabiano Fidêncio 
> ---
>  data/os/centos.org/centos-7.0.xml.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/data/os/centos.org/centos-7.0.xml.in 
> b/data/os/centos.org/centos-7.0.xml.in
> index 8b3531e..cc583b9 100644
> --- a/data/os/centos.org/centos-7.0.xml.in
> +++ b/data/os/centos.org/centos-7.0.xml.in
> @@ -3,6 +3,7 @@
>   See http://www.gnu.org/licenses/ for a copy of the license text -->
>http://centos.org/centos/7.0;>
>  centos7.0
> +centos7
>  <_name>CentOS 7.0
>  7.0
>  <_vendor>CentOS
> 

Huh I didn't know we could do that, but I see we do the same for debian
distros, so it makes sense

Reviewed-by: Cole Robinson 

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 7/9] centos: Use its own install-script

2019-02-14 Thread Cole Robinson
On 12/21/18 9:09 AM, Fabiano Fidêncio wrote:
> Signed-off-by: Fabiano Fidêncio 
> ---
>  data/os/centos.org/centos-6.0.xml.in  | 4 ++--
>  data/os/centos.org/centos-6.1.xml.in  | 4 ++--
>  data/os/centos.org/centos-6.10.xml.in | 4 ++--
>  data/os/centos.org/centos-6.2.xml.in  | 4 ++--
>  data/os/centos.org/centos-6.3.xml.in  | 4 ++--
>  data/os/centos.org/centos-6.4.xml.in  | 4 ++--
>  data/os/centos.org/centos-6.5.xml.in  | 4 ++--
>  data/os/centos.org/centos-6.6.xml.in  | 4 ++--
>  data/os/centos.org/centos-6.7.xml.in  | 4 ++--
>  data/os/centos.org/centos-6.8.xml.in  | 4 ++--
>  data/os/centos.org/centos-6.9.xml.in  | 4 ++--
>  data/os/centos.org/centos-7.0.xml.in  | 4 ++--
>  12 files changed, 24 insertions(+), 24 deletions(-)

Reviewed-by: Cole Robinson 

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 6/9] centos: Add its own kickstart files

2019-02-14 Thread Cole Robinson
On 12/21/18 9:09 AM, Fabiano Fidêncio wrote:
> As CentOS can support initrd as injection-method (mainly when doing an
> installation from "tree"), let's create its own files and stop using the
> RHEL ones.
> 
> Signed-off-by: Fabiano Fidêncio 
> ---
>  .../centos-kickstart-desktop.xml.in   | 197 ++
>  .../centos.org/centos-kickstart-jeos.xml.in   | 142 +
>  2 files changed, 339 insertions(+)
>  create mode 100644 
> data/install-script/centos.org/centos-kickstart-desktop.xml.in
>  create mode 100644 
> data/install-script/centos.org/centos-kickstart-jeos.xml.in
>

Reviewed-by: Cole Robinson 

I compared them to the RHEL versions... I see this was added:

keyboard 

vs. just  'keyboard us'. Should that be added to RHEL as well?

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 5/9] opensuse, autoyast: Accept initrd as injection-method

2019-02-14 Thread Cole Robinson
On 12/21/18 9:09 AM, Fabiano Fidêncio wrote:
> Signed-off-by: Fabiano Fidêncio 
> ---
>  .../opensuse.org/opensuse-autoyast-desktop.xml.in   | 13 +++--
>  .../opensuse.org/opensuse-autoyast-jeos.xml.in  | 13 +++--
>  2 files changed, 22 insertions(+), 4 deletions(-)

Reviewed-by: Cole Robinson 

I've never actually tested initrdinject with opensuse so if it works...
cool! I'm sure the method is sound I just didn't know if virt-install's
injection machinery actually covers it

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 4/9] silverblue, kickstart: Accept initrd as injection-method

2019-02-14 Thread Cole Robinson
On 12/21/18 9:09 AM, Fabiano Fidêncio wrote:
> Signed-off-by: Fabiano Fidêncio 
> ---
>  .../silverblue-kickstart-desktop.xml.in | 17 +
>  1 file changed, 13 insertions(+), 4 deletions(-)

Reviewed-by: Cole Robinson 

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 3/9] silverblue29: Add tree information

2019-02-14 Thread Cole Robinson
On 12/21/18 9:09 AM, Fabiano Fidêncio wrote:
> Signed-off-by: Fabiano Fidêncio 
> ---
>  data/os/fedoraproject.org/silverblue-29.xml.in | 10 ++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/data/os/fedoraproject.org/silverblue-29.xml.in 
> b/data/os/fedoraproject.org/silverblue-29.xml.in
> index 369b0b7..444de82 100644
> --- a/data/os/fedoraproject.org/silverblue-29.xml.in
> +++ b/data/os/fedoraproject.org/silverblue-29.xml.in
> @@ -23,6 +23,16 @@
>isolinux/initrd.img
>  
>  
> +
> +  
> https://download.fedoraproject.org/pub/fedora/linux/releases/29/Silverblue/x86_64/os
> +  
> +Fedora
> +Silverblue
> +29
> +x86_64
> +  
> +
> +
>  
>
>  1
> 

Reviewed-by: Cole Robinson 

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 2/9] fedora, kickstart: Use "installation-source"

2019-02-14 Thread Cole Robinson
On 12/21/18 9:09 AM, Fabiano Fidêncio wrote:
> installation-source can be used in order to decide whether the
> installation will be done from the media or from the network.
> 
> Signed-off-by: Fabiano Fidêncio 
> ---
>  .../fedoraproject.org/fedora-kickstart-desktop.xml.in | 4 ++--
>  .../fedoraproject.org/fedora-kickstart-jeos.xml.in| 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Cole Robinson 

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 1/9] fedora, kickstart: Accept initrd as injection-method

2019-02-14 Thread Cole Robinson
On 12/21/18 9:09 AM, Fabiano Fidêncio wrote:
> Signed-off-by: Fabiano Fidêncio 
> ---
>  .../fedora-kickstart-desktop.xml.in   | 15 ---
>  .../fedora-kickstart-jeos.xml.in  | 15 ---
>  2 files changed, 24 insertions(+), 6 deletions(-)

Reviewed-by: Cole Robinson 

- Cole

___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [libosinfo PATCH 2/4] media: Don't assume identifiers are null terminated

2019-02-14 Thread Christophe Fergeau
On Thu, Feb 14, 2019 at 11:05:39AM +0100, Fabiano Fidêncio wrote:
> On Thu, Feb 14, 2019 at 10:57 AM Christophe Fergeau 
> wrote:
> 
> > Hey,
> >
> > On Wed, Feb 13, 2019 at 08:19:25PM +0100, Fabiano Fidêncio wrote:
> > > Identifiers as volume-id, application, publisher, and system are not
> > > null terminated and cannot be assumed as so.
> > >
> > > By assuming those are null terminated strings, libosinfo ends up not
> > > counting the last character of a MAX_* string and, consequently, not
> > > properly identifying medias that have their identifiers with the MAX_*
> > > size.
> > >
> > > One example is the ubuntu-18.04.1.0-live-server-amd64.iso media, which
> > > has as volume-id 'Ubuntu-Server 18.04.1+ LTS amd64'. As the volume-id
> > > has exactly 32 characters it's never been matched as when reading the
> > > media's volume-id it'd be read as 'Ubuntu-Server 18.04.1+ LTS amd6'.
> >
> > I don't think we have any test case for that code, do we?
> >
> 
> We don't have any specific test case for this code. But the whole
> test-isodetect relies on this (and that's the way I found out the issue
> when adding the new test data).
> 
> Do you want a specific test for this or are you fine with the patch 4
> covering this case?

Ideally we would have a test case for this code, but this is just
something to add to the bottom of the project todo ;)

Christophe


signature.asc
Description: PGP signature
___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 1/4] ubuntu: Improve the volume-id regex

2019-02-14 Thread Christophe Fergeau
On Thu, Feb 14, 2019 at 11:03:57AM +0100, Fabiano Fidêncio wrote:
> On Thu, Feb 14, 2019 at 10:46 AM Christophe Fergeau 
> wrote:
> 
> > On Wed, Feb 13, 2019 at 08:19:24PM +0100, Fabiano Fidêncio wrote:
> > > The first release of Ubuntu ISOs usually have their volume-id as, for
> > > instance:
> > > Ubuntu-Server 18.04 LTS amd64
> > >
> > > Whenever a new release is done, a new digit is added as, for instance:
> > > Ubuntu-Server 18.04.1 LTS amd64
> > >
> > > However, at least with 18.04, they had a new release for the server
> > > media that looks like:
> > > Ubuntu-Server 18.04.1+ LTS amd64
> > >
> > > This '+' addition breaks the current used regular expression to match
> > > the media's volume-id. In order to take a safer path, let's expand all
> > > the regular expressions that have '(.\d)?' to use '(.\d\+?)?' instead,
> > > being able then to also match the '+'.
> > >
> > > The command used to change all the entries is:
> > > sed -i -e 's/(.\\d)?/(.\\d\\+?)?/g' ubuntu-*.xml.in
> > >
> > > Signed-off-by: Fabiano Fidêncio 
> > > ---
> > >  data/os/ubuntu.com/ubuntu-10.04.xml.in |  4 ++--
> > >  data/os/ubuntu.com/ubuntu-12.04.xml.in |  8 
> > >  data/os/ubuntu.com/ubuntu-14.04.xml.in |  8 
> > >  data/os/ubuntu.com/ubuntu-14.10.xml.in |  8 
> > >  data/os/ubuntu.com/ubuntu-15.04.xml.in |  8 
> > >  data/os/ubuntu.com/ubuntu-15.10.xml.in |  8 
> > >  data/os/ubuntu.com/ubuntu-16.04.xml.in | 14 ++---
> > >  data/os/ubuntu.com/ubuntu-16.10.xml.in | 16 +++
> > >  data/os/ubuntu.com/ubuntu-17.04.xml.in | 14 ++---
> > >  data/os/ubuntu.com/ubuntu-17.10.xml.in | 12 +--
> > >  data/os/ubuntu.com/ubuntu-18.04.xml.in | 10 -
> > >  data/os/ubuntu.com/ubuntu-18.10.xml.in | 12 +--
> > >  data/os/ubuntu.com/ubuntu-19.04.xml.in | 10 -
> > >  data/os/ubuntu.com/ubuntu-6.06.xml.in  | 28 +-
> > >  data/os/ubuntu.com/ubuntu-8.04.xml.in  | 12 +--
> > >  data/os/ubuntu.com/ubuntu-9.04.xml.in  |  8 
> >
> > A bunch of the older releases don't look for xx.yy.zz in the volume id,
> > but only for xx.yy. Your patch is missing these. It's not clear to me if
> > it's intentional that we don't have these matches for these releases, or
> > if it's just something that was overlooked.
> >
> 
> I guess it's been overlooked for a few years :-)
> I'll do the changes on those files as well to keep them as the others.
> 
> Do you want to see a v2 of this patch?

Feel free to push directly.

Christophe

> 
> [snip]


signature.asc
Description: PGP signature
___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [libosinfo PATCH 2/4] media: Don't assume identifiers are null terminated

2019-02-14 Thread Fabiano Fidêncio
On Thu, Feb 14, 2019 at 10:57 AM Christophe Fergeau 
wrote:

> Hey,
>
> On Wed, Feb 13, 2019 at 08:19:25PM +0100, Fabiano Fidêncio wrote:
> > Identifiers as volume-id, application, publisher, and system are not
> > null terminated and cannot be assumed as so.
> >
> > By assuming those are null terminated strings, libosinfo ends up not
> > counting the last character of a MAX_* string and, consequently, not
> > properly identifying medias that have their identifiers with the MAX_*
> > size.
> >
> > One example is the ubuntu-18.04.1.0-live-server-amd64.iso media, which
> > has as volume-id 'Ubuntu-Server 18.04.1+ LTS amd64'. As the volume-id
> > has exactly 32 characters it's never been matched as when reading the
> > media's volume-id it'd be read as 'Ubuntu-Server 18.04.1+ LTS amd6'.
>
> I don't think we have any test case for that code, do we?
>

We don't have any specific test case for this code. But the whole
test-isodetect relies on this (and that's the way I found out the issue
when adding the new test data).

Do you want a specific test for this or are you fine with the patch 4
covering this case?


>
> > ---
> >  osinfo/osinfo_media.c | 37 +++--
> >  1 file changed, 23 insertions(+), 14 deletions(-)
> >
> > diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
> > index 9f77504..eaf67e2 100644
> > --- a/osinfo/osinfo_media.c
> > +++ b/osinfo/osinfo_media.c
> > @@ -137,6 +137,11 @@ struct _CreateFromLocationAsyncData {
> >
> >  gsize offset;
> >  gsize length;
> > +
> > +gchar *volume;
> > +gchar *system;
> > +gchar *application;
> > +gchar *publisher;
> >  };
> >
> >  static void create_from_location_async_data_free
> > @@ -144,6 +149,10 @@ static void create_from_location_async_data_free
> >  {
> > g_object_unref(data->file);
> > g_object_unref(data->res);
> > +   g_free(data->volume);
> > +   g_free(data->system);
> > +   g_free(data->application);
> > +   g_free(data->publisher);
> >
> > g_slice_free(CreateFromLocationAsyncData, data);
> >  }
> > @@ -809,18 +818,18 @@
> create_from_location_async_data(CreateFromLocationAsyncData *data)
> >  OSINFO_MEDIA_PROP_URL,
> >  uri);
> >  g_free(uri);
> > -if (!is_str_empty(data->pvd.volume))
> > +if (!is_str_empty(data->volume))
> >  osinfo_entity_set_param(OSINFO_ENTITY(media),
> >  OSINFO_MEDIA_PROP_VOLUME_ID,
> > -data->pvd.volume);
> > -if (!is_str_empty(data->pvd.system))
> > +data->volume);
> > +if (!is_str_empty(data->system))
> >  osinfo_entity_set_param(OSINFO_ENTITY(media),
> >  OSINFO_MEDIA_PROP_SYSTEM_ID,
> > -data->pvd.system);
> > -if (!is_str_empty(data->pvd.publisher))
> > +data->system);
> > +if (!is_str_empty(data->publisher))
> >  osinfo_entity_set_param(OSINFO_ENTITY(media),
> >  OSINFO_MEDIA_PROP_PUBLISHER_ID,
> > -data->pvd.publisher);
> > +data->publisher);
> >  if (!is_str_empty(data->pvd.application))
> >  osinfo_entity_set_param(OSINFO_ENTITY(media),
> >  OSINFO_MEDIA_PROP_APPLICATION_ID,
> > @@ -1159,19 +1168,19 @@ static void on_pvd_read(GObject *source,
> >  return;
> >  }
> >
> > -data->pvd.volume[MAX_VOLUME - 1] = 0;
> > -g_strchomp(data->pvd.volume);
> > +data->volume = g_strndup(data->pvd.volume, MAX_VOLUME);
> > +g_strchomp(data->volume);
> >
> > -data->pvd.system[MAX_SYSTEM - 1] = 0;
> > -g_strchomp(data->pvd.system);
> > +data->system = g_strndup(data->pvd.system, MAX_SYSTEM);
> > +g_strchomp(data->system);
> >
> > -data->pvd.publisher[MAX_PUBLISHER - 1] = 0;
> > -g_strchomp(data->pvd.publisher);
> > +data->publisher = g_strndup(data->pvd.publisher, MAX_PUBLISHER);
> > +g_strchomp(data->publisher);
> >
> > -data->pvd.application[MAX_APPLICATION - 1] = 0;
> > +data->application = g_strndup(data->pvd.application,
> MAX_APPLICATION);
> >  g_strchomp(data->pvd.application);
>
> This should be g_strchomp(data->application);
>

Fixed.


>
> Reviewed-by: Christophe Fergeau 
>
> Christophe
>
___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 1/4] ubuntu: Improve the volume-id regex

2019-02-14 Thread Fabiano Fidêncio
On Thu, Feb 14, 2019 at 10:46 AM Christophe Fergeau 
wrote:

> On Wed, Feb 13, 2019 at 08:19:24PM +0100, Fabiano Fidêncio wrote:
> > The first release of Ubuntu ISOs usually have their volume-id as, for
> > instance:
> > Ubuntu-Server 18.04 LTS amd64
> >
> > Whenever a new release is done, a new digit is added as, for instance:
> > Ubuntu-Server 18.04.1 LTS amd64
> >
> > However, at least with 18.04, they had a new release for the server
> > media that looks like:
> > Ubuntu-Server 18.04.1+ LTS amd64
> >
> > This '+' addition breaks the current used regular expression to match
> > the media's volume-id. In order to take a safer path, let's expand all
> > the regular expressions that have '(.\d)?' to use '(.\d\+?)?' instead,
> > being able then to also match the '+'.
> >
> > The command used to change all the entries is:
> > sed -i -e 's/(.\\d)?/(.\\d\\+?)?/g' ubuntu-*.xml.in
> >
> > Signed-off-by: Fabiano Fidêncio 
> > ---
> >  data/os/ubuntu.com/ubuntu-10.04.xml.in |  4 ++--
> >  data/os/ubuntu.com/ubuntu-12.04.xml.in |  8 
> >  data/os/ubuntu.com/ubuntu-14.04.xml.in |  8 
> >  data/os/ubuntu.com/ubuntu-14.10.xml.in |  8 
> >  data/os/ubuntu.com/ubuntu-15.04.xml.in |  8 
> >  data/os/ubuntu.com/ubuntu-15.10.xml.in |  8 
> >  data/os/ubuntu.com/ubuntu-16.04.xml.in | 14 ++---
> >  data/os/ubuntu.com/ubuntu-16.10.xml.in | 16 +++
> >  data/os/ubuntu.com/ubuntu-17.04.xml.in | 14 ++---
> >  data/os/ubuntu.com/ubuntu-17.10.xml.in | 12 +--
> >  data/os/ubuntu.com/ubuntu-18.04.xml.in | 10 -
> >  data/os/ubuntu.com/ubuntu-18.10.xml.in | 12 +--
> >  data/os/ubuntu.com/ubuntu-19.04.xml.in | 10 -
> >  data/os/ubuntu.com/ubuntu-6.06.xml.in  | 28 +-
> >  data/os/ubuntu.com/ubuntu-8.04.xml.in  | 12 +--
> >  data/os/ubuntu.com/ubuntu-9.04.xml.in  |  8 
>
> A bunch of the older releases don't look for xx.yy.zz in the volume id,
> but only for xx.yy. Your patch is missing these. It's not clear to me if
> it's intentional that we don't have these matches for these releases, or
> if it's just something that was overlooked.
>

I guess it's been overlooked for a few years :-)
I'll do the changes on those files as well to keep them as the others.

Do you want to see a v2 of this patch?

[snip]
___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [libosinfo PATCH 3/4] tests: Add ubuntu 18.04.1 test data

2019-02-14 Thread Christophe Fergeau
Feel free to squash 3/4 and 4/4

Reviewed-by: Christophe Fergeau 

On Wed, Feb 13, 2019 at 08:19:26PM +0100, Fabiano Fidêncio wrote:
> Signed-off-by: Fabiano Fidêncio 
> ---
>  .../ubuntu-18.04.1-desktop-amd64.iso.txt  | 29 +++
>  1 file changed, 29 insertions(+)
>  create mode 100644 
> tests/isodata/ubuntu/ubuntu18.04/ubuntu-18.04.1-desktop-amd64.iso.txt
> 
> diff --git 
> a/tests/isodata/ubuntu/ubuntu18.04/ubuntu-18.04.1-desktop-amd64.iso.txt 
> b/tests/isodata/ubuntu/ubuntu18.04/ubuntu-18.04.1-desktop-amd64.iso.txt
> new file mode 100644
> index 000..f2ca3de
> --- /dev/null
> +++ b/tests/isodata/ubuntu/ubuntu18.04/ubuntu-18.04.1-desktop-amd64.iso.txt
> @@ -0,0 +1,29 @@
> +CD-ROM is in ISO 9660 format
> +System id: 
> +Volume id: Ubuntu 18.04.1 LTS amd64
> +Volume set id: 
> +Publisher id: 
> +Data preparer id: XORRISO-1.2.4 2012.07.20.130001, LIBISOBURN-1.2.4, 
> LIBISOFS-1.2.4, LIBBURN-1.2.4
> +Application id: 
> +Copyright File id: 
> +Abstract File id: 
> +Bibliographic File id: 
> +Volume set size is: 1
> +Volume set sequence number is: 1
> +Logical block size is: 2048
> +Volume size is: 953784
> +El Torito VD version 1 found, boot catalog is in sector 191
> +Joliet with UCS level 3 found
> +Rock Ridge signatures version 1 found
> +Eltorito validation header:
> +Hid 1
> +Arch 0 (x86)
> +ID ''
> +Key 55 AA
> +Eltorito defaultboot header:
> +Bootid 88 (bootable)
> +Boot media 0 (No Emulation Boot)
> +Load segment 0
> +Sys type 0
> +Nsect 4
> +Bootoff E3B56 932694
> -- 
> 2.20.1
> 
> ___
> Libosinfo mailing list
> Libosinfo@redhat.com
> https://www.redhat.com/mailman/listinfo/libosinfo


signature.asc
Description: PGP signature
___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [libosinfo PATCH 2/4] media: Don't assume identifiers are null terminated

2019-02-14 Thread Christophe Fergeau
Hey,

On Wed, Feb 13, 2019 at 08:19:25PM +0100, Fabiano Fidêncio wrote:
> Identifiers as volume-id, application, publisher, and system are not
> null terminated and cannot be assumed as so.
> 
> By assuming those are null terminated strings, libosinfo ends up not
> counting the last character of a MAX_* string and, consequently, not
> properly identifying medias that have their identifiers with the MAX_*
> size.
> 
> One example is the ubuntu-18.04.1.0-live-server-amd64.iso media, which
> has as volume-id 'Ubuntu-Server 18.04.1+ LTS amd64'. As the volume-id
> has exactly 32 characters it's never been matched as when reading the
> media's volume-id it'd be read as 'Ubuntu-Server 18.04.1+ LTS amd6'.

I don't think we have any test case for that code, do we?

> ---
>  osinfo/osinfo_media.c | 37 +++--
>  1 file changed, 23 insertions(+), 14 deletions(-)
> 
> diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
> index 9f77504..eaf67e2 100644
> --- a/osinfo/osinfo_media.c
> +++ b/osinfo/osinfo_media.c
> @@ -137,6 +137,11 @@ struct _CreateFromLocationAsyncData {
>  
>  gsize offset;
>  gsize length;
> +
> +gchar *volume;
> +gchar *system;
> +gchar *application;
> +gchar *publisher;
>  };
>  
>  static void create_from_location_async_data_free
> @@ -144,6 +149,10 @@ static void create_from_location_async_data_free
>  {
> g_object_unref(data->file);
> g_object_unref(data->res);
> +   g_free(data->volume);
> +   g_free(data->system);
> +   g_free(data->application);
> +   g_free(data->publisher);
>  
> g_slice_free(CreateFromLocationAsyncData, data);
>  }
> @@ -809,18 +818,18 @@ 
> create_from_location_async_data(CreateFromLocationAsyncData *data)
>  OSINFO_MEDIA_PROP_URL,
>  uri);
>  g_free(uri);
> -if (!is_str_empty(data->pvd.volume))
> +if (!is_str_empty(data->volume))
>  osinfo_entity_set_param(OSINFO_ENTITY(media),
>  OSINFO_MEDIA_PROP_VOLUME_ID,
> -data->pvd.volume);
> -if (!is_str_empty(data->pvd.system))
> +data->volume);
> +if (!is_str_empty(data->system))
>  osinfo_entity_set_param(OSINFO_ENTITY(media),
>  OSINFO_MEDIA_PROP_SYSTEM_ID,
> -data->pvd.system);
> -if (!is_str_empty(data->pvd.publisher))
> +data->system);
> +if (!is_str_empty(data->publisher))
>  osinfo_entity_set_param(OSINFO_ENTITY(media),
>  OSINFO_MEDIA_PROP_PUBLISHER_ID,
> -data->pvd.publisher);
> +data->publisher);
>  if (!is_str_empty(data->pvd.application))
>  osinfo_entity_set_param(OSINFO_ENTITY(media),
>  OSINFO_MEDIA_PROP_APPLICATION_ID,
> @@ -1159,19 +1168,19 @@ static void on_pvd_read(GObject *source,
>  return;
>  }
>  
> -data->pvd.volume[MAX_VOLUME - 1] = 0;
> -g_strchomp(data->pvd.volume);
> +data->volume = g_strndup(data->pvd.volume, MAX_VOLUME);
> +g_strchomp(data->volume);
>  
> -data->pvd.system[MAX_SYSTEM - 1] = 0;
> -g_strchomp(data->pvd.system);
> +data->system = g_strndup(data->pvd.system, MAX_SYSTEM);
> +g_strchomp(data->system);
>  
> -data->pvd.publisher[MAX_PUBLISHER - 1] = 0;
> -g_strchomp(data->pvd.publisher);
> +data->publisher = g_strndup(data->pvd.publisher, MAX_PUBLISHER);
> +g_strchomp(data->publisher);
>  
> -data->pvd.application[MAX_APPLICATION - 1] = 0;
> +data->application = g_strndup(data->pvd.application, MAX_APPLICATION);
>  g_strchomp(data->pvd.application);

This should be g_strchomp(data->application);

Reviewed-by: Christophe Fergeau 

Christophe


signature.asc
Description: PGP signature
___
Libosinfo mailing list
Libosinfo@redhat.com
https://www.redhat.com/mailman/listinfo/libosinfo


Re: [Libosinfo] [osinfo-db PATCH 1/4] ubuntu: Improve the volume-id regex

2019-02-14 Thread Christophe Fergeau
On Wed, Feb 13, 2019 at 08:19:24PM +0100, Fabiano Fidêncio wrote:
> The first release of Ubuntu ISOs usually have their volume-id as, for
> instance:
> Ubuntu-Server 18.04 LTS amd64
> 
> Whenever a new release is done, a new digit is added as, for instance:
> Ubuntu-Server 18.04.1 LTS amd64
> 
> However, at least with 18.04, they had a new release for the server
> media that looks like:
> Ubuntu-Server 18.04.1+ LTS amd64
> 
> This '+' addition breaks the current used regular expression to match
> the media's volume-id. In order to take a safer path, let's expand all
> the regular expressions that have '(.\d)?' to use '(.\d\+?)?' instead,
> being able then to also match the '+'.
> 
> The command used to change all the entries is:
> sed -i -e 's/(.\\d)?/(.\\d\\+?)?/g' ubuntu-*.xml.in
> 
> Signed-off-by: Fabiano Fidêncio 
> ---
>  data/os/ubuntu.com/ubuntu-10.04.xml.in |  4 ++--
>  data/os/ubuntu.com/ubuntu-12.04.xml.in |  8 
>  data/os/ubuntu.com/ubuntu-14.04.xml.in |  8 
>  data/os/ubuntu.com/ubuntu-14.10.xml.in |  8 
>  data/os/ubuntu.com/ubuntu-15.04.xml.in |  8 
>  data/os/ubuntu.com/ubuntu-15.10.xml.in |  8 
>  data/os/ubuntu.com/ubuntu-16.04.xml.in | 14 ++---
>  data/os/ubuntu.com/ubuntu-16.10.xml.in | 16 +++
>  data/os/ubuntu.com/ubuntu-17.04.xml.in | 14 ++---
>  data/os/ubuntu.com/ubuntu-17.10.xml.in | 12 +--
>  data/os/ubuntu.com/ubuntu-18.04.xml.in | 10 -
>  data/os/ubuntu.com/ubuntu-18.10.xml.in | 12 +--
>  data/os/ubuntu.com/ubuntu-19.04.xml.in | 10 -
>  data/os/ubuntu.com/ubuntu-6.06.xml.in  | 28 +-
>  data/os/ubuntu.com/ubuntu-8.04.xml.in  | 12 +--
>  data/os/ubuntu.com/ubuntu-9.04.xml.in  |  8 

A bunch of the older releases don't look for xx.yy.zz in the volume id,
but only for xx.yy. Your patch is missing these. It's not clear to me if
it's intentional that we don't have these matches for these releases, or
if it's just something that was overlooked.

These releases are:
ubuntu-10.10.xml.in
ubuntu-11.04.xml.in
ubuntu-11.10.xml.in
ubuntu-12.10.xml.in
ubuntu-13.04.xml.in
ubuntu-13.10.xml.in
ubuntu-4.10.xml.in
ubuntu-5.04.xml.in
ubuntu-5.10.xml.in
ubuntu-6.10.xml.in
ubuntu-7.04.xml.in
ubuntu-7.10.xml.in
ubuntu-8.10.xml.in
ubuntu-9.10.xml.in

Apart from this, looks good to me,
Reviewed-by: Christophe Fergeau 


>  16 files changed, 90 insertions(+), 90 deletions(-)
> 
> diff --git a/data/os/ubuntu.com/ubuntu-10.04.xml.in 
> b/data/os/ubuntu.com/ubuntu-10.04.xml.in
> index 6a0d759..2a53801 100644
> --- a/data/os/ubuntu.com/ubuntu-10.04.xml.in
> +++ b/data/os/ubuntu.com/ubuntu-10.04.xml.in
> @@ -32,7 +32,7 @@
>  
>
> http://old-releases.ubuntu.com/releases/lucid/ubuntu-10.04-desktop-i386.iso
>
> -Ubuntu 10.04(.\d)? LTS i386
> +Ubuntu 10.04(.\d\+?)? LTS i386
>  LINUX
>
>casper/vmlinuz
> @@ -41,7 +41,7 @@
>  
>
> http://old-releases.ubuntu.com/releases/lucid/ubuntu-10.04-desktop-amd64.iso
>
> -Ubuntu 10.04(.\d)? LTS amd64
> +Ubuntu 10.04(.\d\+?)? LTS amd64
>  LINUX
>
>casper/vmlinuz
> diff --git a/data/os/ubuntu.com/ubuntu-12.04.xml.in 
> b/data/os/ubuntu.com/ubuntu-12.04.xml.in
> index b81df0a..0093f16 100644
> --- a/data/os/ubuntu.com/ubuntu-12.04.xml.in
> +++ b/data/os/ubuntu.com/ubuntu-12.04.xml.in
> @@ -32,7 +32,7 @@
>  
>
> http://old-releases.ubuntu.com/releases/precise/ubuntu-12.04-server-i386.iso
>
> -Ubuntu-Server 12.04(.\d)? LTS i386
> +Ubuntu-Server 12.04(.\d\+?)? LTS i386
>
>install/vmlinuz
>install/initrd.gz
> @@ -40,7 +40,7 @@
>  
>
> http://old-releases.ubuntu.com/releases/precise/ubuntu-12.04-server-amd64.iso
>
> -Ubuntu-Server 12.04(.\d)? LTS amd64
> +Ubuntu-Server 12.04(.\d\+?)? LTS amd64
>
>install/vmlinuz
>install/initrd.gz
> @@ -48,7 +48,7 @@
>  
>
> http://old-releases.ubuntu.com/releases/precise/ubuntu-12.04-desktop-i386.iso
>
> -Ubuntu 12.04(.\d)? LTS i386
> +Ubuntu 12.04(.\d\+?)? LTS i386
>
>casper/vmlinuz
>casper/initrd.lz
> @@ -56,7 +56,7 @@
>  
>
> http://old-releases.ubuntu.com/releases/precise/ubuntu-12.04-desktop-amd64.iso
>
> -Ubuntu 12.04(.\d)? LTS amd64
> +Ubuntu 12.04(.\d\+?)? LTS amd64
>
>casper/vmlinuz
>casper/initrd.lz
> diff --git a/data/os/ubuntu.com/ubuntu-14.04.xml.in 
> b/data/os/ubuntu.com/ubuntu-14.04.xml.in
> index 40394bb..5e095b6 100644
> --- a/data/os/ubuntu.com/ubuntu-14.04.xml.in
> +++ b/data/os/ubuntu.com/ubuntu-14.04.xml.in
> @@ -33,7 +33,7 @@
>  
>
> http://releases.ubuntu.com/14.04/ubuntu-14.04.5-server-i386.iso
>
> -Ubuntu-Server 14.04(.\d)? LTS i386
> +Ubuntu-Server 14.04(.\d\+?)? LTS i386
>
>