Re: [Libosinfo] [v2 3/5] fedora,script: Install qemu-guest-agent

2015-11-16 Thread Daniel P. Berrange
On Fri, Nov 13, 2015 at 01:03:30PM -0500, Zeeshan Ali (Khattak) wrote:
> On Fri, Nov 13, 2015 at 11:41 AM, Daniel P. Berrange
>  wrote:
> > On Fri, Nov 13, 2015 at 11:39:49AM -0500, Zeeshan Ali (Khattak) wrote:
> >> On Fri, Nov 13, 2015 at 11:19 AM, Daniel P. Berrange
> >>  wrote:
> >> > On Fri, Nov 13, 2015 at 11:16:15AM -0500, Zeeshan Ali (Khattak) wrote:
> >> >> For desktop profile.
> >> >> ---
> >> >>  data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in 
> >> >> | 3 +++
> >> >>  1 file changed, 3 insertions(+)
> >> >>
> >> >> diff --git 
> >> >> a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in 
> >> >> b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> >> >> index be7a965..24a4d6b 100644
> >> >> --- 
> >> >> a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> >> >> +++ 
> >> >> b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> >> >> @@ -156,6 +156,9 @@ url 
> >> >> --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-install-
> >> >>  xorg-x11-drv-qxl
> >> >>  spice-vdagent
> >> >>
> >> >> +# Also Qemu agent
> >> >> +qemu-guest-agent
> >> >
> >> > This surely needs to be made conditional based on some version
> >> > of Fedora, likewise for the other changes in this series, as the
> >> > one kicksart file is shared across many versions of the OS at
> >> > least some of which I expect pre-date qemu-guest-agent.
> >>
> >> It actually seems to predate Fedora itself. :)
> >
> > Unfortunately not - qemu-guest-agent is a sub-RPM of 'qemu' so
> > the changelog you're seeing is the changelog for qemu as a whole.
> >
> > I added it to Fedora in this dist-git commit
> >
> >   commit f057293300c43e749ee543178ab95f0e285949cd
> >   Author: Daniel P. Berrange 
> >   Date:   Wed Oct 5 16:00:36 2011 +0100
> >
> > Fix packaging of the QEMU guest agent
> 
> Ah ok, so I'll modify this patch. As for others:
> 
> * RHEL 6.* had this package and this is the first RHEL release for
> which we list installer scripts for, so no issue there AFAIK.
> 
> * Debian seems to have added the package in debian squeeze (6) and
> desktop installer script is only listed from wheezy (7) and onwards,
> so no need for conditionals there either.

Ok, sounds good.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] RFC: Splitting off database into separate package

2015-11-16 Thread Daniel P. Berrange
On Sun, Nov 15, 2015 at 02:22:47AM -0600, Yang Yu wrote:
> I am kinda late to the party.
> 
> This is indeed a much needed feature. Many distros have libosinfo
> package 6 mon+ old (missing recent OS releases).
> 
> - Is XML the format we want to use long term ?
> I agree with switching to json if the performance gain is significant.
> Not a high priority if performance isn't going to be a concern in
> short term.
> If xml support does not get discontinued, some well defined precedence
> to handle conflicts (in case a copy of xml database and a copy of json
> database are present at the same time) seems necessary.
> 
> - Do we need to mark a database schema version in some manner ?
> adding a hash associated with the version number to remind people if
> the database has been modified since released?
> adding a flag to prevent the database from getting overwritten by
> updates if the user wants to keep the modified version?
> 
> - Should we restructure the database ?
> 1 entity per file instead of a huge file with everything makes sense.
> Easier to maintain. I agree with your approach in [PATCH 00/39] Split
> up database XML files
> https://www.redhat.com/archives/libosinfo/2015-September/msg00043.html
> 
> - How do we provide notifications when updates are available
> Using DNS TXT record for update check is a brilliant idea. While
> having a separate package for database updates, I would like to see a
> method to update the database on demand outside the distro's package
> management (too much admin work and taking too long to publish).  It
> can be as easy as a script to operate in diff/overwrite mode. The
> files can be hosted on github or with cloudflare cdn so libosinfo.org
> won't get hammered too much.
> 
> 
> I tried to replace everything in /usr/share/libosinfo/db with the
> /data (except /data/schemas) from git and /usr/share/libosinfo/schemas
> with data/schemas. It did not work. Is there any change that prevents
> the current database from working on 0.2.11?

You can't directly use the files from git that end in '.xml.in' as they
are post-processed to add in translations to create the final '.xml'
files. If you run a build of git to generate the .xml files those
should then work


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] [PATCH] Switch to 0.3.0 for next release

2015-12-16 Thread Daniel P. Berrange
Since we have had a major change in the way we process the
libosinfo database files, this would be a good time to
switch to 0.3.0 for release numbers
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 81fcc0a..4154134 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([libosinfo], [0.2.13], [libosinfo@redhat.com])
+AC_INIT([libosinfo], [0.3.0], [libosinfo@redhat.com])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 AM_INIT_AUTOMAKE([1.11.1 foreign color-tests tar-ustar])
-- 
2.5.0

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


[Libosinfo] [PATCH] don't include autogenerated enum files in dist

2016-01-13 Thread Daniel P. Berrange
Previous commit 77cf2730eb6e5503a9bd40e6baf7cc0b393a9dc7
reverts 4e488678d4af0e54da7400851d554bc4c4497c76 (fixes
to the VPATH build) because it was said to break the
make distcheck.

After examining the problem, it seems this commit was not
in fact the problem - it merely exposed the existing bug
elsewhere.

The real problem is that we were including the autogenerated
enum files in the dist. So when doing builds from git those
files were in $builddir, but when doing builds from dist
those files were in $srcdir. Except that 'make distclean'
would delete the enum files, which would again cause them
to appear in $builddir.

So the real fix is stop including the enum files in the dist

Signed-off-by: Daniel P. Berrange 
---
 osinfo/Makefile.am | 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
index c4f29a4..410a4c1 100644
--- a/osinfo/Makefile.am
+++ b/osinfo/Makefile.am
@@ -58,7 +58,7 @@ libosinfo_1_0_la_DEPENDENCIES = libosinfo.syms
 
 libosinfo_1_0_includedir = $(includedir)/libosinfo-1.0/osinfo
 
-OSINFO_HEADER_FILES =  \
+libosinfo_1_0_include_HEADERS =\
   osinfo.h \
   osinfo_avatar_format.h   \
   osinfo_db.h  \
@@ -99,8 +99,7 @@ OSINFO_HEADER_FILES = \
   osinfo_treelist.h\
   $(NULL)
 
-libosinfo_1_0_include_HEADERS =\
-  $(OSINFO_HEADER_FILES)   \
+nodist_libosinfo_1_0_include_HEADERS = \
   osinfo_version.h \
   osinfo_enum_types.h  \
   $(NULL)
@@ -110,7 +109,6 @@ libosinfo_1_0_la_SOURCES =  \
   osinfo_datamap.c \
   osinfo_datamaplist.c \
   osinfo_entity.c  \
-  osinfo_enum_types.c  \
   osinfo_filter.c  \
   osinfo_list.c\
   osinfo_device.c  \
@@ -151,11 +149,16 @@ libosinfo_1_0_la_SOURCES =\
   ignore-value.h   \
   $(NULL)
 
-osinfo_enum_types.h: $(OSINFO_HEADER_FILES) osinfo_enum_types.h.template
-   $(AM_V_GEN) ( $(GLIB_MKENUMS) --template 
$(srcdir)/osinfo_enum_types.h.template $(OSINFO_HEADER_FILES:%=$(srcdir)/%) ) > 
$@
+nodist_libosinfo_1_0_la_SOURCES =  \
+  osinfo_enum_types.c  \
+  $(NULL)
+
+
+osinfo_enum_types.h: $(libosinfo_1_0_include_HEADERS) 
osinfo_enum_types.h.template
+   $(AM_V_GEN) ( $(GLIB_MKENUMS) --template 
$(srcdir)/osinfo_enum_types.h.template 
$(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $@
 
 osinfo_enum_types.c: $(OSINFO_HEADER_FILES) osinfo_enum_types.c.template 
osinfo_enum_types.h
-   $(AM_V_GEN) ( $(GLIB_MKENUMS) --template 
$(srcdir)/osinfo_enum_types.c.template $(OSINFO_HEADER_FILES:%=$(srcdir)/%) ) > 
$@
+   $(AM_V_GEN) ( $(GLIB_MKENUMS) --template 
$(srcdir)/osinfo_enum_types.c.template 
$(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $@
 
 DISTCLEANFILES +=  \
osinfo_enum_types.c \
@@ -188,7 +191,7 @@ Libosinfo_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0 libxml2-2.0
 Libosinfo_1_0_gir_PACKAGES = gobject-2.0 gio-2.0 libxml-2.0 libxslt
 Libosinfo_1_0_gir_EXPORT_PACKAGES = libosinfo-1.0
 Libosinfo_1_0_gir_LIBS = libosinfo-1.0.la
-Libosinfo_1_0_gir_FILES = $(libosinfo_1_0_include_HEADERS) 
$(libosinfo_1_0_la_SOURCES)
+Libosinfo_1_0_gir_FILES = $(libosinfo_1_0_include_HEADERS) 
$(libosinfo_1_0_la_SOURCES) $(nodist_libosinfo_1_0_la_SOURCES)
 Libosinfo_1_0_gir_CFLAGS = $(libosinfo_1_0_la_CFLAGS)
 Libosinfo_1_0_gir_SCANNERFLAGS = --identifier-prefix=Osinfo 
--symbol-prefix=osinfo --c-include="osinfo/osinfo.h"
 INTROSPECTION_GIRS += Libosinfo-1.0.gir
-- 
2.5.0

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


Re: [Libosinfo] [PATCH] don't include autogenerated enum files in dist

2016-01-14 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 10:13:58PM +, Zeeshan Ali (Khattak) wrote:
> Hi,
> 
> Patch looks fine to me but I failed to apply it on current git master
> nor 0.3.0 tag.

Opps, I should say it applies after I revert your revert of my
previous patch


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [libosinfo PATCH] Update CD URLs to latest Debian Jessie point release

2016-02-04 Thread Daniel P. Berrange
On Thu, Feb 04, 2016 at 12:50:29PM +0100, Guido Günther wrote:
> ---
>  data/os/debian.org/debian-8.xml.in | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/data/os/debian.org/debian-8.xml.in 
> b/data/os/debian.org/debian-8.xml.in
> index 146089a..e143dd3 100644
> --- a/data/os/debian.org/debian-8.xml.in
> +++ b/data/os/debian.org/debian-8.xml.in
> @@ -29,7 +29,7 @@
>  
>  
>  
> -  
> http://cdimage.debian.org/debian-cd/8.2.0/i386/iso-dvd/debian-8.2.0-i386-DVD-1.iso
> +  
> http://cdimage.debian.org/debian-cd/8.3.0/i386/iso-dvd/debian-8.3.0-i386-DVD-1.iso
>
>  Debian 8.\d.\d i386 1
>
> @@ -37,7 +37,7 @@
>install.386/initrd.gz
>  
>  
> -  
> http://cdimage.debian.org/debian-cd/8.2.0/amd64/iso-dvd/debian-8.2.0-amd64-DVD-1.iso
> +  
> http://cdimage.debian.org/debian-cd/8.3.0/amd64/iso-dvd/debian-8.3.0-amd64-DVD-1.iso
>
>  Debian 8.\d.\d amd64 1
>

I don't suppose you have any connections with people who maintain the
debian download sites ? It would be nice if there were a perma-link
(eg "8-latest"), that always pointed to the most recent 8.x.y point
release, so we don't have to keep chasing minor rleases like this.


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [libosinfo PATCH] Update CD URLs to latest Debian Jessie point release

2016-02-04 Thread Daniel P. Berrange
On Thu, Feb 04, 2016 at 02:36:52PM +0100, Guido Günther wrote:
> Hi Daniel,
> On Thu, Feb 04, 2016 at 01:21:38PM +, Daniel P. Berrange wrote:
> > On Thu, Feb 04, 2016 at 12:50:29PM +0100, Guido Günther wrote:
> > > ---
> > >  data/os/debian.org/debian-8.xml.in | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/data/os/debian.org/debian-8.xml.in 
> > > b/data/os/debian.org/debian-8.xml.in
> > > index 146089a..e143dd3 100644
> > > --- a/data/os/debian.org/debian-8.xml.in
> > > +++ b/data/os/debian.org/debian-8.xml.in
> > > @@ -29,7 +29,7 @@
> > >  
> > >  
> > >  
> > > -  
> > > http://cdimage.debian.org/debian-cd/8.2.0/i386/iso-dvd/debian-8.2.0-i386-DVD-1.iso
> > > +  
> > > http://cdimage.debian.org/debian-cd/8.3.0/i386/iso-dvd/debian-8.3.0-i386-DVD-1.iso
> > >
> > >  Debian 8.\d.\d i386 1
> > >
> > > @@ -37,7 +37,7 @@
> > >install.386/initrd.gz
> > >  
> > >  
> > > -  
> > > http://cdimage.debian.org/debian-cd/8.2.0/amd64/iso-dvd/debian-8.2.0-amd64-DVD-1.iso
> > > +  
> > > http://cdimage.debian.org/debian-cd/8.3.0/amd64/iso-dvd/debian-8.3.0-amd64-DVD-1.iso
> > >
> > >  Debian 8.\d.\d amd64 1
> > >
> > 
> > I don't suppose you have any connections with people who maintain the
> > debian download sites ? It would be nice if there were a perma-link
> > (eg "8-latest"), that always pointed to the most recent 8.x.y point
> > release, so we don't have to keep chasing minor rleases like this.
> 
> I intend to file a bug against the cdimage.debian.org pseudo package but
> hoped to have the patch applied to libosinfo first so I have a good
> example why a stable name makes sense to link to.

Oh sure, the patch to libosinfo is fine. We've been doing these for a
while now already.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH] device: add virtio-gpu

2016-02-26 Thread Daniel P. Berrange
On Fri, Feb 26, 2016 at 02:23:24PM +0100, Marc-André Lureau wrote:
> From: Marc-André Lureau 
> 
> virtio-gpu is a non-legacy device, so device_id is always 0x10 + 0x1040.
> 
> Signed-off-by: Marc-André Lureau 
> ---
>  data/device/pcisig.com/Makefile.am  | 1 +
>  data/device/pcisig.com/pci-1af4-1050.d/Makefile.am  | 1 +
>  data/device/pcisig.com/pci-1af4-1050.d/class.xml.in | 6 ++
>  3 files changed, 8 insertions(+)
>  create mode 100644 data/device/pcisig.com/pci-1af4-1050.d/Makefile.am
>  create mode 100644 data/device/pcisig.com/pci-1af4-1050.d/class.xml.in
> 
> diff --git a/data/device/pcisig.com/Makefile.am 
> b/data/device/pcisig.com/Makefile.am
> index 567618a..4fd99e9 100644
> --- a/data/device/pcisig.com/Makefile.am
> +++ b/data/device/pcisig.com/Makefile.am
> @@ -13,6 +13,7 @@ SUBDIRS = \
>   pci-1af4-1002.d \
>   pci-1af4-1003.d \
>   pci-1af4-1009.d \
> + pci-1af4-1050.d \
>   pci-1b36-0100.d \
>   pci-8086-100e.d \
>   pci-8086-2415.d \
> diff --git a/data/device/pcisig.com/pci-1af4-1050.d/Makefile.am 
> b/data/device/pcisig.com/pci-1af4-1050.d/Makefile.am
> new file mode 100644
> index 000..4ce2491
> --- /dev/null
> +++ b/data/device/pcisig.com/pci-1af4-1050.d/Makefile.am
> @@ -0,0 +1 @@
> +include ../../../Makefile.inc
> diff --git a/data/device/pcisig.com/pci-1af4-1050.d/class.xml.in 
> b/data/device/pcisig.com/pci-1af4-1050.d/class.xml.in
> new file mode 100644
> index 000..4d3ec16
> --- /dev/null
> +++ b/data/device/pcisig.com/pci-1af4-1050.d/class.xml.in
> @@ -0,0 +1,6 @@
> +
> +  http://pcisig.com/pci/1af4/1050";>
> +virtio-gpu
> +video
> +  
> +

That is sufficient *if* the device is included in the master pci.ids
file, but all the virtio-1.0 devices appear to be missing from it :-(

  https://pci-ids.ucw.cz/v2.2/pci.ids

We should poke someone to get this fixed.

In the mean time though you'll need to add the full set of fields

pci
<_vendor>Red Hat, Inc
1af4
virtio-vga
1050

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] Moving GIT repo to gitlab.com

2016-03-03 Thread Daniel P. Berrange
Hi Folks,

Currently the libosinfo master git repository is on the Fedora hosted
git server. As we split out the core database and tools from the GObject
base library we're going to need to create new git repos. While I could
do so on Fedora, it is rather tedious because it is not self-service,
it requires opening tickets with Fedora infra.  Fedora git has also
tended to be rather lacking performance when pushing/pulling git over
the years, and shows no signs of improving.

The primary reason why I chose Fedora hosted originally was to be running
the project on open source infrastrcture. That goal still applies, so I'm
not interested in moving to github.com, no matter how shiny it currently
is [1].

I think that gitlab.com is a reasonable destination though. It is based
on open source software and offers the same ease of use as github does
with fully self-service API for managing project membership & git repos

So I'm suggesting we immediately migrate to gitlab.com. Assuming that's
fine with current committers, I'll setup the project org & import hte
git repo. Each committer would just have to create themselves a login
account so I can add them.

Regards,
Daniel

[1] Back in the day sourceforge was just as shiny & attractive to every
open source project, and that didn't turn out so well in the long
term when then needed to monetize their investment. 
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH] Fix build with older GCC

2016-03-03 Thread Daniel P. Berrange
On Thu, Mar 03, 2016 at 05:07:08PM +0300, Roman Bogorodskiy wrote:
>   Roman Bogorodskiy wrote:
> 
> > Build with older gcc fails with:
> > 
> >   CC   libosinfo_1_0_la-osinfo_avatar_format.lo
> > In file included from ../osinfo/osinfo_os.h:30,
> >  from ../osinfo/osinfo.h:55,
> >  from osinfo_avatar_format.c:28:
> > ../osinfo/osinfo_media.h:68: error: redefinition of typedef 'OsinfoMedia'
> > ../osinfo/osinfo_install_script.h:43: error: previous declaration of 
> > 'OsinfoMedia' was here
> > 
> > To avoid redefinition, use forward-declaration in a similar way
> > like it's done for OsinfoOs in osinfo/osinfo_os.h.
> 
> ping
> 
> > ---
> >  osinfo/osinfo_media.h | 7 +--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/osinfo/osinfo_media.h b/osinfo/osinfo_media.h
> > index 8ad39c4..09fbacd 100644
> > --- a/osinfo/osinfo_media.h
> > +++ b/osinfo/osinfo_media.h
> > @@ -65,8 +65,11 @@ typedef enum {
> >  #define OSINFO_IS_MEDIA_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE 
> > ((klass), OSINFO_TYPE_MEDIA))
> >  #define OSINFO_MEDIA_GET_CLASS(obj)(G_TYPE_INSTANCE_GET_CLASS 
> > ((obj), OSINFO_TYPE_MEDIA, OsinfoMediaClass))
> >  
> > -typedef struct _OsinfoMediaOsinfoMedia;
> > -
> > +/*
> > + * Forward declared in osinfo_install_script.h
> > + *
> > + * typedef struct _OsinfoMediaOsinfoMedia;
> > + */
> >  typedef struct _OsinfoMediaClass   OsinfoMediaClass;
> >
> >  typedef struct _OsinfoMediaPrivate OsinfoMediaPrivate;

ACK & pushed

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] Moving GIT repo to gitlab.com

2016-03-03 Thread Daniel P. Berrange
On Thu, Mar 03, 2016 at 03:11:10PM +0100, Christophe Fergeau wrote:
> On Thu, Mar 03, 2016 at 02:57:09PM +0100, Fabiano Fidêncio wrote:
> > On Thu, Mar 3, 2016 at 2:55 PM, Zeeshan Ali (Khattak)
> >  wrote:
> > > Hi Daniel,
> > >
> > > Yeah, I have no objections on moving to gitlab.
> > 
> > Same here, fine by me.
> 
> No objections either.

Thanks folks. Please go ahead & create yourself a login account on
gitlab.com and tell me your username

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] Splitting off the database (and tools)

2016-03-03 Thread Daniel P. Berrange
I've talked about splitting off the database several times in the past,
and I think we're now in a position to do exactly that.

The two core goals of splitting off the database are

 - Make it easy to issue updates to the DB without updating the code.
   This will help LTS distros which are often loathe to upgrade the
   code, but still wish to pull in DB refreshes frequently

 - Enable apps to consume the database without going via the libosinfo
   library API. libguestfs already does this, and openstack wants todo
   this, so they can avoid a dep on c libraries for python access

Anyway, my thoughts on the approach to doing this are as follows..

 - We want some way to deploy a downloaded database into the right
   place. a "osinfo-db-import" tool.

 - We want some way to take a directory containing a database and
   bundle it into distributable format, merging translations as
   it goes. a "osinfo-db-export" tool

Both of these would basically be thin wrappers around tar or zip I
think.

We already have an "osinfo-db-validate" tool that is used to validate
the database against the published schema.

So, I'm thinking we should create a 'osinfo-db-tools' package / GIT
repo which contains the RNG schema, and the aforementioned tools.
This would be the minimal set of C tools that something like OpenStack
would want to use & depend of.  I would create thisi GIT repo by taking
the current GIT repo & just trimming the bits that are not applicable.
That way we keep GIT history intact for the existing RNG schema and
osinfo-db-validate tool.

For the actual database we would have a 'osinfo-db' package & GIT
repo. This would *not* contain any automake/autoconf stuff. It would
contain the actual XML files for the DB, test data (all the .iso header
text files) and .po files with translations for the XML. To publish the
contents of this GIT repo, we'd simply use the osinfo-db-export tool to
create a distributable archive of it. Again, I'd start with current GIT
and just trim out bits to leave what we want, to preserve GIT history

The current libosinfo GIT repository would have its data/ directory,
the tools/osinfo-db-validate and tests/isodata/ files deleted. Its
RPM would gain a Requires: on osinfo-db-tools and osinfo-db, so that
from end user point the upgrade path is seemless.

For the osinfo-db package I don't think we'd bother doing formal
releases manually. Instead I think I'd just setup a cron job that
runs osinfo-db-export and publishes the result on libosinfo.org
once a day. So we'll always have latest data published for consumption.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] Moving GIT repo to gitlab.com

2016-03-03 Thread Daniel P. Berrange
On Thu, Mar 03, 2016 at 01:38:24PM +, Daniel P. Berrange wrote:
> So I'm suggesting we immediately migrate to gitlab.com. Assuming that's
> fine with current committers, I'll setup the project org & import hte
> git repo. Each committer would just have to create themselves a login
> account so I can add them.

Ok the new GIT repository is live at

   https://gitlab.com/libosinfo/libosinfo/

The following people are set as adminstrators, myself, Christophe, Zeeshan,
and Fabiano.

I've deleted the old code in fedorahosted and pushed a readme pointing
to the new location.

The website is updated with new links.

You can update your local GIT checkout to point to the new location
as follows:

 - Remove old location

   git remote rm origin

 - Add new location, either for commit access:

   git remote add origin g...@gitlab.com:libosinfo/libosinfo.git

   or readonly access

   git remote add origin https://gitlab.com/libosinfo/libosinfo.git

 - Setup local master to point to new location

   git fetch origin
   git branch --set-upstream-to origin/master master

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH] fedora,script: Allow passwordless SSH

2016-04-22 Thread Daniel P. Berrange
On Fri, Apr 22, 2016 at 12:58:40PM +0100, Zeeshan Ali (Khattak) wrote:
> If either user or admin accounts are passwordless, configure SSH server
> to allow empty passwords so these accounts can login through SSH.
> ---
>  .../fedoraproject.org/fedora-kickstart-desktop.xml.in   | 6 
> ++
>  1 file changed, 6 insertions(+)

Do we really want todo this. IMHO apps should be enforcing a
non-zero length password for the accounts created by install
scripts.  Configuring password-less ssh is madness given the
modern hostile network environments, even on intranets.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH] fedora,script: Allow passwordless SSH

2016-04-22 Thread Daniel P. Berrange
On Fri, Apr 22, 2016 at 01:17:24PM +0100, Zeeshan Ali (Khattak) wrote:
> HI Daniel,
> 
> On Fri, Apr 22, 2016 at 1:00 PM, Daniel P. Berrange  
> wrote:
> > On Fri, Apr 22, 2016 at 12:58:40PM +0100, Zeeshan Ali (Khattak) wrote:
> >> If either user or admin accounts are passwordless, configure SSH server
> >> to allow empty passwords so these accounts can login through SSH.
> >> ---
> >>  .../fedoraproject.org/fedora-kickstart-desktop.xml.in   | 6 
> >> ++
> >>  1 file changed, 6 insertions(+)
> >
> > Do we really want todo this. IMHO apps should be enforcing a
> > non-zero length password for the accounts created by install
> > scripts.  Configuring password-less ssh is madness given the
> > modern hostile network environments, even on intranets.
> 
> Well without this patch, there is no way of SSHing into the guest if
> user/app chooses to have no password. Currently that is the default in
> Boxes but maybe Boxes should warn about it being unsecure but I think
> if user want passwordless machine, that is precisely what they should
> get.

IMHO it is irresponsible to configure VMs to allow network based
access with zero authentication. The only valid case where I can
see having no password is if you have instead injected an SSH
public key to allow key based login access. So rather than this
patch to modify the SSH server to turn off all auth, how about
adding config parameter to associate an SSH public key with
the user account.


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH] media: Fix misplaced parenthesis in strncmp use

2016-05-11 Thread Daniel P. Berrange
On Wed, May 11, 2016 at 02:26:27PM +0200, Christophe Fergeau wrote:
> Due to a misplaced parenthesis, bootable media detection was doing
> strncmp(.., .., sizeof(..) != 0)
> instead of
> strncmp(.., .., sizeof(..)) != 0
> 
> This means we were comparing 1 character from BOOTABLE_TAG rather than
> the full string.
> ---
>  osinfo/osinfo_media.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c
> index d9fcba6..f7bf120 100644
> --- a/osinfo/osinfo_media.c
> +++ b/osinfo/osinfo_media.c
> @@ -713,7 +713,7 @@ static void on_svd_read(GObject *source,
>  
>  data->svd.system[MAX_SYSTEM - 1] = 0;
>  
> -if (strncmp(BOOTABLE_TAG, data->svd.system, sizeof(BOOTABLE_TAG) != 0)) {
> +if (strncmp(BOOTABLE_TAG, data->svd.system, sizeof(BOOTABLE_TAG)) != 0) {
>  g_set_error(&error,
>  OSINFO_MEDIA_ERROR,
>  OSINFO_MEDIA_ERROR_NOT_BOOTABLE,

ACK, this kind of thing is why we banned strncmp in libvirt :-) If anyone
is feeling motiviated, libosinfo shold be made to use g_str_equal() instead
and get 'make syntax-check' to block use of strcmp & friends to.


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] [osinfo-db-tools 0/2] Start new osinfo-db-tools package

2016-05-13 Thread Daniel P. Berrange
As mentioned previously we need to split off the database
from the main libosinfo library. In order todo so, we need
some tools to manage the database. One of those is the
pre-existing osinfo-db-validate command, but in future
it will be joined by osinfo-db-import & osinfo-db-export
to let admins import/export tar.gz or zip (TBD) archives
of the database independantly of the libosinfo library
releases.

The new repository is at:

   https://gitlab.com/libosinfo/osinfo-db-tools

and all existing committers of libosinfo git should have
equal access to the new repository.

The new repository used git filter-branch to preserve
the original git history for the files that were kept.

These two patches (which are already committed to master)
show the small fixes done after filtering the git history
to get the build and RPMs working

The project is starting with a version number of 1.0.0,
since it really is pointless to live for years with a
version number < 1.0.0, when the package is already being
shipped & used in enterprise distros.

Daniel P. Berrange (2):
  Fix build system after creating initial repository
  Import trimmed translations from libosinfo project

 .gitignore|   51 +-
 AUTHORS.in|8 +-
 Makefile.am   |   27 +-
 NEWS  |  496 +--
 README|   23 +-
 autobuild.sh  |4 +-
 autogen.sh|4 +-
 cfg.mk|   11 -
 configure.ac  |  265 +-
 docs/Makefile.am  |2 +-
 docs/object-model.fig |  113 ---
 libosinfo.spec.in |  144 
 mingw-libosinfo.spec.in   |  141 
 mingw-osinfo-db-tools.spec.in |   85 ++
 osinfo-db-tools.spec.in   |   39 +
 po/LINGUAS|   95 +++
 po/POTFILES.in|1 +
 po/af.po  |   76 ++
 po/am.po  |   76 ++
 po/anp.po |   76 ++
 po/ar.po  |   77 ++
 po/as.po  |   76 ++
 po/ast.po |   76 ++
 po/bal.po |   76 ++
 po/be.po  |   77 ++
 po/bg.po  |   76 ++
 po/bn.po  |   76 ++
 po/bn_IN.po   |   76 ++
 po/bo.po  |   76 ++
 po/br.po  |   76 ++
 po/brx.po |   76 ++
 po/bs.po  |   77 ++
 po/ca.po  | 1584 ++
 po/cs.po  |   76 ++
 po/cy.po  |   77 ++
 po/da.po  |   76 ++
 po/de.po  | 1234 +++
 po/de_CH.po   |   76 ++
 po/el.po  |   76 ++
 po/en_GB.po   |   76 ++
 po/eo.po  |   76 ++
 po/es.po  |  959 +
 po/et.po  |   76 ++
 po/eu.po  |   76 ++
 po/fa.po  |   76 ++
 po/fi.po  |   76 ++
 po/fr.po  | 1866 +
 po/gl.po  |   76 ++
 po/gu.po  |   76 ++
 po/he.po  |   76 ++
 po/hi.po  |   76 ++
 po/hr.po  |   77 ++
 po/hu.po  |   76 ++
 po/ia.po  |   76 ++
 po/id.po  |   76 ++
 po/ilo.po |   76 ++
 po/is.po  |   76 ++
 po/it.po  |   76 ++
 po/ja.po  | 1235 +++
 po/ka.po  |   76 ++
 po/kk.po  |   76 ++
 po/km.po  |   76 ++
 po/kn.po  |   76 ++
 po/ko.po  |   76 ++
 po/kw.po  |   77 ++
 po/k...@kkcor.po|   77 ++
 po/k...@uccor.po|   77 ++
 po/kw_GB.po   |   77 ++
 po/ky.po  |   76 ++
 po/lt.po  |   77 ++
 po/lv.po  |   77 ++
 po/mai.po |   76 ++
 po/mk.po  |   76 ++
 po/ml.po  |   76 ++
 po/mn.po  |   76 ++
 po/mr.po  |   76 ++
 po/ms.po  |   76 ++
 po/nb.po  |   76 ++
 po/nds.po |   76 ++
 po/ne.po  |   76 ++
 po/nl.po  |   76 ++
 po/nn.po  |   76 ++
 po/nso.po |   76 ++
 po/or.po  |   76 ++
 po/pa.po  |   76 ++
 po/pl.po  | 1590 +++
 po/pt.po  |   76 ++
 po/pt_BR.po  

[Libosinfo] [PATCH] Remove osinfo-db-validate tool

2016-05-13 Thread Daniel P. Berrange
A new osinfo-db-tools package has been forked off from the
libosinfo package. This contains the osinfo-db-validate
tool, so it is no longer neccessary to include it here.

Signed-off-by: Daniel P. Berrange 
---
 .gitignore |   3 -
 libosinfo.spec.in  |   3 +-
 mingw-libosinfo.spec.in|   4 +-
 po/POTFILES.in |   1 -
 tools/Makefile.am  |  11 +-
 tools/osinfo-db-validate.c | 350 -
 6 files changed, 5 insertions(+), 367 deletions(-)
 delete mode 100644 tools/osinfo-db-validate.c

diff --git a/.gitignore b/.gitignore
index 1cc9e2f..b8c42ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -76,9 +76,6 @@ data/usb.ids
 tools/osinfo-detect
 tools/osinfo-detect.1
 tools/osinfo-detect.exe
-tools/osinfo-db-validate
-tools/osinfo-db-validate.exe
-tools/osinfo-db-validate.1
 tools/osinfo-query
 tools/osinfo-query.1
 tools/osinfo-query.exe
diff --git a/libosinfo.spec.in b/libosinfo.spec.in
index 0feed84..6647341 100644
--- a/libosinfo.spec.in
+++ b/libosinfo.spec.in
@@ -33,6 +33,7 @@ BuildRequires: hwdata
 BuildRequires: gobject-introspection-devel
 %endif
 Requires: hwdata
+Requires: osinfo-db-tools
 
 %description
 libosinfo is a library that allows virtualization provisioning tools to
@@ -102,7 +103,6 @@ rm -fr %{buildroot}
 %defattr(-, root, root)
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
 %{_bindir}/osinfo-detect
-%{_bindir}/osinfo-db-validate
 %{_bindir}/osinfo-query
 %{_bindir}/osinfo-install-script
 %dir %{_datadir}/libosinfo/
@@ -114,7 +114,6 @@ rm -fr %{buildroot}
 %{_datadir}/libosinfo/db/platform
 %{_datadir}/libosinfo/db/install-script
 %{_datadir}/libosinfo/schemas/libosinfo.rng
-%{_mandir}/man1/osinfo-db-validate.1*
 %{_mandir}/man1/osinfo-detect.1*
 %{_mandir}/man1/osinfo-query.1*
 %{_mandir}/man1/osinfo-install-script.1*
diff --git a/mingw-libosinfo.spec.in b/mingw-libosinfo.spec.in
index 16c5699..c69ec8b 100644
--- a/mingw-libosinfo.spec.in
+++ b/mingw-libosinfo.spec.in
@@ -42,6 +42,7 @@ combination.
 Summary: %{summary}
 
 Requires: pkgconfig
+Requires: mingw32-osinfo-db-tools
 
 %description -n mingw32-libosinfo
 libosinfo is a library that allows virtualization provisioning tools to
@@ -52,6 +53,7 @@ combination.
 Summary: %{summary}
 
 Requires: pkgconfig
+Requires: mingw64-osinfo-db-tools
 
 %description -n mingw64-libosinfo
 libosinfo is a library that allows virtualization provisioning tools to
@@ -91,7 +93,6 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc
 %files -n mingw32-libosinfo
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
 %{mingw32_bindir}/osinfo-detect.exe
-%{mingw32_bindir}/osinfo-db-validate.exe
 %{mingw32_bindir}/osinfo-install-script.exe
 %{mingw32_bindir}/osinfo-query.exe
 %{mingw32_bindir}/libosinfo-1.0-0.dll
@@ -116,7 +117,6 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc
 %files -n mingw64-libosinfo
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
 %{mingw64_bindir}/osinfo-detect.exe
-%{mingw64_bindir}/osinfo-db-validate.exe
 %{mingw64_bindir}/osinfo-install-script.exe
 %{mingw64_bindir}/osinfo-query.exe
 %{mingw64_bindir}/libosinfo-1.0-0.dll
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5af54e3..0385517 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -427,7 +427,6 @@ osinfo/osinfo_product.c
 osinfo/osinfo_resources.c
 osinfo/osinfo_tree.c
 osinfo/osinfo_os_variant.c
-tools/osinfo-db-validate.c
 tools/osinfo-detect.c
 tools/osinfo-install-script.c
 tools/osinfo-query.c
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 7f7249f..60515e6 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -8,9 +8,9 @@ AM_CFLAGS = $(GOBJECT_CFLAGS) \
-I$(top_srcdir) \
 $(NULL)
 
-bin_PROGRAMS = osinfo-detect osinfo-db-validate osinfo-query 
osinfo-install-script
+bin_PROGRAMS = osinfo-detect osinfo-query osinfo-install-script
 
-man1_MANS = osinfo-db-validate.1 osinfo-detect.1 osinfo-query.1 
osinfo-install-script.1
+man1_MANS = osinfo-detect.1 osinfo-query.1 osinfo-install-script.1
 
 CLEANFILES = $(man1_MANS)
 
@@ -26,13 +26,6 @@ osinfo_detect_LDADD = $(GOBJECT_LIBS)\
  $(LIBXML_LIBS)\
  $(top_builddir)/osinfo/libosinfo-1.0.la
 
-osinfo_db_validate_SOURCES = osinfo-db-validate.c
-osinfo_db_validate_LDADD = $(GOBJECT_LIBS) \
- $(GIO_LIBS)   \
- $(GLIB_LIBS)  \
- $(LIBXML_LIBS)\
- $(top_builddir)/osinfo/libosinfo-1.0.la
-
 osinfo_query_SOURCES = osinfo-query.c
 osinfo_query_LDADD = $(GOBJECT_LIBS)   \
  $(GIO_LIBS)   \
diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
deleted file mode 100644
index 965ed0e..000
--- a/tools/osinfo-db-validate.c
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (C) 2012 Red Hat, Inc
- *
- * osinfo-validate: validate that XML file(s) follows the published schema
- *
- * This

[Libosinfo] [osinfo-db-tools 1/2] Fix build system after creating initial repository

2016-05-13 Thread Daniel P. Berrange
The initial repository state was created from libosinfo
GIT at revision:

  commit 501541a336cd29d3da48584f022ce329fef418dd
  Author: Fabiano Fidêncio 
  Date:   Thu May 12 18:54:58 2016 +0200

win,installer: Fix "Windwos" typo

It was initialized using the following commands:

 $ git clone libosinfo osinfo-db-tools
 $ cd osinfo-db-tools
 $ git filter-branch --index-filter 'git rm -r --cached \
  --ignore-unmatch src examples data db test \
  docs/reference tools/osinfo-detect.c \
  tools/osinfo-install-script.c \
  tools/osinfo-query.c po osinfo' HEAD
 $ git filter-branch -f --prune-empty HEAD
 $ git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git 
update-ref -d
 $ git reflog expire --expire=now --all
 $ git gc --prune=now

This patch now edits the various build system files to
remove references to bits of the tree that were deleted,
and rename from libosinfo to osinfo-db-tools.

Currently this module contains a single command

  osinfo-db-validate

It will later be augmented with tools for importing
and exporting database archives.

Signed-off-by: Daniel P. Berrange 
---
 .gitignore|  51 +
 AUTHORS.in|   8 +-
 Makefile.am   |  27 +--
 NEWS  | 496 +-
 README|  23 +-
 autobuild.sh  |   4 +-
 autogen.sh|   4 +-
 cfg.mk|  11 -
 configure.ac  | 265 +-
 docs/Makefile.am  |   2 +-
 docs/object-model.fig | 113 --
 libosinfo.spec.in | 144 
 mingw-libosinfo.spec.in   | 141 
 mingw-osinfo-db-tools.spec.in |  85 
 osinfo-db-tools.spec.in   |  39 
 po/LINGUAS|  95 
 po/POTFILES.in|   1 +
 po/zanata.xml | 106 +
 tools/Makefile.am |  27 +--
 19 files changed, 355 insertions(+), 1287 deletions(-)
 delete mode 100644 docs/object-model.fig
 delete mode 100644 libosinfo.spec.in
 delete mode 100644 mingw-libosinfo.spec.in
 create mode 100644 mingw-osinfo-db-tools.spec.in
 create mode 100644 osinfo-db-tools.spec.in
 create mode 100644 po/LINGUAS
 create mode 100644 po/POTFILES.in
 create mode 100644 po/zanata.xml

diff --git a/.gitignore b/.gitignore
index 1cc9e2f..03c5264 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,64 +32,15 @@ intltool-update.in
 libtool
 m4
 stamp-h1
-test/test-skeleton
-test/test-skeleton.sh
-osinfo/libosinfo.pc
-osinfo/Libosinfo-1.0.gir
-osinfo/Libosinfo-1.0.typelib
-osinfo/libosinfo-1.0.vapi
-osinfo/osinfo_enum_types.[ch]
-osinfo/osinfo_version.h
-*.gcno
-*.gcda
-coverage/
 *.spec
-*.pc
-test/test-device
-test/test-os
-test/test-entity
-test/test-hypervisor
-test/test-list
-test/test-db
-test/test-devicelist
-test/test-filter
-test/test-hypervisorlist
-test/test-install-script
-test/test-loader
-test/test-productfilter
-test/test-oslist
-test/test-product
-test/test-platform
-test/test-platformlist
-test/test-isodetect
-test/test-mediauris
-test/test-treeuris
-test/*.log
-test/*.trs
 build/
-gtk-doc.make
-data/95-osinfo.rules
-data/*/*/*.xml
-data/*/*/*/*.xml
-data/pci.ids
-data/usb.ids
-tools/osinfo-detect
-tools/osinfo-detect.1
-tools/osinfo-detect.exe
 tools/osinfo-db-validate
 tools/osinfo-db-validate.exe
 tools/osinfo-db-validate.1
-tools/osinfo-query
-tools/osinfo-query.1
-tools/osinfo-query.exe
-tools/osinfo-install-script
-tools/osinfo-install-script.exe
-tools/osinfo-install-script.1
-docs/reference/Libosinfo.types
 po/.intltool-merge-cache
 po/Makefile.in.in
 po/POTFILES
-po/libosinfo.pot
+po/osinfo-db-tools.pot
 po/stamp-it
 po/Makevars.template
 po/Rules-quot
diff --git a/AUTHORS.in b/AUTHORS.in
index 1f7ca5c..397100c 100644
--- a/AUTHORS.in
+++ b/AUTHORS.in
@@ -1,15 +1,11 @@
-   libosinfo Authors
-   =
+   osinfo-db-tools Authors
+   ===
 
 Current maintainers:
 
   Zeeshan Ali (Khattak) 
   Daniel P. Berrange 
 
-Previous maintainers:
-
-  Arjun Roy 
-
 Patches contributed by:
 
 #authorslist#
diff --git a/Makefile.am b/Makefile.am
index 32db4c3..de95eef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 
-SUBDIRS = osinfo data test tools docs po examples
+SUBDIRS = tools docs po
 
 INTLTOOL_FILES = \
intltool-extract.in \
@@ -16,9 +16,9 @@ DISTCLEANFILES =  \
 
 EXTRA_DIST = \
   COPYING.LIB \
-  libosinfo.spec \
-  libosinfo.spec.in \
-  mingw-libosinfo.spec.in \
+  osinfo-db-tools.spec \
+  osinfo-db-tools.spec.in \
+  mingw-osinfo-db-tools.spec.in \
   build-aux/mktempd \
   cfg.mk \
   GNUmakefile \
@@ -39,27 +39,8 @@ MAINTAINERCLEANFILES =   \
po/remove-potcdate.sin  \
$(NULL)
 
-DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
-
 ACLOCAL_AMFLAGS = -I m4
 
-

Re: [Libosinfo] [osinfo-db-tools 0/2] Start new osinfo-db-tools package

2016-05-13 Thread Daniel P. Berrange
On Fri, May 13, 2016 at 04:24:52PM +0100, Zeeshan Ali (Khattak) wrote:
> Hi Daniel,
> 
> On Fri, May 13, 2016 at 12:56 PM, Daniel P. Berrange
>  wrote:
> > As mentioned previously we need to split off the database
> > from the main libosinfo library. In order todo so, we need
> > some tools to manage the database. One of those is the
> > pre-existing osinfo-db-validate command, but in future
> > it will be joined by osinfo-db-import & osinfo-db-export
> > to let admins import/export tar.gz or zip (TBD) archives
> > of the database independantly of the libosinfo library
> > releases.
> >
> > The new repository is at:
> >
> >https://gitlab.com/libosinfo/osinfo-db-tools
> 
> I understand and agree that we need a separate repo/package for db but
> why a separate repo for tools? Why can't this be part of -db itself or
> kept as part of libosinfo even?

The actual 'osinfo-db' package should be 100% data - we don't want to
have any shipped code in it at all. Beyond that the general point is
to decouple the concept of libosinfo the API, from osinfo the database,
to better serve projects which do not wish to use libosinfo the API.

As part of this decoupling there's a clear need for some tools to
manage the deployment and distribution of the database, irrespective
of whether you are installing / using the libosinfo API. So the intent
is that 'osinfo-db-tools' provides the home for those tools that are
just focusing on managing the database deployment/distribution, and
are something everyone can depend on using.

Now, we could have the DB tools as part of libosinfo GIT and just
package them in a separate RPM, but that introduces a mutual
dependancy between osinfo-db & libosinfo. You need to tools to
deploy the osinfo-db content, but libosinfo in turn wants the DB.

Further there's no real compelling benefit to having them in the
same repository - the anticipated osinfo-db-* tools won't share
any code with the rest of the osinfo programs, since they are not
based around use of the libosinfo API - they merely use glib and
other related 3rd party libraries.

So thing of this as providing distinct layers of the stack


 +---+ ++  +---+ +--+
 | openstack | | libguestfs |  | Boxes | | virt-manager |
 +---+ ++  +---+ +--+
 | |  |   |
 v v  v   v
   +-+ +---+
   |osinfo-db|<| libosinfo |
   +-+ +---+
   |
   v
   +-+
   | osinfo-db-tools |
   +-+

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [osinfo-db-tools 0/2] Start new osinfo-db-tools package

2016-05-13 Thread Daniel P. Berrange
On Fri, May 13, 2016 at 05:35:15PM +0100, Zeeshan Ali (Khattak) wrote:
> Hi Daniel,
> 
> Thanks for the very long explanation (I especially appreciated the
> ascii-art diagram) but I don't quite agree.
> 
> While I don't see any harm in -db not depending on libosinfo, I really
> don't see the benefit of going as far as to providing a separate
> package for db tools. The -db does not necessarily be only data
> either. I'd just keep the tools in -db or libosinfo and avoid the
> maintenance and packaging headache.

Actually I think it would make maintenance easier because it avoids
tieing together things that would naturally evolve seprately. For
example, there could be cases where a distro would want to update
the DB management tools, but not pull in a new library version,
or vica-verca. Letting these things evolve separately with their
own release schedules will make life simpler for people consuming
them, as they won't be faced with mutually exclusive decisions about
which updates to pull in if they want to rebase some parts but not
others.

This may not sound like a big deal when all osinfo-db-tools contains
is a couple of command line tools for validate & unpacking archives,
but I've mentioned ideas before about providing tools to periodically
query & download updated database version, so the osinfo-db-tools
package is likely to gain more functionality & complexity over time.
So I think over the long term the split will be beneficial to all
involved.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [osinfo-db-tools 0/2] Start new osinfo-db-tools package

2016-05-19 Thread Daniel P. Berrange
On Fri, May 13, 2016 at 11:13:02PM +0100, Zeeshan Ali (Khattak) wrote:
> On Fri, May 13, 2016 at 5:56 PM, Daniel P. Berrange  
> wrote:
> > On Fri, May 13, 2016 at 05:35:15PM +0100, Zeeshan Ali (Khattak) wrote:
> >> Hi Daniel,
> >>
> >> Thanks for the very long explanation (I especially appreciated the
> >> ascii-art diagram) but I don't quite agree.
> >>
> >> While I don't see any harm in -db not depending on libosinfo, I really
> >> don't see the benefit of going as far as to providing a separate
> >> package for db tools. The -db does not necessarily be only data
> >> either. I'd just keep the tools in -db or libosinfo and avoid the
> >> maintenance and packaging headache.
> >
> > Actually I think it would make maintenance easier because it avoids
> > tieing together things that would naturally evolve seprately. For
> > example, there could be cases where a distro would want to update
> > the DB management tools, but not pull in a new library version,
> > or vica-verca. Letting these things evolve separately with their
> > own release schedules will make life simpler for people consuming
> > them, as they won't be faced with mutually exclusive decisions about
> > which updates to pull in if they want to rebase some parts but not
> > others.
> >
> > This may not sound like a big deal when all osinfo-db-tools contains
> > is a couple of command line tools for validate & unpacking archives,
> > but I've mentioned ideas before about providing tools to periodically
> > query & download updated database version, so the osinfo-db-tools
> > package is likely to gain more functionality & complexity over time.
> > So I think over the long term the split will be beneficial to all
> > involved.
> 
> But why are we being religious about "no code in -db" package?

It makes life much easier to get updates into distros. For example, if
the package is 100% pure data, then for RHEL we can likely get an exception
to allow updating of the data for every single release, as is done with
updating things like pci.ids & usb.ids package. If the rebase included
any amount of code / tools too, then there is increased risk and would
need to go through the normal update approval workflow.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] [PATCH db-tools 0/2] Add tools for database import/export

2016-06-16 Thread Daniel P. Berrange
Since we're soon going to start distributing the database as a
standalone archive, it'll be useful if we had tools which can
import/export between the local database filesystem tree and a
database archive file. While users/apps could just use 'tar'
directly, providing these tools makes life simpler as users
don't need to remember where the correct database locations
are.

For these tools I'm using libarchive since it is available on
all platforms (BSD, Linux, MinGW and OS-X). For the format it
is using the tar "pax" format (the latest POSIX tar format)
since it has unlimited filename/path lengths support, and the
'xz' compression scheme since it is by far the best at compressing
these XML files.


Daniel P. Berrange (2):
  Add osinfo-db-import tool for unpacking an osinfo database archive
  Add osinfo-db-export tool for packing an osinfo database archive

 .gitignore|   6 +
 configure.ac  |   1 +
 mingw-osinfo-db-tools.spec.in |   8 +-
 osinfo-db-tools.spec.in   |   5 +
 po/POTFILES.in|   2 +
 tools/Makefile.am |  18 +-
 tools/osinfo-db-export.c  | 621 ++
 tools/osinfo-db-import.c  | 468 +++
 8 files changed, 1125 insertions(+), 4 deletions(-)
 create mode 100644 tools/osinfo-db-export.c
 create mode 100644 tools/osinfo-db-import.c

-- 
2.5.5

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


[Libosinfo] [PATCH db-tools 2/2] Add osinfo-db-export tool for packing an osinfo database archive

2016-06-16 Thread Daniel P. Berrange
Add a new osinfo-db-export tool which creates an archive in the
tar (pax) format, with XZ compression and can filling it with the
database files from one of the standard libosinfo database locations,
or a custom directory.

This makes it easy for users to create their own local custom database
content and then distribute and import it on many machines. It will
also be used for creating official release archives of the libosinfo
database from upstream.

 $ osinfo-db-export --verbose  osinfo-db-2016-06-15.tar.xz
 osinfo-db-export: d osinfo-db-2016-06-15/
 osinfo-db-export: d osinfo-db-2016-06-15/datamaps
 osinfo-db-export: r osinfo-db-2016-06-15/datamaps/windows-lang.xml
 osinfo-db-export: r osinfo-db-2016-06-15/datamaps/x11-keyboard.xml
 osinfo-db-export: d osinfo-db-2016-06-15/devices
 osinfo-db-export: r osinfo-db-2016-06-15/devices/qemu-pci.xml
 osinfo-db-export: r osinfo-db-2016-06-15/devices/qemu-ps2.xml
 osinfo-db-export: r osinfo-db-2016-06-15/devices/qemu-usb.xml
 osinfo-db-export: r osinfo-db-2016-06-15/devices/virtio-pci.xml
 osinfo-db-export: r osinfo-db-2016-06-15/devices/xen.xml
 osinfo-db-export: d osinfo-db-2016-06-15/hypervisors
 osinfo-db-export: r osinfo-db-2016-06-15/hypervisors/kvm.xml
 ...snip...

Signed-off-by: Daniel P. Berrange 
---
 .gitignore|   3 +
 mingw-osinfo-db-tools.spec.in |   2 +
 osinfo-db-tools.spec.in   |   2 +
 po/POTFILES.in|   1 +
 tools/Makefile.am |  10 +-
 tools/osinfo-db-export.c  | 621 ++
 6 files changed, 637 insertions(+), 2 deletions(-)
 create mode 100644 tools/osinfo-db-export.c

diff --git a/.gitignore b/.gitignore
index 297976f..bda3aea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,6 +40,9 @@ tools/osinfo-db-validate.1
 tools/osinfo-db-import
 tools/osinfo-db-import.exe
 tools/osinfo-db-import.1
+tools/osinfo-db-export
+tools/osinfo-db-export.exe
+tools/osinfo-db-export.1
 po/.intltool-merge-cache
 po/Makefile.in.in
 po/POTFILES
diff --git a/mingw-osinfo-db-tools.spec.in b/mingw-osinfo-db-tools.spec.in
index f3035f9..870b2e4 100644
--- a/mingw-osinfo-db-tools.spec.in
+++ b/mingw-osinfo-db-tools.spec.in
@@ -74,12 +74,14 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/man
 
 %files -n mingw32-osinfo-db-tools
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
+%{mingw32_bindir}/osinfo-db-export.exe
 %{mingw32_bindir}/osinfo-db-import.exe
 %{mingw32_bindir}/osinfo-db-validate.exe
 %{mingw32_datadir}/locale/*/LC_MESSAGES/osinfo-db-tools.mo
 
 %files -n mingw64-osinfo-db-tools
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
+%{mingw64_bindir}/osinfo-db-export.exe
 %{mingw64_bindir}/osinfo-db-import.exe
 %{mingw64_bindir}/osinfo-db-validate.exe
 %{mingw64_datadir}/locale/*/LC_MESSAGES/osinfo-db-tools.mo
diff --git a/osinfo-db-tools.spec.in b/osinfo-db-tools.spec.in
index 1295f6e..d125751 100644
--- a/osinfo-db-tools.spec.in
+++ b/osinfo-db-tools.spec.in
@@ -34,8 +34,10 @@ information about operating systems for use with 
virtualization
 %files -f %{name}.lang
 %defattr(-, root, root)
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
+%{_bindir}/osinfo-db-export
 %{_bindir}/osinfo-db-import
 %{_bindir}/osinfo-db-validate
+%{_mandir}/man1/osinfo-db-export.1*
 %{_mandir}/man1/osinfo-db-import.1*
 %{_mandir}/man1/osinfo-db-validate.1*
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c1e69ef..6688a2d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,2 +1,3 @@
+tools/osinfo-db-export.c
 tools/osinfo-db-import.c
 tools/osinfo-db-validate.c
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 5ade53a..701fbe4 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -10,9 +10,9 @@ AM_CFLAGS = $(GOBJECT_CFLAGS) \
-I$(top_srcdir) \
 $(NULL)
 
-bin_PROGRAMS = osinfo-db-validate osinfo-db-import
+bin_PROGRAMS = osinfo-db-validate osinfo-db-import osinfo-db-export
 
-man1_MANS = osinfo-db-validate.1 osinfo-db-import.1
+man1_MANS = osinfo-db-validate.1 osinfo-db-import.1 osinfo-db-export.1
 
 CLEANFILES = $(man1_MANS)
 
@@ -32,3 +32,9 @@ osinfo_db_import_LDADD = $(GOBJECT_LIBS)  \
  $(GIO_LIBS)   \
  $(GLIB_LIBS)  \
  $(LIBARCHIVE_LIBS)
+
+osinfo_db_export_SOURCES = osinfo-db-export.c
+osinfo_db_export_LDADD = $(GOBJECT_LIBS)   \
+ $(GIO_LIBS)   \
+ $(GLIB_LIBS)  \
+ $(LIBARCHIVE_LIBS)
diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
new file mode 100644
index 000..ea68645
--- /dev/null
+++ b/tools/osinfo-db-export.c
@@ -0,0 +1,621 @@
+/*
+ * Copyright (C) 2016 Red Hat, Inc
+ *
+ * osinfo-db-export: export a database archive
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option

[Libosinfo] [PATCH db-tools 1/2] Add osinfo-db-import tool for unpacking an osinfo database archive

2016-06-16 Thread Daniel P. Berrange
Add a new osinfo-db-import tool which takes an archive in the
tar (pax) format, with XZ compression and can extract its contents
into one of the standard libosinfo database locations.

This makes it easy for users to download new copies of the
database and unpack them in the right place.

eg

 $ osinfo-db-import -v osinfo-db-2016-06-15.tar.xz
 osinfo-db-import: d osinfo-db-2016-06-15/
 osinfo-db-import: r osinfo-db-2016-06-15/pci.ids
 osinfo-db-import: r osinfo-db-2016-06-15/usb.ids
 osinfo-db-import: d osinfo-db-2016-06-15/datamaps/
 osinfo-db-import: r osinfo-db-2016-06-15/datamaps/windows-lang.xml
 osinfo-db-import: r osinfo-db-2016-06-15/datamaps/x11-keyboard.xml
 osinfo-db-import: d osinfo-db-2016-06-15/devices/
 osinfo-db-import: r osinfo-db-2016-06-15/devices/qemu-pci.xml
 osinfo-db-import: r osinfo-db-2016-06-15/devices/qemu-ps2.xml
 osinfo-db-import: r osinfo-db-2016-06-15/devices/qemu-usb.xml
 osinfo-db-import: r osinfo-db-2016-06-15/devices/virtio-pci.xml
 osinfo-db-import: r osinfo-db-2016-06-15/devices/xen.xml
 ...snip...

Signed-off-by: Daniel P. Berrange 
---
 .gitignore|   3 +
 configure.ac  |   1 +
 mingw-osinfo-db-tools.spec.in |   6 +-
 osinfo-db-tools.spec.in   |   3 +
 po/POTFILES.in|   1 +
 tools/Makefile.am |  12 +-
 tools/osinfo-db-import.c  | 468 ++
 7 files changed, 490 insertions(+), 4 deletions(-)
 create mode 100644 tools/osinfo-db-import.c

diff --git a/.gitignore b/.gitignore
index 03c5264..297976f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,6 +37,9 @@ build/
 tools/osinfo-db-validate
 tools/osinfo-db-validate.exe
 tools/osinfo-db-validate.1
+tools/osinfo-db-import
+tools/osinfo-db-import.exe
+tools/osinfo-db-import.1
 po/.intltool-merge-cache
 po/Makefile.in.in
 po/POTFILES
diff --git a/configure.ac b/configure.ac
index 28e0fc6..49fae1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,6 +42,7 @@ GLIB_ENCODED_VERSION="GLIB_VERSION_2_36"
 
 PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= 2.6.0])
 PKG_CHECK_MODULES([LIBXSLT], [libxslt >= 1.0.0])
+PKG_CHECK_MODULES([LIBARCHIVE], [libarchive >= 3.0.0])
 
 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $GLIB_MINIMUM_VERSION gobject-2.0 
gio-2.0])
 GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=$GLIB_ENCODED_VERSION"
diff --git a/mingw-osinfo-db-tools.spec.in b/mingw-osinfo-db-tools.spec.in
index 750b060..f3035f9 100644
--- a/mingw-osinfo-db-tools.spec.in
+++ b/mingw-osinfo-db-tools.spec.in
@@ -26,8 +26,8 @@ BuildRequires: mingw32-libxml2
 BuildRequires: mingw64-libxml2
 BuildRequires: mingw32-libxslt
 BuildRequires: mingw64-libxslt
-BuildRequires: mingw32-libsoup
-BuildRequires: mingw64-libsoup
+BuildRequires: mingw32-libarchive
+BuildRequires: mingw64-libarchive
 
 BuildRequires: pkgconfig
 
@@ -74,11 +74,13 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/man
 
 %files -n mingw32-osinfo-db-tools
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
+%{mingw32_bindir}/osinfo-db-import.exe
 %{mingw32_bindir}/osinfo-db-validate.exe
 %{mingw32_datadir}/locale/*/LC_MESSAGES/osinfo-db-tools.mo
 
 %files -n mingw64-osinfo-db-tools
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
+%{mingw64_bindir}/osinfo-db-import.exe
 %{mingw64_bindir}/osinfo-db-validate.exe
 %{mingw64_datadir}/locale/*/LC_MESSAGES/osinfo-db-tools.mo
 
diff --git a/osinfo-db-tools.spec.in b/osinfo-db-tools.spec.in
index 6285ff1..1295f6e 100644
--- a/osinfo-db-tools.spec.in
+++ b/osinfo-db-tools.spec.in
@@ -12,6 +12,7 @@ BuildRequires: intltool
 BuildRequires: glib2-devel
 BuildRequires: libxml2-devel >= 2.6.0
 BuildRequires: libxslt-devel >= 1.0.0
+BuildRequires: libarchive-devel
 BuildRequires: /usr/bin/pod2man
 
 %description
@@ -33,7 +34,9 @@ information about operating systems for use with 
virtualization
 %files -f %{name}.lang
 %defattr(-, root, root)
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
+%{_bindir}/osinfo-db-import
 %{_bindir}/osinfo-db-validate
+%{_mandir}/man1/osinfo-db-import.1*
 %{_mandir}/man1/osinfo-db-validate.1*
 
 %changelog
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 31b35e2..c1e69ef 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1 +1,2 @@
+tools/osinfo-db-import.c
 tools/osinfo-db-validate.c
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 97a9cb6..5ade53a 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -3,14 +3,16 @@ AM_CFLAGS = $(GOBJECT_CFLAGS) \
$(GLIB_CFLAGS)\
$(LIBXML_CFLAGS)  \
-DPKGDATADIR="\"$(pkgdatadir)\"" \
+   -DDATA_DIR="\"$(datadir)\"" \
+   -DSYSCONFDIR="\"$(sysconfdir)\"" \
-DLOCALEDIR="\"$(datadir)/locale\"" \
$(WARN_CFLAGS) \
-I$(top_srcdir) \
 $(NULL)
 
-bin_PROGRAMS = osinfo-db-validate
+bin_PROGRAMS = osinfo-db-validate osinfo-db-import
 
-man1_MANS = o

[Libosinfo] [PATCH db-tools 03/11] Add a new osinfo-db-path tool for reporting db locations

2016-06-28 Thread Daniel P. Berrange
Applications or system administrators accessing the osinfo
database directly (instead of via the libosinfo API) will
need a well defined means of getting the standard database
locations. The osinfo-db-tool is a trivial command that
can serve this purpose. eg

$ osinfo-db-path --system
/usr/local/share/libosinfo/db

$ osinfo-db-path --user
/home/berrange/.config/libosinfo/db

Signed-off-by: Daniel P. Berrange 
---
 .gitignore|   3 +
 mingw-osinfo-db-tools.spec.in |   2 +
 osinfo-db-tools.spec.in   |   2 +
 po/POTFILES.in|   1 +
 tools/Makefile.am |   9 +-
 tools/osinfo-db-export.c  |   2 +-
 tools/osinfo-db-import.c  |   2 +-
 tools/osinfo-db-path.c| 223 ++
 8 files changed, 240 insertions(+), 4 deletions(-)
 create mode 100644 tools/osinfo-db-path.c

diff --git a/.gitignore b/.gitignore
index bda3aea..437d9bb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,9 @@ tools/osinfo-db-import.1
 tools/osinfo-db-export
 tools/osinfo-db-export.exe
 tools/osinfo-db-export.1
+tools/osinfo-db-path
+tools/osinfo-db-path.exe
+tools/osinfo-db-path.1
 po/.intltool-merge-cache
 po/Makefile.in.in
 po/POTFILES
diff --git a/mingw-osinfo-db-tools.spec.in b/mingw-osinfo-db-tools.spec.in
index 870b2e4..0fe1890 100644
--- a/mingw-osinfo-db-tools.spec.in
+++ b/mingw-osinfo-db-tools.spec.in
@@ -76,6 +76,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/man
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
 %{mingw32_bindir}/osinfo-db-export.exe
 %{mingw32_bindir}/osinfo-db-import.exe
+%{mingw32_bindir}/osinfo-db-path.exe
 %{mingw32_bindir}/osinfo-db-validate.exe
 %{mingw32_datadir}/locale/*/LC_MESSAGES/osinfo-db-tools.mo
 
@@ -83,6 +84,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/man
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
 %{mingw64_bindir}/osinfo-db-export.exe
 %{mingw64_bindir}/osinfo-db-import.exe
+%{mingw64_bindir}/osinfo-db-path.exe
 %{mingw64_bindir}/osinfo-db-validate.exe
 %{mingw64_datadir}/locale/*/LC_MESSAGES/osinfo-db-tools.mo
 
diff --git a/osinfo-db-tools.spec.in b/osinfo-db-tools.spec.in
index d125751..155ede9 100644
--- a/osinfo-db-tools.spec.in
+++ b/osinfo-db-tools.spec.in
@@ -36,9 +36,11 @@ information about operating systems for use with 
virtualization
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
 %{_bindir}/osinfo-db-export
 %{_bindir}/osinfo-db-import
+%{_bindir}/osinfo-db-path
 %{_bindir}/osinfo-db-validate
 %{_mandir}/man1/osinfo-db-export.1*
 %{_mandir}/man1/osinfo-db-import.1*
+%{_mandir}/man1/osinfo-db-path.1*
 %{_mandir}/man1/osinfo-db-validate.1*
 
 %changelog
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6688a2d..279b26f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,3 +1,4 @@
 tools/osinfo-db-export.c
 tools/osinfo-db-import.c
+tools/osinfo-db-path.c
 tools/osinfo-db-validate.c
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 37f9abb..af069a5 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -10,9 +10,9 @@ AM_CFLAGS = $(GOBJECT_CFLAGS) \
-I$(top_srcdir) \
 $(NULL)
 
-bin_PROGRAMS = osinfo-db-validate osinfo-db-import osinfo-db-export
+bin_PROGRAMS = osinfo-db-validate osinfo-db-import osinfo-db-export 
osinfo-db-path
 
-man1_MANS = osinfo-db-validate.1 osinfo-db-import.1 osinfo-db-export.1
+man1_MANS = osinfo-db-validate.1 osinfo-db-import.1 osinfo-db-export.1 
osinfo-db-path.1
 
 CLEANFILES = $(man1_MANS)
 
@@ -43,3 +43,8 @@ osinfo_db_export_LDADD = $(GOBJECT_LIBS)  \
  $(GIO_LIBS)   \
  $(GLIB_LIBS)  \
  $(LIBARCHIVE_LIBS)
+
+osinfo_db_path_SOURCES = osinfo-db-path.c $(COMMON_SOURCES)
+osinfo_db_path_LDADD = $(GOBJECT_LIBS) \
+ $(GIO_LIBS)   \
+ $(GLIB_LIBS)
diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index 553b797..1973a33 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -518,7 +518,7 @@ packed into the archive.
 
 =head1 SEE ALSO
 
-C
+C, C
 
 =head1 AUTHORS
 
diff --git a/tools/osinfo-db-import.c b/tools/osinfo-db-import.c
index 17d9e23..a75745b 100644
--- a/tools/osinfo-db-import.c
+++ b/tools/osinfo-db-import.c
@@ -365,7 +365,7 @@ installed.
 
 =head1 SEE ALSO
 
-C
+C, C
 
 =head1 AUTHORS
 
diff --git a/tools/osinfo-db-path.c b/tools/osinfo-db-path.c
new file mode 100644
index 000..08cefa4
--- /dev/null
+++ b/tools/osinfo-db-path.c
@@ -0,0 +1,223 @@
+/*
+ * Copyright (C) 2016 Red Hat, Inc
+ *
+ * osinfo-db-path: report the path to the osinfo database
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty

[Libosinfo] [PATCH db-tools 04/11] Find RNG schema in default database locations

2016-06-28 Thread Daniel P. Berrange
With the split out database, the RNG schema will no longer
be installed by the code, instead it will be distributed
as part of the database. Thus we should look in the database
locations to find the schema.

Signed-off-by: Daniel P. Berrange 
---
 po/POTFILES.in |  1 +
 tools/Makefile.am  |  2 +-
 tools/osinfo-db-util.c | 49 ++
 tools/osinfo-db-util.h |  7 +++
 tools/osinfo-db-validate.c | 29 ++-
 5 files changed, 78 insertions(+), 10 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 279b26f..a2cfe55 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,4 +1,5 @@
 tools/osinfo-db-export.c
 tools/osinfo-db-import.c
 tools/osinfo-db-path.c
+tools/osinfo-db-util.c
 tools/osinfo-db-validate.c
diff --git a/tools/Makefile.am b/tools/Makefile.am
index af069a5..f415297 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -26,7 +26,7 @@ COMMON_SOURCES = \
osinfo-db-util.h \
$(NULL)
 
-osinfo_db_validate_SOURCES = osinfo-db-validate.c
+osinfo_db_validate_SOURCES = osinfo-db-validate.c $(COMMON_SOURCES)
 osinfo_db_validate_LDADD = $(GOBJECT_LIBS) \
  $(GIO_LIBS)   \
  $(GLIB_LIBS)  \
diff --git a/tools/osinfo-db-util.c b/tools/osinfo-db-util.c
index 1d81d0c..bd4a813 100644
--- a/tools/osinfo-db-util.c
+++ b/tools/osinfo-db-util.c
@@ -23,6 +23,8 @@
 
 #include 
 
+#include 
+
 #include "osinfo-db-util.h"
 
 GFile *osinfo_db_get_system_path(const gchar *root)
@@ -101,6 +103,53 @@ GFile *osinfo_db_get_path(const char *root,
 }
 }
 
+GFile *osinfo_db_get_file(const char *root,
+  gboolean user,
+  gboolean local,
+  gboolean system,
+  const char *custom,
+  const gchar *file,
+  GError **err)
+{
+GFile *ret = NULL;
+gboolean tryAll = TRUE;
+GFile *paths[4];
+gsize npaths = 0;
+gsize i;
+
+if (user || local || system || custom)
+tryAll = FALSE;
+
+if (custom)
+paths[npaths++] = osinfo_db_get_custom_path(custom, root);
+
+if (tryAll || user)
+paths[npaths++] = osinfo_db_get_user_path(root);
+
+if (tryAll || local)
+paths[npaths++] = osinfo_db_get_local_path(root);
+
+if (tryAll || system)
+paths[npaths++] = osinfo_db_get_system_path(root);
+
+for (i = 0; i < npaths; i++) {
+ret = g_file_resolve_relative_path(paths[i], file);
+if (g_file_query_exists(ret, NULL))
+break;
+g_object_unref(ret);
+ret = NULL;
+}
+
+if (!ret) {
+g_set_error(err, 0, 0,
+_("Unable to locate '%s' in any database location"),
+file);
+return NULL;
+}
+
+return ret;
+}
+
 /*
  * Local variables:
  *  indent-tabs-mode: nil
diff --git a/tools/osinfo-db-util.h b/tools/osinfo-db-util.h
index acfcde6..d56c098 100644
--- a/tools/osinfo-db-util.h
+++ b/tools/osinfo-db-util.h
@@ -36,6 +36,13 @@ GFile *osinfo_db_get_path(const char *root,
   gboolean local,
   gboolean system,
   const char *custom);
+GFile *osinfo_db_get_file(const char *root,
+  gboolean user,
+  gboolean local,
+  gboolean system,
+  const char *custom,
+  const gchar *file,
+  GError **err);
 
 #endif /* OSINFO_DB_UTIL_H__ */
 
diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
index 965ed0e..6826a54 100644
--- a/tools/osinfo-db-validate.c
+++ b/tools/osinfo-db-validate.c
@@ -23,13 +23,11 @@
 
 #include 
 
-#include 
-#include 
 #include 
 #include 
 #include 
 
-#define SCHEMA PKGDATADIR "/schemas/libosinfo.rng"
+#include "osinfo-db-util.h"
 
 static gboolean verbose = FALSE;
 
@@ -192,22 +190,24 @@ static gboolean validate_file(xmlRelaxNGValidCtxtPtr 
rngValid, GFile *file, GFil
 }
 
 
-static gboolean validate_files(gint argc, gchar **argv, GError **error)
+static gboolean validate_files(GFile *schema, gint argc, gchar **argv, GError 
**error)
 {
 xmlRelaxNGParserCtxtPtr rngParser = NULL;
 xmlRelaxNGPtr rng = NULL;
 xmlRelaxNGValidCtxtPtr rngValid = NULL;
 gboolean ret = FALSE;
 gsize i;
+gchar *schemapath = NULL;
 
 xmlSetGenericErrorFunc(NULL, validate_generic_error_nop);
 xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop);
 
-rngParser = xmlRelaxNGNewParserCtxt(SCHEMA);
+schemapath = g_file_get_path(schema);
+rngParser = xmlRelaxNGNewParserCtxt(schemapath);
 if (!rngParser) {
 g_set_error(error, 0, 0,
 _("Unable to create RNG parser for %s")

[Libosinfo] [PATCH db-tools 06/11] Set a valid error domain for GError

2016-06-28 Thread Daniel P. Berrange
GLib will print a warning if 0 is passed for the GQuark
error domain when setting a GError. Define a valid error
domain quark and use it.

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-util.c |  7 ++-
 tools/osinfo-db-util.h |  3 +++
 tools/osinfo-db-validate.c | 14 +++---
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/tools/osinfo-db-util.c b/tools/osinfo-db-util.c
index bd4a813..34abe88 100644
--- a/tools/osinfo-db-util.c
+++ b/tools/osinfo-db-util.c
@@ -27,6 +27,11 @@
 
 #include "osinfo-db-util.h"
 
+GQuark osinfo_db_error_quark(void)
+{
+return g_quark_from_static_string("osinfo-db-error");
+}
+
 GFile *osinfo_db_get_system_path(const gchar *root)
 {
 GFile *file;
@@ -141,7 +146,7 @@ GFile *osinfo_db_get_file(const char *root,
 }
 
 if (!ret) {
-g_set_error(err, 0, 0,
+g_set_error(err, OSINFO_DB_ERROR, 0,
 _("Unable to locate '%s' in any database location"),
 file);
 return NULL;
diff --git a/tools/osinfo-db-util.h b/tools/osinfo-db-util.h
index d56c098..59ceadc 100644
--- a/tools/osinfo-db-util.h
+++ b/tools/osinfo-db-util.h
@@ -26,6 +26,9 @@
 
 #include 
 
+#define OSINFO_DB_ERROR osinfo_db_error_quark()
+
+GQuark osinfo_db_error_quark(void);
 GFile *osinfo_db_get_system_path(const gchar *root);
 GFile *osinfo_db_get_local_path(const gchar *root);
 GFile *osinfo_db_get_user_path(const gchar *root);
diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
index 2989f2e..ce3366a 100644
--- a/tools/osinfo-db-validate.c
+++ b/tools/osinfo-db-validate.c
@@ -58,7 +58,7 @@ static xmlDocPtr parse_file(GFile *file, GError **error)
 goto cleanup;
 
 if (!(pctxt = xmlNewParserCtxt())) {
-g_set_error(error, 0, 0, "%s",
+g_set_error(error, OSINFO_DB_ERROR, 0, "%s",
 _("Unable to create libxml parser"));
 goto cleanup;
 }
@@ -66,7 +66,7 @@ static xmlDocPtr parse_file(GFile *file, GError **error)
 if (!(doc = xmlCtxtReadDoc(pctxt, (const xmlChar*)data, uri, NULL,
XML_PARSE_NOENT | XML_PARSE_NONET |
XML_PARSE_NOWARNING))) {
-g_set_error(error, 0, 0,
+g_set_error(error, OSINFO_DB_ERROR, 0,
 _("Unable to parse XML document '%s'"),
 uri);
 goto cleanup;
@@ -98,7 +98,7 @@ static gboolean validate_file_regular(xmlRelaxNGValidCtxtPtr 
rngValid,
 goto cleanup;
 
 if (xmlRelaxNGValidateDoc(rngValid, doc) != 0) {
-g_set_error(error, 0, 0,
+g_set_error(error, OSINFO_DB_ERROR, 0,
 _("Unable to validate XML document '%s'"),
 uri);
 goto cleanup;
@@ -166,7 +166,7 @@ static gboolean validate_file(xmlRelaxNGValidCtxtPtr 
rngValid, GFile *file, GFil
 if (!validate_file_regular(rngValid, file, error))
 goto cleanup;
 } else {
-g_set_error(error, 0, 0,
+g_set_error(error, OSINFO_DB_ERROR, 0,
 "Unable to handle file type for %s",
 uri);
 goto cleanup;
@@ -198,7 +198,7 @@ static gboolean validate_files(GFile *schema, gsize nfiles, 
GFile **files, GErro
 schemapath = g_file_get_path(schema);
 rngParser = xmlRelaxNGNewParserCtxt(schemapath);
 if (!rngParser) {
-g_set_error(error, 0, 0,
+g_set_error(error, OSINFO_DB_ERROR, 0,
 _("Unable to create RNG parser for %s"),
 schemapath);
 goto cleanup;
@@ -206,7 +206,7 @@ static gboolean validate_files(GFile *schema, gsize nfiles, 
GFile **files, GErro
 
 rng = xmlRelaxNGParse(rngParser);
 if (!rng) {
-g_set_error(error, 0, 0,
+g_set_error(error, OSINFO_DB_ERROR, 0,
 _("Unable to parse RNG %s"),
 schemapath);
 goto cleanup;
@@ -214,7 +214,7 @@ static gboolean validate_files(GFile *schema, gsize nfiles, 
GFile **files, GErro
 
 rngValid = xmlRelaxNGNewValidCtxt(rng);
 if (!rngValid) {
-g_set_error(error, 0, 0,
+g_set_error(error, OSINFO_DB_ERROR, 0,
 _("Unable to create RNG validation context %s"),
 schemapath);
 goto cleanup;
-- 
2.7.4

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


[Libosinfo] [PATCH db-tools 05/11] Change osinfo-db-validate to default to a standard location

2016-06-28 Thread Daniel P. Berrange
Instead of requiring a list of paths to be passed in, default
to validating files from the standard database locations.

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-validate.c | 151 ++---
 1 file changed, 128 insertions(+), 23 deletions(-)

diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
index 6826a54..2989f2e 100644
--- a/tools/osinfo-db-validate.c
+++ b/tools/osinfo-db-validate.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Red Hat, Inc
+ * Copyright (C) 2012-2016 Red Hat, Inc
  *
  * osinfo-validate: validate that XML file(s) follows the published schema
  *
@@ -31,13 +31,6 @@
 
 static gboolean verbose = FALSE;
 
-static const GOptionEntry entries[] = {
-{ "verbose", 'v', 0, G_OPTION_ARG_NONE, (void*)&verbose,
-  N_("Verbose progress information"), NULL, },
-{ NULL, 0, 0, 0, NULL, NULL, NULL }
-};
-
-
 static void validate_generic_error_nop(void *userData G_GNUC_UNUSED,
const char *msg G_GNUC_UNUSED,
...)
@@ -190,7 +183,7 @@ static gboolean validate_file(xmlRelaxNGValidCtxtPtr 
rngValid, GFile *file, GFil
 }
 
 
-static gboolean validate_files(GFile *schema, gint argc, gchar **argv, GError 
**error)
+static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, 
GError **error)
 {
 xmlRelaxNGParserCtxtPtr rngParser = NULL;
 xmlRelaxNGPtr rng = NULL;
@@ -227,13 +220,9 @@ static gboolean validate_files(GFile *schema, gint argc, 
gchar **argv, GError **
 goto cleanup;
 }
 
-for (i = 0; i < argc; i++) {
-GFile *file = g_file_new_for_commandline_arg(argv[i]);
-if (!validate_file(rngValid, file, NULL, error)) {
-g_object_unref(file);
+for (i = 0; i < nfiles; i++) {
+if (!validate_file(rngValid, files[i], NULL, error))
 goto cleanup;
-}
-g_object_unref(file);
 }
 
 ret = TRUE;
@@ -252,6 +241,30 @@ gint main(gint argc, gchar **argv)
 GError *error = NULL;
 gint ret = EXIT_FAILURE;
 GFile *schema = NULL;
+gboolean user = FALSE;
+gboolean local = FALSE;
+gboolean system = FALSE;
+const gchar *root = "";
+const gchar *custom = NULL;
+int locs = 0;
+GFile *dir = NULL;
+GFile **files = NULL;
+gsize nfiles = 0, i;
+const GOptionEntry entries[] = {
+  { "verbose", 'v', 0, G_OPTION_ARG_NONE, (void*)&verbose,
+N_("Verbose progress information"), NULL, },
+  { "user", 0, 0, G_OPTION_ARG_NONE, (void *)&user,
+N_("Install into user directory"), NULL, },
+  { "local", 0, 0, G_OPTION_ARG_NONE, (void *)&local,
+N_("Install into local directory"), NULL, },
+  { "system", 0, 0, G_OPTION_ARG_NONE, (void *)&system,
+N_("Install into system directory"), NULL, },
+  { "dir", 0, 0, G_OPTION_ARG_STRING, (void *)&custom,
+N_("Import into custom directory"), NULL, },
+  { "root", 0, 0, G_OPTION_ARG_STRING, &root,
+N_("Installation root directory"), NULL, },
+  { NULL, 0, 0, 0, NULL, NULL, NULL },
+};
 
 setlocale(LC_ALL, "");
 textdomain(GETTEXT_PACKAGE);
@@ -269,14 +282,42 @@ gint main(gint argc, gchar **argv)
 goto error;
 }
 
-schema = osinfo_db_get_file(NULL, FALSE, FALSE, FALSE, NULL,
+if (local)
+locs++;
+if (system)
+locs++;
+if (user)
+locs++;
+if (custom)
+locs++;
+if (locs > 1 || (locs && argc > 1)) {
+g_printerr(_("Only one of --user, --local, --system, --dir or 
positional filenames can be used"));
+goto error;
+}
+
+schema = osinfo_db_get_file(root,
+user || custom,
+local || user || custom,
+system || local || user || custom,
+custom,
 "schema/osinfo.rng", &error);
 if (!schema) {
 g_printerr("%s\n", error->message);
 goto error;
 }
 
-if (!validate_files(schema, argc - 1, argv + 1, &error)) {
+dir = osinfo_db_get_path(root, user, local, system, custom);
+
+if (dir) {
+files = g_new0(GFile *, 1);
+files[nfiles++] = dir;
+} else {
+files = g_new0(GFile *, argc - 1);
+for (i = 1; i < argc; i++) {
+files[nfiles++] = g_file_new_for_commandline_arg(argv[i]);
+}
+}
+if (!validate_files(schema, nfiles, files, &error)) {
 g_printerr("%s\n", error->message);
 goto error;
 }
@@ -286,6 +327,8 @@ gint main(gint argc, gchar **argv)
  error:
 if (schema)
 g_objec

[Libosinfo] [PATCH db-tools 11/11] Fix source link in the RPM spec

2016-06-28 Thread Daniel P. Berrange
Signed-off-by: Daniel P. Berrange 
---
 osinfo-db-tools.spec.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/osinfo-db-tools.spec.in b/osinfo-db-tools.spec.in
index 155ede9..afe0336 100644
--- a/osinfo-db-tools.spec.in
+++ b/osinfo-db-tools.spec.in
@@ -6,7 +6,7 @@ Version: @VERSION@
 Release: 1%{?dist}%{?extra_release}
 License: LGPLv2+
 Group: Development/Libraries
-Source: https://fedorahosted.org/releases/l/i/%{name}/%{name}-%{version}.tar.gz
+Source: 
https://fedorahosted.org/releases/l/i/libosinfo/%{name}-%{version}.tar.gz
 URL: http://libosinfo.org/
 BuildRequires: intltool
 BuildRequires: glib2-devel
-- 
2.7.4

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


[Libosinfo] [PATCH db-tools 01/11] Share code for getting database path locations

2016-06-28 Thread Daniel P. Berrange
Both the osinfo-db-import and osinfo-db-export tools have
the same code for getting the database path locations. Pull
it out into a osinfo-db-util.c file for sharing.

Signed-off-by: Daniel P. Berrange 
---
 tools/Makefile.am|   9 +++-
 tools/osinfo-db-export.c |  80 ++
 tools/osinfo-db-import.c |  80 ++
 tools/osinfo-db-util.c   | 110 +++
 tools/osinfo-db-util.h   |  48 +
 5 files changed, 171 insertions(+), 156 deletions(-)
 create mode 100644 tools/osinfo-db-util.c
 create mode 100644 tools/osinfo-db-util.h

diff --git a/tools/Makefile.am b/tools/Makefile.am
index 701fbe4..37f9abb 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -21,19 +21,24 @@ POD2MAN = pod2man -c "Virtualization Support" -r 
"$(PACKAGE)-$(VERSION)"
 %.1: %.c Makefile
$(AM_V_GEN)$(POD2MAN) $< $@
 
+COMMON_SOURCES = \
+   osinfo-db-util.c \
+   osinfo-db-util.h \
+   $(NULL)
+
 osinfo_db_validate_SOURCES = osinfo-db-validate.c
 osinfo_db_validate_LDADD = $(GOBJECT_LIBS) \
  $(GIO_LIBS)   \
  $(GLIB_LIBS)  \
  $(LIBXML_LIBS)
 
-osinfo_db_import_SOURCES = osinfo-db-import.c
+osinfo_db_import_SOURCES = osinfo-db-import.c $(COMMON_SOURCES)
 osinfo_db_import_LDADD = $(GOBJECT_LIBS)   \
  $(GIO_LIBS)   \
  $(GLIB_LIBS)  \
  $(LIBARCHIVE_LIBS)
 
-osinfo_db_export_SOURCES = osinfo-db-export.c
+osinfo_db_export_SOURCES = osinfo-db-export.c $(COMMON_SOURCES)
 osinfo_db_export_LDADD = $(GOBJECT_LIBS)   \
  $(GIO_LIBS)   \
  $(GLIB_LIBS)  \
diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index ea68645..256c793 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -23,89 +23,15 @@
 
 #include 
 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 
-const char *argv0;
-
-static GFile *osinfo_db_export_get_system_path(const gchar *root)
-{
-GFile *file;
-gchar *dbdir;
-const gchar *path = g_getenv("OSINFO_DATA_DIR");
-if (!path)
-path = DATA_DIR "/libosinfo";
-
-dbdir = g_strdup_printf("%s%s/db", root, path);
-file = g_file_new_for_path(dbdir);
-g_free(dbdir);
-return file;
-}
-
-static GFile *osinfo_db_export_get_local_path(const gchar *root)
-{
-GFile *file;
-gchar *dbdir;
-
-dbdir = g_strdup_printf("%s" SYSCONFDIR "/libosinfo/db", root);
-file = g_file_new_for_path(dbdir);
-g_free(dbdir);
-return file;
-}
-
-static GFile *osinfo_db_export_get_user_path(const gchar *root)
-{
-GFile *file;
-gchar *dbdir;
-const gchar *configdir = g_get_user_config_dir();
-
-dbdir = g_strdup_printf("%s%s/libosinfo/db", root, configdir);
-file = g_file_new_for_path(dbdir);
-g_free(dbdir);
-return file;
-}
+#include "osinfo-db-util.h"
 
-
-static GFile *osinfo_db_export_get_custom_path(const gchar *dir,
-   const gchar *root)
-{
-GFile *file;
-gchar *dbdir;
-
-dbdir = g_strdup_printf("%s%s", root, dir);
-file = g_file_new_for_path(dbdir);
-g_free(dbdir);
-return file;
-}
-
-
-static GFile *osinfo_db_export_get_path(const char *root,
-gboolean user,
-gboolean local,
-gboolean system,
-const char *custom)
-{
-if (custom) {
-return osinfo_db_export_get_custom_path(custom, root);
-} else if (user) {
-return osinfo_db_export_get_user_path(root);
-} else if (local) {
-return osinfo_db_export_get_local_path(root);
-} else if (system) {
-return osinfo_db_export_get_system_path(root);
-#ifndef WIN32
-} else if (geteuid() == 0) {
-return osinfo_db_export_get_local_path(root);
-#endif
-} else {
-return osinfo_db_export_get_user_path(root);
-}
-}
+const char *argv0;
 
 
 static int osinfo_db_export_create_file(const gchar *prefix,
@@ -481,7 +407,7 @@ gint main(gint argc, gchar **argv)
 
 prefix = osinfo_db_export_prefix(version);
 archive = argc == 2 ? argv[1] : NULL;
-dir = osinfo_db_export_get_path(root, user, local, system, custom);
+dir = osinfo_db_get_path(root, user, local, system, custom);
 if (osinfo_db_export_create(prefix, dir, archive, verbose) < 0)
 goto error;
 
diff --git a/tools/osinfo-db-import.c b/tools/osinfo-db-import.c
index 327562a..b621d2b 100644
--- a/tools/osinfo-db-import.c
+++ b/tools/osinfo-db-import.c
@@ -23,89 +23,15 @@
 
 #include 
 
-#includ

[Libosinfo] [PATCH db-tools 00/11] Misc changes for split DB toolchain

2016-06-28 Thread Daniel P. Berrange
This series contains a bunch of small-ish patches doing
random fixes and enhancements to the osinfo-db-tools
package

Notable things

 - Fix osinfo-db-validate to look for RNG schema in the
   database tree location
 - Add a new osinfo-db-path tool
 - Improve the way we create tar.xz packages

Daniel P. Berrange (11):
  Share code for getting database path locations
  Fix description of import/export commands
  Add a new osinfo-db-path tool for reporting db locations
  Find RNG schema in default database locations
  Change osinfo-db-validate to default to a standard location
  Set a valid error domain for GError
  Remove print of filenames when --verbose is not used
  Fix swapped file/directory permissions in tar file
  Explicitly set timestamps on entries in created tar file
  Filter list of files included in created tar
  Fix source link in the RPM spec

 .gitignore|   3 +
 mingw-osinfo-db-tools.spec.in |   2 +
 osinfo-db-tools.spec.in   |   4 +-
 po/POTFILES.in|   2 +
 tools/Makefile.am |  20 +++-
 tools/osinfo-db-export.c  | 107 +---
 tools/osinfo-db-import.c  |  84 +---
 tools/osinfo-db-path.c| 223 ++
 tools/osinfo-db-util.c| 164 +++
 tools/osinfo-db-util.h|  58 +++
 tools/osinfo-db-validate.c| 189 ---
 11 files changed, 653 insertions(+), 203 deletions(-)
 create mode 100644 tools/osinfo-db-path.c
 create mode 100644 tools/osinfo-db-util.c
 create mode 100644 tools/osinfo-db-util.h

-- 
2.7.4

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


[Libosinfo] [PATCH db-tools 02/11] Fix description of import/export commands

2016-06-28 Thread Daniel P. Berrange
The command line option help was reporting the wrong description
for the import/export commands due to cut+paste mistake.

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-export.c | 2 +-
 tools/osinfo-db-import.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index 256c793..553b797 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -375,7 +375,7 @@ gint main(gint argc, gchar **argv)
 bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
 
-context = g_option_context_new(_("- Validate XML documents "));
+context = g_option_context_new(_("- Export database archive "));
 
 g_option_context_add_main_entries(context, entries, GETTEXT_PACKAGE);
 
diff --git a/tools/osinfo-db-import.c b/tools/osinfo-db-import.c
index b621d2b..17d9e23 100644
--- a/tools/osinfo-db-import.c
+++ b/tools/osinfo-db-import.c
@@ -230,7 +230,7 @@ gint main(gint argc, gchar **argv)
 bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
 
-context = g_option_context_new(_("- Validate XML documents "));
+context = g_option_context_new(_("- Import database archive "));
 
 g_option_context_add_main_entries(context, entries, GETTEXT_PACKAGE);
 
-- 
2.7.4

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


[Libosinfo] [PATCH db-tools 07/11] Remove print of filenames when --verbose is not used

2016-06-28 Thread Daniel P. Berrange
The osinfo-db-validate command has a --verbose arg to request
printing of filenames as they are validated. Remove the stray
g_print() that duplicated this

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-validate.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
index ce3366a..70c1ac3 100644
--- a/tools/osinfo-db-validate.c
+++ b/tools/osinfo-db-validate.c
@@ -172,7 +172,6 @@ static gboolean validate_file(xmlRelaxNGValidCtxtPtr 
rngValid, GFile *file, GFil
 goto cleanup;
 }
 
-g_print(_("Processed '%s'.\n"), uri);
 ret = TRUE;
 
  cleanup:
-- 
2.7.4

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


[Libosinfo] [PATCH db-tools 09/11] Explicitly set timestamps on entries in created tar file

2016-06-28 Thread Daniel P. Berrange
Always set a timestamp on entries in the created tar file
to reflect the time at which the tar was created. This
ensures when people import new versions of the database,
the files get newer timestamps.

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-export.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index c79778a..52792a7 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -33,6 +33,7 @@
 
 const char *argv0;
 
+time_t entryts;
 
 static int osinfo_db_export_create_file(const gchar *prefix,
 GFile *file,
@@ -197,6 +198,11 @@ static int osinfo_db_export_create_file(const gchar 
*prefix,
 entry = archive_entry_new();
 archive_entry_set_pathname(entry, entpath);
 
+archive_entry_set_atime(entry, entryts, 0);
+archive_entry_set_ctime(entry, entryts, 0);
+archive_entry_set_mtime(entry, entryts, 0);
+archive_entry_set_birthtime(entry, entryts, 0);
+
 switch (type) {
 case G_FILE_TYPE_REGULAR:
 case G_FILE_TYPE_SYMBOLIC_LINK:
@@ -212,6 +218,7 @@ static int osinfo_db_export_create_file(const gchar *prefix,
 if (verbose) {
 g_print("%s: d %s\n", argv0, entpath);
 }
+
 archive_entry_set_filetype(entry, AE_IFDIR);
 archive_entry_set_perm(entry, 0755);
 archive_entry_set_size(entry, 0);
@@ -405,6 +412,7 @@ gint main(gint argc, gchar **argv)
 goto error;
 }
 
+entryts = time(NULL);
 prefix = osinfo_db_export_prefix(version);
 archive = argc == 2 ? argv[1] : NULL;
 dir = osinfo_db_get_path(root, user, local, system, custom);
-- 
2.7.4

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


[Libosinfo] [PATCH db-tools 08/11] Fix swapped file/directory permissions in tar file

2016-06-28 Thread Daniel P. Berrange
Plain files were given mode 0755 while dirs got 0644, the exact
opposite of what they should have.

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-export.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index 1973a33..c79778a 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -204,7 +204,7 @@ static int osinfo_db_export_create_file(const gchar *prefix,
 g_print("%s: r %s\n", argv0, entpath);
 }
 archive_entry_set_filetype(entry, AE_IFREG);
-archive_entry_set_perm(entry, 0755);
+archive_entry_set_perm(entry, 0644);
 archive_entry_set_size(entry, g_file_info_get_size(info));
 break;
 
@@ -213,7 +213,7 @@ static int osinfo_db_export_create_file(const gchar *prefix,
 g_print("%s: d %s\n", argv0, entpath);
 }
 archive_entry_set_filetype(entry, AE_IFDIR);
-archive_entry_set_perm(entry, 0644);
+archive_entry_set_perm(entry, 0755);
 archive_entry_set_size(entry, 0);
 break;
 
-- 
2.7.4

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


[Libosinfo] [PATCH db-tools 10/11] Filter list of files included in created tar

2016-06-28 Thread Daniel P. Berrange
Don't include hidden files or editor backup files in the
exported tar. Also whitelist to only include files with
a .xml or .rng suffix. This facilitates running against
a local git repo which may have other files such as the
automake/autoconf .in and .am files.

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-export.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index 52792a7..4321ae4 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -206,6 +206,17 @@ static int osinfo_db_export_create_file(const gchar 
*prefix,
 switch (type) {
 case G_FILE_TYPE_REGULAR:
 case G_FILE_TYPE_SYMBOLIC_LINK:
+if (g_file_info_get_is_backup(info) ||
+g_file_info_get_is_hidden(info)) {
+ret = 0;
+goto cleanup;
+}
+if (!g_str_has_suffix(entpath, ".rng") &&
+!g_str_has_suffix(entpath, ".xml")) {
+ret = 0;
+goto cleanup;
+}
+
 if (verbose) {
 g_print("%s: r %s\n", argv0, entpath);
 }
-- 
2.7.4

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


[Libosinfo] ANNOUNCE: libosinfo 0.3.1 release

2016-07-01 Thread Daniel P. Berrange
I am happy to announce a new release of libosinfo, version 0.3.1:

  https://fedorahosted.org/releases/l/i/libosinfo/libosinfo-0.3.1.tar.gz

This is signed with key DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF  
(4096R)

  https://fedorahosted.org/releases/l/i/libosinfo/libosinfo-0.3.1.tar.gz.asc

All historical releases are available from:

  http://libosinfo.org/download/

Changes in this release include:

- Require glib2 >= 2.36
- Replace GSimpleAsyncResult usage with GTask
- Fix VPATH based builds
- Don't include autogenerated enum files in dist
- Fix build with older GCC versions
- Add/improve/fix data for
  - Debian
  - SLES/SLED
  - OpenSUSE
  - FreeBSD
  - Windows
  - RHEL
  - Ubuntu
- Update README content
- Fix string comparison for bootable media detection
- Fix linker flags for OS-X & solaris
- Fix darwin detection code
- Fix multiple memory leaks

Thanks to everyone who contributed towards this release


A special note to downstream vendors/distributors.

The next major release of libosinfo will include a major change in the
way libosinfo is released and distributed. The current single release
will be replaced with three indepedantly released artifacts:

 - libosinfo - this will continue to provide the libosinfo shared library
   and most associated command line tools

 - osinfo-db - this will contain only the database XML files and RNG
   schema, no code at all.

 - osinfo-db-tools - a set of command line tools for managing deployment
   of osinfo-db archives for vendors & users.

The libosinfo and osinfo-db-tools releases will be fairly infrequently as
they are today. The osinfo-db releases will be done very frequently, with
automated releases made available no more than 1 day after updated DB
content is submitted to the project.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://libosinfo.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 1/2] device: add virtio-gpu

2016-07-05 Thread Daniel P. Berrange
On Tue, Jul 05, 2016 at 01:18:44PM +0200, marcandre.lur...@redhat.com wrote:
> From: Marc-André Lureau 
> 
> virtio-gpu is a non-legacy device, so device_id is always 0x10 + 0x1040.

By non-legacy, you mean it is always a virtio-1.0 device ?

We've previously discussed that we probably need to add virtio-1.0
variants for all the existing virtio devices to libosinfo, so that
we can track which guest OS actually have support for the virtio-1.0
devices. They would need to have separate names, eg virtio1-blk instead
of virtio-blk, to go along with the separate pci device IDs. So I'm
thinking we will want to call this virtio1-gpu not virtio-gpu, so that
we're consistent with naming

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] [PATCH] Add missing virtio PCI devices

2016-07-05 Thread Daniel P. Berrange
We were missing virtio-rng and virtio-scsi, as well as
all the virtio 1.0 device variants, which have different
PCI IDS

The pci.ids file lists the following known devices

1000  Virtio network device
1001  Virtio block device
1002  Virtio memory balloon
1003  Virtio console
1004  Virtio SCSI
1005  Virtio RNG
1009  Virtio filesystem
1041  Virtio network device
1042  Virtio block device
1043  Virtio console
1044  Virtio RNG
1045  Virtio memory balloon
1048  Virtio SCSI
1049  Virtio filesystem
1050  Virtio GPU
1052  Virtio input

Of which, only 1001, 1001, 1002 and 1009 were recorded in
libosinfo. They would have appeared via pci.ids file loading,
but they would have lacked friendly names.

Signed-off-by: Daniel P. Berrange 
---
 configure.ac| 11 +++
 data/device/pcisig.com/Makefile.am  | 11 +++
 data/device/pcisig.com/pci-1af4-1004.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1004.d/class.xml.in |  6 ++
 data/device/pcisig.com/pci-1af4-1005.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1005.d/class.xml.in |  6 ++
 data/device/pcisig.com/pci-1af4-1041.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1041.d/class.xml.in |  6 ++
 data/device/pcisig.com/pci-1af4-1042.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1042.d/class.xml.in |  6 ++
 data/device/pcisig.com/pci-1af4-1043.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1043.d/class.xml.in |  6 ++
 data/device/pcisig.com/pci-1af4-1044.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1044.d/class.xml.in |  6 ++
 data/device/pcisig.com/pci-1af4-1045.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1045.d/class.xml.in |  6 ++
 data/device/pcisig.com/pci-1af4-1048.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1048.d/class.xml.in |  6 ++
 data/device/pcisig.com/pci-1af4-1049.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1049.d/class.xml.in |  6 ++
 data/device/pcisig.com/pci-1af4-1050.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1050.d/class.xml.in |  6 ++
 data/device/pcisig.com/pci-1af4-1052.d/Makefile.am  |  1 +
 data/device/pcisig.com/pci-1af4-1052.d/class.xml.in |  6 ++
 24 files changed, 99 insertions(+)
 create mode 100644 data/device/pcisig.com/pci-1af4-1004.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1004.d/class.xml.in
 create mode 100644 data/device/pcisig.com/pci-1af4-1005.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1005.d/class.xml.in
 create mode 100644 data/device/pcisig.com/pci-1af4-1041.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1041.d/class.xml.in
 create mode 100644 data/device/pcisig.com/pci-1af4-1042.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1042.d/class.xml.in
 create mode 100644 data/device/pcisig.com/pci-1af4-1043.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1043.d/class.xml.in
 create mode 100644 data/device/pcisig.com/pci-1af4-1044.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1044.d/class.xml.in
 create mode 100644 data/device/pcisig.com/pci-1af4-1045.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1045.d/class.xml.in
 create mode 100644 data/device/pcisig.com/pci-1af4-1048.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1048.d/class.xml.in
 create mode 100644 data/device/pcisig.com/pci-1af4-1049.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1049.d/class.xml.in
 create mode 100644 data/device/pcisig.com/pci-1af4-1050.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1050.d/class.xml.in
 create mode 100644 data/device/pcisig.com/pci-1af4-1052.d/Makefile.am
 create mode 100644 data/device/pcisig.com/pci-1af4-1052.d/class.xml.in

diff --git a/configure.ac b/configure.ac
index 12ff984..e29fd27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -265,7 +265,18 @@ AC_CONFIG_FILES([
data/device/pcisig.com/pci-1af4-1001.d/Makefile
data/device/pcisig.com/pci-1af4-1002.d/Makefile
data/device/pcisig.com/pci-1af4-1003.d/Makefile
+   data/device/pcisig.com/pci-1af4-1004.d/Makefile
+   data/device/pcisig.com/pci-1af4-1005.d/Makefile
data/device/pcisig.com/pci-1af4-1009.d/Makefile
+   data/device/pcisig.com/pci-1af4-1041.d/Makefile
+   data/device/pcisig.com/pci-1af4-1042.d/Makefile
+   data/device/pcisig.com/pci-1af4-1043.d/Makefile
+   data/device/pcisig.com/pci-1af4-1044.d/Makefile
+   data/device/pcisig.com/pci-1af4-1045.d/Makefile
+   data/device/pcisig.com/pci-1af4-1048.d/Makefile
+   data/device/pcisig.com/pci-1af4-1049.d/Makefile
+   data/device/pcisig.com/pci-1af4-1050.d/Makefile
+   data/device/pcisig.com/pci-1af4-1052.d/Makefile
data/device

Re: [Libosinfo] [PATCH 1/2] device: add virtio-gpu

2016-07-05 Thread Daniel P. Berrange
On Tue, Jul 05, 2016 at 08:13:10AM -0400, Marc-André Lureau wrote:
> Hi
> 
> - Original Message -
> > On Tue, Jul 05, 2016 at 01:18:44PM +0200, marcandre.lur...@redhat.com wrote:
> > > From: Marc-André Lureau 
> > > 
> > > virtio-gpu is a non-legacy device, so device_id is always 0x10 + 0x1040.
> > 
> > By non-legacy, you mean it is always a virtio-1.0 device ?
> 
> Yes
> 
> > 
> > We've previously discussed that we probably need to add virtio-1.0
> > variants for all the existing virtio devices to libosinfo, so that
> > we can track which guest OS actually have support for the virtio-1.0
> > devices. They would need to have separate names, eg virtio1-blk instead
> > of virtio-blk, to go along with the separate pci device IDs. So I'm
> > thinking we will want to call this virtio1-gpu not virtio-gpu, so that
> > we're consistent with naming
> 
> Could this be done once the 1 variants are added?

I've just sent a patch which adds data for all remaining virtio devices
both legacy and modern :-)

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 2/2] fedora: Add F24 info & testcases

2016-07-05 Thread Daniel P. Berrange
On Tue, Jul 05, 2016 at 01:18:45PM +0200, marcandre.lur...@redhat.com wrote:
> From: Marc-André Lureau 
> 
> Fedora 24 with virtio-gpu support.
> 
> Signed-off-by: Marc-André Lureau 
> ---
>  data/os/fedoraproject.org/fedora-24.xml.in | 171 
> +
>  data/os/fedoraproject.org/fedora-unknown.xml.in|  12 +-
>  po/POTFILES.in |   1 +
>  .../fedora24/Fedora-Server-dvd-i386-24-1.2.iso.txt |  29 
>  .../Fedora-Server-dvd-x86_64-24-1.2.iso.txt|  29 
>  .../Fedora-Server-netinst-i386-24-1.2.iso.txt  |  29 
>  .../Fedora-Server-netinst-x86_64-24-1.2.iso.txt|  29 
>  .../Fedora-Workstation-Live-i386-24-1.2.iso.txt|  29 
>  .../Fedora-Workstation-Live-x86_64-24-1.2.iso.txt  |  29 
>  .../Fedora-Workstation-netinst-i386-24-1.2.iso.txt |  29 
>  ...edora-Workstation-netinst-x86_64-24-1.2.iso.txt |  29 
>  11 files changed, 410 insertions(+), 6 deletions(-)
>  create mode 100644 data/os/fedoraproject.org/fedora-24.xml.in
>  create mode 100644 
> test/isodata/fedora/fedora24/Fedora-Server-dvd-i386-24-1.2.iso.txt
>  create mode 100644 
> test/isodata/fedora/fedora24/Fedora-Server-dvd-x86_64-24-1.2.iso.txt
>  create mode 100644 
> test/isodata/fedora/fedora24/Fedora-Server-netinst-i386-24-1.2.iso.txt
>  create mode 100644 
> test/isodata/fedora/fedora24/Fedora-Server-netinst-x86_64-24-1.2.iso.txt
>  create mode 100644 
> test/isodata/fedora/fedora24/Fedora-Workstation-Live-i386-24-1.2.iso.txt
>  create mode 100644 
> test/isodata/fedora/fedora24/Fedora-Workstation-Live-x86_64-24-1.2.iso.txt
>  create mode 100644 
> test/isodata/fedora/fedora24/Fedora-Workstation-netinst-i386-24-1.2.iso.txt
>  create mode 100644 
> test/isodata/fedora/fedora24/Fedora-Workstation-netinst-x86_64-24-1.2.iso.txt
> 
> diff --git a/data/os/fedoraproject.org/fedora-24.xml.in 
> b/data/os/fedoraproject.org/fedora-24.xml.in
> new file mode 100644
> index 000..5c5a801
> --- /dev/null
> +++ b/data/os/fedoraproject.org/fedora-24.xml.in
> @@ -0,0 +1,171 @@
> +
> +  http://fedoraproject.org/fedora/24";>
> +fedora24
> +<_name>Fedora 24
> +24
> +<_vendor>Fedora Project
> +linux
> +fedora
> +http://fedoraproject.org/fedora/23"/>
> +http://fedoraproject.org/fedora/23"/>
> +
> +2016-06-21
> +
> +
> +  http://pcisig.com/pci/1af4/1050"/> 

It looks like virtio-gpu guest kernel driver was introduced in
kernel 4.2, which means it was present in Fedora 23 already
(4.2.3 kernel at GA).

I realise the host side bits were only added in Fedora 24, but
since this is refering to the guest, i think we want this
device ID recorded against Fedora 23. Unless there was something
critically broken in the F23 guest driver that would prevent it
being used ?


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] [PATCH] fedora: record when virtio devices were made available

2016-07-05 Thread Daniel P. Berrange
We currently only record virtio-net, virtio-blk data against
Fedora. virtio-9p, virtio-balloon and virtio-console were
also all available in Fedora 9 kernels, with virtio-rng
added in Fedora 10 and virtio-scsi in Fedora 17.

The virtio-1.0 devices all appeared in Fedora 23 guest
kernels

Signed-off-by: Daniel P. Berrange 
---
 data/os/fedoraproject.org/fedora-10.xml.in |  1 +
 data/os/fedoraproject.org/fedora-17.xml.in |  4 
 data/os/fedoraproject.org/fedora-23.xml.in | 12 
 data/os/fedoraproject.org/fedora-9.xml.in  |  3 +++
 4 files changed, 20 insertions(+)

diff --git a/data/os/fedoraproject.org/fedora-10.xml.in 
b/data/os/fedoraproject.org/fedora-10.xml.in
index a7bde0f..8854c0e 100644
--- a/data/os/fedoraproject.org/fedora-10.xml.in
+++ b/data/os/fedoraproject.org/fedora-10.xml.in
@@ -15,6 +15,7 @@
 
 
   http://pcisig.com/pci/1af4/1001"/> 
+  http://pcisig.com/pci/1af4/1005"/> 
 
 
 
diff --git a/data/os/fedoraproject.org/fedora-17.xml.in 
b/data/os/fedoraproject.org/fedora-17.xml.in
index b025b1c..8802289 100644
--- a/data/os/fedoraproject.org/fedora-17.xml.in
+++ b/data/os/fedoraproject.org/fedora-17.xml.in
@@ -10,6 +10,10 @@
 http://fedoraproject.org/fedora/16"/>
 http://fedoraproject.org/fedora/16"/>
 
+
+  http://pcisig.com/pci/1af4/1004"/> 
+
+
 
   
http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/17/Fedora/i386/iso/Fedora-17-i386-DVD.iso
   
diff --git a/data/os/fedoraproject.org/fedora-23.xml.in 
b/data/os/fedoraproject.org/fedora-23.xml.in
index a898275..7a1ed9c 100644
--- a/data/os/fedoraproject.org/fedora-23.xml.in
+++ b/data/os/fedoraproject.org/fedora-23.xml.in
@@ -24,6 +24,18 @@
   <_name>Fedora 23 Server
 
 
+
+  http://pcisig.com/pci/1af4/1041"/> 
+  http://pcisig.com/pci/1af4/1042"/> 
+  http://pcisig.com/pci/1af4/1043"/> 
+  http://pcisig.com/pci/1af4/1044"/> 
+  http://pcisig.com/pci/1af4/1045"/> 
+  http://pcisig.com/pci/1af4/1048"/> 
+  http://pcisig.com/pci/1af4/1049"/> 
+  http://pcisig.com/pci/1af4/1050"/> 
+  http://pcisig.com/pci/1af4/1052"/> 
+
+
 
 
 
diff --git a/data/os/fedoraproject.org/fedora-9.xml.in 
b/data/os/fedoraproject.org/fedora-9.xml.in
index a49b56d..0410c19 100644
--- a/data/os/fedoraproject.org/fedora-9.xml.in
+++ b/data/os/fedoraproject.org/fedora-9.xml.in
@@ -19,6 +19,9 @@
https://bugzilla.redhat.com/show_bug.cgi?id=470386
   http://pcisig.com/pci/1af4/1001"/>
   -->
+  http://pcisig.com/pci/1af4/1002"/> 
+  http://pcisig.com/pci/1af4/1003"/> 
+  http://pcisig.com/pci/1af4/1009"/> 
 
 
 
-- 
2.7.4

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


Re: [Libosinfo] [PATCH db-tools 00/11] Misc changes for split DB toolchain

2016-07-05 Thread Daniel P. Berrange
Ping, would love a review on this series, as its a pre-requisite
for being able to split off the OS database.

On Tue, Jun 28, 2016 at 04:52:26PM +0100, Daniel P. Berrange wrote:
> This series contains a bunch of small-ish patches doing
> random fixes and enhancements to the osinfo-db-tools
> package
> 
> Notable things
> 
>  - Fix osinfo-db-validate to look for RNG schema in the
>database tree location
>  - Add a new osinfo-db-path tool
>  - Improve the way we create tar.xz packages
> 
> Daniel P. Berrange (11):
>   Share code for getting database path locations
>   Fix description of import/export commands
>   Add a new osinfo-db-path tool for reporting db locations
>   Find RNG schema in default database locations
>   Change osinfo-db-validate to default to a standard location
>   Set a valid error domain for GError
>   Remove print of filenames when --verbose is not used
>   Fix swapped file/directory permissions in tar file
>   Explicitly set timestamps on entries in created tar file
>   Filter list of files included in created tar
>   Fix source link in the RPM spec
> 
>  .gitignore|   3 +
>  mingw-osinfo-db-tools.spec.in |   2 +
>  osinfo-db-tools.spec.in   |   4 +-
>  po/POTFILES.in|   2 +
>  tools/Makefile.am |  20 +++-
>  tools/osinfo-db-export.c  | 107 +---
>  tools/osinfo-db-import.c  |  84 +---
>  tools/osinfo-db-path.c| 223 
> ++
>  tools/osinfo-db-util.c| 164 +++
>  tools/osinfo-db-util.h|  58 +++
>  tools/osinfo-db-validate.c| 189 ---
>  11 files changed, 653 insertions(+), 203 deletions(-)
>  create mode 100644 tools/osinfo-db-path.c
>  create mode 100644 tools/osinfo-db-util.c
>  create mode 100644 tools/osinfo-db-util.h
> 
> -- 
> 2.7.4
> 

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 2/2] fedora: Add F24 info & testcases

2016-07-07 Thread Daniel P. Berrange
On Wed, Jul 06, 2016 at 11:45:45AM +0200, Christophe Fergeau wrote:
> On Tue, Jul 05, 2016 at 02:31:41PM +0100, Daniel P. Berrange wrote:
> > On Tue, Jul 05, 2016 at 01:18:45PM +0200, marcandre.lur...@redhat.com wrote:
> > > From: Marc-André Lureau 
> > > 
> > > Fedora 24 with virtio-gpu support.
> > > 
> > > Signed-off-by: Marc-André Lureau 
> > > ---
> > >  data/os/fedoraproject.org/fedora-24.xml.in | 171 
> > > +
> > >  data/os/fedoraproject.org/fedora-unknown.xml.in|  12 +-
> > >  po/POTFILES.in |   1 +
> > >  .../fedora24/Fedora-Server-dvd-i386-24-1.2.iso.txt |  29 
> > >  .../Fedora-Server-dvd-x86_64-24-1.2.iso.txt|  29 
> > >  .../Fedora-Server-netinst-i386-24-1.2.iso.txt  |  29 
> > >  .../Fedora-Server-netinst-x86_64-24-1.2.iso.txt|  29 
> > >  .../Fedora-Workstation-Live-i386-24-1.2.iso.txt|  29 
> > >  .../Fedora-Workstation-Live-x86_64-24-1.2.iso.txt  |  29 
> > >  .../Fedora-Workstation-netinst-i386-24-1.2.iso.txt |  29 
> > >  ...edora-Workstation-netinst-x86_64-24-1.2.iso.txt |  29 
> > >  11 files changed, 410 insertions(+), 6 deletions(-)
> > >  create mode 100644 data/os/fedoraproject.org/fedora-24.xml.in
> > >  create mode 100644 
> > > test/isodata/fedora/fedora24/Fedora-Server-dvd-i386-24-1.2.iso.txt
> > >  create mode 100644 
> > > test/isodata/fedora/fedora24/Fedora-Server-dvd-x86_64-24-1.2.iso.txt
> > >  create mode 100644 
> > > test/isodata/fedora/fedora24/Fedora-Server-netinst-i386-24-1.2.iso.txt
> > >  create mode 100644 
> > > test/isodata/fedora/fedora24/Fedora-Server-netinst-x86_64-24-1.2.iso.txt
> > >  create mode 100644 
> > > test/isodata/fedora/fedora24/Fedora-Workstation-Live-i386-24-1.2.iso.txt
> > >  create mode 100644 
> > > test/isodata/fedora/fedora24/Fedora-Workstation-Live-x86_64-24-1.2.iso.txt
> > >  create mode 100644 
> > > test/isodata/fedora/fedora24/Fedora-Workstation-netinst-i386-24-1.2.iso.txt
> > >  create mode 100644 
> > > test/isodata/fedora/fedora24/Fedora-Workstation-netinst-x86_64-24-1.2.iso.txt
> > > 
> > > diff --git a/data/os/fedoraproject.org/fedora-24.xml.in 
> > > b/data/os/fedoraproject.org/fedora-24.xml.in
> > > new file mode 100644
> > > index 000..5c5a801
> > > --- /dev/null
> > > +++ b/data/os/fedoraproject.org/fedora-24.xml.in
> > > @@ -0,0 +1,171 @@
> > > +
> > > +  http://fedoraproject.org/fedora/24";>
> > > +fedora24
> > > +<_name>Fedora 24
> > > +24
> > > +<_vendor>Fedora Project
> > > +linux
> > > +fedora
> > > +http://fedoraproject.org/fedora/23"/>
> > > +http://fedoraproject.org/fedora/23"/>
> > > +
> > > +2016-06-21
> > > +
> > > +
> > > +  http://pcisig.com/pci/1af4/1050"/> 
> > 
> > It looks like virtio-gpu guest kernel driver was introduced in
> > kernel 4.2, which means it was present in Fedora 23 already
> > (4.2.3 kernel at GA).
> > 
> > I realise the host side bits were only added in Fedora 24, but
> > since this is refering to the guest, i think we want this
> > device ID recorded against Fedora 23. Unless there was something
> > critically broken in the F23 guest driver that would prevent it
> > being used ?
> 
> The guest driver was fine, last time I tried it was mesa which was not
> good enough for virgl support.

Ok, if it is present but broken, we should pretend its not present at
all. We did his before with virtio-blk which was present but broken
in Fedora 9

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH] Add missing virtio PCI devices

2016-07-07 Thread Daniel P. Berrange
On Wed, Jul 06, 2016 at 12:32:18PM +0200, Marc-André Lureau wrote:
> Hi
> 
> On Tue, Jul 5, 2016 at 2:48 PM, Daniel P. Berrange  
> wrote:
> > We were missing virtio-rng and virtio-scsi, as well as
> > all the virtio 1.0 device variants, which have different
> > PCI IDS
> >
> > The pci.ids file lists the following known devices
> >
> > 1000  Virtio network device
> > 1001  Virtio block device
> > 1002  Virtio memory balloon
> > 1003  Virtio console
> > 1004  Virtio SCSI
> > 1005  Virtio RNG
> > 1009  Virtio filesystem
> > 1041  Virtio network device
> > 1042  Virtio block device
> > 1043  Virtio console
> > 1044  Virtio RNG
> > 1045  Virtio memory balloon
> > 1048  Virtio SCSI
> > 1049  Virtio filesystem
> > 1050  Virtio GPU
> > 1052  Virtio input
> >
> > Of which, only 1001, 1001, 1002 and 1009 were recorded in
> > libosinfo. They would have appeared via pci.ids file loading,
> > but they would have lacked friendly names.
> >
> > Signed-off-by: Daniel P. Berrange 
> > ---
> >  configure.ac| 11 +++
> >  data/device/pcisig.com/Makefile.am  | 11 +++
> >  data/device/pcisig.com/pci-1af4-1004.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1004.d/class.xml.in |  6 ++
> >  data/device/pcisig.com/pci-1af4-1005.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1005.d/class.xml.in |  6 ++
> >  data/device/pcisig.com/pci-1af4-1041.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1041.d/class.xml.in |  6 ++
> >  data/device/pcisig.com/pci-1af4-1042.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1042.d/class.xml.in |  6 ++
> >  data/device/pcisig.com/pci-1af4-1043.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1043.d/class.xml.in |  6 ++
> >  data/device/pcisig.com/pci-1af4-1044.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1044.d/class.xml.in |  6 ++
> >  data/device/pcisig.com/pci-1af4-1045.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1045.d/class.xml.in |  6 ++
> >  data/device/pcisig.com/pci-1af4-1048.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1048.d/class.xml.in |  6 ++
> >  data/device/pcisig.com/pci-1af4-1049.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1049.d/class.xml.in |  6 ++
> >  data/device/pcisig.com/pci-1af4-1050.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1050.d/class.xml.in |  6 ++
> >  data/device/pcisig.com/pci-1af4-1052.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1052.d/class.xml.in |  6 ++
> >  24 files changed, 99 insertions(+)
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1004.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1004.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1005.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1005.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1041.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1041.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1042.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1042.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1043.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1043.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1044.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1044.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1045.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1045.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1048.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1048.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1049.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1049.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1050.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1050.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1052.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1052.d/class.xml.in
> >
> 
> make check fails, it can be fixed with the following (not sure if it'

Re: [Libosinfo] [PATCH 2/2] fedora: Add F24 info & testcases

2016-07-07 Thread Daniel P. Berrange
On Thu, Jul 07, 2016 at 06:01:41AM -0400, Marc-André Lureau wrote:
> Hi
> 
> - Original Message -
> > On Wed, Jul 06, 2016 at 11:45:45AM +0200, Christophe Fergeau wrote:
> > > On Tue, Jul 05, 2016 at 02:31:41PM +0100, Daniel P. Berrange wrote:
> > > > On Tue, Jul 05, 2016 at 01:18:45PM +0200, marcandre.lur...@redhat.com
> > > > wrote:
> > > > > From: Marc-André Lureau 
> > > > > 
> > > > > Fedora 24 with virtio-gpu support.
> > > > > 
> > > > > Signed-off-by: Marc-André Lureau 
> > > > > ---
> > > > >  data/os/fedoraproject.org/fedora-24.xml.in | 171
> > > > >  +
> > > > >  data/os/fedoraproject.org/fedora-unknown.xml.in|  12 +-
> > > > >  po/POTFILES.in |   1 +
> > > > >  .../fedora24/Fedora-Server-dvd-i386-24-1.2.iso.txt |  29 
> > > > >  .../Fedora-Server-dvd-x86_64-24-1.2.iso.txt|  29 
> > > > >  .../Fedora-Server-netinst-i386-24-1.2.iso.txt  |  29 
> > > > >  .../Fedora-Server-netinst-x86_64-24-1.2.iso.txt|  29 
> > > > >  .../Fedora-Workstation-Live-i386-24-1.2.iso.txt|  29 
> > > > >  .../Fedora-Workstation-Live-x86_64-24-1.2.iso.txt  |  29 
> > > > >  .../Fedora-Workstation-netinst-i386-24-1.2.iso.txt |  29 
> > > > >  ...edora-Workstation-netinst-x86_64-24-1.2.iso.txt |  29 
> > > > >  11 files changed, 410 insertions(+), 6 deletions(-)
> > > > >  create mode 100644 data/os/fedoraproject.org/fedora-24.xml.in
> > > > >  create mode 100644
> > > > >  test/isodata/fedora/fedora24/Fedora-Server-dvd-i386-24-1.2.iso.txt
> > > > >  create mode 100644
> > > > >  test/isodata/fedora/fedora24/Fedora-Server-dvd-x86_64-24-1.2.iso.txt
> > > > >  create mode 100644
> > > > >  
> > > > > test/isodata/fedora/fedora24/Fedora-Server-netinst-i386-24-1.2.iso.txt
> > > > >  create mode 100644
> > > > >  
> > > > > test/isodata/fedora/fedora24/Fedora-Server-netinst-x86_64-24-1.2.iso.txt
> > > > >  create mode 100644
> > > > >  
> > > > > test/isodata/fedora/fedora24/Fedora-Workstation-Live-i386-24-1.2.iso.txt
> > > > >  create mode 100644
> > > > >  
> > > > > test/isodata/fedora/fedora24/Fedora-Workstation-Live-x86_64-24-1.2.iso.txt
> > > > >  create mode 100644
> > > > >  
> > > > > test/isodata/fedora/fedora24/Fedora-Workstation-netinst-i386-24-1.2.iso.txt
> > > > >  create mode 100644
> > > > >  
> > > > > test/isodata/fedora/fedora24/Fedora-Workstation-netinst-x86_64-24-1.2.iso.txt
> > > > > 
> > > > > diff --git a/data/os/fedoraproject.org/fedora-24.xml.in
> > > > > b/data/os/fedoraproject.org/fedora-24.xml.in
> > > > > new file mode 100644
> > > > > index 000..5c5a801
> > > > > --- /dev/null
> > > > > +++ b/data/os/fedoraproject.org/fedora-24.xml.in
> > > > > @@ -0,0 +1,171 @@
> > > > > +
> > > > > +  http://fedoraproject.org/fedora/24";>
> > > > > +fedora24
> > > > > +<_name>Fedora 24
> > > > > +24
> > > > > +<_vendor>Fedora Project
> > > > > +linux
> > > > > +fedora
> > > > > +http://fedoraproject.org/fedora/23"/>
> > > > > +http://fedoraproject.org/fedora/23"/>
> > > > > +
> > > > > +2016-06-21
> > > > > +
> > > > > +
> > > > > +  http://pcisig.com/pci/1af4/1050"/> 
> > > > 
> > > > It looks like virtio-gpu guest kernel driver was introduced in
> > > > kernel 4.2, which means it was present in Fedora 23 already
> > > > (4.2.3 kernel at GA).
> > > > 
> > > > I realise the host side bits were only added in Fedora 24, but
> > > > since this is refering to the guest, i think we want this
> > > > device ID recorded against Fedora 23. Unless there was something
> > > > critically broken in the F23 guest driver that would prevent it
> > > > being used ?
> > > 
> > > The guest driver was fine, last time I tried it was mesa which was not
> > > good enough for virgl support.
> > 
> > Ok, if it is present but broken, we should pretend its not present at
> > all. We did his before with virtio-blk which was present but broken
> > in Fedora 9
> 
> So this patch is fine, right?

Yep, ack to that. It'll conflict with my patches, but I'm happy to resolve
the merge myself.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH db-tools 04/11] Find RNG schema in default database locations

2016-07-08 Thread Daniel P. Berrange
On Wed, Jul 06, 2016 at 01:28:31PM +0200, Fabiano Fidêncio wrote:
> On Tue, Jun 28, 2016 at 5:52 PM, Daniel P. Berrange  
> wrote:
> > With the split out database, the RNG schema will no longer
> > be installed by the code, instead it will be distributed
> > as part of the database. Thus we should look in the database
> > locations to find the schema.
> >
> > Signed-off-by: Daniel P. Berrange 
> > ---
> >  po/POTFILES.in |  1 +
> >  tools/Makefile.am  |  2 +-
> >  tools/osinfo-db-util.c | 49 
> > ++
> >  tools/osinfo-db-util.h |  7 +++
> >  tools/osinfo-db-validate.c | 29 ++-
> >  5 files changed, 78 insertions(+), 10 deletions(-)

[snip]

> > +for (i = 0; i < npaths; i++) {
> > +ret = g_file_resolve_relative_path(paths[i], file);
> > +if (g_file_query_exists(ret, NULL))
> > +break;
> > +g_object_unref(ret);
> > +ret = NULL;
> > +}
> > +
> > +if (!ret) {
> 
> This is just my personal preference, but I really would like to have
> explicit comparisons in all cases that you're not checking against a
> boolean. But feel free to ignore, probably there are a lot of other
> places doing the same.

IMHO this is pretty standard style for checking pointers for NULL
status.

> > +g_set_error(err, 0, 0,
> > +_("Unable to locate '%s' in any database location"),
> > +file);
> > +return NULL;
> 
> I would not use "return NULL" here. ret is NULL at this point and
> returning ret would be okay.

Yep.

> 
> > +}
> > +
> > +return ret;
> > +}
> > +

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH db-tools 00/11] Misc changes for split DB toolchain

2016-07-08 Thread Daniel P. Berrange
On Wed, Jul 06, 2016 at 01:29:55PM +0200, Fabiano Fidêncio wrote:
> On Tue, Jul 5, 2016 at 6:14 PM, Fabiano Fidêncio  wrote:
> > On Tue, Jul 5, 2016 at 4:04 PM, Daniel P. Berrange  
> > wrote:
> >> Ping, would love a review on this series, as its a pre-requisite
> >> for being able to split off the OS database.
> >
> > Sure, I'll do it as the first thing Tomorrow.
> 
> Daniel, series look good.
> There is one typo in patch 3 (but it came from c&p) and a few really
> minor comments in patch 4 (so, feel free to ignore them or do the
> changes before pushing the patches).

Yep, fixed those and the pre-existing c&p bug in other files


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] [PATCH] Setup new osinfo-db GIT repo for datbase

2016-07-18 Thread Daniel P. Berrange
This series of 1 patch introduces the new osinfo-db GIT
repo for the libosinfo database. See the patch commit
message for details of how I created the repo while keeping
existing GIT history intact.

The new repo is visible here:

   https://gitlab.com/libosinfo/osinfo-db

Or clonable via ssh with

   g...@gitlab.com:libosinfo/osinfo-db.git

This new repo only contains the actual database files and
corresponding .po file translations, nothing more. It does
not even bother with autoconf/automake, just a simple
Makefile at the top level which speeds things up no end.

NB to build you must already have osinfo-db installed.

Daniel P. Berrange (1):
  Fix build system after creating initial repository

 .gitignore | 109 +---
 COPYING| 681 +
 COPYING.LIB| 502 ---
 Makefile   | 109 
 README |  25 +-
 autobuild.sh   |  65 +-
 .../libosinfo.rng => schema/osinfo.rng.in} |   2 +
 mingw-osinfo-db.spec.in|  48 ++
 osinfo-db.spec.in  |  32 +
 9 files changed, 633 insertions(+), 940 deletions(-)
 delete mode 100644 COPYING.LIB
 create mode 100644 Makefile
 rename data/{schemas/libosinfo.rng => schema/osinfo.rng.in} (99%)
 create mode 100644 mingw-osinfo-db.spec.in
 create mode 100644 osinfo-db.spec.in

-- 
2.7.4

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


[Libosinfo] [PATCH] Fix build system after creating initial repository

2016-07-18 Thread Daniel P. Berrange
The initial repository state was cloned from libosinfo
GIT at revision:

  commit dd68d8ccb0abb9cab7324da1b3a706dbf158870b
  Author: Daniel P. Berrange 
  Date:   Mon Jul 18 11:18:24 2016 +0100

Fix mingw DLL version after bump to 1.0.0

It was initialized using the following commands:

  $ git clone libosinfo osinfo-db
  $ cd osinfo-db
  $ git filter-branch --index-filter 'git rm -r --cached \
  --ignore-unmatch build-aux docs examples m4 osinfo
  po test tools data/Makefile.inc *Makefile.am GNUmakefile
  maint.mk cfg.mk configure.ac db INSTALL libosinfo.spec.in
  mingw-libosinfo.spec.in autogen.sh AUTHORS.in MAINTAINERS
  NEWS' HEAD
  $ git filter-branch -f --prune-empty HEAD
  $ git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git 
update-ref -d
  $ git reflog expire --expire=now --all
  $ git gc --prune=now

This patch now adds a new minimal build system. There
are only two parts to the build, merging translations
into the XML files and generating a tar.xz archive
using osinfo-db-export. The normal autoconf/automake
doesn't make much sense, not least because "make dist"
is irrelevant. So this uses a single Makefile to provide
the minimal rules required.

Signed-off-by: Daniel P. Berrange 
---
 .gitignore | 109 +---
 COPYING| 681 +
 COPYING.LIB| 502 ---
 Makefile   | 109 
 README |  25 +-
 autobuild.sh   |  65 +-
 .../libosinfo.rng => schema/osinfo.rng.in} |   2 +
 mingw-osinfo-db.spec.in|  48 ++
 osinfo-db.spec.in  |  32 +
 9 files changed, 633 insertions(+), 940 deletions(-)
 delete mode 100644 COPYING.LIB
 create mode 100644 Makefile
 rename data/{schemas/libosinfo.rng => schema/osinfo.rng.in} (99%)
 create mode 100644 mingw-osinfo-db.spec.in
 create mode 100644 osinfo-db.spec.in

diff --git a/.gitignore b/.gitignore
index 1cc9e2f..be4ddb3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,103 +1,12 @@
-ChangeLog
-AUTHORS
-*.[ao]
-*.l[ao]
-*~
-.deps
-.libs
-.sc-start-sc_*
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-build-aux/compile
-build-aux/config.guess
-build-aux/config.sub
-build-aux/depcomp
-build-aux/install-sh
-build-aux/ltmain.sh
-build-aux/missing
-build-aux/mkinstalldirs
-build-aux/config.rpath
-build-aux/test-driver
-config.cache
-config.h
-config.h.in
-config.log
-config.status
-configure
-intltool-extract.in
-intltool-merge.in
-intltool-update.in
-libtool
-m4
-stamp-h1
-test/test-skeleton
-test/test-skeleton.sh
-osinfo/libosinfo.pc
-osinfo/Libosinfo-1.0.gir
-osinfo/Libosinfo-1.0.typelib
-osinfo/libosinfo-1.0.vapi
-osinfo/osinfo_enum_types.[ch]
-osinfo/osinfo_version.h
-*.gcno
-*.gcda
-coverage/
-*.spec
-*.pc
-test/test-device
-test/test-os
-test/test-entity
-test/test-hypervisor
-test/test-list
-test/test-db
-test/test-devicelist
-test/test-filter
-test/test-hypervisorlist
-test/test-install-script
-test/test-loader
-test/test-productfilter
-test/test-oslist
-test/test-product
-test/test-platform
-test/test-platformlist
-test/test-isodetect
-test/test-mediauris
-test/test-treeuris
-test/*.log
-test/*.trs
-build/
-gtk-doc.make
-data/95-osinfo.rules
-data/*/*/*.xml
-data/*/*/*/*.xml
-data/pci.ids
-data/usb.ids
-tools/osinfo-detect
-tools/osinfo-detect.1
-tools/osinfo-detect.exe
-tools/osinfo-db-validate
-tools/osinfo-db-validate.exe
-tools/osinfo-db-validate.1
-tools/osinfo-query
-tools/osinfo-query.1
-tools/osinfo-query.exe
-tools/osinfo-install-script
-tools/osinfo-install-script.exe
-tools/osinfo-install-script.1
-docs/reference/Libosinfo.types
 po/.intltool-merge-cache
-po/Makefile.in.in
-po/POTFILES
-po/libosinfo.pot
 po/stamp-it
-po/Makevars.template
-po/Rules-quot
-po/boldquot.sed
-po/en@boldquot.header
-po/en@quot.header
-po/insert-header.sin
-po/quot.sed
-po/remove-potcdate.sin
 po/*.gmo
-ABOUT-NLS
+po/POTFILES.in
+po/osinfo-db.pot
+data/*/*/*.xml
+data/schema/osinfo.rng
+*~
+#*
+osinfo-db-*.tar.xz
+osinfo-db.spec
+mingw-osinfo-db.spec
\ No newline at end of file
diff --git a/COPYING b/COPYING
index d511905..4362b49 100644
--- a/COPYING
+++ b/COPYING
@@ -1,221 +1,397 @@
-   GNU GENERAL PUBLIC LICENSE
-  Version 2, June 1991
+  GNU LESSER GENERAL PUBLIC LICENSE
+   Version 2.1, February 1999
 
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
-   

[Libosinfo] [PATCH db-tools 0/3] Misc improvements to osinfo-db-export

2016-07-18 Thread Daniel P. Berrange
Just a few small changes I made while testing this with the
new osinfo-db split database.

Daniel P. Berrange (3):
  osinfo-db-export: remove '-' in automatic version
  osinfo-db-export: embed a file called "VERSION"
  osinfo-db-export: generate filename if none is given

 tools/osinfo-db-export.c | 104 +--
 1 file changed, 82 insertions(+), 22 deletions(-)

-- 
2.7.4

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


[Libosinfo] [PATCH db-tools 2/3] osinfo-db-export: embed a file called "VERSION"

2016-07-18 Thread Daniel P. Berrange
Although the version can be inferred from the archive
filename, once extracted this info is not available.
Populate the archive with a file called VERSION which
will be extracted into the root of the DB directory.

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-export.c | 88 ++--
 1 file changed, 70 insertions(+), 18 deletions(-)

diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index 19d5ae6..a789dfe 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -292,7 +292,52 @@ static int osinfo_db_export_create_file(const gchar 
*prefix,
 return ret;
 }
 
+static int osinfo_db_export_create_version(const gchar *prefix,
+   const gchar *version,
+   const gchar *target,
+   struct archive *arc,
+   gboolean verbose)
+{
+int ret = -1;
+struct archive_entry *entry = NULL;
+gchar *entpath = NULL;
+
+entpath = g_strdup_printf("%s/VERSION", prefix);
+entry = archive_entry_new();
+archive_entry_set_pathname(entry, entpath);
+
+archive_entry_set_atime(entry, entryts, 0);
+archive_entry_set_ctime(entry, entryts, 0);
+archive_entry_set_mtime(entry, entryts, 0);
+archive_entry_set_birthtime(entry, entryts, 0);
+
+if (verbose) {
+g_print("%s: r %s\n", argv0, entpath);
+}
+archive_entry_set_filetype(entry, AE_IFREG);
+archive_entry_set_perm(entry, 0644);
+archive_entry_set_size(entry, strlen(version));
+
+if (archive_write_header(arc, entry) != ARCHIVE_OK) {
+g_printerr("%s: cannot write archive header %s: %s\n",
+   argv0, target, archive_error_string(arc));
+goto cleanup;
+}
+
+if (archive_write_data(arc, version, strlen(version)) < 0) {
+g_printerr("%s: cannot write archive data for %s to %s: %s\n",
+   argv0, entpath, target, archive_error_string(arc));
+goto cleanup;
+}
+
+ret = 0;
+ cleanup:
+archive_entry_free(entry);
+return ret;
+}
+
 static int osinfo_db_export_create(const gchar *prefix,
+   const gchar *version,
GFile *source,
const gchar *target,
gboolean verbose)
@@ -320,6 +365,10 @@ static int osinfo_db_export_create(const gchar *prefix,
 goto cleanup;
 }
 
+if (osinfo_db_export_create_version(prefix, version, target, arc, verbose) 
< 0) {
+goto cleanup;
+}
+
 if (archive_write_close(arc) != ARCHIVE_OK) {
 g_printerr("%s: cannot finish writing archive %s: %s\n",
argv0, target, archive_error_string(arc));
@@ -334,23 +383,20 @@ static int osinfo_db_export_create(const gchar *prefix,
 return ret;
 }
 
-static gchar *osinfo_db_export_prefix(const gchar *version)
+
+static gchar *osinfo_db_version(void)
 {
-if (version == NULL) {
-GTimeZone *tz = g_time_zone_new_utc();
-GDateTime *now = g_date_time_new_now(tz);
-gchar *ret;
-
-ret = g_strdup_printf("osinfo-db-%04d%02d%02d",
-  g_date_time_get_year(now),
-  g_date_time_get_month(now),
-  g_date_time_get_day_of_month(now));
-g_date_time_unref(now);
-g_time_zone_unref(tz);
-return ret;
-} else {
-return g_strdup_printf("osinfo-db-%s", version);
-}
+GTimeZone *tz = g_time_zone_new_utc();
+GDateTime *now = g_date_time_new_now(tz);
+gchar *ret;
+
+ret = g_strdup_printf("%04d%02d%02d",
+  g_date_time_get_year(now),
+  g_date_time_get_month(now),
+  g_date_time_get_day_of_month(now));
+g_date_time_unref(now);
+g_time_zone_unref(tz);
+return ret;
 }
 
 
@@ -367,6 +413,7 @@ gint main(gint argc, gchar **argv)
 const gchar *archive = NULL;
 const gchar *custom = NULL;
 const gchar *version = NULL;
+gchar *autoversion = NULL;
 gchar *prefix = NULL;
 int locs = 0;
 GFile *dir = NULL;
@@ -425,15 +472,20 @@ gint main(gint argc, gchar **argv)
 }
 
 entryts = time(NULL);
-prefix = osinfo_db_export_prefix(version);
+if (version == NULL) {
+autoversion = osinfo_db_version();
+version = autoversion;
+}
+prefix = g_strdup_printf("osinfo-db-%s", version);
 archive = argc == 2 ? argv[1] : NULL;
 dir = osinfo_db_get_path(root, user, local, system, custom);
-if (osinfo_db_export_create(prefix, dir, archive, verbose) < 0)
+if (osinfo_db_export_create(prefix, version, dir, archive, verbose) < 0)
 goto error;
 
 ret = EXIT_SUCCESS;

[Libosinfo] [PATCH db-tools 3/3] osinfo-db-export: generate filename if none is given

2016-07-18 Thread Daniel P. Berrange
Currently if no filename is given to the export command
the archive will be written to stdout, which is less than
helpful as default behaviour. Change it to generate a
suitable default filename. Export to stdout can still be
requested explicitly by giving a filename of '-'.

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-export.c | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index a789dfe..0d6d060 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -410,7 +410,7 @@ gint main(gint argc, gchar **argv)
 gboolean local = FALSE;
 gboolean system = FALSE;
 const gchar *root = "";
-const gchar *archive = NULL;
+gchar *archive = NULL;
 const gchar *custom = NULL;
 const gchar *version = NULL;
 gchar *autoversion = NULL;
@@ -477,7 +477,11 @@ gint main(gint argc, gchar **argv)
 version = autoversion;
 }
 prefix = g_strdup_printf("osinfo-db-%s", version);
-archive = argc == 2 ? argv[1] : NULL;
+if (argc == 2) {
+archive = argv[2];
+} else {
+archive = g_strdup_printf("%s.tar.xz", prefix);
+}
 dir = osinfo_db_get_path(root, user, local, system, custom);
 if (osinfo_db_export_create(prefix, version, dir, archive, verbose) < 0)
 goto error;
@@ -485,6 +489,7 @@ gint main(gint argc, gchar **argv)
 ret = EXIT_SUCCESS;
 
  error:
+g_free(archive);
 g_free(autoversion);
 g_free(prefix);
 if (dir) {
@@ -506,7 +511,7 @@ osinfo-db-export - Export to a osinfo database archive
 
 =head1 SYNOPSIS
 
-osinfo-db-export [OPTIONS...] ARCHIVE-FILE
+osinfo-db-export [OPTIONS...] [ARCHIVE-FILE]
 
 =head1 DESCRIPTION
 
@@ -540,6 +545,9 @@ If run by a privileged account (ie root), the B 
database
 location will be used by default, otherwise the B location
 will be used.
 
+If no B path is given, an automatically generated
+filename will be used, taking the format B.
+
 =head1 OPTIONS
 
 =over 8
-- 
2.7.4

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


[Libosinfo] [PATCH db-tools 1/3] osinfo-db-export: remove '-' in automatic version

2016-07-18 Thread Daniel P. Berrange
Replace automatic version "2016-07-18" with "20160708" since
"-" is not a valid character in version numbers for RPM and
dates sort correctly without "-" being needed.

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-export.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index d35da6c..19d5ae6 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -341,7 +341,7 @@ static gchar *osinfo_db_export_prefix(const gchar *version)
 GDateTime *now = g_date_time_new_now(tz);
 gchar *ret;
 
-ret = g_strdup_printf("osinfo-db-%04d-%02d-%02d",
+ret = g_strdup_printf("osinfo-db-%04d%02d%02d",
   g_date_time_get_year(now),
   g_date_time_get_month(now),
   g_date_time_get_day_of_month(now));
@@ -522,7 +522,7 @@ in a chroot environment or equivalent.
 
 Set the version string for the files in the archive to
 B. If this argument is not given, the version
-will be set to the current date in the format B.
+will be set to the current date in the format B.
 
 =item B<-v>, B<--verbose>
 
-- 
2.7.4

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


[Libosinfo] [PATCH 4/4] Remove database files

2016-07-29 Thread Daniel P. Berrange
Remove the database files and add a dependancy on the
osinfo-db RPM

Signed-off-by: Daniel P. Berrange 
---

NB, I've deleted almost all the diff contents as it is
not interesting to see 100's of deleted files in a
multi-MB sized email :-)

 Makefile.am|  21 +-
 configure.ac   |  73 --
 data/Makefile.am   |  20 -
 data/Makefile.inc  |  11 -
 data/datamap/Makefile.am   |   5 -
 data/datamap/microsoft.com/Makefile.am |   1 -
 .../microsoft.com/win-7-l10n-language.xml.in   |  40 -
 .../win-8-l10n-language-reverse.xml.in |  41 --
 .../microsoft.com/win-8-l10n-language.xml.in   |  41 --
 data/datamap/x.org/Makefile.am |   1 -
 data/datamap/x.org/x11-keyboard.xml.in | 148 
 data/device/Makefile.am|   8 -
 data/device/ibasetechnologies.net/Makefile.am  |   1 -
 data/device/ibasetechnologies.net/isa-ib700.xml.in |   8 -
 data/device/ibm.com/Makefile.am|   1 -
 data/device/ibm.com/ps2-keyboard.xml.in|   9 -
 data/device/ibm.com/ps2-mouse.xml.in   |   9 -
 data/device/pcisig.com/Makefile.am |  34 -
 data/device/pcisig.com/pci-1000-0012.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1000-0012.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1013-00b8.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1013-00b8.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1022-2000.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1022-2000.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-10ec-8029.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-10ec-8029.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-10ec-8139.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-10ec-8139.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1234-.d/Makefile.am |   1 -
 data/device/pcisig.com/pci-1234-.xml.in|  11 -
 data/device/pcisig.com/pci-1274-5000.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1274-5000.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-15ad-0710.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-15ad-0710.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1000.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1000.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1001.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1001.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1002.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1002.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1003.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1003.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1004.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1004.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1005.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1005.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1009.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1009.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1041.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1041.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1042.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1042.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1043.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1043.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1044.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1044.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1045.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1045.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1048.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1048.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1049.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1049.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1050.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1050.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1052.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1052.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1b36-0100.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1b36-0100.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-8086-100e.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-8086-100e.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-8086-2415.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-8086-2415.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-8086-25ab.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-8086-25ab.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-8086-2668.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-8086-2668.d/class.xml.in |   6 -
 data/device/usb.org/Makefile.am|   2 -
 data/device/usb.org/usb-80ee-0021.d/Makefile.am|   1 -
 data/device/usb.org/usb-80ee-0021.d/class.xml.in   |  

[Libosinfo] [PATCH 3/4] loader: update to comply with new database install location

2016-07-29 Thread Daniel P. Berrange
The new database locations are

  - System location

This is determined by the env variable

  $OSINFO_SYSTEM_DIR

If not set, then defaults to /usr/share/osinfo

This location is intended for use by operating system
distributors to install the initial data set via a
package management system like RPM or Deb

  - Local location

This is determined by the env variable

  $OSINFO_LOCAL_DIR

If not set, then defaults to /etc/osinfo

This location is intended for use by local system
administrators to install custom local data that
should be available to all users on a host

  - User location

This is determined by the env variable

  $OSINFO_USER_DIR

If not set, then defaults to $XDG_CONFIG_HOME/osinfo

If that is not set, then defaults to $HOME/.config/osinfo

This location is intended for use by unprivileged users
wishing to install local data for use by their applications

Adapt to use those, but include temporary support for looking
at the legacy local & user directory locations, and the
OSINFO_DATA_DIR env variable for back-compat.

Signed-off-by: Daniel P. Berrange 
---
 osinfo/Makefile.am |  1 +
 osinfo/osinfo_loader.c | 84 ++
 2 files changed, 73 insertions(+), 12 deletions(-)

diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
index ddece61..c915b57 100644
--- a/osinfo/Makefile.am
+++ b/osinfo/Makefile.am
@@ -36,6 +36,7 @@ libosinfo_1_0_la_CFLAGS = \
$(GOBJECT_CFLAGS) \
$(GLIB_CFLAGS) \
$(GIO_CFLAGS) \
+   -DDATA_DIR='"$(datadir)"' \
-DPKG_DATA_DIR='"$(pkgdatadir)"' \
-DSYS_CONF_DIR='"$(sysconfdir)"' \
-DLOCALEDIR="\"$(datadir)/locale\"" \
diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
index 73843cf..33ff174 100644
--- a/osinfo/osinfo_loader.c
+++ b/osinfo/osinfo_loader.c
@@ -2280,23 +2280,61 @@ static GFile *osinfo_loader_get_usb_path(void)
 static GFile *osinfo_loader_get_system_path(void)
 {
 GFile *file;
-gchar *dbdir;
-const gchar *path = g_getenv("OSINFO_DATA_DIR");
-if (!path)
-path = PKG_DATA_DIR;
+const gchar *path;
+
+path = g_getenv("OSINFO_DATA_DIR");
+if (path) {
+char *dbpath;
+static gboolean warned = FALSE;
+if (!warned) {
+g_printerr("$OSINFO_DATA_DIR is deprecated, please "
+   "use $OSINFO_SYSTEM_DIR intead. Support "
+   "for $OSINFO_DATA_DIR will be removed "
+   "in a future release");
+warned = TRUE;
+}
+
+dbpath = g_strdup_printf("%s/db", path);
+file = g_file_new_for_path(path);
+g_free(dbpath);
+} else {
+path = g_getenv("OSINFO_SYSTEM_DIR");
+if (!path)
+path = DATA_DIR "/osinfo";
 
-dbdir = g_strdup_printf("%s/db", path);
-file = g_file_new_for_path(dbdir);
+file = g_file_new_for_path(path);
+}
 g_object_set_data(G_OBJECT(file), "data-format",
   GINT_TO_POINTER(OSINFO_DATA_FORMAT_NATIVE));
-g_free(dbdir);
 return file;
 }
 
 static GFile *osinfo_loader_get_local_path(void)
 {
 GFile *file;
-file = g_file_new_for_path(SYS_CONF_DIR "/libosinfo/db");
+const gchar *path = g_getenv("OSINFO_LOCAL_DIR");
+
+if (!path) {
+path = SYS_CONF_DIR "/osinfo";
+
+if (access(path, R_OK) == -1) {
+const gchar *oldpath = SYS_CONF_DIR "/libosinfo/db";
+if (access(oldpath, R_OK) != -1) {
+static gboolean warned = FALSE;
+
+if (!warned) {
+g_printerr("%s is deprecated, please use %s instead. "
+   "Support %s will be removed in a future "
+   "release",
+   oldpath, path, oldpath);
+warned = TRUE;
+}
+path = oldpath;
+}
+}
+}
+
+file = g_file_new_for_path(path);
 g_object_set_data(G_OBJECT(file), "data-format",
   GINT_TO_POINTER(OSINFO_DATA_FORMAT_NATIVE));
 return file;
@@ -2305,14 +2343,36 @@ static GFile *osinfo_loader_get_local_path(void)
 static GFile *osinfo_loader_get_user_path(void)
 {
 GFile *file;
-gchar *dbdir;
+const gchar *path = g_getenv("OSINFO_USER_DIR");
 const gchar *configdir = g_get_user_config_dir();
 
-dbdir = g_strdup_printf("%s/libosinfo/db", configdir);
-file = g_file_new_for_path(dbdir);
+if (path) {
+file = g_file_new_for_path(path);
+} else {
+gchar *dbdir = g_strdup_printf("%s/os

[Libosinfo] [PATCH 0/4] Convert over to use standalone osinfo DB

2016-07-29 Thread Daniel P. Berrange
This series of patches does the switch over to use the
standalone osinfo database. This involves removing the
database files, removing osinfo-db-validate, and updating
the osinfo loader to look in the new database locations.

Daniel P. Berrange (4):
  Assume availability of gobject introspection during RPM build
  Remove osinfo-db-validate tool
  loader: update to comply with new database install location
  Remove database files

 Makefile.am|  21 +-
 configure.ac   |  73 --
 data/Makefile.am   |  20 -
 data/Makefile.inc  |  11 -
 data/datamap/Makefile.am   |   5 -
 data/datamap/microsoft.com/Makefile.am |   1 -
 .../microsoft.com/win-7-l10n-language.xml.in   |  40 -
 .../win-8-l10n-language-reverse.xml.in |  41 --
 .../microsoft.com/win-8-l10n-language.xml.in   |  41 --
 data/datamap/x.org/Makefile.am |   1 -
 data/datamap/x.org/x11-keyboard.xml.in | 148 
 data/device/Makefile.am|   8 -
 data/device/ibasetechnologies.net/Makefile.am  |   1 -
 data/device/ibasetechnologies.net/isa-ib700.xml.in |   8 -
 data/device/ibm.com/Makefile.am|   1 -
 data/device/ibm.com/ps2-keyboard.xml.in|   9 -
 data/device/ibm.com/ps2-mouse.xml.in   |   9 -
 data/device/pcisig.com/Makefile.am |  34 -
 data/device/pcisig.com/pci-1000-0012.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1000-0012.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1013-00b8.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1013-00b8.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1022-2000.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1022-2000.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-10ec-8029.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-10ec-8029.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-10ec-8139.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-10ec-8139.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1234-.d/Makefile.am |   1 -
 data/device/pcisig.com/pci-1234-.xml.in|  11 -
 data/device/pcisig.com/pci-1274-5000.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1274-5000.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-15ad-0710.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-15ad-0710.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1000.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1000.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1001.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1001.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1002.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1002.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1003.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1003.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1004.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1004.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1005.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1005.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1009.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1009.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1041.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1041.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1042.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1042.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1043.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1043.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1044.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1044.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1045.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1045.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1048.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1048.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1049.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1049.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1050.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1050.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1af4-1052.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1af4-1052.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-1b36-0100.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-1b36-0100.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-8086-100e.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-8086-100e.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-8086-2415.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-8086-2415.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-8086-25ab.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-8086-25ab.d/class.xml.in |   6 -
 data/device/pcisig.com/pci-8086-2668.d/Makefile.am |   1 -
 .../device/pcisig.com/pci-8086-2668.d/class.xml.in |   6

[Libosinfo] [PATCH 1/4] Assume availability of gobject introspection during RPM build

2016-07-29 Thread Daniel P. Berrange
The gobject introspection support is available for all
currently targetted platforms, so remove RPM conditionals.

Signed-off-by: Daniel P. Berrange 
---
 libosinfo.spec.in | 24 +---
 1 file changed, 1 insertion(+), 23 deletions(-)

diff --git a/libosinfo.spec.in b/libosinfo.spec.in
index 0feed84..d1ba0be 100644
--- a/libosinfo.spec.in
+++ b/libosinfo.spec.in
@@ -1,15 +1,5 @@
 # -*- rpm-spec -*-
 
-# Plugin isn't ready for real world use yet - it needs
-# a security audit at very least
-%define with_plugin 0
-
-%define with_gir 0
-
-%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
-%define with_gir 1
-%endif
-
 Summary: A library for managing OS information for virtualization
 Name: libosinfo
 Version: @VERSION@
@@ -29,9 +19,7 @@ BuildRequires: vala-tools
 BuildRequires: libsoup-devel
 BuildRequires: /usr/bin/pod2man
 BuildRequires: hwdata
-%if %{with_gir}
 BuildRequires: gobject-introspection-devel
-%endif
 Requires: hwdata
 
 %description
@@ -69,13 +57,7 @@ This package provides the Vala bindings for libosinfo 
library.
 %setup -q
 
 %build
-%if %{with_gir}
-%define gir_arg --enable-introspection=yes
-%else
-%define gir_arg --enable-introspection=no
-%endif
-
-%configure %{gir_arg} --enable-vala=yes
+%configure --enable-introspection=yes --enable-vala=yes
 %__make %{?_smp_mflags} V=1
 
 chmod a-x examples/*.js examples/*.py
@@ -119,9 +101,7 @@ rm -fr %{buildroot}
 %{_mandir}/man1/osinfo-query.1*
 %{_mandir}/man1/osinfo-install-script.1*
 %{_libdir}/%{name}-1.0.so.*
-%if %{with_gir}
 %{_libdir}/girepository-1.0/Libosinfo-1.0.typelib
-%endif
 
 %files devel
 %defattr(-, root, root)
@@ -132,9 +112,7 @@ rm -fr %{buildroot}
 %dir %{_includedir}/%{name}-1.0/osinfo/
 %{_includedir}/%{name}-1.0/osinfo/*.h
 %{_libdir}/pkgconfig/%{name}-1.0.pc
-%if %{with_gir}
 %{_datadir}/gir-1.0/Libosinfo-1.0.gir
-%endif
 %{_datadir}/gtk-doc/html/Libosinfo
 
 %files vala
-- 
2.7.4

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


[Libosinfo] [PATCH 2/4] Remove osinfo-db-validate tool

2016-07-29 Thread Daniel P. Berrange
Remove the osinfo-db-validate tool which is now available
via osinfo-db-tools. Add a RPM dep on osinfo-db-tools to
pull it in for upgradability.

Signed-off-by: Daniel P. Berrange 
---
 libosinfo.spec.in  |   3 +-
 mingw-libosinfo.spec.in|   4 +-
 po/POTFILES.in |   1 -
 tools/Makefile.am  |  11 +-
 tools/osinfo-db-validate.c | 350 -
 5 files changed, 5 insertions(+), 364 deletions(-)
 delete mode 100644 tools/osinfo-db-validate.c

diff --git a/libosinfo.spec.in b/libosinfo.spec.in
index d1ba0be..42b32b0 100644
--- a/libosinfo.spec.in
+++ b/libosinfo.spec.in
@@ -21,6 +21,7 @@ BuildRequires: /usr/bin/pod2man
 BuildRequires: hwdata
 BuildRequires: gobject-introspection-devel
 Requires: hwdata
+Requires: osinfo-db-tools
 
 %description
 libosinfo is a library that allows virtualization provisioning tools to
@@ -84,7 +85,6 @@ rm -fr %{buildroot}
 %defattr(-, root, root)
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
 %{_bindir}/osinfo-detect
-%{_bindir}/osinfo-db-validate
 %{_bindir}/osinfo-query
 %{_bindir}/osinfo-install-script
 %dir %{_datadir}/libosinfo/
@@ -96,7 +96,6 @@ rm -fr %{buildroot}
 %{_datadir}/libosinfo/db/platform
 %{_datadir}/libosinfo/db/install-script
 %{_datadir}/libosinfo/schemas/libosinfo.rng
-%{_mandir}/man1/osinfo-db-validate.1*
 %{_mandir}/man1/osinfo-detect.1*
 %{_mandir}/man1/osinfo-query.1*
 %{_mandir}/man1/osinfo-install-script.1*
diff --git a/mingw-libosinfo.spec.in b/mingw-libosinfo.spec.in
index 24d7b0c..054f009 100644
--- a/mingw-libosinfo.spec.in
+++ b/mingw-libosinfo.spec.in
@@ -42,6 +42,7 @@ combination.
 Summary: %{summary}
 
 Requires: pkgconfig
+Requires: mingw32-osinfo-db-tools
 
 %description -n mingw32-libosinfo
 libosinfo is a library that allows virtualization provisioning tools to
@@ -52,6 +53,7 @@ combination.
 Summary: %{summary}
 
 Requires: pkgconfig
+Requires: mingw64-osinfo-db-tools
 
 %description -n mingw64-libosinfo
 libosinfo is a library that allows virtualization provisioning tools to
@@ -91,7 +93,6 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc
 %files -n mingw32-libosinfo
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
 %{mingw32_bindir}/osinfo-detect.exe
-%{mingw32_bindir}/osinfo-db-validate.exe
 %{mingw32_bindir}/osinfo-install-script.exe
 %{mingw32_bindir}/osinfo-query.exe
 %{mingw32_bindir}/libosinfo-1.0-1.dll
@@ -116,7 +117,6 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc
 %files -n mingw64-libosinfo
 %doc AUTHORS ChangeLog COPYING.LIB NEWS README
 %{mingw64_bindir}/osinfo-detect.exe
-%{mingw64_bindir}/osinfo-db-validate.exe
 %{mingw64_bindir}/osinfo-install-script.exe
 %{mingw64_bindir}/osinfo-query.exe
 %{mingw64_bindir}/libosinfo-1.0-1.dll
diff --git a/po/POTFILES.in b/po/POTFILES.in
index bf4afb9..91efc7b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -432,7 +432,6 @@ osinfo/osinfo_product.c
 osinfo/osinfo_resources.c
 osinfo/osinfo_tree.c
 osinfo/osinfo_os_variant.c
-tools/osinfo-db-validate.c
 tools/osinfo-detect.c
 tools/osinfo-install-script.c
 tools/osinfo-query.c
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 7f7249f..60515e6 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -8,9 +8,9 @@ AM_CFLAGS = $(GOBJECT_CFLAGS) \
-I$(top_srcdir) \
 $(NULL)
 
-bin_PROGRAMS = osinfo-detect osinfo-db-validate osinfo-query 
osinfo-install-script
+bin_PROGRAMS = osinfo-detect osinfo-query osinfo-install-script
 
-man1_MANS = osinfo-db-validate.1 osinfo-detect.1 osinfo-query.1 
osinfo-install-script.1
+man1_MANS = osinfo-detect.1 osinfo-query.1 osinfo-install-script.1
 
 CLEANFILES = $(man1_MANS)
 
@@ -26,13 +26,6 @@ osinfo_detect_LDADD = $(GOBJECT_LIBS)\
  $(LIBXML_LIBS)\
  $(top_builddir)/osinfo/libosinfo-1.0.la
 
-osinfo_db_validate_SOURCES = osinfo-db-validate.c
-osinfo_db_validate_LDADD = $(GOBJECT_LIBS) \
- $(GIO_LIBS)   \
- $(GLIB_LIBS)  \
- $(LIBXML_LIBS)\
- $(top_builddir)/osinfo/libosinfo-1.0.la
-
 osinfo_query_SOURCES = osinfo-query.c
 osinfo_query_LDADD = $(GOBJECT_LIBS)   \
  $(GIO_LIBS)   \
diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c
deleted file mode 100644
index 965ed0e..000
--- a/tools/osinfo-db-validate.c
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (C) 2012 Red Hat, Inc
- *
- * osinfo-validate: validate that XML file(s) follows the published schema
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of

Re: [Libosinfo] [PATCH 3/4] loader: update to comply with new database install location

2016-08-05 Thread Daniel P. Berrange
On Fri, Aug 05, 2016 at 01:42:09PM +0200, Christophe Fergeau wrote:
> Hey,
> 
> On Fri, Jul 29, 2016 at 11:21:26AM +0100, Daniel P. Berrange wrote:
> > The new database locations are
> > 
> >   - System location
> > 
> > This is determined by the env variable
> > 
> >   $OSINFO_SYSTEM_DIR
> > 
> > If not set, then defaults to /usr/share/osinfo
> > 
> > This location is intended for use by operating system
> > distributors to install the initial data set via a
> > package management system like RPM or Deb
> > 
> >   - Local location
> > 
> > This is determined by the env variable
> > 
> >   $OSINFO_LOCAL_DIR
> > 
> > If not set, then defaults to /etc/osinfo
> > 
> > This location is intended for use by local system
> > administrators to install custom local data that
> > should be available to all users on a host
> > 
> >   - User location
> > 
> > This is determined by the env variable
> > 
> >   $OSINFO_USER_DIR
> > 
> > If not set, then defaults to $XDG_CONFIG_HOME/osinfo
> > 
> > If that is not set, then defaults to $HOME/.config/osinfo
> 
> I wanted to ask why XDG_CONFIG_HOME and not XDG_DATA_HOME, but it seems
> it was already this way before the split, better to keep things as close
> as possible.

Well we have 3 locations

 - system location - this is non-editable data provided by OS
 - local location  - this is sysadmin editable config in /etc
 - user location   - this is user editable config in $HOME


The system location is akin to XDG_DATA_HOME, while local location
is akin to XDG_CONFIG_HOME. So on balance I think XDG_CONFIG_HOME
is preferrable as this is user editable config for guest installs

> > index ddece61..c915b57 100644
> > --- a/osinfo/Makefile.am
> > +++ b/osinfo/Makefile.am
> > @@ -36,6 +36,7 @@ libosinfo_1_0_la_CFLAGS = \
> > $(GOBJECT_CFLAGS) \
> > $(GLIB_CFLAGS) \
> > $(GIO_CFLAGS) \
> > +   -DDATA_DIR='"$(datadir)"' \
> 
> DATA_DIR is then used to lookup the osinfo database. This means that the
> database and the library have to be built to use the same prefix. I'm
> wondering if it would make sense to have a .pc file together with the
> database to help with locating the system database. Probably not worth
> the complication at this point.

We have an osinfo-db-paths tool that can report this data, for all
3 db locations.  pkg-config isn't a great fit, since it can't report
the user location as it can't dynamically substitute in env variables


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] [PATCH] configure: fix accidental break in soname

2016-08-10 Thread Daniel P. Berrange
The change in version from 0.3.0 to 1.0.0 triggered a latent
bug in our code which sets the library soname. This meant we
created libosinfo-1.0.so.1 instead of libosinfo-1.0.so.0

Pull in the fix from libvirt which is where the original logic
was copied from.

Signed-off-by: Daniel P. Berrange 
---
 configure.ac | 40 +++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 7276861..f002cab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,12 +73,50 @@ LIBOSINFO_MAJOR_VERSION=`echo $VERSION | awk -F. '{print 
$1}'`
 LIBOSINFO_MINOR_VERSION=`echo $VERSION | awk -F. '{print $2}'`
 LIBOSINFO_MICRO_VERSION=`echo $VERSION | awk -F. '{print $3}'`
 
LIBOSINFO_VERSION=$LIBOSINFO_MAJOR_VERSION.$LIBOSINFO_MINOR_VERSION.$LIBOSINFO_MICRO_VERSION$LIBOSINFO_MICRO_VERSION_SUFFIX
-LIBOSINFO_VERSION_INFO=`expr $LIBOSINFO_MAJOR_VERSION + 
$LIBOSINFO_MINOR_VERSION`:$LIBOSINFO_MICRO_VERSION:$LIBOSINFO_MINOR_VERSION
 LIBOSINFO_VERSION_NUMBER=`expr $LIBOSINFO_MAJOR_VERSION \* 100 + 
$LIBOSINFO_MINOR_VERSION \* 1000 + $LIBOSINFO_MICRO_VERSION`
 
+# In libtool terminology we need to figure out:
+#
+# CURRENT
+# The most recent interface number that this library implements.
+#
+# REVISION
+# The implementation number of the CURRENT interface.
+#
+# AGE
+# The difference between the newest and oldest interfaces that this
+# library implements.
+#
+# In other words, the library implements all the interface numbers
+# in the range from number `CURRENT - AGE' to `CURRENT'.
+#
+# Libtool assigns the soname version from `CURRENT - AGE', and we
+# don't want that to ever change in libosinfo. ie it must always be
+# zero, to produce libosinfo.so.0.
+#
+# We would, however, like the libosinfo version number reflected
+# in the so version'd symlinks, and this is based on AGE.REVISION
+# eg  libosinfo.so.0.AGE.REVISION
+#
+# Assuming we do ever want to break soname version, this can
+# toggled. But seriously, don't ever touch this.
+LIBOSINFO_SONUM=0
+
+# The following examples show what libtool will do
+#
+# Input: 0.3.0  ->   libosinfo.so.0.3.0
+# Input: 1.0.0  ->   libosinfo.so.0.1000.0
+# Input: 2.5.8  ->   libosinfo.so.0.2005.8
+#
+AGE=`expr $LIBOSINFO_MAJOR_VERSION '*' 1000 + $LIBOSINFO_MINOR_VERSION`
+REVISION=$LIBOSINFO_MICRO_VERSION
+CURRENT=`expr $LIBOSINFO_SONUM + $AGE`
+LIBOSINFO_VERSION_INFO=$CURRENT:$REVISION:$AGE
+
 AC_SUBST([LIBOSINFO_MAJOR_VERSION])
 AC_SUBST([LIBOSINFO_MINOR_VERSION])
 AC_SUBST([LIBOSINFO_MICRO_VERSION])
+AC_SUBST([LIBOSINFO_SONUM])
 AC_SUBST([LIBOSINFO_VERSION])
 AC_SUBST([LIBOSINFO_VERSION_INFO])
 AC_SUBST([LIBOSINFO_VERSION_NUMBER])
-- 
2.7.4

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


Re: [Libosinfo] [PATCH 0/6] Add Mageia[3-5]+generic support

2016-08-11 Thread Daniel P. Berrange
On Wed, Aug 10, 2016 at 06:19:15PM +0200, Thierry Vignaud wrote:
> This patch series enables to detect:
> - stable release Mageia[3-5]
> - future releases (including Cauldron, the rolling distro)
> Last but not least it makes virt-manager to pick the right devices for proper
> mouse integration & faster virtualization

The libosinfo database files are no longer part of the libosinfo
git repo, so I'm afraid you'll need to re-send this after splitting
it up.

All the XML file changes shoudl now be in the 'osinfo-db' GIT
repository

   https://gitlab.com/libosinfo/osinfo-db

The test data files should remain in libosinfo git.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 0/6] Add Mageia[3-5]+generic support

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 11:15:21AM +0200, Thierry Vignaud wrote:
> On 11 August 2016 at 10:44, Daniel P. Berrange  wrote:
> >> This patch series enables to detect:
> >> - stable release Mageia[3-5]
> >> - future releases (including Cauldron, the rolling distro)
> >> Last but not least it makes virt-manager to pick the right devices for 
> >> proper
> >> mouse integration & faster virtualization
> >
> > The libosinfo database files are no longer part of the libosinfo
> > git repo, so I'm afraid you'll need to re-send this after splitting
> > it up.
> >
> > All the XML file changes shoudl now be in the 'osinfo-db' GIT
> > repository
> >
> >https://gitlab.com/libosinfo/osinfo-db
> >
> > The test data files should remain in libosinfo git.
> 
> The patches actually are against osinfo-db (I imported my libosinfo
> patches on top of  47bdf50c47c59eb74d146d08c1062988440f9aa9) but I
> overlooked the fact that the test directory remained in libosinfo.
> I'll split the tests and submit them separatly for libosinfo

Ah, ok, seeing the tests fooled me :-)

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH] add support for ReactOS

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 12:02:31PM +0200, Thierry Vignaud wrote:
> notes:
> - it's not possible to differentiate LiveCD from regular installer
> - it's not possible to differentiate between different versions
> - network works OK (as in ping)
> ---
>  data/os/reactos/reactos.xml.in | 38 ++
>  1 file changed, 38 insertions(+)
>  create mode 100644 data/os/reactos/reactos.xml.in
> 
> diff --git a/data/os/reactos/reactos.xml.in b/data/os/reactos/reactos.xml.in
> new file mode 100644
> index 000..54c62c9
> --- /dev/null
> +++ b/data/os/reactos/reactos.xml.in
> @@ -0,0 +1,38 @@
> +
> +
> +  https://www.reactos.org/project-news/reactos-041-released";>

The id must match the pattern

   http://vendor-domain/distro-name/version

the loader should be complaining that your ID here is not valid.

> +reactos
> +ReactOS
> +0.4.1
> +ReactOS
> +winnt
> +win
> +http://microsoft.com/win/7"/>
> +
> +
> +2009-10-22
> +2015-01-13

These dates seem wrong  - according to

  https://sourceforge.net/projects/reactos/files/ReactOS/

the 0.4.1 relase was not uploaded until 2016/05/23

> +
> +
> +  
> + 
> +REACTOS

It would be nice to file a bug with reactos asking them to include the
version string + architecture in their volume-ids.

> +ReactOS Foundation
> +  
> +
> +
> +
> +
> +  
> +10
> +1
> +1073741824
> +4294967296
> +  
> +
> +
> +  
> +

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 2/6] recognize Mageia 4

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 11:21:20AM +0200, Thierry Vignaud wrote:
> ---
>  data/os/mageia.org/mageia-4.xml.in | 77 
> ++
>  1 file changed, 77 insertions(+)
>  create mode 100644 data/os/mageia.org/mageia-4.xml.in
> 
> 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 000..3faf39f
> --- /dev/null
> +++ b/data/os/mageia.org/mageia-4.xml.in
> @@ -0,0 +1,77 @@
> +
> +  http://mageia.org/mageia/4";>
> +mageia4
> +<_name>Mageia 4
> +<_vendor>Mageia
> +linux
> +mageia
> +4
> +http://mageia.org/mageia/3"/>
> +2014-02-01
> +2015-09-19
> +
> +
> +  <_name>Mageia 4 Live
> +
> +
> +  <_name>Mageia 4 Net-install
> +
> +
> +  <_name>Mageia 4 DVD Installer
> +
> +
> +
> +  
> +  
> https://www.mageia.org/en/downloads/get/?q=Mageia-4-Boot-i586-CD.iso
> +  
> +Mga Boot ISO
> +  
> +  isolinux/i386/vmlinuz
> +  isolinux/i386/all.rdz
> +
> +
> +
> +  
> +  
> https://www.mageia.org/en/downloads/get/?q=Mageia-4-Boot-x86_64-CD.iso
> +  
> +Mageia 4 x86_64 Netinstall
> +  
> +  isolinux/x86_64/vmlinuz
> +  isolinux/x86_64/all.rdz
> +
> +
> +
> +  
> https://www.mageia.org/en/downloads/get/?q=Mageia-4-i586-DVD.iso
> +

Any reason you left these comments in here and later ?

> +  
> +Mageia-4(-i586)?
> +  
> +  isolinux/i386/vmlinuz
> +  isolinux/i386/all.rdz
> +
> +
> +  
> https://www.mageia.org/en/downloads/get/?q=Mageia-4-x86_64-DVD.iso
> +
> +  
> +Mageia-4(-x86_64)?
> +  
> +  isolinux/x86_64/vmlinuz
> +  isolinux/x86_64/all.rdz
> +
> +
> +  
> http://www.mageia.org/fr/downloads/get/?q=Mageia-4-LiveDVD-KDE4-i586-DVD.iso

Does 'fr' imply that this ISO is in french ? Seems like we should
be using 'en' as you have for the other URLs above to be consistent.

> +
> +  
> +Mageia-4-(GNOME|KDE4)-Live(CD|DVD)
> +  
> +
> +  
> +
> -- 
> 2.9.2
> 
> ___
> Libosinfo mailing list
> Libosinfo@redhat.com
> https://www.redhat.com/mailman/listinfo/libosinfo

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 3/6] recognize Mageia 4.1

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 11:21:21AM +0200, Thierry Vignaud wrote:
> ---
>  data/os/mageia.org/mageia-4.1.xml.in | 53 
> 
>  1 file changed, 53 insertions(+)
>  create mode 100644 data/os/mageia.org/mageia-4.1.xml.in

Same comments here as the previous patch, and likewise your next patch


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 5/6] add support for generic Mageia

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 11:21:23AM +0200, Thierry Vignaud wrote:
> From: Thierry Vignaud 
> 
> v2:
> - split netinstall,
> - add variant IDs
> - add kernel/initrd pathes,
> - make live be x86_64 (same label between ia32 & x86_64 :-( )
> - live matches only mga4+
> ---
>  data/os/mageia.org/mageia-unknown.xml.in | 69 
> 
>  1 file changed, 69 insertions(+)
>  create mode 100644 data/os/mageia.org/mageia-unknown.xml.in
> 
> diff --git a/data/os/mageia.org/mageia-unknown.xml.in 
> b/data/os/mageia.org/mageia-unknown.xml.in
> new file mode 100644
> index 000..bf90917
> --- /dev/null
> +++ b/data/os/mageia.org/mageia-unknown.xml.in
> @@ -0,0 +1,69 @@
> +
> +
> +  https://wiki.mageia.org/en/Cauldron";>
> +mageia-unknown
> +Mageia
> +Mageia
> +linux
> +mageia
> +unknown
> +http://mageia.org/mageia/5"/>
> +
> +
> +  <_name>Mageia Unknown Live
> +
> +
> +  <_name>Mageia Unknown Net-install
> +
> +
> +  <_name>Mageia Unknown DVD Installer
> +
> +
> +
> +  
> +  
> ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/i586/install/images/boot.iso
> +  
> +Mageia.*i586-netinstall
> +  
> +  isolinux/i386/vmlinuz
> +  isolinux/i386/all.rdz
> +
> +
> +
> +  
> +  
> ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/x86_64/install/images/boot.iso

What is this FTP site ? Is that really the official host for the
Mageia download ISO ?


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 6/6] describe HW

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 11:21:24AM +0200, Thierry Vignaud wrote:
> ---
>  data/os/freebsd.org/freebsd-8.0.xml.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/data/os/freebsd.org/freebsd-8.0.xml.in 
> b/data/os/freebsd.org/freebsd-8.0.xml.in
> index e7554a3..0fdbc0b 100644
> --- a/data/os/freebsd.org/freebsd-8.0.xml.in
> +++ b/data/os/freebsd.org/freebsd-8.0.xml.in
> @@ -14,7 +14,7 @@
>  2009-11-25
>  
>  
> -  http://pcisig.com/pci/8086/100e"/>
> +  http://pcisig.com/pci/8086/100e"/> 
>  
>
>  

ACK and pushed to git


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 1/6] use the right devices by default

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 11:21:19AM +0200, Thierry Vignaud wrote:
> ---
>  data/os/mageia.org/mageia-1.xml.in | 8 
>  1 file changed, 8 insertions(+)
> 
> diff --git a/data/os/mageia.org/mageia-1.xml.in 
> b/data/os/mageia.org/mageia-1.xml.in
> index 3380b1b..262d27f 100644
> --- a/data/os/mageia.org/mageia-1.xml.in
> +++ b/data/os/mageia.org/mageia-1.xml.in
> @@ -12,6 +12,14 @@
>  2011-06-01
>  2012-12-01
>  
> +
> +  http://pcisig.com/pci/1af4/1000"/> 
> +  http://pcisig.com/pci/1af4/1001"/> 
> +  http://pcisig.com/pci/1b36/0100"/> 
> +  http://pcisig.com/pci/8086/2415"/> 
> +  http://usb.org/usb/80ee/0021"/> 
> +
> +
>  
>https://www.mageia.org/en/downloads/get/?q=mageia-1-dvd-i586
>

ACK and pushed to git

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH osinfo-db] Fix COPYING file to refer to GPLv2+, not LGPLv2+

2016-08-11 Thread Daniel P. Berrange
On Tue, Aug 02, 2016 at 03:49:55PM +0100, Daniel P. Berrange wrote:
> The LGPLv2+ is only applicable for code that needs to be linked
> with other non-GPL compatible code. The actual osinfo database
> files aren't linked in any traditional sense - they're merely
> parsed. As such they can be just tagged with the GPLv2+, and
> it would still be valid for them to be used for non-GPL compat
> application code.
> 
> This also adds an explicit header to all the XML files to make
> their license clear.
> 
> Signed-off-by: Daniel P. Berrange 

No complaints, so I pushed this.


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 5/6] add support for generic Mageia

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 03:53:03PM +0200, Thierry Vignaud wrote:
> On 11 August 2016 at 13:05, Daniel P. Berrange  wrote:
> > On Thu, Aug 11, 2016 at 11:21:23AM +0200, Thierry Vignaud wrote:
> >> From: Thierry Vignaud 
> >>
> >> v2:
> >> - split netinstall,
> >> - add variant IDs
> >> - add kernel/initrd pathes,
> >> - make live be x86_64 (same label between ia32 & x86_64 :-( )
> >> - live matches only mga4+
> >> ---
> >>  data/os/mageia.org/mageia-unknown.xml.in | 69 
> >> 
> >>  1 file changed, 69 insertions(+)
> >>  create mode 100644 data/os/mageia.org/mageia-unknown.xml.in
> >>
> >> diff --git a/data/os/mageia.org/mageia-unknown.xml.in 
> >> b/data/os/mageia.org/mageia-unknown.xml.in
> >> new file mode 100644
> >> index 000..bf90917
> >> --- /dev/null
> >> +++ b/data/os/mageia.org/mageia-unknown.xml.in
> >> @@ -0,0 +1,69 @@
> >> +
> >> +
> >> +  https://wiki.mageia.org/en/Cauldron";>
> >> +mageia-unknown
> >> +Mageia
> >> +Mageia
> >> +linux
> >> +mageia
> >> +unknown
> >> +http://mageia.org/mageia/5"/>
> >> +
> >> +
> >> +  <_name>Mageia Unknown Live
> >> +
> >> +
> >> +  <_name>Mageia Unknown Net-install
> >> +
> >> +
> >> +  <_name>Mageia Unknown DVD Installer
> >> +
> >> +
> >> +
> >> +  
> >> +  
> >> ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/i586/install/images/boot.iso
> >> +  
> >> +Mageia.*i586-netinstall
> >> +  
> >> +  isolinux/i386/vmlinuz
> >> +  isolinux/i386/all.rdz
> >> +
> >> +
> >> +
> >> +  
> >> +  
> >> ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/x86_64/install/images/boot.iso
> >
> > What is this FTP site ? Is that really the official host for the
> > Mageia download ISO ?
> 
> That's just one of the faster mirror as the web doesn't provide an URL
> for cauldron (~= rawhide for FC) like it does for stable release

There must be somewhere that the mirrors are getting their master
content from. We don't really want to link to specific mirrors
as that inappropriately directs traffic to just one mirror, defeating
the point of having lots of mirrors. Also mirrors come & go, so we
don't want to depend on one specific mirror continuing to exist.


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 5/6] add support for generic Mageia

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 04:32:43PM +0200, Thierry Vignaud wrote:
> On 11 August 2016 at 16:29, Daniel P. Berrange  wrote:
> >> >> - split netinstall,
> >> >> - add variant IDs
> >> >> - add kernel/initrd pathes,
> >> >> - make live be x86_64 (same label between ia32 & x86_64 :-( )
> >> >> - live matches only mga4+
> >> >> ---
> >> >>  data/os/mageia.org/mageia-unknown.xml.in | 69 
> >> >> 
> >> >>  1 file changed, 69 insertions(+)
> >> >>  create mode 100644 data/os/mageia.org/mageia-unknown.xml.in
> >> >>
> >> >> diff --git a/data/os/mageia.org/mageia-unknown.xml.in 
> >> >> b/data/os/mageia.org/mageia-unknown.xml.in
> >> >> new file mode 100644
> >> >> index 000..bf90917
> >> >> --- /dev/null
> >> >> +++ b/data/os/mageia.org/mageia-unknown.xml.in
> >> >> @@ -0,0 +1,69 @@
> >> >> +
> >> >> +
> >> >> +  https://wiki.mageia.org/en/Cauldron";>
> >> >> +mageia-unknown
> >> >> +Mageia
> >> >> +Mageia
> >> >> +linux
> >> >> +mageia
> >> >> +unknown
> >> >> +http://mageia.org/mageia/5"/>
> >> >> +
> >> >> +
> >> >> +  <_name>Mageia Unknown Live
> >> >> +
> >> >> +
> >> >> +  <_name>Mageia Unknown Net-install
> >> >> +
> >> >> +
> >> >> +  <_name>Mageia Unknown DVD Installer
> >> >> +
> >> >> +
> >> >> +
> >> >> +  
> >> >> +  
> >> >> ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/i586/install/images/boot.iso
> >> >> +  
> >> >> +Mageia.*i586-netinstall
> >> >> +  
> >> >> +  isolinux/i386/vmlinuz
> >> >> +  isolinux/i386/all.rdz
> >> >> +
> >> >> +
> >> >> +
> >> >> +  
> >> >> +  
> >> >> ftp://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/distrib/cauldron/x86_64/install/images/boot.iso
> >> >
> >> > What is this FTP site ? Is that really the official host for the
> >> > Mageia download ISO ?
> >>
> >> That's just one of the faster mirror as the web doesn't provide an URL
> >> for cauldron (~= rawhide for FC) like it does for stable release
> >
> > There must be somewhere that the mirrors are getting their master
> > content from. We don't really want to link to specific mirrors
> > as that inappropriately directs traffic to just one mirror, defeating
> > the point of having lots of mirrors. Also mirrors come & go, so we
> > don't want to depend on one specific mirror continuing to exist.
> 
> Sadly the primary source for primary mirrors isn't publicaly availlable

In that case we should either leave out the URL, or enhance libosinfo
to support specifying a mirror list in some manner.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH 2/6] recognize Mageia 4

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 03:49:33PM +0200, Thierry Vignaud wrote:
> On 11 August 2016 at 13:03, Daniel P. Berrange  wrote:
> > On Thu, Aug 11, 2016 at 11:21:20AM +0200, Thierry Vignaud wrote:
> >> ---
> >>  data/os/mageia.org/mageia-4.xml.in | 77 
> >> ++
> >>  1 file changed, 77 insertions(+)
> >>  create mode 100644 data/os/mageia.org/mageia-4.xml.in
> >>
> >> 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 000..3faf39f
> >> --- /dev/null
> >> +++ b/data/os/mageia.org/mageia-4.xml.in
> >> @@ -0,0 +1,77 @@
> >> +
> >> +  http://mageia.org/mageia/4";>
> >> +mageia4
> >> +<_name>Mageia 4
> >> +<_vendor>Mageia
> >> +linux
> >> +mageia
> >> +4
> >> +http://mageia.org/mageia/3"/>
> >> +2014-02-01
> >> +2015-09-19
> >> +
> >> +
> >> +  <_name>Mageia 4 Live
> >> +
> >> +
> >> +  <_name>Mageia 4 Net-install
> >> +
> >> +
> >> +  <_name>Mageia 4 DVD Installer
> >> +
> >> +
> >> +
> >> +  
> >> +  
> >> https://www.mageia.org/en/downloads/get/?q=Mageia-4-Boot-i586-CD.iso
> >> +  
> >> +Mga Boot ISO
> >> +  
> >> +  isolinux/i386/vmlinuz
> >> +  isolinux/i386/all.rdz
> >> +
> >> +
> >> +
> >> +  
> >> +  
> >> https://www.mageia.org/en/downloads/get/?q=Mageia-4-Boot-x86_64-CD.iso
> >> +  
> >> +Mageia 4 x86_64 Netinstall
> >> +  
> >> +  isolinux/x86_64/vmlinuz
> >> +  isolinux/x86_64/all.rdz
> >> +
> >> +
> >> +
> >> +  
> >> https://www.mageia.org/en/downloads/get/?q=Mageia-4-i586-DVD.iso
> >> +
> >
> > Any reason you left these comments in here and later ?
> 
> B/c 2 ISOs have the same ids sadly...
> See also existing entriyes for mageia3-
> 
> >> +  
> >> +Mageia-4(-i586)?
> >> +  
> >> +  isolinux/i386/vmlinuz
> >> +  isolinux/i386/all.rdz
> >> +
> >> +
> >> +  
> >> https://www.mageia.org/en/downloads/get/?q=Mageia-4-x86_64-DVD.iso
> >> +
> >> +  
> >> +Mageia-4(-x86_64)?
> >> +  
> >> +  isolinux/x86_64/vmlinuz
> >> +  isolinux/x86_64/all.rdz
> >> +
> >> +
> >> +  
> >> http://www.mageia.org/fr/downloads/get/?q=Mageia-4-LiveDVD-KDE4-i586-DVD.iso
> >
> > Does 'fr' imply that this ISO is in french ? Seems like we should
> > be using 'en' as you have for the other URLs above to be consistent.
> 
> That's because the web site redirect there to me, like it did for
> Christophe when he submitted mageia[1-3].

Ok, so this is all a big mess, and not really your fault since the
existing data is all wrong too. These URLs are not in fact download
links. They point to webpages which use awful javascript magic to
redirect you to an actual download link.

ie, an application using libosinfo which tries to fetch the ISO
with that link is going to fail, because they'll just fetch an
HTML page.

I don't see any way to get a direct download link for mageia images
which works in same way as othre distros. ie a link which automatically
redirects at the HTTP level directly to the download file.

So I'm afraid you'll have to remove all these URLs. I'm going to submit
a patch which removes the URLs from existing files too since its all
wrong.

To support this would require us to have some kind of explicit
support for mirrorlists. eg you can get a list of mageia mirror
sites via:

  http://mirrors.mageia.org/api/mageia.cauldron.x86_64.list

you'd have to then parse that an append the path to the ISO
image. So somehow we'd need to encode the mirror base URL
and metadata on how to process it

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] [PATCH osinfo-db] mageia: remove all download URLs

2016-08-12 Thread Daniel P. Berrange
The download URLs in the mageia data files are not valid,
since they just point to HTML pages which use javascript
todo a magic redirect to the actual download site. This
means that any app trying to fetch ISOs with URLs will
just get HTML instead of the actual ISO.

Signed-off-by: Daniel P. Berrange 
---
 data/os/mageia.org/mageia-1.xml.in | 17 -
 data/os/mageia.org/mageia-2.xml.in |  8 
 data/os/mageia.org/mageia-3.xml.in | 14 --
 3 files changed, 39 deletions(-)

diff --git a/data/os/mageia.org/mageia-1.xml.in 
b/data/os/mageia.org/mageia-1.xml.in
index 262d27f..197b291 100644
--- a/data/os/mageia.org/mageia-1.xml.in
+++ b/data/os/mageia.org/mageia-1.xml.in
@@ -21,45 +21,28 @@
 
 
 
-  https://www.mageia.org/en/downloads/get/?q=mageia-1-dvd-i586
   
 1-i586
 Mageia.Org
   
 
 
-  http://www.mageia.org/fr/downloads/get/?q=mageia-1-cd-dualarch
   
 mageia-dual-1
   
 
 
-  http://www.mageia.org/fr/downloads/get/?q=mageia-1-cd-dualarch
   
 mageia-dual-1
   
 
 
-  https://www.mageia.org/en/downloads/get/?q=mageia-1-dvd-x86_64
   
 1-x86_64
 Mageia.Org
   
 
 
-  
http://www.mageia.org/fr/downloads/get/?q=mageia-1-live-kde-europe1-cd-i586
-
   
 Livecd-1-(GNOME|KDE)
   
diff --git a/data/os/mageia.org/mageia-2.xml.in 
b/data/os/mageia.org/mageia-2.xml.in
index ba516c1..3a15c80 100644
--- a/data/os/mageia.org/mageia-2.xml.in
+++ b/data/os/mageia.org/mageia-2.xml.in
@@ -13,19 +13,11 @@
 2013-11-22
 
 
-  
https://www.mageia.org/en/downloads/get/?q=Mageia-2-i586-DVD.iso
-
   
 Mageia-2(-i586)?
   
 
 
-  
https://www.mageia.org/en/downloads/get/?q=Mageia-2-x86_64-DVD.iso
-
   
 Mageia-2(-x86_64)?
   
diff --git a/data/os/mageia.org/mageia-3.xml.in 
b/data/os/mageia.org/mageia-3.xml.in
index 8070ca0..1230d7e 100644
--- a/data/os/mageia.org/mageia-3.xml.in
+++ b/data/os/mageia.org/mageia-3.xml.in
@@ -13,30 +13,16 @@
 2014-11-19
 
 
-  
https://www.mageia.org/en/downloads/get/?q=Mageia-3-i586-DVD.iso
-
   
 Mageia-3(-i586)?
   
 
 
-  
https://www.mageia.org/en/downloads/get/?q=Mageia-3-x86_64-DVD.iso
-
   
 Mageia-3(-x86_64)?
   
 
 
-  
http://www.mageia.org/fr/downloads/get/?q=Mageia-3-LiveDVD-KDE4-i586-DVD.iso
-
   
 Mageia-3-(GNOME|KDE4)-Live(CD|DVD)
   
-- 
2.7.4

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


Re: [Libosinfo] [PATCH] fedora: Install spice-webdavd dependency

2016-08-22 Thread Daniel P. Berrange
On Fri, Aug 19, 2016 at 11:44:22PM +0300, Visarion Alexandru wrote:
> From: Visarion Alexandru 
> 
> GNOME-Boxes is developing a folder sharing feature which will
> need spice-webdavd installed in the guest for it to work.
> 
> Let's make the folder sharing feature available right after
> express install in Fedora, by automaticaly installing spice-webdavd.
> ---
>  data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git 
> a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in 
> b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> index bd10fba..edff4e2 100644
> --- a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> +++ b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> @@ -155,6 +155,7 @@ url 
> --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$release
>  # QXL driver and SPICE vdagent
>  xorg-x11-drv-qxl
>  spice-vdagent
> +spice-webdavd

I'mm pretty sure this RPM doesn't exist for all versions of Fedora we
support, so you'll need to wrap this in conditional logic

>  
>  
>

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH] fedora: Install spice-webdavd dependency

2016-08-26 Thread Daniel P. Berrange
On Fri, Aug 26, 2016 at 07:23:19PM +0300, Visarion Alexandru wrote:
> From: Visarion Alexandru 
> 
> GNOME-Boxes is developing a folder sharing feature which will
> need spice-webdavd installed in the guest for it to work.
> 
> Let's make the folder sharing feature available right after
> express install in Fedora, by automaticaly installing spice-webdavd,
> if available.
> ---
>  data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git 
> a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in 
> b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> index bd10fba..d79034e 100644
> --- a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> +++ b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> @@ -157,6 +157,9 @@ xorg-x11-drv-qxl
>  spice-vdagent
>  
>  
> +  
> +spice-webdavd
> +  

Only the first matching condition of a  is run. So by adding
this you've now prevented qemu-guest-agent being installed. Just use an
standalone 

>
>  qemu-guest-agent
>

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] [PATCH] fedora: Install spice-webdavd dependency

2016-09-05 Thread Daniel P. Berrange
On Tue, Aug 30, 2016 at 12:52:09PM +0300, Visarion Alexandru wrote:
> From: Visarion Alexandru 
> 
> GNOME-Boxes is developing a folder sharing feature which will
> need spice-webdavd installed in the guest for it to work.
> 
> Let's make the folder sharing feature available right after
> express install in Fedora, by automaticaly installing spice-webdavd,
> if available.
> ---
>  data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in | 4 
> 
>  1 file changed, 4 insertions(+)
> 
> diff --git 
> a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in 
> b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> index bd10fba..ba772ab 100644
> --- a/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> +++ b/data/install-script/fedoraproject.org/fedora-kickstart-desktop.xml.in
> @@ -156,6 +156,10 @@ url 
> --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$release
>  xorg-x11-drv-qxl
>  spice-vdagent
>  
> +
> +spice-webdavd
> +
> +
>  
>
>  qemu-guest-agent

ACK and pushed to git master

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] [PATCH osinfo-db] make: add ability to build from non-local dir

2016-09-12 Thread Daniel P. Berrange
Add ability to do a VPATH building by doing

  mkdir build
  cd build
  ln -s ../Makefile .
  make VPATH=..

Signed-off-by: Daniel P. Berrange 
---
 Makefile | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 2223db3..3cffade 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
 
+VPATH = .
+
 TODAY = $(shell date +"%Y%m%d")
 
 OSINFO_DB_EXPORT = osinfo-db-export
@@ -14,8 +16,8 @@ GETTEXT_PACKAGE = osinfo-db
 
 SED = sed
 
-DATA_FILES_IN = $(wildcard data/*/*/*.xml.in) $(wildcard data/*/*/*/*.xml.in)
-DATA_FILES = $(DATA_FILES_IN:%.in=%)
+DATA_FILES_IN = $(wildcard $(VPATH)/data/*/*/*.xml.in) $(wildcard 
$(VPATH)/data/*/*/*/*.xml.in)
+DATA_FILES = $(DATA_FILES_IN:$(VPATH)/%.in=%)
 
 SCHEMA_FILES_IN = data/schema/osinfo.rng.in
 SCHEMA_FILES = data/schema/osinfo.rng
@@ -59,9 +61,11 @@ mingwrpm:  mingw-osinfo-db.spec $(ARCHIVE)
 
 
 %.xml: %.xml.in Makefile
-   $(V_I18N) LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_MERGE_OPTS) -x -u -c 
po/.intltool-merge-cache po $< $@
+   @mkdir -p `dirname $@` po
+   $(V_I18N) LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_MERGE_OPTS) -x -u -c 
po/.intltool-merge-cache $(VPATH)/po $< $@
 
 %.rng: %.rng.in Makefile
+   @mkdir -p `dirname $@` po
$(V_GEN) $(SED) -e "s/@VERSION@/$(TODAY)/" < $< > $@
 
 $(ARCHIVE): $(DATA_FILES) $(SCHEMA_FILES)
-- 
2.7.4

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


[Libosinfo] [PATCH osinfo-db] Add support for DESTDIR

2016-09-13 Thread Daniel P. Berrange
The jhbuild system doesn't support plain "make" systems,
so we need to pretend to be more automake-like. Adding
DESTDIR support lets jhbuild' automake "make install"
step work.

Signed-off-by: Daniel P. Berrange 
---
 Makefile | 3 ++-
 autobuild.sh | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 3cffade..53a2ea5 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ TODAY = $(shell date +"%Y%m%d")
 OSINFO_DB_EXPORT = osinfo-db-export
 OSINFO_DB_IMPORT = osinfo-db-import
 
+DESTDIR = /
 OSINFO_DB_TARGET = --user
 
 INTLTOOL_MERGE = intltool-merge
@@ -48,7 +49,7 @@ INTLTOOL_MERGE_OPTS_1 =
 all: $(ARCHIVE) osinfo-db.spec mingw-osinfo-db.spec
 
 install: $(ARCHIVE)
-   $(OSINFO_DB_IMPORT) $(OSINFO_DB_TARGET) $(ARCHIVE)
+   $(OSINFO_DB_IMPORT) --root $(DESTDIR) $(OSINFO_DB_TARGET) $(ARCHIVE)
 
 %.spec: %.spec.in Makefile
$(V_GEN) $(SED) -e "s/@VERSION@/$(TODAY)/" < $< > $@
diff --git a/autobuild.sh b/autobuild.sh
index d3b8cf4..d82b0ef 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -22,7 +22,7 @@ case $MAKEFLAGS in
 esac
 
 make
-make install OSINFO_DB_TARGET="--system --root $AUTOBUILD_INSTALL_ROOT"
+make install DESTDIR="$AUTOBUILD_INSTALL_ROOT" OSINFO_DB_TARGET="--system"
 
 if [ -n "$AUTOBUILD_COUNTER" ]; then
   EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
-- 
2.7.4

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


Re: [Libosinfo] [PATCH osinfo-db] Add support for DESTDIR

2016-09-13 Thread Daniel P. Berrange
On Tue, Sep 13, 2016 at 11:59:27AM +0200, Zeeshan Ali (Khattak) wrote:
> Hmm.. this would work but it creates an extra directory level,
> osinfo-db at DESTDIR (when invoked with --system target):
> 
> /jhbuild/_jhbuild/root-osinfo-db/osinfo-db

Are your sure that's not related to configure args you used
when building osinfo-db-tools.

The osinfo-db-import command will merely concatenate the
default --system path with the --root path. So

eg if I see the default system path:

$ osinfo-db-path --system
/usr/share/osinfo

And use a --root of /tmp/jhbuild:

$ osinfo-db-import  --root /tmp/jhbuild --system osinfo-db-20160913.tar.xz 

It'll end up installing in

$ ls /tmp/jhbuild/usr/share/osinfo/
datamap  device  install-script  os  platform  schema  VERSION


So whatever path you are getting is a result of of
args you passed for DESTDIR and/or previous
configure args used for osinfo-db-tools build

> On Tue, Sep 13, 2016 at 11:03 AM, Daniel P. Berrange
>  wrote:
> > The jhbuild system doesn't support plain "make" systems,
> > so we need to pretend to be more automake-like. Adding
> > DESTDIR support lets jhbuild' automake "make install"
> > step work.
> >
> > Signed-off-by: Daniel P. Berrange 
> > ---
> >  Makefile | 3 ++-
> >  autobuild.sh | 2 +-
> >  2 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 3cffade..53a2ea5 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -6,6 +6,7 @@ TODAY = $(shell date +"%Y%m%d")
> >  OSINFO_DB_EXPORT = osinfo-db-export
> >  OSINFO_DB_IMPORT = osinfo-db-import
> >
> > +DESTDIR = /
> >  OSINFO_DB_TARGET = --user
> >
> >  INTLTOOL_MERGE = intltool-merge
> > @@ -48,7 +49,7 @@ INTLTOOL_MERGE_OPTS_1 =
> >  all: $(ARCHIVE) osinfo-db.spec mingw-osinfo-db.spec
> >
> >  install: $(ARCHIVE)
> > -   $(OSINFO_DB_IMPORT) $(OSINFO_DB_TARGET) $(ARCHIVE)
> > +   $(OSINFO_DB_IMPORT) --root $(DESTDIR) $(OSINFO_DB_TARGET) $(ARCHIVE)
> >
> >  %.spec: %.spec.in Makefile
> > $(V_GEN) $(SED) -e "s/@VERSION@/$(TODAY)/" < $< > $@
> > diff --git a/autobuild.sh b/autobuild.sh
> > index d3b8cf4..d82b0ef 100755
> > --- a/autobuild.sh
> > +++ b/autobuild.sh
> > @@ -22,7 +22,7 @@ case $MAKEFLAGS in
> >  esac
> >
> >  make
> > -make install OSINFO_DB_TARGET="--system --root $AUTOBUILD_INSTALL_ROOT"
> > +make install DESTDIR="$AUTOBUILD_INSTALL_ROOT" OSINFO_DB_TARGET="--system"
> >
> >  if [ -n "$AUTOBUILD_COUNTER" ]; then
> >EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
> > --

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


Re: [Libosinfo] Improve the size of default memory for rhel6 guest to 2048M

2016-09-20 Thread Daniel P. Berrange
On Tue, Sep 20, 2016 at 06:25:02AM -0400, Ming Xie wrote:
> Hi All, 
> 
> I meet a problem that guest can't boot into rhel6 after installation
> or rhel6 can't be installed in guest if the guest has only 1GB memory
> and has no swap partition, I know this is not bug because rhel6 systems
> with low memory(1 GB and less) and less than the recommended amount of
> swap space may have issues ranging from low responsivity up to and
> including complete inability to boot after the installation
>
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/sn-Supported_Installation_Hardware-x86.html
>  
> I see virt-manager built for rhel7 could adjust memory to 4096M when
> create windows guest , but the default memory size always will be set
> as 1024M when create linux guest in virt-manager, customers may don't
> know rhel6 need to create swap if memory < =1GB, I think the default
> memory size 1GB is not appropriate when create rhel6 guest in
> virt-manager, besides, virtualbox has a related bug about this
> ttps://www.virtualbox.org/ticket/8490 , customer has thought default
> memory setting is too low to install rhel6 in guest 
> Could we improve the size of default memory for rhel6 guest to 2048M
> so that customer doesn't need to care about whether need to create a
> swap partition if mem < 1G and it will reduce the risk of failure
> installation in rhel6 guest

Yes, I don't know why we have set the recommended level at 1GB, as it
is clearly too low to be useful. We currently have the min ram set
at 512 MB:


  
1
536870912
  

  
4
1073741824
9663676416
  


Based on this:

https://access.redhat.com/articles/rhel-limits

512 MB is only acceptable for i386, x86_64 requires 1 GB min and
PPC wants 2 GB. So we clearly need to update the RHEL6 limits
both minimum and recommended. 

Could you submit a patch for the various RHEL XML files to update
these limits.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

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


[Libosinfo] ANNOUNCE: libosinfo 1.0.0 release

2016-10-07 Thread Daniel P. Berrange
I am happy to announce a new release of libosinfo, version 1.0.0:

  https://fedorahosted.org/releases/l/i/libosinfo/libosinfo-1.0.0.tar.gz

This is signed with key DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF  
(4096R)

  https://fedorahosted.org/releases/l/i/libosinfo/libosinfo-1.0.0.tar.gz.asc

All historical releases are available from:

  http://libosinfo.org/download/

Changes in this release include:

 - Update loader to follow new layout for external
   database
 - Move all database files into separate osinfo-db package
 - Move osinfo-db-validate into osinfo-db-tools package

The new osinfo-db and osinfo-db-tools packages must be deployed before
installing libosinfo 1.0.0. They are available from the same download
location linked from:

  http://libosinfo.org/download/

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] osinfo-db source tarball

2016-10-18 Thread Daniel P. Berrange
On Tue, Oct 11, 2016 at 08:32:05PM +0200, Guido Günther wrote:
> Hi,
> I looked into packaging osinfo-db for Debian and looking at:
> 
>   https://fedorahosted.org/releases/l/i/libosinfo/osinfo-db-20160728.tar.xz
> 
> it looks quit different from https://gitlab.com/libosinfo/osinfo-db
> . Would it be possible to ship a proper source tarball that:
> 
> * contains a license file

The tarball isn't supposed to contain anything other than the DB XML
files. Indeed the way it is created is by running osinfo-db-export
on the installed database directory, so it won't pick up anything
other than the files in that dir, so no license file will be found
there.

> * contains the Makefile to execute and run the build so we can use the
>   preferred form of modificaation?

You are *not* supposed to unpack the tarball manually. Run the
osinfo-db-import tool, passing it the tarball, as described at

   https://libosinfo.org/download/

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] osinfo-db source tarball

2016-10-18 Thread Daniel P. Berrange
On Tue, Oct 18, 2016 at 09:30:49AM +0100, Daniel P. Berrange wrote:
> On Tue, Oct 11, 2016 at 08:32:05PM +0200, Guido Günther wrote:
> > Hi,
> > I looked into packaging osinfo-db for Debian and looking at:
> > 
> >   https://fedorahosted.org/releases/l/i/libosinfo/osinfo-db-20160728.tar.xz
> > 
> > it looks quit different from https://gitlab.com/libosinfo/osinfo-db
> > . Would it be possible to ship a proper source tarball that:
> > 
> > * contains a license file
> 
> The tarball isn't supposed to contain anything other than the DB XML
> files. Indeed the way it is created is by running osinfo-db-export
> on the installed database directory, so it won't pick up anything
> other than the files in that dir, so no license file will be found
> there.

Thinking about this more, we could add a --license option to the
osinfo-db-export command to let it pull in a separate license
file

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


[Libosinfo] [PATCH db-tools] osinfo-db-export: add ability to include a license file

2016-10-19 Thread Daniel P. Berrange
Add a "--license FILE-NAME" option to osinfo-db-export
which will add that reference FILE-NAME to the generated
archive as a file called "LICENSE" in the top level.

Signed-off-by: Daniel P. Berrange 
---
 tools/osinfo-db-export.c | 78 +++-
 1 file changed, 77 insertions(+), 1 deletion(-)

diff --git a/tools/osinfo-db-export.c b/tools/osinfo-db-export.c
index a2aef2f..8b2d5fb 100644
--- a/tools/osinfo-db-export.c
+++ b/tools/osinfo-db-export.c
@@ -336,10 +336,72 @@ static int osinfo_db_export_create_version(const gchar 
*prefix,
 return ret;
 }
 
+static int osinfo_db_export_create_license(const gchar *prefix,
+   const gchar *license,
+   const gchar *target,
+   struct archive *arc,
+   gboolean verbose)
+{
+int ret = -1;
+struct archive_entry *entry = NULL;
+gchar *entpath = NULL;
+GFile *file = NULL;
+GFileInfo *info = NULL;
+GError *err = NULL;
+
+file = g_file_new_for_path(license);
+
+info = g_file_query_info(file,
+ G_FILE_ATTRIBUTE_STANDARD_NAME
+ ","
+ G_FILE_ATTRIBUTE_STANDARD_SIZE,
+ G_FILE_QUERY_INFO_NONE,
+ NULL,
+ &err);
+if (!info) {
+g_printerr("%s: cannot get file info %s: %s\n",
+   argv0, license, err->message);
+goto cleanup;
+}
+
+entpath = g_strdup_printf("%s/LICENSE", prefix);
+entry = archive_entry_new();
+archive_entry_set_pathname(entry, entpath);
+
+archive_entry_set_atime(entry, entryts, 0);
+archive_entry_set_ctime(entry, entryts, 0);
+archive_entry_set_mtime(entry, entryts, 0);
+archive_entry_set_birthtime(entry, entryts, 0);
+
+if (verbose) {
+g_print("%s: r %s\n", argv0, entpath);
+}
+archive_entry_set_filetype(entry, AE_IFREG);
+archive_entry_set_perm(entry, 0644);
+archive_entry_set_size(entry, g_file_info_get_size(info));
+
+if (archive_write_header(arc, entry) != ARCHIVE_OK) {
+g_printerr("%s: cannot write archive header %s: %s\n",
+   argv0, target, archive_error_string(arc));
+goto cleanup;
+}
+
+if (osinfo_db_export_create_reg(file, license, target, arc) < 0)
+goto cleanup;
+
+ret = 0;
+ cleanup:
+archive_entry_free(entry);
+if (err)
+g_error_free(err);
+return ret;
+}
+
 static int osinfo_db_export_create(const gchar *prefix,
const gchar *version,
GFile *source,
const gchar *target,
+   const gchar *license,
gboolean verbose)
 {
 struct archive *arc;
@@ -369,6 +431,11 @@ static int osinfo_db_export_create(const gchar *prefix,
 goto cleanup;
 }
 
+if (license != NULL &&
+osinfo_db_export_create_license(prefix, license, target, arc, verbose) 
< 0) {
+goto cleanup;
+}
+
 if (archive_write_close(arc) != ARCHIVE_OK) {
 g_printerr("%s: cannot finish writing archive %s: %s\n",
argv0, target, archive_error_string(arc));
@@ -415,6 +482,7 @@ gint main(gint argc, gchar **argv)
 const gchar *version = NULL;
 gchar *autoversion = NULL;
 gchar *prefix = NULL;
+const gchar *license = NULL;
 int locs = 0;
 GFile *dir = NULL;
 const GOptionEntry entries[] = {
@@ -432,6 +500,8 @@ gint main(gint argc, gchar **argv)
 N_("Set version number of archive"), NULL, },
   { "root", 0, 0, G_OPTION_ARG_STRING, &root,
 N_("Installation root directory"), NULL, },
+  { "license", 0, 0, G_OPTION_ARG_STRING, &license,
+N_("License file"), NULL, },
   { NULL, 0, 0, 0, NULL, NULL, NULL },
 };
 argv0 = argv[0];
@@ -483,7 +553,8 @@ gint main(gint argc, gchar **argv)
 archive = g_strdup_printf("%s.tar.xz", prefix);
 }
 dir = osinfo_db_get_path(root, user, local, system, custom);
-if (osinfo_db_export_create(prefix, version, dir, archive, verbose) < 0)
+if (osinfo_db_export_create(prefix, version, dir, archive,
+license, verbose) < 0)
 goto error;
 
 ret = EXIT_SUCCESS;
@@ -584,6 +655,11 @@ Set the version string for the files in the archive to
 B. If this argument is not given, the version
 will be set to the current date in the format B.
 
+=item B<--license=LICENSE-FILE>
+
+Add C to the generated archive as an entry
+named "LICENSE".
+
 =item B<-v>, B&

[Libosinfo] [PATCH db] include COPYING file as license for archive

2016-10-19 Thread Daniel P. Berrange
When generating the archive of DB files we must include
the COPYING file as the quoted license.

Signed-off-by: Daniel P. Berrange 
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 53a2ea5..7f5801a 100644
--- a/Makefile
+++ b/Makefile
@@ -70,7 +70,7 @@ mingwrpm:  mingw-osinfo-db.spec $(ARCHIVE)
$(V_GEN) $(SED) -e "s/@VERSION@/$(TODAY)/" < $< > $@
 
 $(ARCHIVE): $(DATA_FILES) $(SCHEMA_FILES)
-   $(V_EXP) $(OSINFO_DB_EXPORT) --version "$(TODAY)" --dir data $(ARCHIVE)
+   $(V_EXP) $(OSINFO_DB_EXPORT) --license COPYING --version "$(TODAY)" 
--dir data $(ARCHIVE)
 
 clean:
rm -f osinfo-db-*.tar.xz
-- 
2.7.4

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


Re: [Libosinfo] [PATCH osinfo-db] Add release and eol dates for Debian 6, 7 and 8

2016-10-20 Thread Daniel P. Berrange
On Thu, Oct 20, 2016 at 01:29:14PM +0200, Guido Günther wrote:
> ---
>  data/os/debian.org/debian-6.xml.in | 3 +++
>  data/os/debian.org/debian-7.xml.in | 3 +++
>  data/os/debian.org/debian-8.xml.in | 2 ++
>  3 files changed, 8 insertions(+)

ACK

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [PATCH osinfo-db-tools] validate: correct help output

2016-10-20 Thread Daniel P. Berrange
On Thu, Oct 20, 2016 at 01:28:10PM +0200, Guido Günther wrote:
> We validate files, don't install them
> ---
>  tools/osinfo-db-validate.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)

ACK


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [osinfo-db-tools PATCH] README: libarchive is required as well

2016-10-20 Thread Daniel P. Berrange
On Thu, Oct 20, 2016 at 01:00:03PM +0200, Guido Günther wrote:
> ---
>  README | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/README b/README
> index 6b095ff..0368735 100644
> --- a/README
> +++ b/README
> @@ -19,6 +19,7 @@ Dependencies
>  - Required:
>- gobject-2.0
>- gio-2.0
> +  - libarchive3
>- libxml-2.0
>- libxslt-1.0

ACK

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [PATCH db] include COPYING file as license for archive

2016-10-20 Thread Daniel P. Berrange
On Thu, Oct 20, 2016 at 02:09:07PM +0200, Fabiano Fidêncio wrote:
> On Wed, Oct 19, 2016 at 11:12 AM, Daniel P. Berrange
>  wrote:
> > When generating the archive of DB files we must include
> > the COPYING file as the quoted license.
> >
> > Signed-off-by: Daniel P. Berrange 
> > ---
> >  Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 53a2ea5..7f5801a 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -70,7 +70,7 @@ mingwrpm:  mingw-osinfo-db.spec $(ARCHIVE)
> > $(V_GEN) $(SED) -e "s/@VERSION@/$(TODAY)/" < $< > $@
> >
> >  $(ARCHIVE): $(DATA_FILES) $(SCHEMA_FILES)
> > -   $(V_EXP) $(OSINFO_DB_EXPORT) --version "$(TODAY)" --dir data 
> > $(ARCHIVE)
> > +   $(V_EXP) $(OSINFO_DB_EXPORT) --license COPYING --version "$(TODAY)" 
> > --dir data $(ARCHIVE)
> >
> >  clean:
> > rm -f osinfo-db-*.tar.xz
> > --
> > 2.7.4
> >
> 
> Shouldn't we add the generated COPYING file to the spec as well?

Oh yes, it should.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] osinfo-db source tarball

2016-10-21 Thread Daniel P. Berrange
On Thu, Oct 20, 2016 at 07:55:10PM +0200, Guido Günther wrote:
> Hi Daniel,
> On Tue, Oct 18, 2016 at 09:30:49AM +0100, Daniel P. Berrange wrote:
> > On Tue, Oct 11, 2016 at 08:32:05PM +0200, Guido Günther wrote:
> > > Hi,
> > > I looked into packaging osinfo-db for Debian and looking at:
> > > 
> > >   
> > > https://fedorahosted.org/releases/l/i/libosinfo/osinfo-db-20160728.tar.xz
> > > 
> > > it looks quit different from https://gitlab.com/libosinfo/osinfo-db
> > > . Would it be possible to ship a proper source tarball that:
> > > 
> > > * contains a license file
> > 
> > The tarball isn't supposed to contain anything other than the DB XML
> > files. Indeed the way it is created is by running osinfo-db-export
> > on the installed database directory, so it won't pick up anything
> > other than the files in that dir, so no license file will be found
> > there.
> 
> I think it's not exacthel the "source" tarball then. It's the "binary"
> tarball that contains the database files. I like to be sure we can
> rebuild the xml files from the xml.in files.
> 
> In Debian people often fetch the source package, apply pathes on top of
> it and post these to the bug tracking system (because we have lots of
> tooling around it). I'd like to make this as simple as possible
> (including forwarding this upstream you libosinfo authors).
> 
> So I took a different approch and ran:
> 
> git archive HEAD | xz -c > ../osinfo-db_0.20160728+git20161020.orig.tar.xz
> 
> and used that as the source tarball for building.

IMHO that does really help in any way. The only difference between
xml and xml.in files is the translation data. So having the xml.in
and .po files in deb packages is not doing anything useful. Translations
updates have to go via the Zanata translation system, and any content
updates are fine to send in the .xml files

> > > * contains the Makefile to execute and run the build so we can use the
> > >   preferred form of modificaation?
> > 
> > You are *not* supposed to unpack the tarball manually. Run the
> > osinfo-db-import tool, passing it the tarball, as described at
> > 
> >https://libosinfo.org/download/
> 
> Yes, I'm doing so after rebuilding the XML files:
> 
> 
> https://anonscm.debian.org/cgit/pkg-libvirt/osinfo-db.git/tree/debian/rules#n10
> 
> So would it make sense to build two things: the tarball as shipped atm
> plus a separate one (osinfo-db-source_.tar.xz) as generated above?
> If so I'd send a patch for the Makefile to generate both.

No, I don't think providing a raw tarball is useful at all and certainly
don't want to encourage anyone else to do that.

The long term intention is to actually provide more tools to automate
the process of downloading & deploying newer osinfo-db archives,
independantly of what the OS vendor provides, because the OS vendor
provided data is inherantly always out of date, particularly for long
term distros like Debian / RHEL.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [PATCH libosinfo] examples: avoid PyGIWarning

2016-10-31 Thread Daniel P. Berrange
On Sat, Oct 29, 2016 at 10:42:35PM +0200, Guido Günther wrote:
> This fixes
> 
> demo.py:3: PyGIWarning: Libosinfo was imported without specifying a version 
> first. Use gi.require_version('Libosinfo', '1.0') before import
> to ensure that the right version gets loaded.
>   from gi.repository import Libosinfo as osinfo;
> ---
>  examples/demo.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/examples/demo.py b/examples/demo.py
> index bdc9b9a..afd3e7c 100755
> --- a/examples/demo.py
> +++ b/examples/demo.py
> @@ -1,5 +1,7 @@
>  #!/usr/bin/python
>  
> +import gi
> +gi.require_version('Libosinfo', '1.0')
>  from gi.repository import Libosinfo as osinfo;
>  
>  loader = osinfo.Loader()

ACK

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [PATCH osinfo-db] Unbreak vpath build

2016-11-07 Thread Daniel P. Berrange
On Sun, Nov 06, 2016 at 07:45:51PM +0100, Guido Günther wrote:
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

ACK


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [PATCH osinfo-db 0/3] Updates for Debian

2016-11-07 Thread Daniel P. Berrange
On Sun, Nov 06, 2016 at 07:51:03PM +0100, Guido Günther wrote:
> Guido Günther (3):
>   Update virtio device information for Debian Wheezy and Jessie
>   Remove redundant entries for Debian
>   Derive Debian testing from the latest stable release
> 
>  data/os/debian.org/debian-7.xml.in   |  7 ++-
>  data/os/debian.org/debian-8.xml.in   |  2 +-
>  data/os/debian.org/debian-testing.xml.in | 10 ++
>  3 files changed, 9 insertions(+), 10 deletions(-)

ACK all 3


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [PATCH libosinfo] loader: Fix typo in error message

2016-11-07 Thread Daniel P. Berrange
On Sat, Nov 05, 2016 at 02:00:28PM +0100, Guido Günther wrote:
> ---
>  osinfo/osinfo_loader.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

ACK


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [PATCH osinfo-db] Debian: enhance guest agent support

2016-11-08 Thread Daniel P. Berrange
On Tue, Nov 08, 2016 at 08:13:27AM +0100, Guido Günther wrote:
> This also only installs qemu-guest-agent on recent Debian since versions
> before Jessie don't ship it.
> ---
>  data/install-script/debian.org/debian-preseed-desktop.xml.in | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

ACK


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [PATCH osinfo-db] Abort on XML errors

2016-11-08 Thread Daniel P. Berrange
On Tue, Nov 08, 2016 at 08:14:07AM +0100, Guido Günther wrote:
> While we abort on XML errors the first time the output XML already gets
> written so a subsequent make call will continue with the next file
> leading to an incomplete database. Use a temporary file to fix this.
> ---
>  Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 6b3f8e7..d08f5cc 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -63,7 +63,8 @@ mingwrpm:  mingw-osinfo-db.spec $(ARCHIVE)
>  
>  %.xml: %.xml.in Makefile
>   @mkdir -p `dirname $@` po
> - $(V_I18N) LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_MERGE_OPTS) -x -u -c 
> po/.intltool-merge-cache $(VPATH)/po $< $@
> + $(V_I18N) LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_MERGE_OPTS) -x -u -c 
> po/.intltool-merge-cache $(VPATH)/po $< $@.tmp
> + @mv $@.tmp $@

Won't this leave a .tmp file on disk if it fails. IIUC you need to have

 ...CMD... && mv $@.tmp $@  || rm -f $@.tmp

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [PATCH osinfo-db v2] Abort on XML errors

2016-11-09 Thread Daniel P. Berrange
On Tue, Nov 08, 2016 at 07:19:14PM +0100, Guido Günther wrote:
> While we abort on XML errors the first time the output XML already gets
> written so a subsequent make call will continue with the next file
> leading to an incomplete database. Use a temporary file to fix this.
> ---
> 
>Changes since v1:
> 
>   * remove temp file on failure
> 
>  Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 6b3f8e7..6ff9b5c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -63,7 +63,9 @@ mingwrpm:  mingw-osinfo-db.spec $(ARCHIVE)
>  
>  %.xml: %.xml.in Makefile
>   @mkdir -p `dirname $@` po
> - $(V_I18N) LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_MERGE_OPTS) -x -u -c 
> po/.intltool-merge-cache $(VPATH)/po $< $@
> + $(V_I18N) LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_MERGE_OPTS) -x -u -c 
> po/.intltool-merge-cache $(VPATH)/po $< $@.tmp \
> + || { rm $@.tmp && exit 1; }
> + @mv $@.tmp $@
>  
>  %.rng: %.rng.in Makefile
>   @mkdir -p `dirname $@` po

ACK


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


Re: [Libosinfo] [PATCH 00/10] Update SUSE distro database information

2016-12-13 Thread Daniel P. Berrange
On Mon, Dec 12, 2016 at 03:43:00PM -0700, Charles Arnold wrote:
> This patch series fixes, updates, and adds missing SUSE distro
> database information.

Thanks for the comprehensive update !  I'll just trust the data is all
correct, so I've pushed all 10.

Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://entangle-photo.org   -o-http://search.cpan.org/~danberr/ :|

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


  1   2   >