Hello community, here is the log from the commit of package appstream-glib for openSUSE:Factory checked in at 2020-04-22 20:44:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/appstream-glib (Old) and /work/SRC/openSUSE:Factory/.appstream-glib.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "appstream-glib" Wed Apr 22 20:44:45 2020 rev:71 rq:796263 version:0.7.17 Changes: -------- --- /work/SRC/openSUSE:Factory/appstream-glib/appstream-glib.changes 2020-01-02 14:39:55.628878261 +0100 +++ /work/SRC/openSUSE:Factory/.appstream-glib.new.2738/appstream-glib.changes 2020-04-22 20:45:29.946512044 +0200 @@ -1,0 +2,22 @@ +Wed Apr 22 09:30:51 UTC 2020 - Dominique Leuenberger <[email protected]> + +- Add as-glib-PR359.patch: Fix crash with invalid children of <ul>. + +------------------------------------------------------------------- +Wed Apr 15 17:12:57 UTC 2020 - [email protected] + +- Update to version 0.7.17: + * Support versioning on clang/macOS + * Use ".so" suffix for the plugins on macOS + * Use internal uuid library in macOS + * docs: Fix examples of AsNodeToXmlFlags using an invalid flag. + * Bump minimum glib2 dependency. + * Update Galician translations + * as-app: properly initialize unique_id_mutex + * Use _fullpath() instead of GetFullPathNameA(). + * Fix Win32 headers. + * Support ${id}/${locale}.qm in addition to ${id}_${locale}.qm + * as-app: add "icon-theme" as recognised component type + * as-content-rating: Make default values match OARS semantics + +------------------------------------------------------------------- Old: ---- appstream-glib-0.7.16.obscpio New: ---- appstream-glib-0.7.17.obscpio as-glib-PR359.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ appstream-glib.spec ++++++ --- /var/tmp/diff_new_pack.K5tTWi/_old 2020-04-22 20:45:32.062516187 +0200 +++ /var/tmp/diff_new_pack.K5tTWi/_new 2020-04-22 20:45:32.066516195 +0200 @@ -1,7 +1,7 @@ # # spec file for package appstream-glib # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2014 Dominique Leuenberger, Amsterdam, The Netherlands # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: appstream-glib -Version: 0.7.16 +Version: 0.7.17 Release: 0 Summary: AppStream Abstraction Library License: LGPL-2.1-or-later AND GPL-2.0-or-later @@ -26,6 +26,8 @@ URL: http://people.freedesktop.org/~hughsient/appstream-glib/ Source0: %{name}-%{version}.tar.xz Source1: openSUSE-appstream-process +# PATCH-FIX-UPSTREAM as-glib-PR359.patch [email protected] -- Fix crash with invalid children of <ul> +Patch0: as-glib-PR359.patch BuildRequires: docbook-xsl-stylesheets BuildRequires: gcab >= 0.6 BuildRequires: gobject-introspection-devel ++++++ _service ++++++ --- /var/tmp/diff_new_pack.K5tTWi/_old 2020-04-22 20:45:32.118516296 +0200 +++ /var/tmp/diff_new_pack.K5tTWi/_new 2020-04-22 20:45:32.118516296 +0200 @@ -6,7 +6,7 @@ <param name="versionrewrite-pattern">appstream_glib_(\d+)_(\d+)_(\d+)</param> <param name="versionrewrite-replacement">\1.\2.\3</param> <param name="changesgenerate">enable</param> - <param name="revision">refs/tags/appstream_glib_0_7_16</param> + <param name="revision">refs/tags/appstream_glib_0_7_17</param> </service> <service name="tar" mode="buildtime"/> <service name="recompress" mode="buildtime"> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.K5tTWi/_old 2020-04-22 20:45:32.154516367 +0200 +++ /var/tmp/diff_new_pack.K5tTWi/_new 2020-04-22 20:45:32.158516375 +0200 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/hughsie/appstream-glib.git</param> - <param name="changesrevision">230e2da082d9754858330c3e262a9d44f816def1</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">93f614add2377465bc7bd24a9a99c8ae28e2342f</param></service></servicedata> \ No newline at end of file ++++++ appstream-glib-0.7.16.obscpio -> appstream-glib-0.7.17.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/.travis.yml new/appstream-glib-0.7.17/.travis.yml --- old/appstream-glib-0.7.16/.travis.yml 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/.travis.yml 2020-02-20 10:31:17.000000000 +0100 @@ -6,9 +6,9 @@ - docker before_script: - - docker build -t appstream-glib-fedora-29 -f contrib/ci/Dockerfile-fedora-29 . + - docker build -t appstream-glib-fedora -f contrib/ci/Dockerfile-fedora . - docker build -t appstream-glib-debian-buster -f contrib/ci/Dockerfile-debian-buster . script: - - docker run -t -v `pwd`:/build appstream-glib-fedora-29 ./contrib/ci/build_and_test.sh -Drpm=true -Ddep11=false + - docker run -t -v `pwd`:/build appstream-glib-fedora ./contrib/ci/build_and_test.sh -Drpm=true -Ddep11=false - docker run -t -v `pwd`:/build appstream-glib-debian-buster ./contrib/ci/build_and_test.sh -Drpm=false -Ddep11=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/NEWS new/appstream-glib-0.7.17/NEWS --- old/appstream-glib-0.7.16/NEWS 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/NEWS 2020-02-20 10:31:17.000000000 +0100 @@ -1,3 +1,25 @@ +Version 0.7.17 +~~~~~~~~~~~~~~ +Released: 2020-02-20 + +Bugfixes: + - Add UPL short name to SPDX conversion (Salman Siddiqui) + - Allow building on Windows (Jehan) + - Allow non-desktop components to be extended (Richard Hughes) + - Allow parsing desktop files using as_app_parse_data() (Richard Hughes) + - Do not allow forward or backwards slashes in <id> values (Richard Hughes) + - Do not preserve restrictive permissions when installing AppStream files (Richard Hughes) + - Do not require <translation> for validation unless strict (Kalev Lember) + - Do not require <update_contact> for validation unless strict (Richard Hughes) + - Log expected and actual screenshot dimensions when failing (Tobias Mueller) + - Modernize the validation requirements (Richard Hughes) + - Offset future checks by UTC+14 (Peter Hutterer) + - Only require <release> for validate, but not validate-relax (Kalev Lember) + - Remove relative path from icon names (David Hewitt) + - Support loading YAML from as_store_from_bytes (Robert Ancell) + - Update list of allowed metadata licences (scx) + - Update the SPDX license list to v3.5 (Richard Hughes) + Version 0.7.16 ~~~~~~~~~~~~~~ Released: 2019-09-30 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/RELEASE new/appstream-glib-0.7.17/RELEASE --- old/appstream-glib-0.7.16/RELEASE 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/RELEASE 2020-02-20 10:31:17.000000000 +0100 @@ -2,12 +2,12 @@ 1. Write NEWS entries for appstream_glib in the same format as usual. -git shortlog appstream_glib_0_7_15.. | grep -i -v trivial | grep -v Merge > NEWS.new +git shortlog appstream_glib_0_7_16.. | grep -i -v trivial | grep -v Merge > NEWS.new -------------------------------------------------------------------------------- -Version 0.7.16 +Version 0.7.17 ~~~~~~~~~~~~~~ -Released: 2019-xx-xx +Released: 2020-xx-xx Notes: @@ -16,22 +16,12 @@ Bugfixes: -------------------------------------------------------------------------------- -1.5 Update translations: - -ninja-build appstream-glib-pot -zanata push -zanata pull --min-doc-percent=5 -for f in po/*.po; do -msgattrib --no-location --translated --no-wrap --sort-output $f --output-file=$f -done -git add po/*.po - 3. Update library version if new ABI or API in meson.build 4. Commit changes in git: -git commit -a -m "Release version 0.7.16" -git tag -s -f -m "Release 0.7.16" appstream_glib_0_7_16 +git commit -a -m "Release version 0.7.17" +git tag -s -f -m "Release 0.7.17" appstream_glib_0_7_17 <gpg password> git push --tags git push diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/contrib/ci/Dockerfile-fedora new/appstream-glib-0.7.17/contrib/ci/Dockerfile-fedora --- old/appstream-glib-0.7.16/contrib/ci/Dockerfile-fedora 1970-01-01 01:00:00.000000000 +0100 +++ new/appstream-glib-0.7.17/contrib/ci/Dockerfile-fedora 2020-02-20 10:31:17.000000000 +0100 @@ -0,0 +1,28 @@ +FROM fedora:31 + +RUN dnf -y update +RUN dnf -y install \ + docbook-style-xsl \ + docbook-utils \ + fontconfig-devel \ + freetype-devel \ + gdk-pixbuf2-devel \ + gettext \ + glib2-devel \ + gobject-introspection-devel \ + gperf \ + gtk3-devel \ + gtk-doc \ + json-glib-devel \ + libarchive-devel \ + libsoup-devel \ + libstemmer-devel \ + libuuid-devel \ + libxslt \ + libyaml-devel \ + meson \ + pango-devel \ + redhat-rpm-config \ + rpm-devel +RUN mkdir /build +WORKDIR /build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/contrib/ci/Dockerfile-fedora-29 new/appstream-glib-0.7.17/contrib/ci/Dockerfile-fedora-29 --- old/appstream-glib-0.7.16/contrib/ci/Dockerfile-fedora-29 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/contrib/ci/Dockerfile-fedora-29 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ -FROM fedora:29 - -RUN dnf -y update -RUN dnf -y install \ - docbook-style-xsl \ - docbook-utils \ - fontconfig-devel \ - freetype-devel \ - gdk-pixbuf2-devel \ - gettext \ - glib2-devel \ - gobject-introspection-devel \ - gperf \ - gtk3-devel \ - gtk-doc \ - json-glib-devel \ - libarchive-devel \ - libsoup-devel \ - libstemmer-devel \ - libuuid-devel \ - libxslt \ - libyaml-devel \ - meson \ - pango-devel \ - redhat-rpm-config \ - rpm-devel -RUN mkdir /build -WORKDIR /build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/contrib/libappstream-glib.spec.in new/appstream-glib-0.7.17/contrib/libappstream-glib.spec.in --- old/appstream-glib-0.7.16/contrib/libappstream-glib.spec.in 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/contrib/libappstream-glib.spec.in 2020-02-20 10:31:17.000000000 +0100 @@ -48,6 +48,9 @@ Obsoletes: appdata-tools < 0.1.9 Provides: appdata-tools +# Removed in F30 +Obsoletes: libappstream-glib-builder-devel < 0.7.15 + # this is not a library version %define as_plugin_version 5 @@ -60,7 +63,6 @@ %package devel Summary: GLib Libraries and headers for appstream-glib Requires: %{name}%{?_isa} = %{version}-%{release} -Obsoletes: %{name}-builder-devel < 0.7.14-2 %description devel GLib headers and libraries for appstream-glib. @@ -68,21 +70,14 @@ %package builder Summary: Library and command line tools for building AppStream metadata Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: pngquant >= 2.8 +Recommends: pngquant %description builder This library and command line tool is used for building AppStream metadata from a directory of packages. -%package builder-devel -Summary: GLib Libraries and headers for appstream-builder -Requires: %{name}-builder%{?_isa} = %{version}-%{release} - -%description builder-devel -GLib headers and libraries for appstream-builder. - %prep -%setup -q -n appstream-glib-%{version} +%autosetup -p1 -n appstream-glib-%{version} %build %meson \ @@ -96,11 +91,8 @@ %find_lang appstream-glib -%post -p /sbin/ldconfig -%post builder -p /sbin/ldconfig - -%postun -p /sbin/ldconfig -%postun builder -p /sbin/ldconfig +%ldconfig_scriptlets +%ldconfig_scriptlets builder %files -f appstream-glib.lang %license COPYING diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/data/tests/broken.appdata.xml new/appstream-glib-0.7.17/data/tests/broken.appdata.xml --- old/appstream-glib-0.7.16/data/tests/broken.appdata.xml 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/data/tests/broken.appdata.xml 2020-02-20 10:31:17.000000000 +0100 @@ -40,7 +40,7 @@ <p>This is a duplicate release on the same day!</p> </description> </release> - <release date="2020-01-01" version="0.6.2"> + <release date="2050-01-01" version="0.6.2"> <description> <p>This is a release in the future!</p> </description> Binary files old/appstream-glib-0.7.16/data/tests/usr/share/kdeapp2/translations/kdeapp2/fr.qm and new/appstream-glib-0.7.17/data/tests/usr/share/kdeapp2/translations/kdeapp2/fr.qm differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-builder/plugins/meson.build new/appstream-glib-0.7.17/libappstream-builder/plugins/meson.build --- old/appstream-glib-0.7.16/libappstream-builder/plugins/meson.build 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-builder/plugins/meson.build 2020-02-20 10:31:17.000000000 +0100 @@ -1,4 +1,9 @@ asb_plugins_cargs = ['-DG_LOG_DOMAIN="Asb"'] +name_suffix = [] + +if platform_osx + name_suffix = 'so' +endif shared_module( 'asb_plugin_icon', @@ -12,6 +17,7 @@ gdkpixbuf, ], c_args : asb_plugins_cargs, + name_suffix: name_suffix, install : true, install_dir : plugindir, ) @@ -28,6 +34,7 @@ gdkpixbuf, ], c_args : asb_plugins_cargs, + name_suffix: name_suffix, install : true, install_dir : plugindir, ) @@ -44,6 +51,7 @@ gdkpixbuf, ], c_args : asb_plugins_cargs, + name_suffix: name_suffix, install : true, install_dir : plugindir, ) @@ -60,6 +68,7 @@ gdkpixbuf, ], c_args : asb_plugins_cargs, + name_suffix: name_suffix, install : true, install_dir : plugindir, ) @@ -76,6 +85,7 @@ gdkpixbuf, ], c_args : asb_plugins_cargs, + name_suffix: name_suffix, install : true, install_dir : plugindir, ) @@ -93,6 +103,7 @@ json_glib, ], c_args : asb_plugins_cargs, + name_suffix: name_suffix, install : true, install_dir : plugindir, ) @@ -113,6 +124,7 @@ fontconfig, ], c_args : asb_plugins_cargs, + name_suffix: name_suffix, install : true, install_dir : plugindir, ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/appstream-glib.map.osx-clang new/appstream-glib-0.7.17/libappstream-glib/appstream-glib.map.osx-clang --- old/appstream-glib-0.7.16/libappstream-glib/appstream-glib.map.osx-clang 1970-01-01 01:00:00.000000000 +0100 +++ new/appstream-glib-0.7.17/libappstream-glib/appstream-glib.map.osx-clang 2020-02-20 10:31:17.000000000 +0100 @@ -0,0 +1 @@ +_as_* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/as-app-builder.c new/appstream-glib-0.7.17/libappstream-glib/as-app-builder.c --- old/appstream-glib-0.7.16/libappstream-glib/as-app-builder.c 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/as-app-builder.c 2020-02-20 10:31:17.000000000 +0100 @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * * Copyright (C) 2015 Richard Hughes <[email protected]> + * Copyright (C) 2019 Kalev Lember <[email protected]> * * SPDX-License-Identifier: LGPL-2.1+ */ @@ -336,6 +337,7 @@ /* search for each translation ID */ for (i = 0; i < ctx->translations->len; i++) { AsTranslation *t; + const gchar *dirname; const gchar *filename; const gchar *install_dir; g_autofree gchar *path = NULL; @@ -344,6 +346,11 @@ /* FIXME: this path probably has to be specified as an attribute * in the <translations> tag from the AppData file */ t = g_ptr_array_index (ctx->translations, i); + if (as_translation_get_kind (t) != AS_TRANSLATION_KIND_QT && + as_translation_get_kind (t) != AS_TRANSLATION_KIND_UNKNOWN) + continue; + if (as_translation_get_id (t) == NULL) + continue; install_dir = as_translation_get_id (t); path = g_build_filename (prefix, "share", @@ -356,23 +363,53 @@ if (dir == NULL) return FALSE; - /* the format is ${prefix}/share/${install_dir}/translations/${id}_${locale}.qm */ + /* look for ${prefix}/share/${install_dir}/translations/${id}_${locale}.qm */ while ((filename = g_dir_read_name (dir)) != NULL) { g_autofree gchar *fn = NULL; g_autofree gchar *locale = NULL; - if (as_translation_get_kind (t) != AS_TRANSLATION_KIND_QT && - as_translation_get_kind (t) != AS_TRANSLATION_KIND_UNKNOWN) + if (!g_str_has_prefix (filename, as_translation_get_id (t))) continue; - if (as_translation_get_id (t) == NULL) + if (!g_str_has_suffix (filename, ".qm")) continue; - if (!g_str_has_prefix (filename, as_translation_get_id (t))) + fn = g_build_filename (path, filename, NULL); + if (!g_file_test (fn, G_FILE_TEST_IS_REGULAR)) continue; locale = g_strdup (filename + strlen (as_translation_get_id (t)) + 1); g_strdelimit (locale, ".", '\0'); - fn = g_build_filename (path, filename, NULL); if (!as_app_builder_parse_file_qt (ctx, locale, fn, error)) return FALSE; } + + g_dir_rewind (dir); + + /* look for ${prefix}/share/${install_dir}/translations/${id}/${locale}.qm */ + while ((dirname = g_dir_read_name (dir)) != NULL) { + g_autofree gchar *path_subdir = NULL; + g_autoptr(GDir) subdir = NULL; + + if (!g_str_equal (dirname, as_translation_get_id (t))) + continue; + path_subdir = g_build_filename (path, dirname, NULL); + if (!g_file_test (path_subdir, G_FILE_TEST_IS_DIR)) + continue; + subdir = g_dir_open (path_subdir, 0, error); + if (subdir == NULL) + return FALSE; + + while ((filename = g_dir_read_name (subdir)) != NULL) { + g_autofree gchar *fn = NULL; + g_autofree gchar *locale = NULL; + if (!g_str_has_suffix (filename, ".qm")) + continue; + fn = g_build_filename (path_subdir, filename, NULL); + if (!g_file_test (fn, G_FILE_TEST_IS_REGULAR)) + continue; + locale = g_strdup (filename); + g_strdelimit (locale, ".", '\0'); + if (!as_app_builder_parse_file_qt (ctx, locale, fn, error)) + return FALSE; + } + } } return TRUE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/as-app-desktop.c new/appstream-glib-0.7.17/libappstream-glib/as-app-desktop.c --- old/appstream-glib-0.7.16/libappstream-glib/as-app-desktop.c 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/as-app-desktop.c 2020-02-20 10:31:17.000000000 +0100 @@ -455,7 +455,7 @@ return TRUE; } -gboolean +static gboolean as_app_parse_desktop_kf (AsApp *app, GKeyFile *kf, AsAppParseFlags flags, GError **error) { g_auto(GStrv) keys = NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/as-app-validate.c new/appstream-glib-0.7.17/libappstream-glib/as-app-validate.c --- old/appstream-glib-0.7.16/libappstream-glib/as-app-validate.c 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/as-app-validate.c 2020-02-20 10:31:17.000000000 +0100 @@ -864,7 +864,7 @@ AS_PROBLEM_KIND_ATTRIBUTE_MISSING, "<release> has no timestamp"); } - if (timestamp > 20120101 && timestamp < 20251231) { + if (timestamp > 20120101 && timestamp < 20351231) { ai_app_validate_add (helper, AS_PROBLEM_KIND_ATTRIBUTE_INVALID, "<release> timestamp should be a UNIX time"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/as-app.c new/appstream-glib-0.7.17/libappstream-glib/as-app.c --- old/appstream-glib-0.7.16/libappstream-glib/as-app.c 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/as-app.c 2020-02-20 10:31:17.000000000 +0100 @@ -217,6 +217,8 @@ return AS_APP_KIND_CONSOLE; if (g_strcmp0 (kind, "driver") == 0) return AS_APP_KIND_DRIVER; + if (g_strcmp0 (kind, "icon-theme") == 0) + return AS_APP_KIND_ICON_THEME; /* legacy */ if (g_strcmp0 (kind, "desktop") == 0) @@ -522,6 +524,7 @@ priv->urls = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) as_ref_string_unref, (GDestroyNotify) as_ref_string_unref); + g_mutex_init (&priv->unique_id_mutex); priv->token_cache = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) as_ref_string_unref, g_free); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/as-app.h new/appstream-glib-0.7.17/libappstream-glib/as-app.h --- old/appstream-glib-0.7.16/libappstream-glib/as-app.h 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/as-app.h 2020-02-20 10:31:17.000000000 +0100 @@ -298,6 +298,7 @@ * @AS_APP_KIND_LOCALIZATION: Localization data * @AS_APP_KIND_CONSOLE: Console program * @AS_APP_KIND_DRIVER: Driver for hardware support + * @AS_APP_KIND_ICON_THEME: An icon theme * * The component type. **/ @@ -319,6 +320,7 @@ AS_APP_KIND_LOCALIZATION, /* Since: 0.5.11 */ AS_APP_KIND_CONSOLE, /* Since: 0.6.1 */ AS_APP_KIND_DRIVER, /* Since: 0.6.3 */ + AS_APP_KIND_ICON_THEME, /* Since: 0.7.17 */ /*< private >*/ AS_APP_KIND_LAST } AsAppKind; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/as-content-rating.c new/appstream-glib-0.7.17/libappstream-glib/as-content-rating.c --- old/appstream-glib-0.7.16/libappstream-glib/as-content-rating.c 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/as-content-rating.c 2020-02-20 10:31:17.000000000 +0100 @@ -38,6 +38,14 @@ #define GET_PRIVATE(o) (as_content_rating_get_instance_private (o)) +typedef enum +{ + OARS_1_0, + OARS_1_1, +} OarsVersion; + +static gboolean is_oars_key (const gchar *id, OarsVersion version); + static void as_content_rating_finalize (GObject *object) { @@ -139,7 +147,18 @@ if (g_strcmp0 (key->id, id) == 0) return key->value; } - return AS_CONTENT_RATING_VALUE_UNKNOWN; + + /* According to the + * [OARS specification](https://github.com/hughsie/oars/blob/master/specification/oars-1.1.md), + * return %AS_CONTENT_RATING_VALUE_NONE if the #AsContentRating exists + * overall. Only return %AS_CONTENT_RATING_VALUE_UNKNOWN if the + * #AsContentRating doesn’t exist at all (or for other types of content + * rating). */ + if ((g_strcmp0 (priv->kind, "oars-1.0") == 0 && is_oars_key (id, OARS_1_0)) || + (g_strcmp0 (priv->kind, "oars-1.1") == 0 && is_oars_key (id, OARS_1_1))) + return AS_CONTENT_RATING_VALUE_NONE; + else + return AS_CONTENT_RATING_VALUE_UNKNOWN; } /** @@ -196,6 +215,7 @@ static const struct { const gchar *id; + OarsVersion oars_version; /* when the key was first added */ guint csm_age_none; /* for %AS_CONTENT_RATING_VALUE_NONE */ guint csm_age_mild; /* for %AS_CONTENT_RATING_VALUE_MILD */ guint csm_age_moderate; /* for %AS_CONTENT_RATING_VALUE_MODERATE */ @@ -204,37 +224,47 @@ /* Each @id must only appear once. The set of @csm_age_* values for a * given @id must be complete and non-decreasing. */ /* v1.0 */ - { "violence-cartoon", 0, 3, 4, 6 }, - { "violence-fantasy", 0, 3, 7, 8 }, - { "violence-realistic", 0, 4, 9, 14 }, - { "violence-bloodshed", 0, 9, 11, 18 }, - { "violence-sexual", 0, 18, 18, 18 }, - { "drugs-alcohol", 0, 11, 13, 16 }, - { "drugs-narcotics", 0, 12, 14, 17 }, - { "drugs-tobacco", 0, 10, 13, 13 }, - { "sex-nudity", 0, 12, 14, 14 }, - { "sex-themes", 0, 13, 14, 15 }, - { "language-profanity", 0, 8, 11, 14 }, - { "language-humor", 0, 3, 8, 14 }, - { "language-discrimination", 0, 9, 10, 11 }, - { "money-advertising", 0, 7, 8, 10 }, - { "money-gambling", 0, 7, 10, 18 }, - { "money-purchasing", 0, 12, 14, 15 }, - { "social-chat", 0, 4, 10, 13 }, - { "social-audio", 0, 15, 15, 15 }, - { "social-contacts", 0, 12, 12, 12 }, - { "social-info", 0, 0, 13, 13 }, - { "social-location", 0, 13, 13, 13 }, + { "violence-cartoon", OARS_1_0, 0, 3, 4, 6 }, + { "violence-fantasy", OARS_1_0, 0, 3, 7, 8 }, + { "violence-realistic", OARS_1_0, 0, 4, 9, 14 }, + { "violence-bloodshed", OARS_1_0, 0, 9, 11, 18 }, + { "violence-sexual", OARS_1_0, 0, 18, 18, 18 }, + { "drugs-alcohol", OARS_1_0, 0, 11, 13, 16 }, + { "drugs-narcotics", OARS_1_0, 0, 12, 14, 17 }, + { "drugs-tobacco", OARS_1_0, 0, 10, 13, 13 }, + { "sex-nudity", OARS_1_0, 0, 12, 14, 14 }, + { "sex-themes", OARS_1_0, 0, 13, 14, 15 }, + { "language-profanity", OARS_1_0, 0, 8, 11, 14 }, + { "language-humor", OARS_1_0, 0, 3, 8, 14 }, + { "language-discrimination", OARS_1_0, 0, 9, 10, 11 }, + { "money-advertising", OARS_1_0, 0, 7, 8, 10 }, + { "money-gambling", OARS_1_0, 0, 7, 10, 18 }, + { "money-purchasing", OARS_1_0, 0, 12, 14, 15 }, + { "social-chat", OARS_1_0, 0, 4, 10, 13 }, + { "social-audio", OARS_1_0, 0, 15, 15, 15 }, + { "social-contacts", OARS_1_0, 0, 12, 12, 12 }, + { "social-info", OARS_1_0, 0, 0, 13, 13 }, + { "social-location", OARS_1_0, 0, 13, 13, 13 }, /* v1.1 additions */ - { "sex-homosexuality", 0, 10, 13, 18 }, - { "sex-prostitution", 0, 12, 14, 18 }, - { "sex-adultery", 0, 8, 10, 18 }, - { "sex-appearance", 0, 10, 10, 15 }, - { "violence-worship", 0, 13, 15, 18 }, - { "violence-desecration", 0, 13, 15, 18 }, - { "violence-slavery", 0, 13, 15, 18 }, + { "sex-homosexuality", OARS_1_1, 0, 10, 13, 18 }, + { "sex-prostitution", OARS_1_1, 0, 12, 14, 18 }, + { "sex-adultery", OARS_1_1, 0, 8, 10, 18 }, + { "sex-appearance", OARS_1_1, 0, 10, 10, 15 }, + { "violence-worship", OARS_1_1, 0, 13, 15, 18 }, + { "violence-desecration", OARS_1_1, 0, 13, 15, 18 }, + { "violence-slavery", OARS_1_1, 0, 13, 15, 18 }, }; +static gboolean +is_oars_key (const gchar *id, OarsVersion version) +{ + for (gsize i = 0; i < G_N_ELEMENTS (oars_to_csm_mappings); i++) { + if (g_str_equal (id, oars_to_csm_mappings[i].id)) + return (oars_to_csm_mappings[i].oars_version <= version); + } + return FALSE; +} + /** * as_content_rating_attribute_to_csm_age: * @id: the subsection ID e.g. `violence-cartoon` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/as-node.c new/appstream-glib-0.7.17/libappstream-glib/as-node.c --- old/appstream-glib-0.7.16/libappstream-glib/as-node.c 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/as-node.c 2020-02-20 10:31:17.000000000 +0100 @@ -560,7 +560,7 @@ /** * as_node_to_xml: * @node: a #AsNode. - * @flags: the AsNodeToXmlFlags, e.g. %AS_NODE_INSERT_FLAG_PRE_ESCAPED. + * @flags: the AsNodeToXmlFlags, e.g. %AS_NODE_TO_XML_FLAG_NONE. * * Converts a node and it's children to XML. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/as-self-test.c new/appstream-glib-0.7.17/libappstream-glib/as-self-test.c --- old/appstream-glib-0.7.16/libappstream-glib/as-self-test.c 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/as-self-test.c 2020-02-20 10:31:17.000000000 +0100 @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * * Copyright (C) 2014-2018 Richard Hughes <[email protected]> + * Copyright (C) 2019 Kalev Lember <[email protected]> * * SPDX-License-Identifier: LGPL-2.1+ */ @@ -42,7 +43,7 @@ #ifndef _WIN32 #include <fnmatch.h> #else -#include <windef.h> +#include <windows.h> #endif #define AS_TEST_WILDCARD_SHA1 "\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?\?" @@ -92,15 +93,12 @@ } #ifdef _WIN32 { - DWORD retval; - TCHAR full_path[PATH_MAX]; - - retval = GetFullPathNameA (path, PATH_MAX, full_path, NULL); - - if (retval > 0) - return g_strdup (full_path); - else + char full_path[PATH_MAX]; + if (_fullpath (full_path, path, PATH_MAX) == NULL) + return NULL; + if (!g_file_test (full_path, G_FILE_TEST_EXISTS)) return NULL; + return g_strdup (full_path); } #else return realpath (path, NULL); @@ -438,6 +436,42 @@ } static void +as_test_app_builder_qt_subdir_func (void) +{ + GError *error = NULL; + gboolean ret; + guint i; + g_autofree gchar *fn = NULL; + g_autoptr(AsApp) app = NULL; + g_autoptr(GList) list = NULL; + const gchar *gettext_domains[] = { "kdeapp2", "notgoingtoexist", NULL }; + + app = as_app_new (); + fn = as_test_get_filename ("usr"); + g_assert (fn != NULL); + for (i = 0; gettext_domains[i] != NULL; i++) { + g_autoptr(AsTranslation) translation = NULL; + translation = as_translation_new (); + as_translation_set_kind (translation, AS_TRANSLATION_KIND_QT); + as_translation_set_id (translation, gettext_domains[i]); + as_app_add_translation (app, translation); + } + ret = as_app_builder_search_translations (app, fn, 25, + AS_APP_BUILDER_FLAG_NONE, + NULL, &error); + g_assert_no_error (error); + g_assert (ret); + + /* check langs */ + g_assert_cmpint (as_app_get_language (app, "fr"), ==, 100); + g_assert_cmpint (as_app_get_language (app, "en_GB"), ==, -1); + + /* check size */ + list = as_app_get_languages (app); + g_assert_cmpint (g_list_length (list), ==, 1); +} + +static void as_test_tag_func (void) { guint i; @@ -1743,7 +1777,7 @@ g_assert_cmpint (as_content_rating_get_value (content_rating, "violence-cartoon"), ==, AS_CONTENT_RATING_VALUE_MILD); g_assert_cmpint (as_content_rating_get_value (content_rating, "violence-bloodshed"), ==, - AS_CONTENT_RATING_VALUE_UNKNOWN); + AS_CONTENT_RATING_VALUE_NONE); rating_ids = as_content_rating_get_rating_ids (content_rating); g_assert_nonnull (rating_ids); @@ -1770,6 +1804,51 @@ as_node_unref (root); } +/* Test that parsing an empty content rating correctly returns `none` as the + * value for all the ratings defined by that particular kind of content rating, + * and `unknown` for everything else. */ +static void +as_test_content_rating_empty (void) +{ + GError *error = NULL; + AsNode *n; + AsNode *root; + const gchar *src = + "<content_rating type=\"oars-1.0\">\n" + "</content_rating>\n"; + gboolean ret; + g_autoptr(AsNodeContext) ctx = NULL; + g_autoptr(AsContentRating) content_rating = NULL; + + content_rating = as_content_rating_new (); + + /* to object */ + root = as_node_from_xml (src, 0, &error); + g_assert_no_error (error); + g_assert_nonnull (root); + n = as_node_find (root, "content_rating"); + g_assert_nonnull (n); + ctx = as_node_context_new (); + ret = as_content_rating_node_parse (content_rating, n, ctx, &error); + g_assert_no_error (error); + g_assert_true (ret); + + /* verify */ + g_assert_cmpstr (as_content_rating_get_kind (content_rating), ==, "oars-1.0"); + g_assert_cmpint (as_content_rating_get_value (content_rating, "drugs-alcohol"), ==, + AS_CONTENT_RATING_VALUE_NONE); + g_assert_cmpint (as_content_rating_get_value (content_rating, "violence-cartoon"), ==, + AS_CONTENT_RATING_VALUE_NONE); + g_assert_cmpint (as_content_rating_get_value (content_rating, "violence-bloodshed"), ==, + AS_CONTENT_RATING_VALUE_NONE); + + /* This one was only added in OARS-1.1, so it shouldn’t have a value of `none`. */ + g_assert_cmpint (as_content_rating_get_value (content_rating, "sex-adultery"), ==, + AS_CONTENT_RATING_VALUE_UNKNOWN); + + as_node_unref (root); +} + /* Test that the OARS → CSM mapping table in as_content_rating_attribute_to_csm_age() * is complete (contains mappings for all known IDs), and that the ages it * returns are non-decreasing for increasing values of #AsContentRatingValue in @@ -5625,6 +5704,7 @@ g_test_add_func ("/AppStream/require", as_test_require_func); g_test_add_func ("/AppStream/checksum", as_test_checksum_func); g_test_add_func ("/AppStream/content_rating", as_test_content_rating_func); + g_test_add_func ("/AppStream/content_rating/empty", as_test_content_rating_empty); g_test_add_func ("/AppStream/content_rating/mappings", as_test_content_rating_mappings); g_test_add_func ("/AppStream/release", as_test_release_func); g_test_add_func ("/AppStream/release{date}", as_test_release_date_func); @@ -5647,6 +5727,7 @@ g_test_add_func ("/AppStream/app{builder:gettext}", as_test_app_builder_gettext_func); g_test_add_func ("/AppStream/app{builder:gettext-nodomain}", as_test_app_builder_gettext_nodomain_func); g_test_add_func ("/AppStream/app{builder:qt}", as_test_app_builder_qt_func); + g_test_add_func ("/AppStream/app{builder:qt-subdir}", as_test_app_builder_qt_subdir_func); g_test_add_func ("/AppStream/app{translated}", as_test_app_translated_func); g_test_add_func ("/AppStream/app{validate-style}", as_test_app_validate_style_func); g_test_add_func ("/AppStream/app{validate-appdata-good}", as_test_app_validate_appdata_good_func); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/as-store.c new/appstream-glib-0.7.17/libappstream-glib/as-store.c --- old/appstream-glib-0.7.16/libappstream-glib/as-store.c 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/as-store.c 2020-02-20 10:31:17.000000000 +0100 @@ -2469,7 +2469,7 @@ /** * as_store_to_xml: * @store: a #AsStore instance. - * @flags: the AsNodeToXmlFlags, e.g. %AS_NODE_INSERT_FLAG_NONE. + * @flags: the AsNodeToXmlFlags, e.g. %AS_NODE_TO_XML_FLAG_NONE. * * Outputs an XML representation of all the applications in the store. * @@ -2578,7 +2578,7 @@ * as_store_to_file: * @store: a #AsStore instance. * @file: file - * @flags: the AsNodeToXmlFlags, e.g. %AS_NODE_INSERT_FLAG_NONE. + * @flags: the AsNodeToXmlFlags, e.g. %AS_NODE_TO_XML_FLAG_NONE. * @cancellable: A #GCancellable, or %NULL * @error: A #GError or %NULL * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/as-utils.c new/appstream-glib-0.7.17/libappstream-glib/as-utils.c --- old/appstream-glib-0.7.16/libappstream-glib/as-utils.c 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/as-utils.c 2020-02-20 10:31:17.000000000 +0100 @@ -24,8 +24,12 @@ #include <libsoup/soup.h> #include <stdlib.h> #ifndef _WIN32 +#ifdef __APPLE__ +#include <uuid/uuid.h> +#else #include <uuid.h> #endif +#endif #ifdef HAVE_RPM #include <rpm/rpmlib.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/libappstream-glib/meson.build new/appstream-glib-0.7.17/libappstream-glib/meson.build --- old/appstream-glib-0.7.16/libappstream-glib/meson.build 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/libappstream-glib/meson.build 2020-02-20 10:31:17.000000000 +0100 @@ -13,6 +13,8 @@ if platform_win32 deps += [giowindows] +elif platform_osx + deps += [giounix] else deps += [giounix, uuid] endif @@ -132,7 +134,13 @@ install_headers(headers, subdir : 'libappstream-glib') mapfile = 'appstream-glib.map' -vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) +if platform_osx + mapfile = 'appstream-glib.map.osx-clang' + vflag = '-Wl,-exported_symbols_list,@0@/@1@'.format(meson.current_source_dir(), mapfile) +else + vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) +endif + asglib = shared_library( 'appstream-glib', sources, soversion : lt_current, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/meson.build new/appstream-glib-0.7.17/meson.build --- old/appstream-glib-0.7.16/meson.build 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/meson.build 2020-02-20 10:31:17.000000000 +0100 @@ -1,5 +1,5 @@ project('appstream-glib', 'c', - version : '0.7.16', + version : '0.7.17', license : 'LGPL-2.1+', default_options : ['warning_level=1', 'c_std=c99'], meson_version : '>=0.37.0' @@ -14,13 +14,14 @@ # Check the right platform. platform_win32 = false +platform_osx = false host_os = host_machine.system() platform_win32 = (host_os.startswith('mingw') or host_os.startswith('cygwin') or host_os.startswith('windows')) - +platform_osx = host_os.startswith('darwin') conf = configuration_data() conf.set('AS_MAJOR_VERSION_CONF', as_major_version) @@ -59,11 +60,13 @@ get_option('libdir'), 'asb-plugins-' + as_plugin_version) -glib_ver = '>= 2.45.8' +glib_ver = '>= 2.58.0' glib = dependency('glib-2.0', version : glib_ver) gmodule = dependency('gmodule-2.0', version : glib_ver) if platform_win32 giowindows = dependency('gio-windows-2.0', version : glib_ver) +elif platform_osx + giounix = dependency('gio-unix-2.0', version : glib_ver) else giounix = dependency('gio-unix-2.0', version : glib_ver) uuid = dependency('uuid') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appstream-glib-0.7.16/po/gl.po new/appstream-glib-0.7.17/po/gl.po --- old/appstream-glib-0.7.16/po/gl.po 2019-09-30 20:02:16.000000000 +0200 +++ new/appstream-glib-0.7.17/po/gl.po 2020-02-20 10:31:17.000000000 +0100 @@ -5,258 +5,520 @@ # Translators: # Fran Diéguez <[email protected]>, 2014-2015 # Richard Hughes <[email protected]>, 2016. #zanata +# Marcos Lans <[email protected]>, 2018. msgid "" msgstr "" "Project-Id-Version: appstream-glib\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-02-28 10:43+0000\n" -"PO-Revision-Date: 2016-08-06 02:59+0000\n" -"Last-Translator: Copied by Zanata <[email protected]>\n" -"Language-Team: Galician (http://www.transifex.com/freedesktop/appstream-glib/language/gl/)\n" +"Report-Msgid-Bugs-To: https://github.com/hughsie/appstream-glib/issues\n" +"POT-Creation-Date: 2019-04-09 15:24+0000\n" +"PO-Revision-Date: 2019-12-28 12:27+0100\n" +"Last-Translator: Fran Diéguez <[email protected]>\n" +"Language-Team: Galician (http://www.transifex.com/freedesktop/appstream-glib/" +"language/gl/)\n" "Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Zanata 4.6.2\n" +"X-Generator: Poedit 2.2.4\n" #. TRANSLATORS: command line option -msgid "Add HiDPI icons to the tarball" -msgstr "Engadir iconas HiDPI ao tarball" +#: client/as-builder.c:76 client/as-compose.c:326 client/as-util.c:4327 +msgid "Show extra debugging information" +msgstr "Mostra información de depuración adicional" #. TRANSLATORS: command line option +#: client/as-builder.c:79 msgid "Add a cache ID to each component" msgstr "Engadir un ID de caché para cada compoñente" #. TRANSLATORS: command line option -msgid "Add encoded icons to the XML" -msgstr "Engadir iconas codificadas ao XML" - -#. TRANSLATORS: this is a command alias -#, c-format -msgid "Alias to %s" -msgstr "Alias a %s" - -#. TRANSLATORS: program name -msgid "AppStream Utility" -msgstr "Utilidade de AppStream" - -#. TRANSLATORS: command description -msgid "Check installed application data" -msgstr "Comproba os datos de aplicativo instalados" +#: client/as-builder.c:82 +msgid "Include failed results in the output" +msgstr "Incluír os resultados fallidos na saída" -msgid "Command not found, valid commands are:" -msgstr "Orde non atopada, as ordes válidas son:" +#. TRANSLATORS: command line option +#: client/as-builder.c:85 +msgid "Add HiDPI icons to the tarball" +msgstr "Engadir iconas HiDPI ao tarball" -#. TRANSLATORS: command description -msgid "Compare the contents of two AppStream files" -msgstr "Comparar os contidos de dous ficheiros AppStream" +#. TRANSLATORS: command line option +#: client/as-builder.c:88 +msgid "Add encoded icons to the XML" +msgstr "Engadir iconas codificadas ao XML" -#. TRANSLATORS: command description -msgid "Convert an AppData file to NEWS format" -msgstr "Conveter un ficheiro AppData ao formato NEWS" +#. TRANSLATORS: command line option +#: client/as-builder.c:91 +msgid "Do not compress the icons into a tarball" +msgstr "Non comprimir as iconas nun tarball" -#. TRANSLATORS: command description -msgid "Convert an NEWS file to AppData format" -msgstr "Converter un ficheiro NEWS ao formato AppData" +#. TRANSLATORS: command line option +#: client/as-builder.c:94 +msgid "Set the logging directory" +msgstr "Estabelecer o directorio de rexistro" -#. TRANSLATORS: command description -msgid "Converts AppStream metadata from one version to another" -msgstr "Convirte os metadatos AppStream dunha versión a outra" +#. TRANSLATORS: command line option +#: client/as-builder.c:97 +msgid "Set the packages directory" +msgstr "Estabelecer o directorio de paquetes" -#. TRANSLATORS: command description -msgid "Create an CSV status document" -msgstr "Crea un documento de estado CSV" +#. TRANSLATORS: command line option +#: client/as-builder.c:100 +msgid "Set the temporary directory" +msgstr "Estabelecer o directorio temporal" -#. TRANSLATORS: command description -msgid "Create an HTML matrix page" -msgstr "Crear unha páxina de matriz de HTML" +#. TRANSLATORS: command line option +#: client/as-builder.c:103 client/as-compose.c:332 +msgid "Set the output directory" +msgstr "Estabelecer o directorio de saída" -#. TRANSLATORS: command description -msgid "Create an HTML status page" -msgstr "Crea unha páxina de estado HTML" +#. TRANSLATORS: command line option +#: client/as-builder.c:106 client/as-compose.c:335 +msgid "Set the icons directory" +msgstr "Estabelecer o cartafol das iconas" -#. TRANSLATORS: command description -msgid "Display application search tokens" -msgstr "Mostrar tokens de busca de aplicativo" +#. TRANSLATORS: command line option +#: client/as-builder.c:109 +msgid "Set the cache directory" +msgstr "Estabelecer o directorio de caché" #. TRANSLATORS: command line option -msgid "Do not compress the icons into a tarball" -msgstr "Non comprimir as iconas nun tarball" +#: client/as-builder.c:112 client/as-compose.c:344 +msgid "Set the basenames of the output files" +msgstr "Estabelecer os nomes base dos ficheiros de saída" -#. TRANSLATORS: this is the --nonet argument -msgid "Do not use network access" -msgstr "Non usar o acceso á rede" +#. TRANSLATORS: command line option +#: client/as-builder.c:115 client/as-compose.c:338 +msgid "Set the origin name" +msgstr "Estabelecer o nome de orixe" -#. success -#. TRANSLATORS: information message -msgid "Done!" -msgstr "Feito!" +#. TRANSLATORS: command line option +#: client/as-builder.c:118 +msgid "Set the number of threads" +msgstr "Estabelecer o número de fíos" -#. TRANSLATORS: command description -msgid "Dumps the applications in the AppStream metadata" -msgstr "Emborca os aplicativos nos metadatos AppStream" +#. TRANSLATORS: command line option +#: client/as-builder.c:121 client/as-compose.c:341 +msgid "Set the minimum icon size in pixels" +msgstr "Estabelecer o tamaño de icona mínimo en píxeles" #. TRANSLATORS: command line option -msgid "Enable profiling" -msgstr "Engadir perfilado" +#: client/as-builder.c:124 +msgid "Set the old metadata location" +msgstr "Estabelecer a localización dos metadatos antigos" -#. list failures -msgid "FAILED" -msgstr "FALLIDA" +#. TRANSLATORS: command line option +#: client/as-builder.c:127 +msgid "Ignore certain types of veto" +msgstr "Ignorar certos tipos de veto" #. TRANSLATORS: error message -msgid "Failed to add package" -msgstr "Produciuse un fallo ao engadir o paquete" +#: client/as-builder.c:141 client/as-compose.c:358 client/as-util.c:4606 +msgid "Failed to parse arguments" +msgstr "Produciuse un fallo ao analizar os argumentos" #. TRANSLATORS: error message -msgid "Failed to generate metadata" -msgstr "Produciuse un fallo ao xerar os metadatos" +#: client/as-builder.c:246 +msgid "Failed to set up builder" +msgstr "Produciuse un fallo ao configurar o construtor" #. TRANSLATORS: error message +#: client/as-builder.c:265 msgid "Failed to open packages" msgstr "Produciuse un fallo ao abrir os paquetes" +#. TRANSLATORS: information message +#: client/as-builder.c:275 +msgid "Scanning packages..." +msgstr "Analizando paquetes…" + #. TRANSLATORS: error message -msgid "Failed to parse arguments" -msgstr "Produciuse un fallo ao analizar os argumentos" +#: client/as-builder.c:285 +msgid "Failed to add package" +msgstr "Produciuse un fallo ao engadir o paquete" + +#. TRANSLATORS: information message +#: client/as-builder.c:291 +#, c-format +msgid "Parsed %u/%u files..." +msgstr "Analizados %u/%u ficheiros..." #. TRANSLATORS: error message -msgid "Failed to set up builder" -msgstr "Produciuse un fallo ao configurar o construtor" +#: client/as-builder.c:301 +msgid "Failed to generate metadata" +msgstr "Produciuse un fallo ao xerar os metadatos" -#. TRANSLATORS: command line option -msgid "Ignore certain types of veto" -msgstr "Ignorar certos tipos de veto" +#. success +#. TRANSLATORS: information message +#: client/as-builder.c:308 client/as-compose.c:537 +msgid "Done!" +msgstr "Feito!" -#. TRANSLATORS: command line option -msgid "Include failed results in the output" -msgstr "Incluír os resultados fallidos na saída" +#. TRANSLATORS: we've saving the icon file to disk +#: client/as-compose.c:109 client/as-compose.c:163 +msgid "Saving icon" +msgstr "Gardando icona" + +#. TRANSLATORS: command line option +#: client/as-compose.c:329 +msgid "Set the prefix" +msgstr "Estabelecer o prefixo" + +#. TRANSLATORS: we're generating the AppStream data +#: client/as-compose.c:401 +msgid "Processing application" +msgstr "Procesando aplicación" + +#. TRANSLATORS: the .appdata.xml file could not +#. * be loaded +#: client/as-compose.c:407 +msgid "Error loading AppData file" +msgstr "Produciuse un erro cargando o ficheiro AppData" + +#. TRANSLATORS: the .mo files could not be parsed +#: client/as-compose.c:420 +msgid "Error parsing translations" +msgstr "Produciuse un erro analizando as traducións" + +#. TRANSLATORS: we could not auto-add the kudo +#: client/as-compose.c:431 +msgid "Error parsing kudos" +msgstr "Produciuse un erro analizando «kudos»" + +#. TRANSLATORS: we could not auto-add the provides +#: client/as-compose.c:442 +msgid "Error parsing provides" +msgstr "Produciuse un erro analizando «provides»" + +#. TRANSLATORS: not a valid desktop filename +#: client/as-compose.c:465 +msgid "Invalid desktop filename" +msgstr "Nome de ficheiro desktop non válido" + +#. TRANSLATORS: the .desktop file could not +#. * be loaded +#: client/as-compose.c:484 +msgid "Error loading desktop file" +msgstr "Produciuse un erro cargando o ficheiro desktop" + +#. TRANSLATORS: this is when the folder could +#. * not be created +#: client/as-compose.c:512 +msgid "Error creating output directory" +msgstr "Produciuse un erro creando o cartafol de saída" + +#. TRANSLATORS: we've saving the XML file to disk +#: client/as-compose.c:521 +msgid "Saving AppStream" +msgstr "Cargando AppStream" + +#. TRANSLATORS: this is when the destination file +#. * cannot be saved for some reason +#: client/as-compose.c:531 +msgid "Error saving AppStream file" +msgstr "Produciuse un erro gardando o ficheiro da AppStream" -#. TRANSLATORS: command description -msgid "Incorporate extra metadata from an external file" -msgstr "Incorporar metadatos adicionais desde un ficheiro externo" +#. TRANSLATORS: this is a command alias +#: client/as-util.c:93 +#, c-format +msgid "Alias to %s" +msgstr "Alias a %s" -#. TRANSLATORS: command description -msgid "Installs AppStream metadata" -msgstr "Instala os metadatos de AppStream" +#: client/as-util.c:175 +msgid "Command not found, valid commands are:" +msgstr "Orde non atopada, as ordes válidas son:" -#. TRANSLATORS: command description -msgid "Installs AppStream metadata with new origin" -msgstr "Instala os metadatos de AppStream con un novo orixe" +#. TRANSLATORS: any manual changes required? +#. * also note: FIXME is a hardcoded string +#: client/as-util.c:467 +msgid "Please review the file and fix any 'FIXME' items" +msgstr "Por favor revise o ficheiro e arranxe calquera elemento «FIXME»" -#. TRANSLATORS: command description -msgid "List applications not backed by packages" -msgstr "Lista os aplicativos que non teñen un paquete" +#. TRANSLATORS: information message +#: client/as-util.c:485 +msgid "Old API version" +msgstr "Versión antiga da API" #. TRANSLATORS: information message +#: client/as-util.c:497 msgid "New API version" msgstr "Nova versión da API" +#: client/as-util.c:516 +msgid "Not enough arguments, expected old.xml new.xml version" +msgstr "Non hai argumentos dabondo, agardábase a versión antiga.xml nova.xml" + +#. TRANSLATORS: the %s and %s are file types, +#. * e.g. "appdata" to "appstream" +#: client/as-util.c:552 +#, c-format +msgid "Conversion %s to %s is not implemented" +msgstr "A conversión de %s a %s non está implementada" + +#: client/as-util.c:569 msgid "Not enough arguments, expected file.xml" msgstr "Non hai argumentos dabondo, agardábase ficheiro.xml" -msgid "Not enough arguments, expected old.xml new.xml version" -msgstr "Non hai argumentos dabondo, agardábase a versión antiga.xml nova.xml" +#. TRANSLATORS: %s is a file type, +#. * e.g. 'appdata' +#: client/as-util.c:595 +#, c-format +msgid "File format '%s' cannot be upgraded" +msgstr "Non é posíbel anovar o formato de ficheiro «%s»" + +#. TRANSLATORS: not a recognised file type +#: client/as-util.c:638 client/as-util.c:1038 client/as-util.c:1139 +msgid "Format not recognised" +msgstr "Formato non recoñecido" + +#. TRANSLATORS: probably wrong XML +#: client/as-util.c:1979 +msgid "No desktop applications found" +msgstr "Non foi posíbel atopar aplicacións de escritorio" #. TRANSLATORS: the file is valid +#: client/as-util.c:2711 msgid "OK" msgstr "OK" -#. TRANSLATORS: any manual changes required? -#. * also note: FIXME is a hardcoded string -msgid "Please review the file and fix any 'FIXME' items" -msgstr "Por favor revise o ficheiro e arranxe calquera elemento «FIXME»" +#. list failures +#: client/as-util.c:2716 +msgid "FAILED" +msgstr "FALLIDA" -#. TRANSLATORS: command description -msgid "Replace screenshots in source file" -msgstr "Substituír capturas de pantallas no ficheiro de orixe" +#: client/as-util.c:2812 +msgid "Validation failed" +msgstr "Validación fallida" -#. TRANSLATORS: information message -msgid "Scanning packages..." -msgstr "Analizando paquetes…" +#: client/as-util.c:2856 +msgid "Validation of files failed" +msgstr "Validación dos ficheiros fallida" -#. TRANSLATORS: command description -msgid "Search for AppStream applications" -msgstr "Buscar aplicativos AppStream" +#. TRANSLATORS: application was removed +#: client/as-util.c:3974 +msgid "Removed" +msgstr "Retirado" + +#. TRANSLATORS: application was added +#: client/as-util.c:3987 +msgid "Added" +msgstr "Engadido" + +#. TRANSLATORS: this is when a device ctrl+c's a watch +#: client/as-util.c:4270 +msgid "Cancelled" +msgstr "Cancelado" -#. TRANSLATORS: command line option -msgid "Set the basenames of the output files" -msgstr "Estabelecer os nomes base dos ficheiros de saída" +#. TRANSLATORS: this is the --nonet argument +#: client/as-util.c:4324 +msgid "Do not use network access" +msgstr "Non usar o acceso á rede" #. TRANSLATORS: command line option -msgid "Set the cache directory" -msgstr "Estabelece o directorio de caché" +#: client/as-util.c:4330 +msgid "Show version" +msgstr "Mostra a versión" #. TRANSLATORS: command line option -msgid "Set the icons directory" -msgstr "Estabelecer o cartafol das iconas" +#: client/as-util.c:4333 +msgid "Enable profiling" +msgstr "Engadir perfilado" -#. TRANSLATORS: command line option -msgid "Set the logging directory" -msgstr "Estabelece o directorio de rexistro" +#. TRANSLATORS: command description +#: client/as-util.c:4365 +msgid "Converts AppStream metadata from one version to another" +msgstr "Convirte os metadatos AppStream dunha versión a outra" -#. TRANSLATORS: command line option -msgid "Set the minimum icon size in pixels" -msgstr "Estabelecer o tamaño de icona mínimo nos píxeles" +#. TRANSLATORS: command description +#: client/as-util.c:4371 +msgid "Upgrade AppData metadata to the latest version" +msgstr "Anovar os metadatos de AppData á última versión" -#. TRANSLATORS: command line option -msgid "Set the number of threads" -msgstr "Estabelece o número de fíos" +#. TRANSLATORS: command description +#: client/as-util.c:4377 +msgid "Creates an example AppData file from a .desktop file" +msgstr "Crea un ficheiro Appdata de exemplo desde un ficheiro .desktop" -#. TRANSLATORS: command line option -msgid "Set the old metadata location" -msgstr "Estabelece a localización de metadatos antigos" +#. TRANSLATORS: command description +#: client/as-util.c:4383 +msgid "Dumps the applications in the AppStream metadata" +msgstr "Emborca as aplicacións nos metadatos AppStream" -#. TRANSLATORS: command line option -msgid "Set the origin name" -msgstr "Estabelece o nome de orixe" +#. TRANSLATORS: command description +#: client/as-util.c:4389 +msgid "Search for AppStream applications" +msgstr "Buscar aplicacións AppStream" -#. TRANSLATORS: command line option -msgid "Set the output directory" -msgstr "Estabelece o directorio de saída" +#. TRANSLATORS: command description +#: client/as-util.c:4395 +msgid "Search for AppStream applications by package name" +msgstr "Buscar aplicacións en AppStream polo nome do paquete" -#. TRANSLATORS: command line option -msgid "Set the packages directory" -msgstr "Estabelece o directorio de paquetes" +#. TRANSLATORS: command description +#: client/as-util.c:4401 +msgid "Show all installed AppStream applications" +msgstr "Mostrar todas as aplicacións de AppStream instalados" -#. TRANSLATORS: command line option -msgid "Set the temporary directory" -msgstr "Estabelece o directorio temporal" +#. TRANSLATORS: command description +#: client/as-util.c:4407 +msgid "Search for AppStream applications by category name" +msgstr "Buscar aplicacións en AppStream polo nome da categoría" -#. TRANSLATORS: command line option -msgid "Show extra debugging information" -msgstr "Mostra información de depuración adicional" +#. TRANSLATORS: command description +#: client/as-util.c:4413 +msgid "Display application search tokens" +msgstr "Mostrar tokens de busca de aplicación" -#. TRANSLATORS: command line option -msgid "Show version" -msgstr "Mostra a versión" +#. TRANSLATORS: command description +#: client/as-util.c:4419 +msgid "Installs AppStream metadata" +msgstr "Instala os metadatos de AppStream" + +#. TRANSLATORS: command description +#: client/as-util.c:4425 +msgid "Installs AppStream metadata with new origin" +msgstr "Instala os metadatos de AppStream con un novo orixe" #. TRANSLATORS: command description +#: client/as-util.c:4431 msgid "Uninstalls AppStream metadata" msgstr "Desinstala os metadatos de AppStream" #. TRANSLATORS: command description -msgid "Upgrade AppData metadata to the latest version" -msgstr "Anovar os metadatos de AppData á última versión" +#: client/as-util.c:4437 +msgid "Create an HTML status page" +msgstr "Crea unha páxina de estado HTML" + +#. TRANSLATORS: command description +#: client/as-util.c:4443 +msgid "Create an CSV status document" +msgstr "Crea un documento de estado CSV" + +#. TRANSLATORS: command description +#: client/as-util.c:4449 +msgid "Create an HTML matrix page" +msgstr "Crear unha páxina de matriz de HTML" + +#. TRANSLATORS: command description +#: client/as-util.c:4455 +msgid "List applications not backed by packages" +msgstr "Lista as aplicacións que non teñen un paquete" #. TRANSLATORS: command description +#: client/as-util.c:4461 msgid "Validate an AppData or AppStream file" msgstr "Valida un ficheiro de AppData ou AppStream" #. TRANSLATORS: command description +#: client/as-util.c:4467 msgid "Validate an AppData or AppStream file (relaxed)" msgstr "Valida un ficheiro de AppData ou AppStream (relaxado)" #. TRANSLATORS: command description +#: client/as-util.c:4473 +msgid "Exports the agreement to text" +msgstr "Exporta o acordo a texto" + +#. TRANSLATORS: command description +#: client/as-util.c:4479 msgid "Validate an AppData or AppStream file (strict)" msgstr "Valida un ficheiro de AppData ou AppStream (estricto)" -msgid "Validation failed" -msgstr "Validación fallida" +#. TRANSLATORS: command description +#: client/as-util.c:4485 +msgid "Convert an AppData file to NEWS format" +msgstr "Conveter un ficheiro AppData ao formato NEWS" -msgid "Validation of files failed" -msgstr "Validación dos ficheiros fallida" +#. TRANSLATORS: command description +#: client/as-util.c:4491 +msgid "Convert an NEWS file to AppData format" +msgstr "Converter un ficheiro NEWS ao formato AppData" + +#. TRANSLATORS: command description +#: client/as-util.c:4497 +msgid "Check installed application data" +msgstr "Comproba os datos de aplicación instaladas" + +#. TRANSLATORS: command description +#: client/as-util.c:4503 +msgid "check an installed application" +msgstr "comprobar unha aplicación instalada" + +#. TRANSLATORS: command description +#: client/as-util.c:4509 +msgid "Replace screenshots in source file" +msgstr "Substituír capturas de pantallas no ficheiro de orixe" + +#. TRANSLATORS: command description +#: client/as-util.c:4515 +msgid "Add a provide to a source file" +msgstr "Engadir un «provide» a un ficheiro fonte" + +#. TRANSLATORS: command description +#: client/as-util.c:4521 +msgid "Add a language to a source file" +msgstr "Engadir un idioma a ficheiro fonte" + +#. TRANSLATORS: command description +#: client/as-util.c:4527 +msgid "Mirror upstream screenshots" +msgstr "Copiar as capturas de pantalla de «upstream»" + +#. TRANSLATORS: command description +#: client/as-util.c:4533 +msgid "Incorporate extra metadata from an external file" +msgstr "Incorporar metadatos adicionais desde un ficheiro externo" + +#. TRANSLATORS: command description +#: client/as-util.c:4539 +msgid "Compare the contents of two AppStream files" +msgstr "Comparar os contidos de dous ficheiros AppStream" + +#. TRANSLATORS: command description +#: client/as-util.c:4545 +msgid "Generate a GUID from an input string" +msgstr "Xerar un GUID dunha cadea de entrada" + +#. TRANSLATORS: command description +#: client/as-util.c:4551 +msgid "Modify an AppData file" +msgstr "Modificar un ficheiro AppData" + +#. TRANSLATORS: command description +#: client/as-util.c:4557 +msgid "Split an AppStream file to AppData and Metainfo files" +msgstr "Dividir un ficheiro de AppStream en ficheiros AppData e Metainfo" + +#. TRANSLATORS: command description +#: client/as-util.c:4563 +msgid "Merge several files to an AppStream file" +msgstr "Combinar varios ficheiros nun ficheiro AppStream" + +#. TRANSLATORS: command description +#: client/as-util.c:4569 +msgid "Import a file to AppStream markup" +msgstr "Importar un ficheiro a marcado de AppStream" + +#. TRANSLATORS: command description +#: client/as-util.c:4575 +msgid "Watch AppStream locations for changes" +msgstr "Observar cambios nas localizacións de AppStream" + +#. TRANSLATORS: command description +#: client/as-util.c:4581 +msgid "Compare version numbers" +msgstr "Comparar números de versión" + +#. TRANSLATORS: command description +#: client/as-util.c:4587 +msgid "Test a regular expression" +msgstr "Probar unha expresión regular" + +#. TRANSLATORS: program name +#: client/as-util.c:4600 +msgid "AppStream Utility" +msgstr "Utilidade de AppStream" +#: client/as-util.c:4624 msgid "Version:" msgstr "Versión:" ++++++ appstream-glib.obsinfo ++++++ --- /var/tmp/diff_new_pack.K5tTWi/_old 2020-04-22 20:45:32.474516994 +0200 +++ /var/tmp/diff_new_pack.K5tTWi/_new 2020-04-22 20:45:32.474516994 +0200 @@ -1,5 +1,5 @@ name: appstream-glib -version: 0.7.16 -mtime: 1569866536 -commit: 230e2da082d9754858330c3e262a9d44f816def1 +version: 0.7.17 +mtime: 1582191077 +commit: 93f614add2377465bc7bd24a9a99c8ae28e2342f ++++++ as-glib-PR359.patch ++++++ >From d4bfa8389932029ae85a7bad4a762d69a47fbbb4 Mon Sep 17 00:00:00 2001 From: Fabian Vogt <[email protected]> Date: Wed, 22 Apr 2020 11:22:03 +0200 Subject: [PATCH] Fix crash with invalid children of <ul/> It segfaulted when building the error message as data_c->name was invalid. data_c was a valid tag, so only the data_c->tag union member was active. Fix the crash by calling the proper function instead and add a test case. --- libappstream-glib/as-node.c | 2 +- libappstream-glib/as-self-test.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libappstream-glib/as-node.c b/libappstream-glib/as-node.c index 7fd68515..66d582a8 100644 --- a/libappstream-glib/as-node.c +++ b/libappstream-glib/as-node.c @@ -1891,7 +1891,7 @@ as_node_get_localized_unwrap_type_li (const AsNode *node, AS_NODE_ERROR, AS_NODE_ERROR_INVALID_MARKUP, "Tag %s in %s invalid", - data_c->name, + as_tag_data_get_name (data_c), as_tag_data_get_name (data)); return FALSE; } diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c index 47ad937f..66166410 100644 --- a/libappstream-glib/as-self-test.c +++ b/libappstream-glib/as-self-test.c @@ -2810,6 +2810,7 @@ as_test_node_xml_func (void) AsNode *n2; AsNode *root; GString *xml; + GHashTable *hashtable; /* invalid XML */ root = as_node_from_xml ("<moo>", 0, &error); @@ -2920,6 +2921,16 @@ as_test_node_xml_func (void) g_assert_cmpstr (xml->str, ==, "<!-- 1st -->\n<!-- 2nd -->\n<foo/>\n"); g_string_free (xml, TRUE); as_node_unref (root); + + /* invalid child of ul */ + root = as_node_from_xml ("<ul><ul></ul></ul>", 0, &error); + g_assert_no_error (error); + g_assert (root != NULL); + hashtable = as_node_get_localized_unwrap (root, &error); + g_assert_error (error, AS_NODE_ERROR, AS_NODE_ERROR_INVALID_MARKUP); + g_assert_cmpstr (error->message, ==, "Tag ul in ul invalid"); + g_clear_error (&error); + g_assert (hashtable == NULL); } static void
