Hello community, here is the log from the commit of package AppStream for openSUSE:Factory checked in at 2020-07-06 16:17:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/AppStream (Old) and /work/SRC/openSUSE:Factory/.AppStream.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "AppStream" Mon Jul 6 16:17:08 2020 rev:18 rq:818429 version:0.12.11 Changes: -------- --- /work/SRC/openSUSE:Factory/AppStream/AppStream.changes 2020-02-28 15:19:15.785639264 +0100 +++ /work/SRC/openSUSE:Factory/.AppStream.new.3060/AppStream.changes 2020-07-06 16:18:39.905202716 +0200 @@ -1,0 +2,42 @@ +Thu Jul 2 16:50:16 UTC 2020 - Fabian Vogt <[email protected]> + +- Update to 0.12.11: + Features: + * Auto-update static category data from fd.o + * Implement support for input control relations + * validator: Validate input control relations + * validator: Put AppStream technical terms and tag names in backticks in + explanation texts + * Modernize the README + * validator: Check for uppercase letters in cids + * Strip beginning/trailing newlines in a number of places + * Make AsContext getter for AsComponent public API + * qt: Add support for name_variant_suffix + * Make component sort-score API public API + * Implement a YAML representation of release artifact information + Specification: + * Build specification and docs with DAPS + * docs: Add (HTML) anchors for requires/recommends items + * spec: Specify user input control recommendations + * docs: Don't show reference to nonexistent provides->service tag for services + * spec: Encourage the use of only lowercase letters for component-IDs + * docs: Document --explain flag in ascli manual page as well + * docs: Add permalink anchors to some list entries + * Formally support BLAKE2b/s as hash functions for release artifacts + * docs: Link to the MetaInfo Creator webapp in a few places + Bugfixes: + * Be less noisy about ignoring excessively long search tokens + * Tighten the "free license" check and prevent false positives + * cache: Use correct fts value per result (David Hewitt) + * validator: Control items can't have a version + * validator: Reduce download timeout + * yaml: Strip encoding when serializing keyword lists + * Allows arbitrary indentation when converting NEWS files + * Ignore NULL values silently in our stringstrip function + * Only dump valid metainfo description markup, sanitize it otherwise +- Add patch to avoid parser errors for invalid descriptions: + * properly-escape-markup.patch +- Add patch to fix build on Leap 15.2: + * fix-build-gcc7.patch + +------------------------------------------------------------------- Old: ---- AppStream-0.12.10.tar.xz AppStream-0.12.10.tar.xz.asc New: ---- AppStream-0.12.11.tar.xz AppStream-0.12.11.tar.xz.asc fix-build-gcc7.patch properly-escape-markup.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ AppStream.spec ++++++ --- /var/tmp/diff_new_pack.qoZRTM/_old 2020-07-06 16:18:44.473216751 +0200 +++ /var/tmp/diff_new_pack.qoZRTM/_new 2020-07-06 16:18:44.473216751 +0200 @@ -19,7 +19,7 @@ %define libappstream_sover 4 %define libAppStreamQt_sover 2 Name: AppStream -Version: 0.12.10 +Version: 0.12.11 Release: 0 Summary: Tools and libraries to work with AppStream metadata License: GPL-2.0-or-later AND LGPL-2.1-or-later @@ -28,6 +28,10 @@ Source0: http://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz Source1: http://www.freedesktop.org/software/appstream/releases/%{name}-%{version}.tar.xz.asc Source2: %{name}.keyring +# PATCH-FIX-UPSTREAM +Patch1: properly-escape-markup.patch +# PATCH-FIX-OPENSUSE +Patch100: fix-build-gcc7.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: gettext BuildRequires: gperf ++++++ AppStream-0.12.10.tar.xz -> AppStream-0.12.11.tar.xz ++++++ ++++ 89062 lines of diff (skipped) ++++++ fix-build-gcc7.patch ++++++ From: Fabian Vogt <[email protected]> Subject: Fix build with GCC 7 Index: AppStream-0.12.11/meson.build =================================================================== --- AppStream-0.12.11.orig/meson.build +++ AppStream-0.12.11/meson.build @@ -54,7 +54,7 @@ endif # a few compiler warning flags we always want enabled add_global_arguments('-Werror=implicit-function-declaration', '-Wno-unused-parameter', language: 'c') -add_global_arguments('-Wno-unused-parameter', '-Wno-error=deprecated-copy', language: 'cpp') +add_global_arguments('-Wno-unused-parameter', language: 'cpp') add_global_arguments('-DAS_COMPILATION', language : 'c') # ++++++ properly-escape-markup.patch ++++++ >From 178c01d2fa12fe8b0676e1676d0d40613f167c69 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp <[email protected]> Date: Wed, 13 May 2020 21:45:32 +0200 Subject: [PATCH] Properly escape markup when fixing invalid description data This resolves https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=960491 and possibly more issues when AppStream was fed broken metainfo files. --- src/as-xml.c | 26 +++++++++++++++----------- src/as-xml.h | 2 +- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/as-xml.c b/src/as-xml.c index 962bdf9a..1935e37b 100644 --- a/src/as-xml.c +++ b/src/as-xml.c @@ -112,10 +112,10 @@ as_xml_dump_node (xmlNode *node, gchar **content, gssize *len) } /** - * as_xml_dump_node_content: + * as_xml_dump_node_content_raw: */ gchar* -as_xml_dump_node_content (xmlNode *node) +as_xml_dump_node_content_raw (xmlNode *node) { g_autofree gchar *content = NULL; gchar *tmp; @@ -170,10 +170,10 @@ as_xml_dump_node_children (xmlNode *node) } /** - * as_xml_dump_desc_para_node_content: + * as_xml_dump_desc_para_node_content_raw: */ static gchar* -as_xml_dump_desc_para_node_content (xmlNode *node) +as_xml_dump_desc_para_node_content_raw (xmlNode *node) { gboolean is_valid_markup = TRUE; @@ -198,11 +198,15 @@ as_xml_dump_desc_para_node_content (xmlNode *node) * was deemed valid. Otherwise we will just try to dump any string content, and hope * people call the validator on their files to see that their metadata is broken. * TODO: Parse the data properly, and remove only the bad nodes on error, if libxml permits - * that somehow? */ - if (is_valid_markup) - return as_xml_dump_node_content (node); - else - return as_xml_get_node_value (node); + * that in an efficient way? */ + if (G_LIKELY (is_valid_markup)) { + return as_xml_dump_node_content_raw (node); + } else { + g_autofree gchar *tmp = as_xml_get_node_value (node); + if (G_UNLIKELY (tmp == NULL)) + return NULL; + return g_markup_escape_text (tmp, -1); + } } /** @@ -405,7 +409,7 @@ as_xml_parse_metainfo_description_node (AsContext *ctx, xmlNode *node, GHFunc fu g_hash_table_insert (desc, g_strdup (lang), str); } - content = as_xml_dump_desc_para_node_content (iter); + content = as_xml_dump_desc_para_node_content_raw (iter); if (content != NULL) g_string_append_printf (str, "<p>%s</p>\n", content); @@ -443,7 +447,7 @@ as_xml_parse_metainfo_description_node (AsContext *ctx, xmlNode *node, GHFunc fu g_hash_table_insert (desc, g_strdup (lang), str); } - content = as_xml_dump_desc_para_node_content (iter2); + content = as_xml_dump_desc_para_node_content_raw (iter2); if (content != NULL) g_string_append_printf (str, " <%s>%s</%s>\n", (gchar*) iter2->name, content, (gchar*) iter2->name); } diff --git a/src/as-xml.h b/src/as-xml.h index 50a38082..ff1efc56 100644 --- a/src/as-xml.h +++ b/src/as-xml.h @@ -53,7 +53,7 @@ void as_xml_parse_metainfo_description_node (AsContext *ctx, GHFunc func, gpointer entity); -gchar *as_xml_dump_node_content (xmlNode *node); +gchar *as_xml_dump_node_content_raw (xmlNode *node); gchar *as_xml_dump_node_children (xmlNode *node); void as_xml_add_description_node (AsContext *ctx,
