From berrange at redhat.com Fri Oct 7 16:03:23 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Fri, 7 Oct 2016 17:03:23 +0100 Subject: [Libosinfo] ANNOUNCE: libosinfo 1.0.0 release Message-ID: <20161007160323.GI4619@redhat.com> 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/ :| From agx at sigxcpu.org Tue Oct 11 18:32:05 2016 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Tue, 11 Oct 2016 20:32:05 +0200 Subject: [Libosinfo] osinfo-db source tarball Message-ID: <20161011183205.ilmdxu3tzvpf5crv@bogon.m.sigxcpu.org> 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 * contains the Makefile to execute and run the build so we can use the preferred form of modificaation? Cheers, -- Guido From cfergeau at redhat.com Wed Oct 12 08:05:12 2016 From: cfergeau at redhat.com (Christophe Fergeau) Date: Wed, 12 Oct 2016 10:05:12 +0200 Subject: [Libosinfo] osinfo-db source tarball In-Reply-To: <20161011183205.ilmdxu3tzvpf5crv@bogon.m.sigxcpu.org> References: <20161011183205.ilmdxu3tzvpf5crv@bogon.m.sigxcpu.org> Message-ID: <20161012080512.GM6294@edamame.cdg.redhat.com> Hey, 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 Shipping the license file would indeed be nice. > * contains the Makefile to execute and run the build so we can use the > preferred form of modificaation? For what it's worth, the fedora package is just calling osinfo-db-import --root %{buildroot} --dir %{_datadir}/osinfo %{SOURCE0} directly. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: From berrange at redhat.com Tue Oct 18 08:30:49 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Tue, 18 Oct 2016 09:30:49 +0100 Subject: [Libosinfo] osinfo-db source tarball In-Reply-To: <20161011183205.ilmdxu3tzvpf5crv@bogon.m.sigxcpu.org> References: <20161011183205.ilmdxu3tzvpf5crv@bogon.m.sigxcpu.org> Message-ID: <20161018083049.GA4349@redhat.com> 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/ :| From berrange at redhat.com Tue Oct 18 16:29:39 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Tue, 18 Oct 2016 17:29:39 +0100 Subject: [Libosinfo] osinfo-db source tarball In-Reply-To: <20161018083049.GA4349@redhat.com> References: <20161011183205.ilmdxu3tzvpf5crv@bogon.m.sigxcpu.org> <20161018083049.GA4349@redhat.com> Message-ID: <20161018162939.GJ12728@redhat.com> 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/ :| From berrange at redhat.com Wed Oct 19 09:11:35 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Wed, 19 Oct 2016 10:11:35 +0100 Subject: [Libosinfo] [PATCH db-tools] osinfo-db-export: add ability to include a license file Message-ID: <1476868295-16162-1-git-send-email-berrange@redhat.com> 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<--verbose> Display verbose progress information when archiving files -- 2.7.4 From berrange at redhat.com Wed Oct 19 09:12:31 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Wed, 19 Oct 2016 10:12:31 +0100 Subject: [Libosinfo] [PATCH db] include COPYING file as license for archive Message-ID: <1476868351-16275-1-git-send-email-berrange@redhat.com> 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 From agx at sigxcpu.org Thu Oct 20 11:00:03 2016 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Thu, 20 Oct 2016 13:00:03 +0200 Subject: [Libosinfo] [osinfo-db-tools PATCH] README: libarchive is required as well Message-ID: <20161020110003.ihhlzdo3dyw4v3q3@bogon.m.sigxcpu.org> --- 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 -- 2.9.3 From agx at sigxcpu.org Thu Oct 20 11:28:10 2016 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Thu, 20 Oct 2016 13:28:10 +0200 Subject: [Libosinfo] [PATCH osinfo-db-tools] validate: correct help output Message-ID: <20161020112810.6tnkhigkkdaz5iow@bogon.m.sigxcpu.org> We validate files, don't install them --- tools/osinfo-db-validate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c index c735fc8..d8c3af9 100644 --- a/tools/osinfo-db-validate.c +++ b/tools/osinfo-db-validate.c @@ -253,13 +253,13 @@ gint main(gint argc, gchar **argv) { "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, }, + N_("Validate files in user directory"), NULL, }, { "local", 0, 0, G_OPTION_ARG_NONE, (void *)&local, - N_("Install into local directory"), NULL, }, + N_("Validate files in local directory"), NULL, }, { "system", 0, 0, G_OPTION_ARG_NONE, (void *)&system, - N_("Install into system directory"), NULL, }, + N_("Validate files in system directory"), NULL, }, { "dir", 0, 0, G_OPTION_ARG_STRING, (void *)&custom, - N_("Import into custom directory"), NULL, }, + N_("Validate files in custom directory"), NULL, }, { "root", 0, 0, G_OPTION_ARG_STRING, &root, N_("Installation root directory"), NULL, }, { NULL, 0, 0, 0, NULL, NULL, NULL }, -- 2.9.3 From agx at sigxcpu.org Thu Oct 20 11:29:14 2016 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Thu, 20 Oct 2016 13:29:14 +0200 Subject: [Libosinfo] [PATCH osinfo-db] Add release and eol dates for Debian 6, 7 and 8 Message-ID: <20161020112914.ka36zqtuoeaep6ur@bogon.m.sigxcpu.org> --- 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(+) diff --git a/data/os/debian.org/debian-6.xml.in b/data/os/debian.org/debian-6.xml.in index e29b892..a962661 100644 --- a/data/os/debian.org/debian-6.xml.in +++ b/data/os/debian.org/debian-6.xml.in @@ -12,6 +12,9 @@ + 2011-02-06 + 2016-02-29 + diff --git a/data/os/debian.org/debian-7.xml.in b/data/os/debian.org/debian-7.xml.in index f6aa50a..4e5ff33 100644 --- a/data/os/debian.org/debian-7.xml.in +++ b/data/os/debian.org/debian-7.xml.in @@ -12,6 +12,9 @@ + 2013-05-04 + 2018-05-31 + diff --git a/data/os/debian.org/debian-8.xml.in b/data/os/debian.org/debian-8.xml.in index 13e6d62..7fd1d35 100644 --- a/data/os/debian.org/debian-8.xml.in +++ b/data/os/debian.org/debian-8.xml.in @@ -12,6 +12,8 @@ + 2015-04-25 + -- 2.9.3 From berrange at redhat.com Thu Oct 20 11:42:43 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 20 Oct 2016 12:42:43 +0100 Subject: [Libosinfo] [PATCH osinfo-db] Add release and eol dates for Debian 6, 7 and 8 In-Reply-To: <20161020112914.ka36zqtuoeaep6ur@bogon.m.sigxcpu.org> References: <20161020112914.ka36zqtuoeaep6ur@bogon.m.sigxcpu.org> Message-ID: <20161020114243.GK12145@redhat.com> 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/ :| From berrange at redhat.com Thu Oct 20 11:44:35 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 20 Oct 2016 12:44:35 +0100 Subject: [Libosinfo] [PATCH osinfo-db-tools] validate: correct help output In-Reply-To: <20161020112810.6tnkhigkkdaz5iow@bogon.m.sigxcpu.org> References: <20161020112810.6tnkhigkkdaz5iow@bogon.m.sigxcpu.org> Message-ID: <20161020114435.GM12145@redhat.com> 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/ :| From berrange at redhat.com Thu Oct 20 11:46:54 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 20 Oct 2016 12:46:54 +0100 Subject: [Libosinfo] [osinfo-db-tools PATCH] README: libarchive is required as well In-Reply-To: <20161020110003.ihhlzdo3dyw4v3q3@bogon.m.sigxcpu.org> References: <20161020110003.ihhlzdo3dyw4v3q3@bogon.m.sigxcpu.org> Message-ID: <20161020114653.GN12145@redhat.com> 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/ :| From fidencio at redhat.com Thu Oct 20 12:08:37 2016 From: fidencio at redhat.com (=?UTF-8?Q?Fabiano_Fid=C3=AAncio?=) Date: Thu, 20 Oct 2016 14:08:37 +0200 Subject: [Libosinfo] [PATCH db-tools] osinfo-db-export: add ability to include a license file In-Reply-To: <1476868295-16162-1-git-send-email-berrange@redhat.com> References: <1476868295-16162-1-git-send-email-berrange@redhat.com> Message-ID: On Wed, Oct 19, 2016 at 11:11 AM, Daniel P. Berrange wrote: > 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<--verbose> > > Display verbose progress information when archiving files > -- > 2.7.4 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo ACK! From fidencio at redhat.com Thu Oct 20 12:09:07 2016 From: fidencio at redhat.com (=?UTF-8?Q?Fabiano_Fid=C3=AAncio?=) Date: Thu, 20 Oct 2016 14:09:07 +0200 Subject: [Libosinfo] [PATCH db] include COPYING file as license for archive In-Reply-To: <1476868351-16275-1-git-send-email-berrange@redhat.com> References: <1476868351-16275-1-git-send-email-berrange@redhat.com> Message-ID: 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 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo Shouldn't we add the generated COPYING file to the spec as well? From berrange at redhat.com Thu Oct 20 12:21:45 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Thu, 20 Oct 2016 13:21:45 +0100 Subject: [Libosinfo] [PATCH db] include COPYING file as license for archive In-Reply-To: References: <1476868351-16275-1-git-send-email-berrange@redhat.com> Message-ID: <20161020122144.GP12145@redhat.com> 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/ :| From agx at sigxcpu.org Thu Oct 20 15:17:56 2016 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Thu, 20 Oct 2016 17:17:56 +0200 Subject: [Libosinfo] [PATCH osinfo-db] Add release and eol dates for Debian 6, 7 and 8 In-Reply-To: <20161020114243.GK12145@redhat.com> References: <20161020112914.ka36zqtuoeaep6ur@bogon.m.sigxcpu.org> <20161020114243.GK12145@redhat.com> Message-ID: <20161020151756.ms3ijzmh6bcpu6jz@bogon.m.sigxcpu.org> On Thu, Oct 20, 2016 at 12:42:43PM +0100, Daniel P. Berrange wrote: > 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 Pushed. Thanks, -- Guido From agx at sigxcpu.org Thu Oct 20 15:18:23 2016 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Thu, 20 Oct 2016 17:18:23 +0200 Subject: [Libosinfo] [PATCH osinfo-db-tools] validate: correct help output In-Reply-To: <20161020114435.GM12145@redhat.com> References: <20161020112810.6tnkhigkkdaz5iow@bogon.m.sigxcpu.org> <20161020114435.GM12145@redhat.com> Message-ID: <20161020151823.w5mdcdbg4xldsaia@bogon.m.sigxcpu.org> On Thu, Oct 20, 2016 at 12:44:35PM +0100, Daniel P. Berrange wrote: > 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 Pushed. Thanks, -- Guido From agx at sigxcpu.org Thu Oct 20 15:18:34 2016 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Thu, 20 Oct 2016 17:18:34 +0200 Subject: [Libosinfo] [osinfo-db-tools PATCH] README: libarchive is required as well In-Reply-To: <20161020114653.GN12145@redhat.com> References: <20161020110003.ihhlzdo3dyw4v3q3@bogon.m.sigxcpu.org> <20161020114653.GN12145@redhat.com> Message-ID: <20161020151834.hag7ltw65oqr35y2@bogon.m.sigxcpu.org> On Thu, Oct 20, 2016 at 12:46:54PM +0100, Daniel P. Berrange wrote: > 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 Pushed. Thanks, -- Guido From agx at sigxcpu.org Thu Oct 20 17:55:10 2016 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Thu, 20 Oct 2016 19:55:10 +0200 Subject: [Libosinfo] osinfo-db source tarball In-Reply-To: <20161018083049.GA4349@redhat.com> References: <20161011183205.ilmdxu3tzvpf5crv@bogon.m.sigxcpu.org> <20161018083049.GA4349@redhat.com> Message-ID: <20161020175510.q6v2pm2kaet3ld5a@bogon.m.sigxcpu.org> 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. > > * 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. Cheers, -- Guido From berrange at redhat.com Fri Oct 21 09:50:44 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Fri, 21 Oct 2016 10:50:44 +0100 Subject: [Libosinfo] osinfo-db source tarball In-Reply-To: <20161020175510.q6v2pm2kaet3ld5a@bogon.m.sigxcpu.org> References: <20161011183205.ilmdxu3tzvpf5crv@bogon.m.sigxcpu.org> <20161018083049.GA4349@redhat.com> <20161020175510.q6v2pm2kaet3ld5a@bogon.m.sigxcpu.org> Message-ID: <20161021095044.GF6585@redhat.com> 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/ :| From agx at sigxcpu.org Fri Oct 21 10:36:04 2016 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Fri, 21 Oct 2016 12:36:04 +0200 Subject: [Libosinfo] osinfo-db source tarball In-Reply-To: <20161021095044.GF6585@redhat.com> References: <20161011183205.ilmdxu3tzvpf5crv@bogon.m.sigxcpu.org> <20161018083049.GA4349@redhat.com> <20161020175510.q6v2pm2kaet3ld5a@bogon.m.sigxcpu.org> <20161021095044.GF6585@redhat.com> Message-ID: <20161021103604.cywi53w2r3cbnjl3@bogon.m.sigxcpu.org> On Fri, Oct 21, 2016 at 10:50:44AM +0100, Daniel P. Berrange wrote: [..snip..] > > 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 s/does/does not/? > 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 The .in files are only ever in a source package, they never end up on a users system. They're used merely used for building the package. The merging of the .in files creates more fuzz than just adding translations like trailing spaces when dropping comments. Using the generated XML makes carrying distro specific patches harder than necessary (not that intend to not forward upstream but you never know). Furthermore generating from the .in files makes sure we're able to build the xml from within Debian (i.e. have all the tools packaged). > > > > > * 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. Fine with me. I can stick to the above method for generating a source tarball (from the released tags in the future). > 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. Now with the db split out I'm looking forward to update the database files on point releases. Thanks for making this possible with the split! Cheers, -- Guido From agx at sigxcpu.org Sat Oct 29 20:42:35 2016 From: agx at sigxcpu.org (Guido =?iso-8859-1?Q?G=FCnther?=) Date: Sat, 29 Oct 2016 22:42:35 +0200 Subject: [Libosinfo] [PATCH libosinfo] examples: avoid PyGIWarning Message-ID: <20161029204235.2mj4klheepmptq5o@bogon.m.sigxcpu.org> 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() -- 2.9.3 From berrange at redhat.com Mon Oct 31 10:44:50 2016 From: berrange at redhat.com (Daniel P. Berrange) Date: Mon, 31 Oct 2016 10:44:50 +0000 Subject: [Libosinfo] [PATCH libosinfo] examples: avoid PyGIWarning In-Reply-To: <20161029204235.2mj4klheepmptq5o@bogon.m.sigxcpu.org> References: <20161029204235.2mj4klheepmptq5o@bogon.m.sigxcpu.org> Message-ID: <20161031104450.GA2668@redhat.com> 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/ :|