From zeeshanak at gnome.org Fri Aug 1 10:20:54 2014 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Fri, 1 Aug 2014 12:20:54 +0200 Subject: [Libosinfo] [PATCH] tmp Message-ID: <1406888454-3983-1-git-send-email-zeeshanak@gnome.org> --- data/schemas/libosinfo.rng | 10 +++++----- test/test-xml-validate | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng index e693674..69e2b13 100644 --- a/data/schemas/libosinfo.rng +++ b/data/schemas/libosinfo.rng @@ -597,11 +597,6 @@ - - - - - @@ -624,6 +619,11 @@ + + + + + diff --git a/test/test-xml-validate b/test/test-xml-validate index a2d20b4..e5d1eed 100755 --- a/test/test-xml-validate +++ b/test/test-xml-validate @@ -21,7 +21,7 @@ do ret=$? test_result $n $(basename $(dirname $xml))"/"$(basename $xml) $ret - if test "$verbose" = "1" && test $ret != 0 ; then + if test $ret != 0 ; then printf '%s\n' "$cmd" "$result" fi if test "$ret" != 0 ; then -- 1.9.3 From zeeshanak at gnome.org Fri Aug 1 10:27:18 2014 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Fri, 1 Aug 2014 12:27:18 +0200 Subject: [Libosinfo] [PATCH] tmp In-Reply-To: <1406888454-3983-1-git-send-email-zeeshanak@gnome.org> References: <1406888454-3983-1-git-send-email-zeeshanak@gnome.org> Message-ID: On Fri, Aug 1, 2014 at 12:20 PM, Zeeshan Ali (Khattak) wrote: > --- Really sorry for this. I keep forgetting git-send-email doesn't take single patches. > data/schemas/libosinfo.rng | 10 +++++----- > test/test-xml-validate | 2 +- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng > index e693674..69e2b13 100644 > --- a/data/schemas/libosinfo.rng > +++ b/data/schemas/libosinfo.rng > @@ -597,11 +597,6 @@ > > > > - > - > - > - > - > > > > @@ -624,6 +619,11 @@ > > > > + > + > + > + > + > > > > diff --git a/test/test-xml-validate b/test/test-xml-validate > index a2d20b4..e5d1eed 100755 > --- a/test/test-xml-validate > +++ b/test/test-xml-validate > @@ -21,7 +21,7 @@ do > ret=$? > > test_result $n $(basename $(dirname $xml))"/"$(basename $xml) $ret > - if test "$verbose" = "1" && test $ret != 0 ; then > + if test $ret != 0 ; then > printf '%s\n' "$cmd" "$result" > fi > if test "$ret" != 0 ; then > -- > 1.9.3 > -- Regards, Zeeshan Ali (Khattak) ________________________________________ Befriend GNOME: http://www.gnome.org/friends/ From zeeshanak at gnome.org Fri Aug 1 10:27:30 2014 From: zeeshanak at gnome.org (Zeeshan Ali (Khattak)) Date: Fri, 1 Aug 2014 12:27:30 +0200 Subject: [Libosinfo] [PATCH] install-script: Default to DISK injection method Message-ID: <1406888850-4234-1-git-send-email-zeeshanak@gnome.org> If script does not declare an injection method, assume DISK as every script must at least support one injection method and there is no need to require scripts to always explicitly declare supported injection methods. --- osinfo/osinfo_install_script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index cc3eed2..66a49e4 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -1323,7 +1323,7 @@ unsigned int osinfo_install_script_get_injection_methods(OsinfoInstallScript *sc return osinfo_entity_get_param_value_int64_with_default (OSINFO_ENTITY(script), OSINFO_INSTALL_SCRIPT_PROP_INJECTION_METHOD, - 0); + OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK); } /** -- 1.9.3 From gscrivan at redhat.com Fri Aug 1 10:39:32 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Fri, 01 Aug 2014 12:39:32 +0200 Subject: [Libosinfo] [PATCH] install-script: Default to DISK injection method In-Reply-To: <1406888850-4234-1-git-send-email-zeeshanak@gnome.org> (Zeeshan Ali's message of "Fri, 1 Aug 2014 12:27:30 +0200") References: <1406888850-4234-1-git-send-email-zeeshanak@gnome.org> Message-ID: <87vbqcjxy3.fsf@redhat.com> "Zeeshan Ali (Khattak)" writes: > If script does not declare an injection method, assume DISK as every > script must at least support one injection method and there is no need > to require scripts to always explicitly declare supported injection > methods. > --- > osinfo/osinfo_install_script.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c > index cc3eed2..66a49e4 100644 > --- a/osinfo/osinfo_install_script.c > +++ b/osinfo/osinfo_install_script.c > @@ -1323,7 +1323,7 @@ unsigned int osinfo_install_script_get_injection_methods(OsinfoInstallScript *sc > return osinfo_entity_get_param_value_int64_with_default > (OSINFO_ENTITY(script), > OSINFO_INSTALL_SCRIPT_PROP_INJECTION_METHOD, > - 0); > + OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK); > } > > /** nice idea. ACK. Regards, Giuseppe From gscrivan at redhat.com Mon Aug 4 07:31:34 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Mon, 04 Aug 2014 09:31:34 +0200 Subject: [Libosinfo] [PATCH libosinfo 0/6] enable more syntax-check rules In-Reply-To: <1406641272-4957-1-git-send-email-gscrivan@redhat.com> (Giuseppe Scrivano's message of "Tue, 29 Jul 2014 15:41:06 +0200") References: <1406641272-4957-1-git-send-email-gscrivan@redhat.com> Message-ID: <87d2cgk8x5.fsf@redhat.com> Giuseppe Scrivano writes: > Giuseppe Scrivano (6): > maint.mk: update from gnulib > syntax-check: enable and fix sc_changelog > cfg.mk: enable more syntax-check tests > cfg.mk: enable and fix sc_error_message_uppercase > cfg.mk: enable and fix sc_space_tab > cfg.mk: enable sc_prohibit_atoi_atof and skip it for tests ping? Thanks, Giuseppe From cfergeau at redhat.com Mon Aug 4 10:09:35 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 4 Aug 2014 12:09:35 +0200 Subject: [Libosinfo] [PATCH libosinfo 2/6] syntax-check: enable and fix sc_changelog In-Reply-To: <1406641272-4957-3-git-send-email-gscrivan@redhat.com> References: <1406641272-4957-1-git-send-email-gscrivan@redhat.com> <1406641272-4957-3-git-send-email-gscrivan@redhat.com> Message-ID: <20140804100935.GJ7341@edamame.cdg.redhat.com> On Tue, Jul 29, 2014 at 03:41:08PM +0200, Giuseppe Scrivano wrote: > Signed-off-by: Giuseppe Scrivano > --- > cfg.mk | 1 - > maint.mk | 2 +- > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/cfg.mk b/cfg.mk > index c2f07e0..b9be881 100644 > --- a/cfg.mk > +++ b/cfg.mk > @@ -21,7 +21,6 @@ local-checks-to-skip = \ > makefile-check \ > makefile_path_separator_check \ > patch-check \ > - sc_GPL_version \ > sc_always_defined_macros \ > sc_cast_of_alloca_return_value \ > sc_cross_check_PATH_usage_in_tests \ > diff --git a/maint.mk b/maint.mk > index 04a839a..792100b 100644 > --- a/maint.mk > +++ b/maint.mk > @@ -856,7 +856,7 @@ sc_prohibit_backup_files: > > # Require the latest GPL. > sc_GPL_version: > - @prohibit='either ''version [^3]' \ > + @prohibit='either ''version [^23]' \ This one is weird, the comment implies that this test explicitly checks that GPLv3 is used, and you change it to allow GPLv2 as well. What do we get from this check in addition to the 'latest GPL' test? Christophe > halt='GPL vN, N!=3' \ > $(_sc_search_regexp) > > -- > 1.9.3 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From gscrivan at redhat.com Mon Aug 4 10:36:05 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Mon, 04 Aug 2014 12:36:05 +0200 Subject: [Libosinfo] [PATCH libosinfo 2/6] syntax-check: enable and fix sc_changelog In-Reply-To: <20140804100935.GJ7341@edamame.cdg.redhat.com> (Christophe Fergeau's message of "Mon, 4 Aug 2014 12:09:35 +0200") References: <1406641272-4957-1-git-send-email-gscrivan@redhat.com> <1406641272-4957-3-git-send-email-gscrivan@redhat.com> <20140804100935.GJ7341@edamame.cdg.redhat.com> Message-ID: <87iom8ilt6.fsf@redhat.com> Christophe Fergeau writes: > On Tue, Jul 29, 2014 at 03:41:08PM +0200, Giuseppe Scrivano wrote: >> Signed-off-by: Giuseppe Scrivano >> --- >> cfg.mk | 1 - >> maint.mk | 2 +- >> 2 files changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/cfg.mk b/cfg.mk >> index c2f07e0..b9be881 100644 >> --- a/cfg.mk >> +++ b/cfg.mk >> @@ -21,7 +21,6 @@ local-checks-to-skip = \ >> makefile-check \ >> makefile_path_separator_check \ >> patch-check \ >> - sc_GPL_version \ >> sc_always_defined_macros \ >> sc_cast_of_alloca_return_value \ >> sc_cross_check_PATH_usage_in_tests \ >> diff --git a/maint.mk b/maint.mk >> index 04a839a..792100b 100644 >> --- a/maint.mk >> +++ b/maint.mk >> @@ -856,7 +856,7 @@ sc_prohibit_backup_files: >> >> # Require the latest GPL. >> sc_GPL_version: >> - @prohibit='either ''version [^3]' \ >> + @prohibit='either ''version [^23]' \ > > This one is weird, the comment implies that this test explicitly checks > that GPLv3 is used, and you change it to allow GPLv2 as well. What do we > get from this check in addition to the 'latest GPL' test? I've tried to enable as many rules as possible, but now that I think more about it, I agree with you, we can just drop this patch as there is not real advantage in having it. Thanks, Giuseppe From cfergeau at redhat.com Mon Aug 4 12:10:05 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 4 Aug 2014 14:10:05 +0200 Subject: [Libosinfo] [PATCH] build-sys: Generate glib enum files in $(builddir) Message-ID: <1407154205-32176-1-git-send-email-cfergeau@redhat.com> Since b4c5a1b5c which introduced the generation of an osinfo_version.h file when configure is run, the glib enum files will be regenerated during make distcheck instead of using the one from the tarball. osinfo/Makefile.am currently attempts to generate these files in $(srcdir), which causes make distcheck to fail as it makes $(srcdir) read-only. This patch makes sure these files are generated in $(builddir) and that they are cleaned up afterwards. --- osinfo/Makefile.am | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am index b5d8be0..8f5685c 100644 --- a/osinfo/Makefile.am +++ b/osinfo/Makefile.am @@ -1,4 +1,4 @@ - +DISTCLEANFILES = EXTRA_DIST = libosinfo.syms \ osinfo_enum_types.h.template \ osinfo_enum_types.c.template @@ -149,10 +149,15 @@ libosinfo_1_0_la_SOURCES = \ $(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 $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $(srcdir)/osinfo_enum_types.h + $(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 $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $(srcdir)/osinfo_enum_types.c + $(AM_V_GEN) ( $(GLIB_MKENUMS) --template $(srcdir)/osinfo_enum_types.c.template $(libosinfo_1_0_include_HEADERS:%=$(srcdir)/%) ) > $@ + +DISTCLEANFILES += \ + osinfo_enum_types.c \ + osinfo_enum_types.h \ + $(NULL) # .libs/libosinfo.so is built by libtool as a side-effect of the Makefile # rule for libosinfo.la. However, checking symbols relies on Linux ELF layout -- 1.9.3 From cfergeau at redhat.com Mon Aug 4 12:13:35 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 4 Aug 2014 14:13:35 +0200 Subject: [Libosinfo] [PATCH libosinfo 4/6] cfg.mk: enable and fix sc_error_message_uppercase In-Reply-To: <1406641272-4957-5-git-send-email-gscrivan@redhat.com> References: <1406641272-4957-1-git-send-email-gscrivan@redhat.com> <1406641272-4957-5-git-send-email-gscrivan@redhat.com> Message-ID: <20140804121335.GM7341@edamame.cdg.redhat.com> I don't know whether we want all error messages to start with a capital letter or a lower case one, but being consistent is indeed good :) Christophe On Tue, Jul 29, 2014 at 03:41:10PM +0200, Giuseppe Scrivano wrote: > Signed-off-by: Giuseppe Scrivano > --- > cfg.mk | 1 - > osinfo/osinfo_install_script.c | 36 ++++++++++++++++++------------------ > osinfo/osinfo_loader.c | 34 +++++++++++++++++----------------- > osinfo/osinfo_media.c | 8 ++++---- > osinfo/osinfo_tree.c | 4 ++-- > tools/osinfo-db-validate.c | 16 ++++++++-------- > tools/osinfo-install-script.c | 2 +- > tools/osinfo-query.c | 14 +++++++------- > 8 files changed, 57 insertions(+), 58 deletions(-) > > diff --git a/cfg.mk b/cfg.mk > index 40ec1db..8e1b541 100644 > --- a/cfg.mk > +++ b/cfg.mk > @@ -23,7 +23,6 @@ local-checks-to-skip = \ > sc_prohibit_atoi_atof \ > sc_space_tab \ > sc_two_space_separator_in_usage \ > - sc_error_message_uppercase \ > sc_program_name \ > sc_makefile_check > > diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c > index fca1267..c6acac8 100644 > --- a/osinfo/osinfo_install_script.c > +++ b/osinfo/osinfo_install_script.c > @@ -578,7 +578,7 @@ static xsltStylesheetPtr osinfo_install_script_load_template(const gchar *uri, > pctxt = xmlNewParserCtxt(); > if (!pctxt || !pctxt->sax) { > g_set_error(error, 0, 0, "%s", > - _("Unable to create XML parser context")); > + _("unable to create XML parser context")); > goto cleanup; > } > > @@ -586,13 +586,13 @@ static xsltStylesheetPtr osinfo_install_script_load_template(const gchar *uri, > XML_PARSE_NOENT | XML_PARSE_NONET | > XML_PARSE_NOWARNING))) { > g_set_error(error, 0, 0, "%s", > - _("Unable to read XSL template")); > + _("unable to read XSL template")); > goto cleanup; > } > > if (!(xslt = xsltParseStylesheetDoc(doc))) { > g_set_error(error, 0, 0, "%s", > - _("Unable to parse XSL template")); > + _("unable to parse XSL template")); > goto cleanup; > } > > @@ -665,7 +665,7 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript > > if (!(node = xmlNewDocNode(NULL, NULL, (xmlChar*)name, NULL))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to create XML node '%s': '%s'"), > + g_set_error(error, 0, 0, _("unable to create XML node '%s': '%s'"), > name, err ? err->message : ""); > goto error; > } > @@ -673,13 +673,13 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript > if (!(data = xmlNewDocRawNode(NULL, NULL, (const xmlChar*)"id", > (const xmlChar*)osinfo_entity_get_id(entity)))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to create XML node 'id': '%s'"), > + g_set_error(error, 0, 0, _("unable to create XML node 'id': '%s'"), > err ? err->message : ""); > goto error; > } > if (!(xmlAddChild(node, data))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to add XML child '%s'"), err ? err->message : ""); > + g_set_error(error, 0, 0, _("unable to add XML child '%s'"), err ? err->message : ""); > goto error; > } > data = NULL; > @@ -701,13 +701,13 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript > if (!(data = xmlNewDocRawNode(NULL, NULL, (const xmlChar*)tmp1->data, > (const xmlChar*)tmp2->data))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to create XML node '%s': '%s'"), > + g_set_error(error, 0, 0, _("unable to create XML node '%s': '%s'"), > (const gchar *)tmp1->data, err ? err->message : ""); > goto error; > } > if (!(xmlAddChild(node, data))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to add XML child '%s'"), err ? err->message : ""); > + g_set_error(error, 0, 0, _("unable to add XML child '%s'"), err ? err->message : ""); > goto error; > } > data = NULL; > @@ -752,7 +752,7 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * > goto error; > if (!(xmlAddChild(root, node))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); > + g_set_error(error, 0, 0, _("unable to set XML root '%s'"), err ? err->message : ""); > goto error; > } > > @@ -763,7 +763,7 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * > goto error; > if (!(xmlAddChild(root, node))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); > + g_set_error(error, 0, 0, _("unable to set XML root '%s'"), err ? err->message : ""); > goto error; > } > > @@ -774,7 +774,7 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * > goto error; > if (!(xmlAddChild(root, node))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); > + g_set_error(error, 0, 0, _("unable to set XML root '%s'"), err ? err->message : ""); > goto error; > } > > @@ -796,17 +796,17 @@ static gchar *osinfo_install_script_apply_xslt(xsltStylesheetPtr ss, > int len; > > if (!(ctxt = xsltNewTransformContext(ss, doc))) { > - g_set_error(error, 0, 0, "%s", _("Unable to create XSL transform context")); > + g_set_error(error, 0, 0, "%s", _("unable to create XSL transform context")); > goto cleanup; > } > > if (!(docOut = xsltApplyStylesheetUser(ss, doc, NULL, NULL, NULL, ctxt))) { > - g_set_error(error, 0, 0, "%s", _("Unable to apply XSL transform context")); > + g_set_error(error, 0, 0, "%s", _("unable to apply XSL transform context")); > goto cleanup; > } > > if (xsltSaveResultToString((xmlChar **)&ret, &len, docOut, ss) < 0) { > - g_set_error(error, 0, 0, "%s", _("Unable to convert XSL output to string")); > + g_set_error(error, 0, 0, "%s", _("unable to convert XSL output to string")); > goto cleanup; > } > > @@ -863,7 +863,7 @@ static void osinfo_install_script_template_loaded(GObject *src, > &length, > NULL, > &error)) { > - g_prefix_error(&error, _("Failed to load script template %s: "), uri); > + g_prefix_error(&error, _("failed to load script template %s: "), uri); > g_simple_async_result_take_error(data->res, error); > goto cleanup; > } > @@ -877,7 +877,7 @@ static void osinfo_install_script_template_loaded(GObject *src, > &output, > data->config, > &error)) { > - g_prefix_error(&error, _("Failed to apply script template %s: "), uri); > + g_prefix_error(&error, _("failed to apply script template %s: "), uri); > g_simple_async_result_take_error(data->res, error); > goto cleanup; > } > @@ -922,7 +922,7 @@ void osinfo_install_script_generate_async(OsinfoInstallScript *script, > &output, > data->config, > &error)) { > - g_prefix_error(&error, "%s", _("Failed to apply script template: ")); > + g_prefix_error(&error, "%s", _("failed to apply script template: ")); > g_simple_async_result_take_error(data->res, error); > g_simple_async_result_complete(data->res); > osinfo_install_script_generate_data_free(data); > @@ -1231,7 +1231,7 @@ gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, > &output, > config, > &error)) { > - g_prefix_error(&error, "%s", _("Failed to apply script template: ")); > + g_prefix_error(&error, "%s", _("failed to apply script template: ")); > } > } > > diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c > index b8d6e45..035af13 100644 > --- a/osinfo/osinfo_loader.c > +++ b/osinfo/osinfo_loader.c > @@ -170,7 +170,7 @@ osinfo_loader_nodeset(const char *xpath, > return 0; > if (obj->type != XPATH_NODESET) { > g_set_error(err, g_quark_from_static_string("libosinfo"), 0, > - _("Expected a nodeset in XPath query %s"), xpath); > + _("expected a nodeset in XPath query %s"), xpath); > xmlXPathFreeObject(obj); > return -1; > } > @@ -250,7 +250,7 @@ osinfo_loader_boolean(const char *xpath, > break; > } > if (node->children->type != XML_TEXT_NODE) { > - OSINFO_ERROR(err, _("Expected a text node attribute value")); > + OSINFO_ERROR(err, _("expected a text node attribute value")); > goto cleanup; > } > > @@ -292,13 +292,13 @@ osinfo_loader_doc(const char *xpath, > if (!(buf = xmlBufferCreate())) { > xmlXPathFreeObject(obj); > g_set_error(err, 0, 0, "%s", > - "Cannot allocate buffer"); > + "cannot allocate buffer"); > return NULL; > } > if (xmlNodeDump(buf, NULL, obj->nodesetval->nodeTab[0], 0, 1) < 0) { > xmlXPathFreeObject(obj); > g_set_error(err, 0, 0, "%s", > - "Cannot format stylesheet"); > + "cannot format stylesheet"); > } > ret = g_strdup((char *)buf->content); > > @@ -394,7 +394,7 @@ static void osinfo_loader_entity(OsinfoLoader *loader, > > if (!param->children || > param->children->type != XML_TEXT_NODE) { > - OSINFO_ERROR(err, _("Expected a text node attribute value")); > + OSINFO_ERROR(err, _("expected a text node attribute value")); > goto cleanup; > } > > @@ -485,7 +485,7 @@ static void osinfo_loader_device(OsinfoLoader *loader, > { NULL, G_TYPE_INVALID } > }; > if (!id) { > - OSINFO_ERROR(err, _("Missing device id property")); > + OSINFO_ERROR(err, _("missing device id property")); > return; > } > > @@ -515,7 +515,7 @@ static void osinfo_loader_device_link(OsinfoLoader *loader, > }; > gchar *id = (gchar *)xmlGetProp(related[i], BAD_CAST "id"); > if (!id) { > - OSINFO_ERROR(err, _("Missing device link id property")); > + OSINFO_ERROR(err, _("missing device link id property")); > goto cleanup; > } > OsinfoDevice *dev = osinfo_loader_get_device(loader, id); > @@ -565,7 +565,7 @@ static void osinfo_loader_product_relshp(OsinfoLoader *loader, > > gchar *id = (gchar *) xmlGetProp(it, BAD_CAST "id"); > if (!id) { > - OSINFO_ERROR(err, _("Missing product upgrades id property")); > + OSINFO_ERROR(err, _("missing product upgrades id property")); > goto cleanup; > } > OsinfoProduct *relproduct; > @@ -637,7 +637,7 @@ static void osinfo_loader_platform(OsinfoLoader *loader, > { > gchar *id = (gchar *)xmlGetProp(root, BAD_CAST "id"); > if (!id) { > - OSINFO_ERROR(err, _("Missing platform id property")); > + OSINFO_ERROR(err, _("missing platform id property")); > return; > } > > @@ -665,13 +665,13 @@ static void osinfo_loader_deployment(OsinfoLoader *loader, > { > gchar *id = (gchar *)xmlGetProp(root, BAD_CAST "id"); > if (!id) { > - OSINFO_ERROR(err, _("Missing deployment id property")); > + OSINFO_ERROR(err, _("missing deployment id property")); > return; > } > > gchar *osid = osinfo_loader_string("string(./os/@id)", loader, ctxt, err); > if (!osid && 0) { > - OSINFO_ERROR(err, _("Missing deployment os id property")); > + OSINFO_ERROR(err, _("missing deployment os id property")); > xmlFree(id); > return; > } > @@ -681,7 +681,7 @@ static void osinfo_loader_deployment(OsinfoLoader *loader, > gchar *platformid = osinfo_loader_string("string(./platform/@id)", loader, > ctxt, err); > if (!platformid) { > - OSINFO_ERROR(err, _("Missing deployment platform id property")); > + OSINFO_ERROR(err, _("missing deployment platform id property")); > xmlFree(id); > return; > } > @@ -719,7 +719,7 @@ static void osinfo_loader_datamap(OsinfoLoader *loader, > gchar *id = (gchar *)xmlGetProp(root, BAD_CAST "id"); > > if (!id) { > - OSINFO_ERROR(err, _("Missing os id property")); > + OSINFO_ERROR(err, _("missing os id property")); > return; > } > > @@ -835,7 +835,7 @@ static void osinfo_loader_install_script(OsinfoLoader *loader, > GFlagsClass *flags_class; > > if (!id) { > - OSINFO_ERROR(err, _("Missing install script id property")); > + OSINFO_ERROR(err, _("missing install script id property")); > return; > } > > @@ -1279,7 +1279,7 @@ static void osinfo_loader_os(OsinfoLoader *loader, > }; > > if (!id) { > - OSINFO_ERROR(err, _("Missing os id property")); > + OSINFO_ERROR(err, _("missing os id property")); > return; > } > > @@ -1389,7 +1389,7 @@ static void osinfo_loader_os(OsinfoLoader *loader, > for (i = 0; i < nnodes; i++) { > gchar *scriptid = (gchar *)xmlGetProp(nodes[i], BAD_CAST "id"); > if (!scriptid) { > - OSINFO_ERROR(err, _("Missing OS install script property")); > + OSINFO_ERROR(err, _("missing OS install script property")); > goto cleanup; > } > OsinfoInstallScript *script; > @@ -1540,7 +1540,7 @@ static void osinfo_loader_process_xml(OsinfoLoader *loader, > root = xmlDocGetRootElement(xml); > > if (!root) { > - OSINFO_ERROR(err, _("Missing root XML element")); > + OSINFO_ERROR(err, _("missing root XML element")); > goto cleanup; > } > > diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c > index 96f9603..9ac423b 100644 > --- a/osinfo/osinfo_media.c > +++ b/osinfo/osinfo_media.c > @@ -658,7 +658,7 @@ static void on_svd_read(GObject *source, > &error); > if (ret < 0) { > g_prefix_error(&error, > - _("Failed to read supplementary volume descriptor: ")); > + _("failed to read supplementary volume descriptor: ")); > goto EXIT; > } > if (ret == 0) { > @@ -744,7 +744,7 @@ static void on_pvd_read(GObject *source, > res, > &error); > if (ret < 0) { > - g_prefix_error(&error, _("Failed to read primary volume descriptor: ")); > + g_prefix_error(&error, _("failed to read primary volume descriptor: ")); > goto ON_ERROR; > } > if (ret == 0) { > @@ -811,7 +811,7 @@ static void on_location_skipped(GObject *source, > > if (g_input_stream_skip_finish(stream, res, &error) < PVD_OFFSET) { > if (error) > - g_prefix_error(&error, _("Failed to skip %d bytes"), PVD_OFFSET); > + g_prefix_error(&error, _("failed to skip %d bytes"), PVD_OFFSET); > else > g_set_error(&error, > OSINFO_MEDIA_ERROR, > @@ -848,7 +848,7 @@ static void on_location_read(GObject *source, > > stream = g_file_read_finish(G_FILE(source), res, &error); > if (error != NULL) { > - g_prefix_error(&error, _("Failed to open file")); > + g_prefix_error(&error, _("failed to open file")); > g_simple_async_result_take_error(data->res, error); > g_simple_async_result_complete(data->res); > create_from_location_async_data_free(data); > diff --git a/osinfo/osinfo_tree.c b/osinfo/osinfo_tree.c > index 55c572e..392cc2e 100644 > --- a/osinfo/osinfo_tree.c > +++ b/osinfo/osinfo_tree.c > @@ -603,7 +603,7 @@ static void on_location_read(GObject *source, > &length, > NULL, > &error)) { > - g_prefix_error(&error, _("Failed to load .treeinfo file: ")); > + g_prefix_error(&error, _("failed to load .treeinfo file: ")); > g_simple_async_result_take_error(data->res, error); > g_simple_async_result_complete(data->res); > create_from_location_async_data_free(data); > @@ -614,7 +614,7 @@ static void on_location_read(GObject *source, > content, > length, > &error))) { > - g_prefix_error(&error, _("Failed to process keyinfo file: ")); > + g_prefix_error(&error, _("failed to process keyinfo file: ")); > g_simple_async_result_take_error(data->res, error); > goto cleanup; > } > diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c > index f53aebe..d391575 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, 2014 Red Hat, Inc > * > * osinfo-validate: validate that XML file(s) follows the published schema > * > @@ -68,7 +68,7 @@ static xmlDocPtr parse_file(GFile *file, GError **error) > > if (!(pctxt = xmlNewParserCtxt())) { > g_set_error(error, 0, 0, "%s", > - _("Unable to create libxml parser")); > + _("unable to create libxml parser")); > goto cleanup; > } > > @@ -76,7 +76,7 @@ static xmlDocPtr parse_file(GFile *file, GError **error) > XML_PARSE_NOENT | XML_PARSE_NONET | > XML_PARSE_NOWARNING))) { > g_set_error(error, 0, 0, > - _("Unable to parse XML document '%s'"), > + _("unable to parse XML document '%s'"), > uri); > goto cleanup; > } > @@ -108,7 +108,7 @@ static gboolean validate_file_regular(xmlRelaxNGValidCtxtPtr rngValid, > > if (xmlRelaxNGValidateDoc(rngValid, doc) != 0) { > g_set_error(error, 0, 0, > - _("Unable to validate XML document '%s'"), > + _("unable to validate XML document '%s'"), > uri); > goto cleanup; > } > @@ -176,7 +176,7 @@ static gboolean validate_file(xmlRelaxNGValidCtxtPtr rngValid, GFile *file, GFil > goto cleanup; > } else { > g_set_error(error, 0, 0, > - "Unable to handle file type for %s", > + "unable to handle file type for %s", > uri); > goto cleanup; > } > @@ -206,7 +206,7 @@ static gboolean validate_files(gint argc, gchar **argv, GError **error) > rngParser = xmlRelaxNGNewParserCtxt(SCHEMA); > if (!rngParser) { > g_set_error(error, 0, 0, > - _("Unable to create RNG parser for %s"), > + _("unable to create RNG parser for %s"), > SCHEMA); > goto cleanup; > } > @@ -214,7 +214,7 @@ static gboolean validate_files(gint argc, gchar **argv, GError **error) > rng = xmlRelaxNGParse(rngParser); > if (!rng) { > g_set_error(error, 0, 0, > - _("Unable to parse RNG %s"), > + _("unable to parse RNG %s"), > SCHEMA); > goto cleanup; > } > @@ -222,7 +222,7 @@ static gboolean validate_files(gint argc, gchar **argv, GError **error) > rngValid = xmlRelaxNGNewValidCtxt(rng); > if (!rngValid) { > g_set_error(error, 0, 0, > - _("Unable to create RNG validation context %s"), > + _("unable to create RNG validation context %s"), > SCHEMA); > goto cleanup; > } > diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c > index 9f9894a..135a1ea 100644 > --- a/tools/osinfo-install-script.c > +++ b/tools/osinfo-install-script.c > @@ -50,7 +50,7 @@ static gboolean handle_config(const gchar *option_name G_GNUC_UNUSED, > > if (!(val = strchr(value, '='))) { > g_set_error(error, 0, 0, > - _("Expected configuration key=value")); > + _("expected configuration key=value")); > return FALSE; > } > len = val - value; > diff --git a/tools/osinfo-query.c b/tools/osinfo-query.c > index 43ded4f..df2aa29 100644 > --- a/tools/osinfo-query.c > +++ b/tools/osinfo-query.c > @@ -1,5 +1,5 @@ > /* > - * Copyright (C) 2012 Red Hat, Inc > + * Copyright (C) 2012, 2014 Red Hat, Inc > * > * osinfo-query: query the contents of the database > * > @@ -150,7 +150,7 @@ static gboolean toggle_fields(struct OsinfoLabel *labels, > } > if (!found) { > g_set_error(error, 0, 0, > - _("Unknown property name %s"), fields[i]); > + _("unknown property name %s"), fields[i]); > goto cleanup; > } > } > @@ -174,7 +174,7 @@ static gboolean build_filter(struct OsinfoLabel *labels, > for (i = 0; i < argc; i++) { > const gchar *tmp = strchr(argv[i], '='); > if (!tmp) { > - g_set_error(error, 0, 0, "%s", _("Syntax error in condition, expecting KEY=VALUE")); > + g_set_error(error, 0, 0, "%s", _("syntax error in condition, expecting KEY=VALUE")); > goto cleanup; > } > gchar *key = g_strndup(argv[i], tmp-argv[i]); > @@ -188,7 +188,7 @@ static gboolean build_filter(struct OsinfoLabel *labels, > > if (!found) { > g_set_error(error, 0, 0, > - _("Unknown property name %s"), key); > + _("unknown property name %s"), key); > goto cleanup; > } > > @@ -446,17 +446,17 @@ gint main(gint argc, gchar **argv) > } > > if (!entities) { > - g_printerr(_("Unknown type '%s' requested\n"), type); > + g_printerr(_("unknown type '%s' requested\n"), type); > goto error; > } > > if (!build_filter(labels, filter, argc-2, argv+2, &error)) { > - g_printerr(_("Unable to construct filter: %s\n"), error->message); > + g_printerr(_("unable to construct filter: %s\n"), error->message); > goto error; > } > > if (!toggle_fields(labels, fields, &error)) { > - g_printerr(_("Unable to set field visibility: %s\n"), error->message); > + g_printerr(_("unable to set field visibility: %s\n"), error->message); > goto error; > } > > -- > 1.9.3 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Mon Aug 4 12:14:13 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 4 Aug 2014 14:14:13 +0200 Subject: [Libosinfo] [PATCH libosinfo 5/6] cfg.mk: enable and fix sc_space_tab In-Reply-To: <1406641272-4957-6-git-send-email-gscrivan@redhat.com> References: <1406641272-4957-1-git-send-email-gscrivan@redhat.com> <1406641272-4957-6-git-send-email-gscrivan@redhat.com> Message-ID: <20140804121413.GN7341@edamame.cdg.redhat.com> I'd add more details in the commit log about what this test does On Tue, Jul 29, 2014 at 03:41:11PM +0200, Giuseppe Scrivano wrote: > Signed-off-by: Giuseppe Scrivano > --- > cfg.mk | 5 +++-- > data/devices/Makefile.am | 10 +++++----- > data/oses/Makefile.am | 2 +- > tools/Makefile.am | 22 +++++++++++----------- > 4 files changed, 20 insertions(+), 19 deletions(-) > > diff --git a/cfg.mk b/cfg.mk > index 8e1b541..c36e50c 100644 > --- a/cfg.mk > +++ b/cfg.mk > @@ -19,9 +19,8 @@ > local-checks-to-skip = \ > sc_file_system \ > sc_immutable_NEWS \ > - sc_prohibit_always_true_header_tests \ > + sc_prohibit_always_true_header_tests \ This does not belong to this patch ACK otherwise. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Mon Aug 4 12:14:35 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 4 Aug 2014 14:14:35 +0200 Subject: [Libosinfo] [PATCH libosinfo 6/6] cfg.mk: enable sc_prohibit_atoi_atof and skip it for tests In-Reply-To: <1406641272-4957-7-git-send-email-gscrivan@redhat.com> References: <1406641272-4957-1-git-send-email-gscrivan@redhat.com> <1406641272-4957-7-git-send-email-gscrivan@redhat.com> Message-ID: <20140804121435.GO7341@edamame.cdg.redhat.com> Ditto, some short english description of the test in the commit log could be nice. On Tue, Jul 29, 2014 at 03:41:12PM +0200, Giuseppe Scrivano wrote: > Signed-off-by: Giuseppe Scrivano > --- > cfg.mk | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/cfg.mk b/cfg.mk > index c36e50c..2af1a99 100644 > --- a/cfg.mk > +++ b/cfg.mk > @@ -20,7 +20,6 @@ local-checks-to-skip = \ > sc_file_system \ > sc_immutable_NEWS \ > sc_prohibit_always_true_header_tests \ > - sc_prohibit_atoi_atof \ > sc_two_space_separator_in_usage \ > sc_program_name \ > sc_makefile_check > @@ -106,3 +105,5 @@ exclude_file_name_regexp--sc_trailing_blank = ^test/isodata/.*|docs/object-model > exclude_file_name_regexp--sc_bindtextdomain = ^tools/.*.c|test/.*.c > > exclude_file_name_regexp--sc_space_tab = ^test/isodata/.* > + > +exclude_file_name_regexp--sc_prohibit_atoi_atof = ^test/.*\.c > -- > 1.9.3 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Mon Aug 4 12:15:02 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Mon, 4 Aug 2014 14:15:02 +0200 Subject: [Libosinfo] [PATCH libosinfo 0/6] enable more syntax-check rules In-Reply-To: <87d2cgk8x5.fsf@redhat.com> References: <1406641272-4957-1-git-send-email-gscrivan@redhat.com> <87d2cgk8x5.fsf@redhat.com> Message-ID: <20140804121502.GP7341@edamame.cdg.redhat.com> ACK to the patches I did not comment on. Christophe On Mon, Aug 04, 2014 at 09:31:34AM +0200, Giuseppe Scrivano wrote: > Giuseppe Scrivano writes: > > > Giuseppe Scrivano (6): > > maint.mk: update from gnulib > > syntax-check: enable and fix sc_changelog > > cfg.mk: enable more syntax-check tests > > cfg.mk: enable and fix sc_error_message_uppercase > > cfg.mk: enable and fix sc_space_tab > > cfg.mk: enable sc_prohibit_atoi_atof and skip it for tests > > ping? > > Thanks, > Giuseppe > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From gscrivan at redhat.com Mon Aug 4 13:08:44 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Mon, 04 Aug 2014 15:08:44 +0200 Subject: [Libosinfo] [PATCH libosinfo 0/6] enable more syntax-check rules In-Reply-To: <20140804121502.GP7341@edamame.cdg.redhat.com> (Christophe Fergeau's message of "Mon, 4 Aug 2014 14:15:02 +0200") References: <1406641272-4957-1-git-send-email-gscrivan@redhat.com> <87d2cgk8x5.fsf@redhat.com> <20140804121502.GP7341@edamame.cdg.redhat.com> Message-ID: <87a97kieqr.fsf@redhat.com> Christophe Fergeau writes: > ACK to the patches I did not comment on. thanks for your reviews, I am going to send a v2 soon which addresses your comments. Regards, Giuseppe From gscrivan at redhat.com Mon Aug 4 13:17:27 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Mon, 4 Aug 2014 15:17:27 +0200 Subject: [Libosinfo] [PATCH libosinfo v2 0/5] enable more syntax-check rules Message-ID: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> v2: address the comments on the previous version. v1 here: https://www.redhat.com/archives/libosinfo/2014-July/msg00037.html Giuseppe Scrivano (5): maint.mk: update from gnulib cfg.mk: enable more syntax-check tests cfg.mk: enable and fix sc_error_message_uppercase cfg.mk: enable and fix sc_space_tab cfg.mk: enable sc_prohibit_atoi_atof and skip it for tests cfg.mk | 24 +++---------- data/devices/Makefile.am | 10 +++--- data/oses/Makefile.am | 2 +- maint.mk | 78 +++++++++++++++++++++--------------------- osinfo/osinfo_install_script.c | 36 +++++++++---------- osinfo/osinfo_loader.c | 34 +++++++++--------- osinfo/osinfo_media.c | 8 ++--- osinfo/osinfo_tree.c | 4 +-- tools/Makefile.am | 22 ++++++------ tools/osinfo-db-validate.c | 16 ++++----- tools/osinfo-install-script.c | 2 +- tools/osinfo-query.c | 14 ++++---- 12 files changed, 118 insertions(+), 132 deletions(-) -- 1.9.3 From gscrivan at redhat.com Mon Aug 4 13:17:28 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Mon, 4 Aug 2014 15:17:28 +0200 Subject: [Libosinfo] [PATCH libosinfo v2 1/5] maint.mk: update from gnulib In-Reply-To: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> References: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> Message-ID: <1407158252-15291-2-git-send-email-gscrivan@redhat.com> Signed-off-by: Giuseppe Scrivano --- maint.mk | 78 ++++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/maint.mk b/maint.mk index ea44ece..04a839a 100644 --- a/maint.mk +++ b/maint.mk @@ -2,7 +2,7 @@ # This Makefile fragment tries to be general-purpose enough to be # used by many projects via the gnulib maintainer-makefile module. -## Copyright (C) 2001-2012 Free Software Foundation, Inc. +## Copyright (C) 2001-2014 Free Software Foundation, Inc. ## ## 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 @@ -21,13 +21,6 @@ # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) ME := maint.mk -# Diagnostic for continued use of deprecated variable. -# Remove in 2013 -ifneq ($(build_aux),) - $(error "$(ME): \ -set $$(_build-aux) relative to $$(srcdir) instead of $$(build_aux)") -endif - # Helper variables. _empty = _sp = $(_empty) $(_empty) @@ -76,7 +69,7 @@ _dot_escaped_srcdir = $(subst .,\.,$(srcdir)) ifeq ($(srcdir),.) _prepend_srcdir_prefix = else - _prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|' + _prepend_srcdir_prefix = | $(SED) 's|^|$(srcdir)/|' endif # In order to be able to consistently filter "."-relative names, @@ -85,7 +78,7 @@ endif _sc_excl = \ $(or $(exclude_file_name_regexp--$@),^$$) VC_LIST_EXCEPT = \ - $(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \ + $(VC_LIST) | $(SED) 's|^$(_dot_escaped_srcdir)/||' \ | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \ else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \ | grep -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \ @@ -155,11 +148,11 @@ export LC_ALL = C ## Sanity checks. ## ## --------------- ## -_cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk') +_cfg_mk := $(wildcard $(srcdir)/cfg.mk) # Collect the names of rules starting with 'sc_'. -syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \ - $(srcdir)/$(ME) $(_cfg_mk))) +syntax-check-rules := $(sort $(shell $(SED) -n \ + 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(srcdir)/$(ME) $(_cfg_mk))) .PHONY: $(syntax-check-rules) ifeq ($(shell $(VC_LIST) >/dev/null 2>&1; echo $$?),0) @@ -445,10 +438,10 @@ sc_require_config_h: # You must include before including any other header file. # This can possibly be via a package-specific header, if given by cfg.mk. sc_require_config_h_first: - @if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ + @if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ fail=0; \ for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \ - grep '^# *include\>' $$i | sed 1q \ + grep '^# *include\>' $$i | $(SED) 1q \ | grep -E '^# *include $(config_h_header)' > /dev/null \ || { echo $$i; fail=1; }; \ done; \ @@ -468,8 +461,8 @@ sc_prohibit_HAVE_MBRTOWC: # re: a regular expression that matches IFF something provided by $h is used. define _sc_header_without_use dummy=; : so we do not need a semicolon before each use; \ - h_esc=`echo '[<"]'"$$h"'[">]'|sed 's/\./\\\\./g'`; \ - if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \ + h_esc=`echo '[<"]'"$$h"'[">]'|$(SED) 's/\./\\\\./g'`; \ + if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ files=$$(grep -l '^# *include '"$$h_esc" \ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \ grep -LE "$$re" $$files | grep . && \ @@ -591,7 +584,7 @@ sc_prohibit_root_dev_ino_without_use: sc_prohibit_openat_without_use: @h='openat.h' \ - re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>' \ + re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat|(FCHMOD|FCHOWN|STAT)AT_INLINE)\>' \ $(_sc_header_without_use) # Prohibit the inclusion of c-ctype.h without an actual use. @@ -716,7 +709,7 @@ sc_changelog: # Ensure that each .c file containing a "main" function also # calls set_program_name. sc_program_name: - @require='set_program_name *\(m?argv\[0\]\);' \ + @require='set_program_name *\(.*\);' \ in_vc_files='\.c$$' \ containing='\
/' + | $(SED) 's/^/^ *# *(define|undef) */;s/$$/\\>/' endef # Don't define macros that we already get from gnulib header files. @@ -1054,12 +1047,12 @@ sc_const_long_option: $(_sc_search_regexp) NEWS_hash = \ - $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \ + $$($(SED) -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \ $(srcdir)/NEWS \ | perl -0777 -pe \ 's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \ | md5sum - \ - | sed 's/ .*//') + | $(SED) 's/ .*//') # Ensure that we don't accidentally insert an entry into an old NEWS block. sc_immutable_NEWS: @@ -1097,7 +1090,7 @@ sc_makefile_at_at_check: && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : news-check: NEWS - $(AM_V_GEN)if sed -n $(news-check-lines-spec)p $< \ + $(AM_V_GEN)if $(SED) -n $(news-check-lines-spec)p $< \ | grep -E $(news-check-regexp) >/dev/null; then \ :; \ else \ @@ -1146,7 +1139,7 @@ sc_po_check: files="$$files $$file"; \ done; \ grep -E -l '$(_gl_translatable_string_re)' $$files \ - | sed 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \ + | $(SED) 's|^$(_dot_escaped_srcdir)/||' | sort -u > $@-2; \ diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \ || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \ rm -f $@-1 $@-2; \ @@ -1192,7 +1185,7 @@ sc_copyright_check: in_vc_files=$(sample-test) \ halt='out of date copyright in $(sample-test); update it' \ $(_sc_search_regexp) - @require='Copyright @copyright\{\} .*'$$(date +%Y)' Free' \ + @require='Copyright @copyright\{\} .*'$$(date +%Y) \ in_vc_files=$(texi) \ halt='out of date copyright in $(texi); update it' \ $(_sc_search_regexp) @@ -1283,15 +1276,17 @@ vc-diff-check: rel-files = $(DIST_ARCHIVES) gnulib_dir ?= $(srcdir)/gnulib -gnulib-version = $$(cd $(gnulib_dir) && git describe) +gnulib-version = $$(cd $(gnulib_dir) \ + && { git describe || git rev-parse --short=10 HEAD; } ) bootstrap-tools ?= autoconf,automake,gnulib +gpgv = $$(gpgv2 --version >/dev/null && echo gpgv2 || echo gpgv) # If it's not already specified, derive the GPG key ID from # the signed tag we've just applied to mark this release. gpg_key_ID ?= \ $$(cd $(srcdir) \ && git cat-file tag v$(VERSION) \ - | gpgv --status-fd 1 --keyring /dev/null - - 2>/dev/null \ + | $(gpgv) --status-fd 1 --keyring /dev/null - - 2>/dev/null \ | awk '/^\[GNUPG:\] ERRSIG / {print $$3; exit}') translation_project_ ?= coordinator at translationproject.org @@ -1315,7 +1310,7 @@ announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type)) announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type)) announcement: NEWS ChangeLog $(rel-files) # Not $(AM_V_GEN) since the output of this command serves as -# annoucement message: it would start with " GEN announcement". +# announcement message: it would start with " GEN announcement". $(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \ --mail-headers='$(announcement_mail_headers_)' \ --release-type=$(release-type) \ @@ -1370,7 +1365,8 @@ endef .PHONY: no-submodule-changes no-submodule-changes: - $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + $(AM_V_GEN)if test -d $(srcdir)/.git \ + && git --version >/dev/null 2>&1; then \ diff=$$(cd $(srcdir) && git submodule -q foreach \ git diff-index --name-only HEAD) \ || exit 1; \ @@ -1388,10 +1384,12 @@ submodule-checks ?= no-submodule-changes public-submodule-commit # cannot be built from a fresh clone. .PHONY: public-submodule-commit public-submodule-commit: - $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + $(AM_V_GEN)if test -d $(srcdir)/.git \ + && git --version >/dev/null 2>&1; then \ cd $(srcdir) && \ - git submodule --quiet foreach test '$$(git rev-parse $$sha1)' \ - = '$$(git merge-base origin $$sha1)' \ + git submodule --quiet foreach \ + 'test "$$(git rev-parse "$$sha1")" \ + = "$$(git merge-base origin "$$sha1")"' \ || { echo '$(ME): found non-public submodule commit' >&2; \ exit 1; }; \ else \ @@ -1421,6 +1419,7 @@ alpha beta stable: $(local-check) writable-files $(submodule-checks) $(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@ release: + $(AM_V_GEN)$(MAKE) _version $(AM_V_GEN)$(MAKE) $(release-type) # Override this in cfg.mk if you follow different procedures. @@ -1505,7 +1504,7 @@ refresh-gnulib-patches: test -n "$$t" && gl=$$t; \ fi; \ for diff in $$(cd $$gl; git ls-files | grep '\.diff$$'); do \ - b=$$(printf %s "$$diff"|sed 's/\.diff$$//'); \ + b=$$(printf %s "$$diff"|$(SED) 's/\.diff$$//'); \ VERSION_CONTROL=none \ patch "$(gnulib_dir)/$$b" "$$gl/$$diff" || exit 1; \ ( cd $(gnulib_dir) || exit 1; \ @@ -1524,7 +1523,8 @@ refresh-po: wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \ echo 'en at boldquot' > $(PODIR)/LINGUAS && \ echo 'en at quot' >> $(PODIR)/LINGUAS && \ - ls $(PODIR)/*.po | sed 's/\.po//;s,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS + ls $(PODIR)/*.po | $(SED) 's/\.po//;s,$(PODIR)/,,' | \ + sort >> $(PODIR)/LINGUAS # Running indent once is not idempotent, but running it twice is. INDENT_SOURCES ?= $(C_SOURCES) @@ -1634,18 +1634,18 @@ _gl_tight_scope: $(bin_PROGRAMS) test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_functions); \ grep -h -A1 '^extern .*[^;]$$' $$src \ - | grep -vE '^(extern |--)' | sed 's/ .*//'; \ + | grep -vE '^(extern |--)' | $(SED) 's/ .*//'; \ perl -lne \ '$(_gl_TS_function_match) and print "^$$1\$$"' $$hdr; \ ) | sort -u > $$t; \ - nm -e $(_gl_TS_obj_files) | sed -n 's/.* T //p'|grep -Ev -f $$t \ + nm -e $(_gl_TS_obj_files)|$(SED) -n 's/.* T //p'|grep -Ev -f $$t \ && { echo the above functions should have static scope >&2; \ exit 1; } || : ; \ ( printf '^%s$$\n' '__.*' $(_gl_TS_unmarked_extern_vars); \ perl -lne '$(_gl_TS_var_match) and print "^$$1\$$"' \ $$hdr $(_gl_TS_other_headers) \ ) | sort -u > $$t; \ - nm -e $(_gl_TS_obj_files) | sed -n 's/.* [BCDGRS] //p' \ + nm -e $(_gl_TS_obj_files) | $(SED) -n 's/.* [BCDGRS] //p' \ | sort -u | grep -Ev -f $$t \ && { echo the above variables should have static scope >&2; \ exit 1; } || : -- 1.9.3 From gscrivan at redhat.com Mon Aug 4 13:17:29 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Mon, 4 Aug 2014 15:17:29 +0200 Subject: [Libosinfo] [PATCH libosinfo v2 2/5] cfg.mk: enable more syntax-check tests In-Reply-To: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> References: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> Message-ID: <1407158252-15291-3-git-send-email-gscrivan@redhat.com> Signed-off-by: Giuseppe Scrivano --- cfg.mk | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/cfg.mk b/cfg.mk index c2f07e0..ff44ca5 100644 --- a/cfg.mk +++ b/cfg.mk @@ -29,28 +29,13 @@ local-checks-to-skip = \ sc_error_exit_success \ sc_file_system \ sc_immutable_NEWS \ - sc_makefile_path_separator_check \ - sc_obsolete_symbols \ sc_prohibit_always_true_header_tests \ - sc_prohibit_S_IS_definition \ sc_prohibit_atoi_atof \ - sc_prohibit_hash_without_use \ - sc_prohibit_jm_in_m4 \ - sc_prohibit_quote_without_use \ - sc_prohibit_quotearg_without_use \ - sc_prohibit_stat_st_blocks \ - sc_root_tests \ sc_space_tab \ - sc_sun_os_names \ - sc_system_h_headers \ - sc_texinfo_acronym \ - sc_tight_scope \ sc_two_space_separator_in_usage \ sc_error_message_uppercase \ sc_program_name \ - sc_require_test_exit_idiom \ - sc_makefile_check \ - sc_useless_cpp_parens + sc_makefile_check # Files that should never cause syntax check failures. VC_LIST_ALWAYS_EXCLUDE_REGEX = \ -- 1.9.3 From gscrivan at redhat.com Mon Aug 4 13:17:30 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Mon, 4 Aug 2014 15:17:30 +0200 Subject: [Libosinfo] [PATCH libosinfo v2 3/5] cfg.mk: enable and fix sc_error_message_uppercase In-Reply-To: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> References: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> Message-ID: <1407158252-15291-4-git-send-email-gscrivan@redhat.com> Signed-off-by: Giuseppe Scrivano --- cfg.mk | 1 - osinfo/osinfo_install_script.c | 36 ++++++++++++++++++------------------ osinfo/osinfo_loader.c | 34 +++++++++++++++++----------------- osinfo/osinfo_media.c | 8 ++++---- osinfo/osinfo_tree.c | 4 ++-- tools/osinfo-db-validate.c | 16 ++++++++-------- tools/osinfo-install-script.c | 2 +- tools/osinfo-query.c | 14 +++++++------- 8 files changed, 57 insertions(+), 58 deletions(-) diff --git a/cfg.mk b/cfg.mk index ff44ca5..6d9d60e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -33,7 +33,6 @@ local-checks-to-skip = \ sc_prohibit_atoi_atof \ sc_space_tab \ sc_two_space_separator_in_usage \ - sc_error_message_uppercase \ sc_program_name \ sc_makefile_check diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index 8cb06cc..d29eb18 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -578,7 +578,7 @@ static xsltStylesheetPtr osinfo_install_script_load_template(const gchar *uri, pctxt = xmlNewParserCtxt(); if (!pctxt || !pctxt->sax) { g_set_error(error, 0, 0, "%s", - _("Unable to create XML parser context")); + _("unable to create XML parser context")); goto cleanup; } @@ -586,13 +586,13 @@ static xsltStylesheetPtr osinfo_install_script_load_template(const gchar *uri, XML_PARSE_NOENT | XML_PARSE_NONET | XML_PARSE_NOWARNING))) { g_set_error(error, 0, 0, "%s", - _("Unable to read XSL template")); + _("unable to read XSL template")); goto cleanup; } if (!(xslt = xsltParseStylesheetDoc(doc))) { g_set_error(error, 0, 0, "%s", - _("Unable to parse XSL template")); + _("unable to parse XSL template")); goto cleanup; } @@ -665,7 +665,7 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript if (!(node = xmlNewDocNode(NULL, NULL, (xmlChar*)name, NULL))) { xmlErrorPtr err = xmlGetLastError(); - g_set_error(error, 0, 0, _("Unable to create XML node '%s': '%s'"), + g_set_error(error, 0, 0, _("unable to create XML node '%s': '%s'"), name, err ? err->message : ""); goto error; } @@ -673,13 +673,13 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript if (!(data = xmlNewDocRawNode(NULL, NULL, (const xmlChar*)"id", (const xmlChar*)osinfo_entity_get_id(entity)))) { xmlErrorPtr err = xmlGetLastError(); - g_set_error(error, 0, 0, _("Unable to create XML node 'id': '%s'"), + g_set_error(error, 0, 0, _("unable to create XML node 'id': '%s'"), err ? err->message : ""); goto error; } if (!(xmlAddChild(node, data))) { xmlErrorPtr err = xmlGetLastError(); - g_set_error(error, 0, 0, _("Unable to add XML child '%s'"), err ? err->message : ""); + g_set_error(error, 0, 0, _("unable to add XML child '%s'"), err ? err->message : ""); goto error; } data = NULL; @@ -701,13 +701,13 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript if (!(data = xmlNewDocRawNode(NULL, NULL, (const xmlChar*)tmp1->data, (const xmlChar*)tmp2->data))) { xmlErrorPtr err = xmlGetLastError(); - g_set_error(error, 0, 0, _("Unable to create XML node '%s': '%s'"), + g_set_error(error, 0, 0, _("unable to create XML node '%s': '%s'"), (const gchar *)tmp1->data, err ? err->message : ""); goto error; } if (!(xmlAddChild(node, data))) { xmlErrorPtr err = xmlGetLastError(); - g_set_error(error, 0, 0, _("Unable to add XML child '%s'"), err ? err->message : ""); + g_set_error(error, 0, 0, _("unable to add XML child '%s'"), err ? err->message : ""); goto error; } data = NULL; @@ -752,7 +752,7 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * goto error; if (!(xmlAddChild(root, node))) { xmlErrorPtr err = xmlGetLastError(); - g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); + g_set_error(error, 0, 0, _("unable to set XML root '%s'"), err ? err->message : ""); goto error; } @@ -763,7 +763,7 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * goto error; if (!(xmlAddChild(root, node))) { xmlErrorPtr err = xmlGetLastError(); - g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); + g_set_error(error, 0, 0, _("unable to set XML root '%s'"), err ? err->message : ""); goto error; } @@ -774,7 +774,7 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * goto error; if (!(xmlAddChild(root, node))) { xmlErrorPtr err = xmlGetLastError(); - g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); + g_set_error(error, 0, 0, _("unable to set XML root '%s'"), err ? err->message : ""); goto error; } @@ -796,17 +796,17 @@ static gchar *osinfo_install_script_apply_xslt(xsltStylesheetPtr ss, int len; if (!(ctxt = xsltNewTransformContext(ss, doc))) { - g_set_error(error, 0, 0, "%s", _("Unable to create XSL transform context")); + g_set_error(error, 0, 0, "%s", _("unable to create XSL transform context")); goto cleanup; } if (!(docOut = xsltApplyStylesheetUser(ss, doc, NULL, NULL, NULL, ctxt))) { - g_set_error(error, 0, 0, "%s", _("Unable to apply XSL transform context")); + g_set_error(error, 0, 0, "%s", _("unable to apply XSL transform context")); goto cleanup; } if (xsltSaveResultToString((xmlChar **)&ret, &len, docOut, ss) < 0) { - g_set_error(error, 0, 0, "%s", _("Unable to convert XSL output to string")); + g_set_error(error, 0, 0, "%s", _("unable to convert XSL output to string")); goto cleanup; } @@ -863,7 +863,7 @@ static void osinfo_install_script_template_loaded(GObject *src, &length, NULL, &error)) { - g_prefix_error(&error, _("Failed to load script template %s: "), uri); + g_prefix_error(&error, _("failed to load script template %s: "), uri); g_simple_async_result_take_error(data->res, error); goto cleanup; } @@ -877,7 +877,7 @@ static void osinfo_install_script_template_loaded(GObject *src, &output, data->config, &error)) { - g_prefix_error(&error, _("Failed to apply script template %s: "), uri); + g_prefix_error(&error, _("failed to apply script template %s: "), uri); g_simple_async_result_take_error(data->res, error); goto cleanup; } @@ -922,7 +922,7 @@ void osinfo_install_script_generate_async(OsinfoInstallScript *script, &output, data->config, &error)) { - g_prefix_error(&error, "%s", _("Failed to apply script template: ")); + g_prefix_error(&error, "%s", _("failed to apply script template: ")); g_simple_async_result_take_error(data->res, error); g_simple_async_result_complete(data->res); osinfo_install_script_generate_data_free(data); @@ -1231,7 +1231,7 @@ gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, &output, config, &error)) { - g_prefix_error(&error, "%s", _("Failed to apply script template: ")); + g_prefix_error(&error, "%s", _("failed to apply script template: ")); } } diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c index b8d6e45..035af13 100644 --- a/osinfo/osinfo_loader.c +++ b/osinfo/osinfo_loader.c @@ -170,7 +170,7 @@ osinfo_loader_nodeset(const char *xpath, return 0; if (obj->type != XPATH_NODESET) { g_set_error(err, g_quark_from_static_string("libosinfo"), 0, - _("Expected a nodeset in XPath query %s"), xpath); + _("expected a nodeset in XPath query %s"), xpath); xmlXPathFreeObject(obj); return -1; } @@ -250,7 +250,7 @@ osinfo_loader_boolean(const char *xpath, break; } if (node->children->type != XML_TEXT_NODE) { - OSINFO_ERROR(err, _("Expected a text node attribute value")); + OSINFO_ERROR(err, _("expected a text node attribute value")); goto cleanup; } @@ -292,13 +292,13 @@ osinfo_loader_doc(const char *xpath, if (!(buf = xmlBufferCreate())) { xmlXPathFreeObject(obj); g_set_error(err, 0, 0, "%s", - "Cannot allocate buffer"); + "cannot allocate buffer"); return NULL; } if (xmlNodeDump(buf, NULL, obj->nodesetval->nodeTab[0], 0, 1) < 0) { xmlXPathFreeObject(obj); g_set_error(err, 0, 0, "%s", - "Cannot format stylesheet"); + "cannot format stylesheet"); } ret = g_strdup((char *)buf->content); @@ -394,7 +394,7 @@ static void osinfo_loader_entity(OsinfoLoader *loader, if (!param->children || param->children->type != XML_TEXT_NODE) { - OSINFO_ERROR(err, _("Expected a text node attribute value")); + OSINFO_ERROR(err, _("expected a text node attribute value")); goto cleanup; } @@ -485,7 +485,7 @@ static void osinfo_loader_device(OsinfoLoader *loader, { NULL, G_TYPE_INVALID } }; if (!id) { - OSINFO_ERROR(err, _("Missing device id property")); + OSINFO_ERROR(err, _("missing device id property")); return; } @@ -515,7 +515,7 @@ static void osinfo_loader_device_link(OsinfoLoader *loader, }; gchar *id = (gchar *)xmlGetProp(related[i], BAD_CAST "id"); if (!id) { - OSINFO_ERROR(err, _("Missing device link id property")); + OSINFO_ERROR(err, _("missing device link id property")); goto cleanup; } OsinfoDevice *dev = osinfo_loader_get_device(loader, id); @@ -565,7 +565,7 @@ static void osinfo_loader_product_relshp(OsinfoLoader *loader, gchar *id = (gchar *) xmlGetProp(it, BAD_CAST "id"); if (!id) { - OSINFO_ERROR(err, _("Missing product upgrades id property")); + OSINFO_ERROR(err, _("missing product upgrades id property")); goto cleanup; } OsinfoProduct *relproduct; @@ -637,7 +637,7 @@ static void osinfo_loader_platform(OsinfoLoader *loader, { gchar *id = (gchar *)xmlGetProp(root, BAD_CAST "id"); if (!id) { - OSINFO_ERROR(err, _("Missing platform id property")); + OSINFO_ERROR(err, _("missing platform id property")); return; } @@ -665,13 +665,13 @@ static void osinfo_loader_deployment(OsinfoLoader *loader, { gchar *id = (gchar *)xmlGetProp(root, BAD_CAST "id"); if (!id) { - OSINFO_ERROR(err, _("Missing deployment id property")); + OSINFO_ERROR(err, _("missing deployment id property")); return; } gchar *osid = osinfo_loader_string("string(./os/@id)", loader, ctxt, err); if (!osid && 0) { - OSINFO_ERROR(err, _("Missing deployment os id property")); + OSINFO_ERROR(err, _("missing deployment os id property")); xmlFree(id); return; } @@ -681,7 +681,7 @@ static void osinfo_loader_deployment(OsinfoLoader *loader, gchar *platformid = osinfo_loader_string("string(./platform/@id)", loader, ctxt, err); if (!platformid) { - OSINFO_ERROR(err, _("Missing deployment platform id property")); + OSINFO_ERROR(err, _("missing deployment platform id property")); xmlFree(id); return; } @@ -719,7 +719,7 @@ static void osinfo_loader_datamap(OsinfoLoader *loader, gchar *id = (gchar *)xmlGetProp(root, BAD_CAST "id"); if (!id) { - OSINFO_ERROR(err, _("Missing os id property")); + OSINFO_ERROR(err, _("missing os id property")); return; } @@ -835,7 +835,7 @@ static void osinfo_loader_install_script(OsinfoLoader *loader, GFlagsClass *flags_class; if (!id) { - OSINFO_ERROR(err, _("Missing install script id property")); + OSINFO_ERROR(err, _("missing install script id property")); return; } @@ -1279,7 +1279,7 @@ static void osinfo_loader_os(OsinfoLoader *loader, }; if (!id) { - OSINFO_ERROR(err, _("Missing os id property")); + OSINFO_ERROR(err, _("missing os id property")); return; } @@ -1389,7 +1389,7 @@ static void osinfo_loader_os(OsinfoLoader *loader, for (i = 0; i < nnodes; i++) { gchar *scriptid = (gchar *)xmlGetProp(nodes[i], BAD_CAST "id"); if (!scriptid) { - OSINFO_ERROR(err, _("Missing OS install script property")); + OSINFO_ERROR(err, _("missing OS install script property")); goto cleanup; } OsinfoInstallScript *script; @@ -1540,7 +1540,7 @@ static void osinfo_loader_process_xml(OsinfoLoader *loader, root = xmlDocGetRootElement(xml); if (!root) { - OSINFO_ERROR(err, _("Missing root XML element")); + OSINFO_ERROR(err, _("missing root XML element")); goto cleanup; } diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c index 96f9603..9ac423b 100644 --- a/osinfo/osinfo_media.c +++ b/osinfo/osinfo_media.c @@ -658,7 +658,7 @@ static void on_svd_read(GObject *source, &error); if (ret < 0) { g_prefix_error(&error, - _("Failed to read supplementary volume descriptor: ")); + _("failed to read supplementary volume descriptor: ")); goto EXIT; } if (ret == 0) { @@ -744,7 +744,7 @@ static void on_pvd_read(GObject *source, res, &error); if (ret < 0) { - g_prefix_error(&error, _("Failed to read primary volume descriptor: ")); + g_prefix_error(&error, _("failed to read primary volume descriptor: ")); goto ON_ERROR; } if (ret == 0) { @@ -811,7 +811,7 @@ static void on_location_skipped(GObject *source, if (g_input_stream_skip_finish(stream, res, &error) < PVD_OFFSET) { if (error) - g_prefix_error(&error, _("Failed to skip %d bytes"), PVD_OFFSET); + g_prefix_error(&error, _("failed to skip %d bytes"), PVD_OFFSET); else g_set_error(&error, OSINFO_MEDIA_ERROR, @@ -848,7 +848,7 @@ static void on_location_read(GObject *source, stream = g_file_read_finish(G_FILE(source), res, &error); if (error != NULL) { - g_prefix_error(&error, _("Failed to open file")); + g_prefix_error(&error, _("failed to open file")); g_simple_async_result_take_error(data->res, error); g_simple_async_result_complete(data->res); create_from_location_async_data_free(data); diff --git a/osinfo/osinfo_tree.c b/osinfo/osinfo_tree.c index 55c572e..392cc2e 100644 --- a/osinfo/osinfo_tree.c +++ b/osinfo/osinfo_tree.c @@ -603,7 +603,7 @@ static void on_location_read(GObject *source, &length, NULL, &error)) { - g_prefix_error(&error, _("Failed to load .treeinfo file: ")); + g_prefix_error(&error, _("failed to load .treeinfo file: ")); g_simple_async_result_take_error(data->res, error); g_simple_async_result_complete(data->res); create_from_location_async_data_free(data); @@ -614,7 +614,7 @@ static void on_location_read(GObject *source, content, length, &error))) { - g_prefix_error(&error, _("Failed to process keyinfo file: ")); + g_prefix_error(&error, _("failed to process keyinfo file: ")); g_simple_async_result_take_error(data->res, error); goto cleanup; } diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c index f53aebe..d391575 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, 2014 Red Hat, Inc * * osinfo-validate: validate that XML file(s) follows the published schema * @@ -68,7 +68,7 @@ static xmlDocPtr parse_file(GFile *file, GError **error) if (!(pctxt = xmlNewParserCtxt())) { g_set_error(error, 0, 0, "%s", - _("Unable to create libxml parser")); + _("unable to create libxml parser")); goto cleanup; } @@ -76,7 +76,7 @@ static xmlDocPtr parse_file(GFile *file, GError **error) XML_PARSE_NOENT | XML_PARSE_NONET | XML_PARSE_NOWARNING))) { g_set_error(error, 0, 0, - _("Unable to parse XML document '%s'"), + _("unable to parse XML document '%s'"), uri); goto cleanup; } @@ -108,7 +108,7 @@ static gboolean validate_file_regular(xmlRelaxNGValidCtxtPtr rngValid, if (xmlRelaxNGValidateDoc(rngValid, doc) != 0) { g_set_error(error, 0, 0, - _("Unable to validate XML document '%s'"), + _("unable to validate XML document '%s'"), uri); goto cleanup; } @@ -176,7 +176,7 @@ static gboolean validate_file(xmlRelaxNGValidCtxtPtr rngValid, GFile *file, GFil goto cleanup; } else { g_set_error(error, 0, 0, - "Unable to handle file type for %s", + "unable to handle file type for %s", uri); goto cleanup; } @@ -206,7 +206,7 @@ static gboolean validate_files(gint argc, gchar **argv, GError **error) rngParser = xmlRelaxNGNewParserCtxt(SCHEMA); if (!rngParser) { g_set_error(error, 0, 0, - _("Unable to create RNG parser for %s"), + _("unable to create RNG parser for %s"), SCHEMA); goto cleanup; } @@ -214,7 +214,7 @@ static gboolean validate_files(gint argc, gchar **argv, GError **error) rng = xmlRelaxNGParse(rngParser); if (!rng) { g_set_error(error, 0, 0, - _("Unable to parse RNG %s"), + _("unable to parse RNG %s"), SCHEMA); goto cleanup; } @@ -222,7 +222,7 @@ static gboolean validate_files(gint argc, gchar **argv, GError **error) rngValid = xmlRelaxNGNewValidCtxt(rng); if (!rngValid) { g_set_error(error, 0, 0, - _("Unable to create RNG validation context %s"), + _("unable to create RNG validation context %s"), SCHEMA); goto cleanup; } diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c index 9f9894a..135a1ea 100644 --- a/tools/osinfo-install-script.c +++ b/tools/osinfo-install-script.c @@ -50,7 +50,7 @@ static gboolean handle_config(const gchar *option_name G_GNUC_UNUSED, if (!(val = strchr(value, '='))) { g_set_error(error, 0, 0, - _("Expected configuration key=value")); + _("expected configuration key=value")); return FALSE; } len = val - value; diff --git a/tools/osinfo-query.c b/tools/osinfo-query.c index 43ded4f..df2aa29 100644 --- a/tools/osinfo-query.c +++ b/tools/osinfo-query.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2012 Red Hat, Inc + * Copyright (C) 2012, 2014 Red Hat, Inc * * osinfo-query: query the contents of the database * @@ -150,7 +150,7 @@ static gboolean toggle_fields(struct OsinfoLabel *labels, } if (!found) { g_set_error(error, 0, 0, - _("Unknown property name %s"), fields[i]); + _("unknown property name %s"), fields[i]); goto cleanup; } } @@ -174,7 +174,7 @@ static gboolean build_filter(struct OsinfoLabel *labels, for (i = 0; i < argc; i++) { const gchar *tmp = strchr(argv[i], '='); if (!tmp) { - g_set_error(error, 0, 0, "%s", _("Syntax error in condition, expecting KEY=VALUE")); + g_set_error(error, 0, 0, "%s", _("syntax error in condition, expecting KEY=VALUE")); goto cleanup; } gchar *key = g_strndup(argv[i], tmp-argv[i]); @@ -188,7 +188,7 @@ static gboolean build_filter(struct OsinfoLabel *labels, if (!found) { g_set_error(error, 0, 0, - _("Unknown property name %s"), key); + _("unknown property name %s"), key); goto cleanup; } @@ -446,17 +446,17 @@ gint main(gint argc, gchar **argv) } if (!entities) { - g_printerr(_("Unknown type '%s' requested\n"), type); + g_printerr(_("unknown type '%s' requested\n"), type); goto error; } if (!build_filter(labels, filter, argc-2, argv+2, &error)) { - g_printerr(_("Unable to construct filter: %s\n"), error->message); + g_printerr(_("unable to construct filter: %s\n"), error->message); goto error; } if (!toggle_fields(labels, fields, &error)) { - g_printerr(_("Unable to set field visibility: %s\n"), error->message); + g_printerr(_("unable to set field visibility: %s\n"), error->message); goto error; } -- 1.9.3 From gscrivan at redhat.com Mon Aug 4 13:17:31 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Mon, 4 Aug 2014 15:17:31 +0200 Subject: [Libosinfo] [PATCH libosinfo v2 4/5] cfg.mk: enable and fix sc_space_tab In-Reply-To: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> References: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> Message-ID: <1407158252-15291-5-git-send-email-gscrivan@redhat.com> It checks that tab indentation is not used together with white spaces indentation. Signed-off-by: Giuseppe Scrivano --- cfg.mk | 3 ++- data/devices/Makefile.am | 10 +++++----- data/oses/Makefile.am | 2 +- tools/Makefile.am | 22 +++++++++++----------- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/cfg.mk b/cfg.mk index 6d9d60e..890a4ae 100644 --- a/cfg.mk +++ b/cfg.mk @@ -31,7 +31,6 @@ local-checks-to-skip = \ sc_immutable_NEWS \ sc_prohibit_always_true_header_tests \ sc_prohibit_atoi_atof \ - sc_space_tab \ sc_two_space_separator_in_usage \ sc_program_name \ sc_makefile_check @@ -115,3 +114,5 @@ exclude_file_name_regexp--sc_require_config_h_first = python/libvirt-glib.c exclude_file_name_regexp--sc_trailing_blank = ^test/isodata/.*|docs/object-model.fig exclude_file_name_regexp--sc_bindtextdomain = ^tools/.*.c|test/.*.c + +exclude_file_name_regexp--sc_space_tab = ^test/isodata/.* diff --git a/data/devices/Makefile.am b/data/devices/Makefile.am index c53c221..35aa20c 100644 --- a/data/devices/Makefile.am +++ b/data/devices/Makefile.am @@ -1,10 +1,10 @@ databasedir = $(pkgdatadir)/db/devices/ -database_in_files = \ - xen.xml.in \ - qemu-pci.xml.in \ - qemu-usb.xml.in \ - qemu-ps2.xml.in \ +database_in_files = \ + xen.xml.in \ + qemu-pci.xml.in \ + qemu-usb.xml.in \ + qemu-ps2.xml.in \ virtio-pci.xml.in $(NULL) diff --git a/data/oses/Makefile.am b/data/oses/Makefile.am index 49c8bab..e1fb6fb 100644 --- a/data/oses/Makefile.am +++ b/data/oses/Makefile.am @@ -1,6 +1,6 @@ databasedir = $(pkgdatadir)/db/oses/ -database_in_files = \ +database_in_files = \ altlinux.xml.in \ centos.xml.in \ debian.xml.in \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 8494439..a064dce 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -19,24 +19,24 @@ POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" $(AM_V_GEN)$(POD2MAN) $< $@ osinfo_detect_SOURCES = osinfo-detect.c -osinfo_detect_LDADD = $(GOBJECT_LIBS) \ - $(GIO_LIBS) \ - $(LIBXML_LIBS) \ +osinfo_detect_LDADD = $(GOBJECT_LIBS) \ + $(GIO_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) \ - $(LIBXML_LIBS) \ +osinfo_db_validate_LDADD = $(GOBJECT_LIBS) \ + $(GIO_LIBS) \ + $(LIBXML_LIBS) \ $(top_builddir)/osinfo/libosinfo-1.0.la osinfo_query_SOURCES = osinfo-query.c -osinfo_query_LDADD = $(GOBJECT_LIBS) \ - $(GIO_LIBS) \ +osinfo_query_LDADD = $(GOBJECT_LIBS) \ + $(GIO_LIBS) \ $(top_builddir)/osinfo/libosinfo-1.0.la osinfo_install_script_SOURCES = osinfo-install-script.c -osinfo_install_script_LDADD = $(GOBJECT_LIBS) \ - $(GIO_LIBS) \ - $(LIBXML_LIBS) \ +osinfo_install_script_LDADD = $(GOBJECT_LIBS) \ + $(GIO_LIBS) \ + $(LIBXML_LIBS) \ $(top_builddir)/osinfo/libosinfo-1.0.la -- 1.9.3 From gscrivan at redhat.com Mon Aug 4 13:17:32 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Mon, 4 Aug 2014 15:17:32 +0200 Subject: [Libosinfo] [PATCH libosinfo v2 5/5] cfg.mk: enable sc_prohibit_atoi_atof and skip it for tests In-Reply-To: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> References: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> Message-ID: <1407158252-15291-6-git-send-email-gscrivan@redhat.com> Avoid the usage of atoi and atof which are believed to be not safe, as they don't do any error reporting. Signed-off-by: Giuseppe Scrivano --- cfg.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cfg.mk b/cfg.mk index 890a4ae..7471467 100644 --- a/cfg.mk +++ b/cfg.mk @@ -30,7 +30,6 @@ local-checks-to-skip = \ sc_file_system \ sc_immutable_NEWS \ sc_prohibit_always_true_header_tests \ - sc_prohibit_atoi_atof \ sc_two_space_separator_in_usage \ sc_program_name \ sc_makefile_check @@ -116,3 +115,5 @@ exclude_file_name_regexp--sc_trailing_blank = ^test/isodata/.*|docs/object-model exclude_file_name_regexp--sc_bindtextdomain = ^tools/.*.c|test/.*.c exclude_file_name_regexp--sc_space_tab = ^test/isodata/.* + +exclude_file_name_regexp--sc_prohibit_atoi_atof = ^test/.*\.c -- 1.9.3 From fidencio at redhat.com Tue Aug 5 21:57:28 2014 From: fidencio at redhat.com (=?UTF-8?q?Fabiano=20Fid=C3=AAncio?=) Date: Tue, 5 Aug 2014 23:57:28 +0200 Subject: [Libosinfo] [PATCH] win7: Add one more volume ID to DB Message-ID: <1407275848-11141-1-git-send-email-fidencio@redhat.com> --- data/oses/windows.xml.in | 10 ++++++++ ...windows_7_starter_with_sp1_x86_dvd_u_678562.iso | 29 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 test/isodata/windows/win7/en_windows_7_starter_with_sp1_x86_dvd_u_678562.iso diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in index 34fc781..33d0f30 100644 --- a/data/oses/windows.xml.in +++ b/data/oses/windows.xml.in @@ -755,6 +755,16 @@ <_name>Microsoft Windows 7 Ultimate + + + + + (GSP1RMCSTFREO)_ + MICROSOFT CORPORATION + [[:upper:][:digit:]]*_([[:upper:]]*) + + + diff --git a/test/isodata/windows/win7/en_windows_7_starter_with_sp1_x86_dvd_u_678562.iso b/test/isodata/windows/win7/en_windows_7_starter_with_sp1_x86_dvd_u_678562.iso new file mode 100644 index 0000000..1786c99 --- /dev/null +++ b/test/isodata/windows/win7/en_windows_7_starter_with_sp1_x86_dvd_u_678562.iso @@ -0,0 +1,29 @@ +CD-ROM is in ISO 9660 format +System id: +Volume id: GSP1RMCSTFREO_EN_DVD +Volume set id: GSP1RMCSTFREO_EN_DVD +Publisher id: MICROSOFT CORPORATION +Data preparer id: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080 +Application id: CDIMAGE 2.54 (01/01/2005 TM) +Copyright File id: +Abstract File id: +Bibliographic File id: +Volume set size is: 1 +Volume set sequence number is: 1 +Logical block size is: 2048 +Volume size is: 1252186 +El Torito VD version 1 found, boot catalog is in sector 22 +NO Joliet present +NO Rock Ridge present +Eltorito validation header: + Hid 1 + Arch 0 (x86) + ID 'Microsoft Corporation' + Key 55 AA + Eltorito defaultboot header: + Bootid 88 (bootable) + Boot media 0 (No Emulation Boot) + Load segment 0 + Sys type 0 + Nsect 8 + Bootoff 2DF 735 -- 1.9.3 From cfergeau at redhat.com Wed Aug 6 07:58:53 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Wed, 6 Aug 2014 09:58:53 +0200 Subject: [Libosinfo] [PATCH] win7: Add one more volume ID to DB In-Reply-To: <1407275848-11141-1-git-send-email-fidencio@redhat.com> References: <1407275848-11141-1-git-send-email-fidencio@redhat.com> Message-ID: <20140806075853.GB23664@edamame.cdg.redhat.com> ACK Christophe On Tue, Aug 05, 2014 at 11:57:28PM +0200, Fabiano Fid?ncio wrote: > --- > data/oses/windows.xml.in | 10 ++++++++ > ...windows_7_starter_with_sp1_x86_dvd_u_678562.iso | 29 ++++++++++++++++++++++ > 2 files changed, 39 insertions(+) > create mode 100644 test/isodata/windows/win7/en_windows_7_starter_with_sp1_x86_dvd_u_678562.iso > > diff --git a/data/oses/windows.xml.in b/data/oses/windows.xml.in > index 34fc781..33d0f30 100644 > --- a/data/oses/windows.xml.in > +++ b/data/oses/windows.xml.in > @@ -755,6 +755,16 @@ > <_name>Microsoft Windows 7 Ultimate > > > + > + > + > + > + (GSP1RMCSTFREO)_ > + MICROSOFT CORPORATION > + [[:upper:][:digit:]]*_([[:upper:]]*) > + > + > + > > > > diff --git a/test/isodata/windows/win7/en_windows_7_starter_with_sp1_x86_dvd_u_678562.iso b/test/isodata/windows/win7/en_windows_7_starter_with_sp1_x86_dvd_u_678562.iso > new file mode 100644 > index 0000000..1786c99 > --- /dev/null > +++ b/test/isodata/windows/win7/en_windows_7_starter_with_sp1_x86_dvd_u_678562.iso > @@ -0,0 +1,29 @@ > +CD-ROM is in ISO 9660 format > +System id: > +Volume id: GSP1RMCSTFREO_EN_DVD > +Volume set id: GSP1RMCSTFREO_EN_DVD > +Publisher id: MICROSOFT CORPORATION > +Data preparer id: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080 > +Application id: CDIMAGE 2.54 (01/01/2005 TM) > +Copyright File id: > +Abstract File id: > +Bibliographic File id: > +Volume set size is: 1 > +Volume set sequence number is: 1 > +Logical block size is: 2048 > +Volume size is: 1252186 > +El Torito VD version 1 found, boot catalog is in sector 22 > +NO Joliet present > +NO Rock Ridge present > +Eltorito validation header: > + Hid 1 > + Arch 0 (x86) > + ID 'Microsoft Corporation' > + Key 55 AA > + Eltorito defaultboot header: > + Bootid 88 (bootable) > + Boot media 0 (No Emulation Boot) > + Load segment 0 > + Sys type 0 > + Nsect 8 > + Bootoff 2DF 735 > -- > 1.9.3 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Wed Aug 6 09:43:15 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Wed, 6 Aug 2014 11:43:15 +0200 Subject: [Libosinfo] [PATCH libosinfo v2 3/5] cfg.mk: enable and fix sc_error_message_uppercase In-Reply-To: <1407158252-15291-4-git-send-email-gscrivan@redhat.com> References: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> <1407158252-15291-4-git-send-email-gscrivan@redhat.com> Message-ID: <20140806094315.GD29981@edamame.cdg.redhat.com> Hey, Actually glib (shared by gtk+, libsoup, ..) convention is to have error messages starting with an upper case letter, so it would be better to follow that rather than start with a lower case letter. Christophe On Mon, Aug 04, 2014 at 03:17:30PM +0200, Giuseppe Scrivano wrote: > Signed-off-by: Giuseppe Scrivano > --- > cfg.mk | 1 - > osinfo/osinfo_install_script.c | 36 ++++++++++++++++++------------------ > osinfo/osinfo_loader.c | 34 +++++++++++++++++----------------- > osinfo/osinfo_media.c | 8 ++++---- > osinfo/osinfo_tree.c | 4 ++-- > tools/osinfo-db-validate.c | 16 ++++++++-------- > tools/osinfo-install-script.c | 2 +- > tools/osinfo-query.c | 14 +++++++------- > 8 files changed, 57 insertions(+), 58 deletions(-) > > diff --git a/cfg.mk b/cfg.mk > index ff44ca5..6d9d60e 100644 > --- a/cfg.mk > +++ b/cfg.mk > @@ -33,7 +33,6 @@ local-checks-to-skip = \ > sc_prohibit_atoi_atof \ > sc_space_tab \ > sc_two_space_separator_in_usage \ > - sc_error_message_uppercase \ > sc_program_name \ > sc_makefile_check > > diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c > index 8cb06cc..d29eb18 100644 > --- a/osinfo/osinfo_install_script.c > +++ b/osinfo/osinfo_install_script.c > @@ -578,7 +578,7 @@ static xsltStylesheetPtr osinfo_install_script_load_template(const gchar *uri, > pctxt = xmlNewParserCtxt(); > if (!pctxt || !pctxt->sax) { > g_set_error(error, 0, 0, "%s", > - _("Unable to create XML parser context")); > + _("unable to create XML parser context")); > goto cleanup; > } > > @@ -586,13 +586,13 @@ static xsltStylesheetPtr osinfo_install_script_load_template(const gchar *uri, > XML_PARSE_NOENT | XML_PARSE_NONET | > XML_PARSE_NOWARNING))) { > g_set_error(error, 0, 0, "%s", > - _("Unable to read XSL template")); > + _("unable to read XSL template")); > goto cleanup; > } > > if (!(xslt = xsltParseStylesheetDoc(doc))) { > g_set_error(error, 0, 0, "%s", > - _("Unable to parse XSL template")); > + _("unable to parse XSL template")); > goto cleanup; > } > > @@ -665,7 +665,7 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript > > if (!(node = xmlNewDocNode(NULL, NULL, (xmlChar*)name, NULL))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to create XML node '%s': '%s'"), > + g_set_error(error, 0, 0, _("unable to create XML node '%s': '%s'"), > name, err ? err->message : ""); > goto error; > } > @@ -673,13 +673,13 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript > if (!(data = xmlNewDocRawNode(NULL, NULL, (const xmlChar*)"id", > (const xmlChar*)osinfo_entity_get_id(entity)))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to create XML node 'id': '%s'"), > + g_set_error(error, 0, 0, _("unable to create XML node 'id': '%s'"), > err ? err->message : ""); > goto error; > } > if (!(xmlAddChild(node, data))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to add XML child '%s'"), err ? err->message : ""); > + g_set_error(error, 0, 0, _("unable to add XML child '%s'"), err ? err->message : ""); > goto error; > } > data = NULL; > @@ -701,13 +701,13 @@ static xmlNodePtr osinfo_install_script_generate_entity_xml(OsinfoInstallScript > if (!(data = xmlNewDocRawNode(NULL, NULL, (const xmlChar*)tmp1->data, > (const xmlChar*)tmp2->data))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to create XML node '%s': '%s'"), > + g_set_error(error, 0, 0, _("unable to create XML node '%s': '%s'"), > (const gchar *)tmp1->data, err ? err->message : ""); > goto error; > } > if (!(xmlAddChild(node, data))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to add XML child '%s'"), err ? err->message : ""); > + g_set_error(error, 0, 0, _("unable to add XML child '%s'"), err ? err->message : ""); > goto error; > } > data = NULL; > @@ -752,7 +752,7 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * > goto error; > if (!(xmlAddChild(root, node))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); > + g_set_error(error, 0, 0, _("unable to set XML root '%s'"), err ? err->message : ""); > goto error; > } > > @@ -763,7 +763,7 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * > goto error; > if (!(xmlAddChild(root, node))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); > + g_set_error(error, 0, 0, _("unable to set XML root '%s'"), err ? err->message : ""); > goto error; > } > > @@ -774,7 +774,7 @@ static xmlDocPtr osinfo_install_script_generate_config_xml(OsinfoInstallScript * > goto error; > if (!(xmlAddChild(root, node))) { > xmlErrorPtr err = xmlGetLastError(); > - g_set_error(error, 0, 0, _("Unable to set XML root '%s'"), err ? err->message : ""); > + g_set_error(error, 0, 0, _("unable to set XML root '%s'"), err ? err->message : ""); > goto error; > } > > @@ -796,17 +796,17 @@ static gchar *osinfo_install_script_apply_xslt(xsltStylesheetPtr ss, > int len; > > if (!(ctxt = xsltNewTransformContext(ss, doc))) { > - g_set_error(error, 0, 0, "%s", _("Unable to create XSL transform context")); > + g_set_error(error, 0, 0, "%s", _("unable to create XSL transform context")); > goto cleanup; > } > > if (!(docOut = xsltApplyStylesheetUser(ss, doc, NULL, NULL, NULL, ctxt))) { > - g_set_error(error, 0, 0, "%s", _("Unable to apply XSL transform context")); > + g_set_error(error, 0, 0, "%s", _("unable to apply XSL transform context")); > goto cleanup; > } > > if (xsltSaveResultToString((xmlChar **)&ret, &len, docOut, ss) < 0) { > - g_set_error(error, 0, 0, "%s", _("Unable to convert XSL output to string")); > + g_set_error(error, 0, 0, "%s", _("unable to convert XSL output to string")); > goto cleanup; > } > > @@ -863,7 +863,7 @@ static void osinfo_install_script_template_loaded(GObject *src, > &length, > NULL, > &error)) { > - g_prefix_error(&error, _("Failed to load script template %s: "), uri); > + g_prefix_error(&error, _("failed to load script template %s: "), uri); > g_simple_async_result_take_error(data->res, error); > goto cleanup; > } > @@ -877,7 +877,7 @@ static void osinfo_install_script_template_loaded(GObject *src, > &output, > data->config, > &error)) { > - g_prefix_error(&error, _("Failed to apply script template %s: "), uri); > + g_prefix_error(&error, _("failed to apply script template %s: "), uri); > g_simple_async_result_take_error(data->res, error); > goto cleanup; > } > @@ -922,7 +922,7 @@ void osinfo_install_script_generate_async(OsinfoInstallScript *script, > &output, > data->config, > &error)) { > - g_prefix_error(&error, "%s", _("Failed to apply script template: ")); > + g_prefix_error(&error, "%s", _("failed to apply script template: ")); > g_simple_async_result_take_error(data->res, error); > g_simple_async_result_complete(data->res); > osinfo_install_script_generate_data_free(data); > @@ -1231,7 +1231,7 @@ gchar *osinfo_install_script_generate_command_line(OsinfoInstallScript *script, > &output, > config, > &error)) { > - g_prefix_error(&error, "%s", _("Failed to apply script template: ")); > + g_prefix_error(&error, "%s", _("failed to apply script template: ")); > } > } > > diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c > index b8d6e45..035af13 100644 > --- a/osinfo/osinfo_loader.c > +++ b/osinfo/osinfo_loader.c > @@ -170,7 +170,7 @@ osinfo_loader_nodeset(const char *xpath, > return 0; > if (obj->type != XPATH_NODESET) { > g_set_error(err, g_quark_from_static_string("libosinfo"), 0, > - _("Expected a nodeset in XPath query %s"), xpath); > + _("expected a nodeset in XPath query %s"), xpath); > xmlXPathFreeObject(obj); > return -1; > } > @@ -250,7 +250,7 @@ osinfo_loader_boolean(const char *xpath, > break; > } > if (node->children->type != XML_TEXT_NODE) { > - OSINFO_ERROR(err, _("Expected a text node attribute value")); > + OSINFO_ERROR(err, _("expected a text node attribute value")); > goto cleanup; > } > > @@ -292,13 +292,13 @@ osinfo_loader_doc(const char *xpath, > if (!(buf = xmlBufferCreate())) { > xmlXPathFreeObject(obj); > g_set_error(err, 0, 0, "%s", > - "Cannot allocate buffer"); > + "cannot allocate buffer"); > return NULL; > } > if (xmlNodeDump(buf, NULL, obj->nodesetval->nodeTab[0], 0, 1) < 0) { > xmlXPathFreeObject(obj); > g_set_error(err, 0, 0, "%s", > - "Cannot format stylesheet"); > + "cannot format stylesheet"); > } > ret = g_strdup((char *)buf->content); > > @@ -394,7 +394,7 @@ static void osinfo_loader_entity(OsinfoLoader *loader, > > if (!param->children || > param->children->type != XML_TEXT_NODE) { > - OSINFO_ERROR(err, _("Expected a text node attribute value")); > + OSINFO_ERROR(err, _("expected a text node attribute value")); > goto cleanup; > } > > @@ -485,7 +485,7 @@ static void osinfo_loader_device(OsinfoLoader *loader, > { NULL, G_TYPE_INVALID } > }; > if (!id) { > - OSINFO_ERROR(err, _("Missing device id property")); > + OSINFO_ERROR(err, _("missing device id property")); > return; > } > > @@ -515,7 +515,7 @@ static void osinfo_loader_device_link(OsinfoLoader *loader, > }; > gchar *id = (gchar *)xmlGetProp(related[i], BAD_CAST "id"); > if (!id) { > - OSINFO_ERROR(err, _("Missing device link id property")); > + OSINFO_ERROR(err, _("missing device link id property")); > goto cleanup; > } > OsinfoDevice *dev = osinfo_loader_get_device(loader, id); > @@ -565,7 +565,7 @@ static void osinfo_loader_product_relshp(OsinfoLoader *loader, > > gchar *id = (gchar *) xmlGetProp(it, BAD_CAST "id"); > if (!id) { > - OSINFO_ERROR(err, _("Missing product upgrades id property")); > + OSINFO_ERROR(err, _("missing product upgrades id property")); > goto cleanup; > } > OsinfoProduct *relproduct; > @@ -637,7 +637,7 @@ static void osinfo_loader_platform(OsinfoLoader *loader, > { > gchar *id = (gchar *)xmlGetProp(root, BAD_CAST "id"); > if (!id) { > - OSINFO_ERROR(err, _("Missing platform id property")); > + OSINFO_ERROR(err, _("missing platform id property")); > return; > } > > @@ -665,13 +665,13 @@ static void osinfo_loader_deployment(OsinfoLoader *loader, > { > gchar *id = (gchar *)xmlGetProp(root, BAD_CAST "id"); > if (!id) { > - OSINFO_ERROR(err, _("Missing deployment id property")); > + OSINFO_ERROR(err, _("missing deployment id property")); > return; > } > > gchar *osid = osinfo_loader_string("string(./os/@id)", loader, ctxt, err); > if (!osid && 0) { > - OSINFO_ERROR(err, _("Missing deployment os id property")); > + OSINFO_ERROR(err, _("missing deployment os id property")); > xmlFree(id); > return; > } > @@ -681,7 +681,7 @@ static void osinfo_loader_deployment(OsinfoLoader *loader, > gchar *platformid = osinfo_loader_string("string(./platform/@id)", loader, > ctxt, err); > if (!platformid) { > - OSINFO_ERROR(err, _("Missing deployment platform id property")); > + OSINFO_ERROR(err, _("missing deployment platform id property")); > xmlFree(id); > return; > } > @@ -719,7 +719,7 @@ static void osinfo_loader_datamap(OsinfoLoader *loader, > gchar *id = (gchar *)xmlGetProp(root, BAD_CAST "id"); > > if (!id) { > - OSINFO_ERROR(err, _("Missing os id property")); > + OSINFO_ERROR(err, _("missing os id property")); > return; > } > > @@ -835,7 +835,7 @@ static void osinfo_loader_install_script(OsinfoLoader *loader, > GFlagsClass *flags_class; > > if (!id) { > - OSINFO_ERROR(err, _("Missing install script id property")); > + OSINFO_ERROR(err, _("missing install script id property")); > return; > } > > @@ -1279,7 +1279,7 @@ static void osinfo_loader_os(OsinfoLoader *loader, > }; > > if (!id) { > - OSINFO_ERROR(err, _("Missing os id property")); > + OSINFO_ERROR(err, _("missing os id property")); > return; > } > > @@ -1389,7 +1389,7 @@ static void osinfo_loader_os(OsinfoLoader *loader, > for (i = 0; i < nnodes; i++) { > gchar *scriptid = (gchar *)xmlGetProp(nodes[i], BAD_CAST "id"); > if (!scriptid) { > - OSINFO_ERROR(err, _("Missing OS install script property")); > + OSINFO_ERROR(err, _("missing OS install script property")); > goto cleanup; > } > OsinfoInstallScript *script; > @@ -1540,7 +1540,7 @@ static void osinfo_loader_process_xml(OsinfoLoader *loader, > root = xmlDocGetRootElement(xml); > > if (!root) { > - OSINFO_ERROR(err, _("Missing root XML element")); > + OSINFO_ERROR(err, _("missing root XML element")); > goto cleanup; > } > > diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c > index 96f9603..9ac423b 100644 > --- a/osinfo/osinfo_media.c > +++ b/osinfo/osinfo_media.c > @@ -658,7 +658,7 @@ static void on_svd_read(GObject *source, > &error); > if (ret < 0) { > g_prefix_error(&error, > - _("Failed to read supplementary volume descriptor: ")); > + _("failed to read supplementary volume descriptor: ")); > goto EXIT; > } > if (ret == 0) { > @@ -744,7 +744,7 @@ static void on_pvd_read(GObject *source, > res, > &error); > if (ret < 0) { > - g_prefix_error(&error, _("Failed to read primary volume descriptor: ")); > + g_prefix_error(&error, _("failed to read primary volume descriptor: ")); > goto ON_ERROR; > } > if (ret == 0) { > @@ -811,7 +811,7 @@ static void on_location_skipped(GObject *source, > > if (g_input_stream_skip_finish(stream, res, &error) < PVD_OFFSET) { > if (error) > - g_prefix_error(&error, _("Failed to skip %d bytes"), PVD_OFFSET); > + g_prefix_error(&error, _("failed to skip %d bytes"), PVD_OFFSET); > else > g_set_error(&error, > OSINFO_MEDIA_ERROR, > @@ -848,7 +848,7 @@ static void on_location_read(GObject *source, > > stream = g_file_read_finish(G_FILE(source), res, &error); > if (error != NULL) { > - g_prefix_error(&error, _("Failed to open file")); > + g_prefix_error(&error, _("failed to open file")); > g_simple_async_result_take_error(data->res, error); > g_simple_async_result_complete(data->res); > create_from_location_async_data_free(data); > diff --git a/osinfo/osinfo_tree.c b/osinfo/osinfo_tree.c > index 55c572e..392cc2e 100644 > --- a/osinfo/osinfo_tree.c > +++ b/osinfo/osinfo_tree.c > @@ -603,7 +603,7 @@ static void on_location_read(GObject *source, > &length, > NULL, > &error)) { > - g_prefix_error(&error, _("Failed to load .treeinfo file: ")); > + g_prefix_error(&error, _("failed to load .treeinfo file: ")); > g_simple_async_result_take_error(data->res, error); > g_simple_async_result_complete(data->res); > create_from_location_async_data_free(data); > @@ -614,7 +614,7 @@ static void on_location_read(GObject *source, > content, > length, > &error))) { > - g_prefix_error(&error, _("Failed to process keyinfo file: ")); > + g_prefix_error(&error, _("failed to process keyinfo file: ")); > g_simple_async_result_take_error(data->res, error); > goto cleanup; > } > diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c > index f53aebe..d391575 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, 2014 Red Hat, Inc > * > * osinfo-validate: validate that XML file(s) follows the published schema > * > @@ -68,7 +68,7 @@ static xmlDocPtr parse_file(GFile *file, GError **error) > > if (!(pctxt = xmlNewParserCtxt())) { > g_set_error(error, 0, 0, "%s", > - _("Unable to create libxml parser")); > + _("unable to create libxml parser")); > goto cleanup; > } > > @@ -76,7 +76,7 @@ static xmlDocPtr parse_file(GFile *file, GError **error) > XML_PARSE_NOENT | XML_PARSE_NONET | > XML_PARSE_NOWARNING))) { > g_set_error(error, 0, 0, > - _("Unable to parse XML document '%s'"), > + _("unable to parse XML document '%s'"), > uri); > goto cleanup; > } > @@ -108,7 +108,7 @@ static gboolean validate_file_regular(xmlRelaxNGValidCtxtPtr rngValid, > > if (xmlRelaxNGValidateDoc(rngValid, doc) != 0) { > g_set_error(error, 0, 0, > - _("Unable to validate XML document '%s'"), > + _("unable to validate XML document '%s'"), > uri); > goto cleanup; > } > @@ -176,7 +176,7 @@ static gboolean validate_file(xmlRelaxNGValidCtxtPtr rngValid, GFile *file, GFil > goto cleanup; > } else { > g_set_error(error, 0, 0, > - "Unable to handle file type for %s", > + "unable to handle file type for %s", > uri); > goto cleanup; > } > @@ -206,7 +206,7 @@ static gboolean validate_files(gint argc, gchar **argv, GError **error) > rngParser = xmlRelaxNGNewParserCtxt(SCHEMA); > if (!rngParser) { > g_set_error(error, 0, 0, > - _("Unable to create RNG parser for %s"), > + _("unable to create RNG parser for %s"), > SCHEMA); > goto cleanup; > } > @@ -214,7 +214,7 @@ static gboolean validate_files(gint argc, gchar **argv, GError **error) > rng = xmlRelaxNGParse(rngParser); > if (!rng) { > g_set_error(error, 0, 0, > - _("Unable to parse RNG %s"), > + _("unable to parse RNG %s"), > SCHEMA); > goto cleanup; > } > @@ -222,7 +222,7 @@ static gboolean validate_files(gint argc, gchar **argv, GError **error) > rngValid = xmlRelaxNGNewValidCtxt(rng); > if (!rngValid) { > g_set_error(error, 0, 0, > - _("Unable to create RNG validation context %s"), > + _("unable to create RNG validation context %s"), > SCHEMA); > goto cleanup; > } > diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c > index 9f9894a..135a1ea 100644 > --- a/tools/osinfo-install-script.c > +++ b/tools/osinfo-install-script.c > @@ -50,7 +50,7 @@ static gboolean handle_config(const gchar *option_name G_GNUC_UNUSED, > > if (!(val = strchr(value, '='))) { > g_set_error(error, 0, 0, > - _("Expected configuration key=value")); > + _("expected configuration key=value")); > return FALSE; > } > len = val - value; > diff --git a/tools/osinfo-query.c b/tools/osinfo-query.c > index 43ded4f..df2aa29 100644 > --- a/tools/osinfo-query.c > +++ b/tools/osinfo-query.c > @@ -1,5 +1,5 @@ > /* > - * Copyright (C) 2012 Red Hat, Inc > + * Copyright (C) 2012, 2014 Red Hat, Inc > * > * osinfo-query: query the contents of the database > * > @@ -150,7 +150,7 @@ static gboolean toggle_fields(struct OsinfoLabel *labels, > } > if (!found) { > g_set_error(error, 0, 0, > - _("Unknown property name %s"), fields[i]); > + _("unknown property name %s"), fields[i]); > goto cleanup; > } > } > @@ -174,7 +174,7 @@ static gboolean build_filter(struct OsinfoLabel *labels, > for (i = 0; i < argc; i++) { > const gchar *tmp = strchr(argv[i], '='); > if (!tmp) { > - g_set_error(error, 0, 0, "%s", _("Syntax error in condition, expecting KEY=VALUE")); > + g_set_error(error, 0, 0, "%s", _("syntax error in condition, expecting KEY=VALUE")); > goto cleanup; > } > gchar *key = g_strndup(argv[i], tmp-argv[i]); > @@ -188,7 +188,7 @@ static gboolean build_filter(struct OsinfoLabel *labels, > > if (!found) { > g_set_error(error, 0, 0, > - _("Unknown property name %s"), key); > + _("unknown property name %s"), key); > goto cleanup; > } > > @@ -446,17 +446,17 @@ gint main(gint argc, gchar **argv) > } > > if (!entities) { > - g_printerr(_("Unknown type '%s' requested\n"), type); > + g_printerr(_("unknown type '%s' requested\n"), type); > goto error; > } > > if (!build_filter(labels, filter, argc-2, argv+2, &error)) { > - g_printerr(_("Unable to construct filter: %s\n"), error->message); > + g_printerr(_("unable to construct filter: %s\n"), error->message); > goto error; > } > > if (!toggle_fields(labels, fields, &error)) { > - g_printerr(_("Unable to set field visibility: %s\n"), error->message); > + g_printerr(_("unable to set field visibility: %s\n"), error->message); > goto error; > } > > -- > 1.9.3 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From cfergeau at redhat.com Wed Aug 6 09:43:56 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Wed, 6 Aug 2014 11:43:56 +0200 Subject: [Libosinfo] [PATCH libosinfo v2 0/5] enable more syntax-check rules In-Reply-To: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> References: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> Message-ID: <20140806094356.GE29981@edamame.cdg.redhat.com> ACK series except 3/5 Christophe On Mon, Aug 04, 2014 at 03:17:27PM +0200, Giuseppe Scrivano wrote: > v2: address the comments on the previous version. > > v1 here: > > https://www.redhat.com/archives/libosinfo/2014-July/msg00037.html > > Giuseppe Scrivano (5): > maint.mk: update from gnulib > cfg.mk: enable more syntax-check tests > cfg.mk: enable and fix sc_error_message_uppercase > cfg.mk: enable and fix sc_space_tab > cfg.mk: enable sc_prohibit_atoi_atof and skip it for tests > > cfg.mk | 24 +++---------- > data/devices/Makefile.am | 10 +++--- > data/oses/Makefile.am | 2 +- > maint.mk | 78 +++++++++++++++++++++--------------------- > osinfo/osinfo_install_script.c | 36 +++++++++---------- > osinfo/osinfo_loader.c | 34 +++++++++--------- > osinfo/osinfo_media.c | 8 ++--- > osinfo/osinfo_tree.c | 4 +-- > tools/Makefile.am | 22 ++++++------ > tools/osinfo-db-validate.c | 16 ++++----- > tools/osinfo-install-script.c | 2 +- > tools/osinfo-query.c | 14 ++++---- > 12 files changed, 118 insertions(+), 132 deletions(-) > > -- > 1.9.3 > > _______________________________________________ > Libosinfo mailing list > Libosinfo at redhat.com > https://www.redhat.com/mailman/listinfo/libosinfo -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From gscrivan at redhat.com Wed Aug 6 10:09:38 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Wed, 06 Aug 2014 12:09:38 +0200 Subject: [Libosinfo] [PATCH libosinfo v2 0/5] enable more syntax-check rules In-Reply-To: <20140806094356.GE29981@edamame.cdg.redhat.com> (Christophe Fergeau's message of "Wed, 6 Aug 2014 11:43:56 +0200") References: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> <20140806094356.GE29981@edamame.cdg.redhat.com> Message-ID: <87bnryexp9.fsf@redhat.com> Christophe Fergeau writes: > ACK series except 3/5 thanks for the review. I've dropped the patch from the series and pushed it. Regards, Giuseppe From cfergeau at redhat.com Wed Aug 6 10:34:47 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Wed, 6 Aug 2014 12:34:47 +0200 Subject: [Libosinfo] [PATCH libosinfo v2 0/5] enable more syntax-check rules In-Reply-To: <87bnryexp9.fsf@redhat.com> References: <1407158252-15291-1-git-send-email-gscrivan@redhat.com> <20140806094356.GE29981@edamame.cdg.redhat.com> <87bnryexp9.fsf@redhat.com> Message-ID: <20140806103447.GJ29981@edamame.cdg.redhat.com> On Wed, Aug 06, 2014 at 12:09:38PM +0200, Giuseppe Scrivano wrote: > Christophe Fergeau writes: > > > ACK series except 3/5 > > thanks for the review. I've dropped the patch from the series and > pushed it. If there is a way to check if the message does not start with lower case letter, we could change 3/5 to do that. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From gscrivan at redhat.com Wed Aug 6 12:27:07 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Wed, 6 Aug 2014 14:27:07 +0200 Subject: [Libosinfo] [PATCH libosinfo] rhel7: set minimum memory to 2GiB for ppc64 Message-ID: <1407328027-22792-1-git-send-email-gscrivan@redhat.com> At least 2 GiB are needed by the Anaconda installer. Signed-off-by: Giuseppe Scrivano --- data/oses/rhel.xml.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/data/oses/rhel.xml.in b/data/oses/rhel.xml.in index d1942b7..779e0d1 100644 --- a/data/oses/rhel.xml.in +++ b/data/oses/rhel.xml.in @@ -1002,6 +1002,21 @@ isolinux/initrd.img + + + 1 + 1000000000 + 2147483648 + 10737418240 + + + + 400000000 + 2147483648 + 9663676416 + + + 1 -- 1.9.3 From cfergeau at redhat.com Wed Aug 6 13:25:48 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Wed, 6 Aug 2014 15:25:48 +0200 Subject: [Libosinfo] [PATCH libosinfo] rhel7: set minimum memory to 2GiB for ppc64 In-Reply-To: <1407328027-22792-1-git-send-email-gscrivan@redhat.com> References: <1407328027-22792-1-git-send-email-gscrivan@redhat.com> Message-ID: <20140806132548.GA3878@edamame.cdg.redhat.com> On Wed, Aug 06, 2014 at 02:27:07PM +0200, Giuseppe Scrivano wrote: > At least 2 GiB are needed by the Anaconda installer. Can you add a link to https://access.redhat.com/articles/rhel-limits ? > > Signed-off-by: Giuseppe Scrivano > --- > data/oses/rhel.xml.in | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/data/oses/rhel.xml.in b/data/oses/rhel.xml.in > index d1942b7..779e0d1 100644 > --- a/data/oses/rhel.xml.in > +++ b/data/oses/rhel.xml.in > @@ -1002,6 +1002,21 @@ > isolinux/initrd.img > > > + > + > + 1 > + 1000000000 > + 2147483648 > + 10737418240 > + > + > + > + 400000000 > + 2147483648 > + 9663676416 > + The storage part does not look correct, it should be 10GB minimum and 20GB recommended ACK with those changes. Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From gscrivan at redhat.com Wed Aug 6 13:33:09 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Wed, 06 Aug 2014 15:33:09 +0200 Subject: [Libosinfo] [PATCH libosinfo] rhel7: set minimum memory to 2GiB for ppc64 In-Reply-To: <20140806132548.GA3878@edamame.cdg.redhat.com> (Christophe Fergeau's message of "Wed, 6 Aug 2014 15:25:48 +0200") References: <1407328027-22792-1-git-send-email-gscrivan@redhat.com> <20140806132548.GA3878@edamame.cdg.redhat.com> Message-ID: <87y4v1eoa2.fsf@redhat.com> Christophe Fergeau writes: > On Wed, Aug 06, 2014 at 02:27:07PM +0200, Giuseppe Scrivano wrote: >> At least 2 GiB are needed by the Anaconda installer. > > Can you add a link to https://access.redhat.com/articles/rhel-limits ? thanks for the information, I didn't know this page and seems very useful :-) Fine to push this? >From 754b82015eaa142b26d6a163612f2fafa8da43a8 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 6 Aug 2014 14:11:27 +0200 Subject: [PATCH] rhel7: set minimum memory to 2GiB for ppc64 At least 2 GiB are needed by the Anaconda installer: https://access.redhat.com/articles/rhel-limits Signed-off-by: Giuseppe Scrivano --- data/oses/rhel.xml.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/data/oses/rhel.xml.in b/data/oses/rhel.xml.in index d1942b7..779e0d1 100644 --- a/data/oses/rhel.xml.in +++ b/data/oses/rhel.xml.in @@ -1002,6 +1002,21 @@ isolinux/initrd.img + + + 1 + 1000000000 + 2147483648 + 10737418240 + + + + 400000000 + 2147483648 + 9663676416 + + + 1 -- 1.9.3 Regards, Giuseppe From cfergeau at redhat.com Wed Aug 6 13:37:48 2014 From: cfergeau at redhat.com (Christophe Fergeau) Date: Wed, 6 Aug 2014 15:37:48 +0200 Subject: [Libosinfo] [PATCH libosinfo] rhel7: set minimum memory to 2GiB for ppc64 In-Reply-To: <87y4v1eoa2.fsf@redhat.com> References: <1407328027-22792-1-git-send-email-gscrivan@redhat.com> <20140806132548.GA3878@edamame.cdg.redhat.com> <87y4v1eoa2.fsf@redhat.com> Message-ID: <20140806133748.GA4862@edamame.cdg.redhat.com> On Wed, Aug 06, 2014 at 03:33:09PM +0200, Giuseppe Scrivano wrote: > Christophe Fergeau writes: > > > On Wed, Aug 06, 2014 at 02:27:07PM +0200, Giuseppe Scrivano wrote: > >> At least 2 GiB are needed by the Anaconda installer. > > > > Can you add a link to https://access.redhat.com/articles/rhel-limits ? > > thanks for the information, I didn't know this page and seems very > useful :-) > > Fine to push this? You haven't fixed the storage requirements, have you? I guess you missed the comments at the bottom of my previous email :) Christophe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From gscrivan at redhat.com Wed Aug 6 13:53:57 2014 From: gscrivan at redhat.com (Giuseppe Scrivano) Date: Wed, 06 Aug 2014 15:53:57 +0200 Subject: [Libosinfo] [PATCH libosinfo] rhel7: set minimum memory to 2GiB for ppc64 In-Reply-To: <20140806133748.GA4862@edamame.cdg.redhat.com> (Christophe Fergeau's message of "Wed, 6 Aug 2014 15:37:48 +0200") References: <1407328027-22792-1-git-send-email-gscrivan@redhat.com> <20140806132548.GA3878@edamame.cdg.redhat.com> <87y4v1eoa2.fsf@redhat.com> <20140806133748.GA4862@edamame.cdg.redhat.com> Message-ID: <87ha1penbe.fsf@redhat.com> Christophe Fergeau writes: > You haven't fixed the storage requirements, have you? I guess you missed > the comments at the bottom of my previous email :) sorry, I have fixed the requirements and adjusted the commit message before pushing it :-) Thanks, Giuseppe From lasse.schuirmann at gmail.com Sun Aug 10 13:55:05 2014 From: lasse.schuirmann at gmail.com (Lasse Schuirmann) Date: Sun, 10 Aug 2014 15:55:05 +0200 Subject: [Libosinfo] debian: Add installation script In-Reply-To: <1404826515-4180-2-git-send-email-lasse.schuirmann@gmail.com> References: <1404826515-4180-2-git-send-email-lasse.schuirmann@gmail.com> Message-ID: <1407678908-8102-1-git-send-email-lasse.schuirmann@gmail.com> Hello everyone, here are the three patches. To sum up the differences to the ones before: Patch 1: No differences Patch 2: Rebased only Patch 3: Change use of to (which was the completely valid reason for the fail of the testcase.) Greetings, Lasse From lasse.schuirmann at gmail.com Sun Aug 10 13:55:06 2014 From: lasse.schuirmann at gmail.com (Lasse Schuirmann) Date: Sun, 10 Aug 2014 15:55:06 +0200 Subject: [Libosinfo] [PATCH 1/3] debian: Fix JEOS installation script In-Reply-To: <1407678908-8102-1-git-send-email-lasse.schuirmann@gmail.com> References: <1404826515-4180-2-git-send-email-lasse.schuirmann@gmail.com> <1407678908-8102-1-git-send-email-lasse.schuirmann@gmail.com> Message-ID: <1407678908-8102-2-git-send-email-lasse.schuirmann@gmail.com> grub-installer does not accept the boot device unless given after a certain command. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666974 for more info. --- data/install-scripts/debian.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/install-scripts/debian.xml b/data/install-scripts/debian.xml index e344bda..e08b86b 100644 --- a/data/install-scripts/debian.xml +++ b/data/install-scripts/debian.xml @@ -89,8 +89,9 @@ d-i passwd/root-password-again password d-i apt-setup/security_host string d-i apt-setup/services-select multiselect -- 1.9.3 From lasse.schuirmann at gmail.com Sun Aug 10 13:55:07 2014 From: lasse.schuirmann at gmail.com (Lasse Schuirmann) Date: Sun, 10 Aug 2014 15:55:07 +0200 Subject: [Libosinfo] [PATCH 2/3] install-script: Add needs-internet param In-Reply-To: <1407678908-8102-1-git-send-email-lasse.schuirmann@gmail.com> References: <1404826515-4180-2-git-send-email-lasse.schuirmann@gmail.com> <1407678908-8102-1-git-send-email-lasse.schuirmann@gmail.com> Message-ID: <1407678908-8102-3-git-send-email-lasse.schuirmann@gmail.com> Add API to query install scripts whether they can work properly without an internet connection or not. --- data/schemas/libosinfo.rng | 5 +++++ osinfo/libosinfo.syms | 5 +++++ osinfo/osinfo_install_script.c | 17 +++++++++++++++++ osinfo/osinfo_install_script.h | 3 +++ osinfo/osinfo_loader.c | 1 + 5 files changed, 31 insertions(+) diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng index 4f4edac..e693674 100644 --- a/data/schemas/libosinfo.rng +++ b/data/schemas/libosinfo.rng @@ -597,6 +597,11 @@ + + + + + diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms index abcc8bb..86de581 100644 --- a/osinfo/libosinfo.syms +++ b/osinfo/libosinfo.syms @@ -500,6 +500,11 @@ LIBOSINFO_0.2.10 { osinfo_install_script_injection_method_get_type; } LIBOSINFO_0.2.9; + LIBOSINFO_0.2.11 { + global: + osinfo_install_script_get_needs_internet; + } LIBOSINFO_0.2.10; + /* Symbols in next release... LIBOSINFO_0.0.2 { diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c index 8cb06cc..66a49e4 100644 --- a/osinfo/osinfo_install_script.c +++ b/osinfo/osinfo_install_script.c @@ -1326,6 +1326,23 @@ unsigned int osinfo_install_script_get_injection_methods(OsinfoInstallScript *sc OSINFO_INSTALL_SCRIPT_INJECTION_METHOD_DISK); } +/** + * osinfo_install_script_get_needs_internet: + * @script: the install script + * + * Some install scripts can not ensure that they work without an internet connection. + * + * Returns: TRUE if script needs an internet connection, FALSE otherwise + * internet connection. + */ +gboolean osinfo_install_script_get_needs_internet(OsinfoInstallScript *script) +{ + return osinfo_entity_get_param_value_boolean_with_default + (OSINFO_ENTITY(script), + OSINFO_INSTALL_SCRIPT_PROP_NEEDS_INTERNET, + FALSE); +} + /* * Local variables: diff --git a/osinfo/osinfo_install_script.h b/osinfo/osinfo_install_script.h index d328a96..f8083b4 100644 --- a/osinfo/osinfo_install_script.h +++ b/osinfo/osinfo_install_script.h @@ -55,6 +55,7 @@ typedef struct _OsinfoInstallScriptPrivate OsinfoInstallScriptPrivate; #define OSINFO_INSTALL_SCRIPT_PROP_PATH_FORMAT "path-format" #define OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS "can-pre-install-drivers" #define OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS "can-post-install-drivers" +#define OSINFO_INSTALL_SCRIPT_PROP_NEEDS_INTERNET "needs-internet" #define OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ "pre-install-drivers-signing-req" #define OSINFO_INSTALL_SCRIPT_PROP_POST_INSTALL_DRIVERS_SIGNING_REQ "post-install-drivers-signing-req" #define OSINFO_INSTALL_SCRIPT_PROP_INJECTION_METHOD "injection-method" @@ -220,6 +221,8 @@ int osinfo_install_script_get_post_install_drivers_signing_req(OsinfoInstallScri unsigned int osinfo_install_script_get_injection_methods(OsinfoInstallScript *script); +gboolean osinfo_install_script_get_needs_internet(OsinfoInstallScript *script); + #endif /* __OSINFO_INSTALL_SCRIPT_H__ */ /* * Local variables: diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c index b8d6e45..845eda3 100644 --- a/osinfo/osinfo_loader.c +++ b/osinfo/osinfo_loader.c @@ -822,6 +822,7 @@ static void osinfo_loader_install_script(OsinfoLoader *loader, { OSINFO_INSTALL_SCRIPT_PROP_PRODUCT_KEY_FORMAT, G_TYPE_STRING }, { OSINFO_INSTALL_SCRIPT_PROP_PATH_FORMAT, G_TYPE_STRING }, { OSINFO_INSTALL_SCRIPT_PROP_EXPECTED_FILENAME, G_TYPE_STRING }, + { OSINFO_INSTALL_SCRIPT_PROP_NEEDS_INTERNET, G_TYPE_BOOLEAN }, { OSINFO_INSTALL_SCRIPT_PROP_CAN_PRE_INSTALL_DRIVERS, G_TYPE_BOOLEAN }, { OSINFO_INSTALL_SCRIPT_PROP_CAN_POST_INSTALL_DRIVERS, G_TYPE_BOOLEAN }, { OSINFO_INSTALL_SCRIPT_PROP_PRE_INSTALL_DRIVERS_SIGNING_REQ, G_TYPE_STRING }, -- 1.9.3 From lasse.schuirmann at gmail.com Sun Aug 10 13:55:08 2014 From: lasse.schuirmann at gmail.com (Lasse Schuirmann) Date: Sun, 10 Aug 2014 15:55:08 +0200 Subject: [Libosinfo] [PATCH 3/3] debian: Add desktop installation script In-Reply-To: <1407678908-8102-1-git-send-email-lasse.schuirmann@gmail.com> References: <1404826515-4180-2-git-send-email-lasse.schuirmann@gmail.com> <1407678908-8102-1-git-send-email-lasse.schuirmann@gmail.com> Message-ID: <1407678908-8102-4-git-send-email-lasse.schuirmann@gmail.com> This script needs an internet connection because it seems not possible to install the desktop that is present on the ISO. Choosing the 'desktop' package always installs GNOME which is not always shipped with the ISO hence is fetched from the internet. More info: https://wiki.debian.org/tasksel#Desktop_environment --- data/install-scripts/debian.xml | 174 ++++++++++++++++++++++++++++++++++++++++ data/oses/debian.xml.in | 1 + 2 files changed, 175 insertions(+) diff --git a/data/install-scripts/debian.xml b/data/install-scripts/debian.xml index e08b86b..b07f200 100644 --- a/data/install-scripts/debian.xml +++ b/data/install-scripts/debian.xml @@ -103,4 +103,178 @@ d-i finish-install/reboot_in_progress note + + + + desktop + preseed.cfg + true + + + + + + + + + + + + + + + + + + + initrd + true + + diff --git a/data/oses/debian.xml.in b/data/oses/debian.xml.in index 1ecb2dd..dc97d81 100644 --- a/data/oses/debian.xml.in +++ b/data/oses/debian.xml.in @@ -256,6 +256,7 @@