[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

[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 1973

[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 -

[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: @V

[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 ++-

[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 Dani

[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/o

[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.

[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 +++---

[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 -

[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/sh

[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.a