From a8cd4bcb754a611c7821de728333f4dff679d02b Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Tue, 23 Mar 2021 13:45:37 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/gnome-software.git#75366111674a11c45528a9e5224aebdf99452a0e --- .gitignore | 1 + ...dd-additional-icon-debug-information.patch | 32 ---------- ...-handling-of-icons-where-appdata-doe.patch | 48 --------------- ...und-invalid-icon-names-from-some-app.patch | 61 ------------------- ...provider-Fix-crash-in-variant-handli.patch | 29 --------- gnome-software.spec | 18 ++---- sources | 2 +- 7 files changed, 7 insertions(+), 184 deletions(-) delete mode 100644 0001-gs-app-Add-additional-icon-debug-information.patch delete mode 100644 0002-gs-appstream-Fix-handling-of-icons-where-appdata-doe.patch delete mode 100644 0003-gs-icon-Work-around-invalid-icon-names-from-some-app.patch delete mode 100644 0004-gs-shell-search-provider-Fix-crash-in-variant-handli.patch diff --git a/.gitignore b/.gitignore index 6dba849..3aae75a 100644 --- a/.gitignore +++ b/.gitignore @@ -116,3 +116,4 @@ /gnome-software-3.38.1.tar.xz /gnome-software-40.beta.tar.xz /gnome-software-40.rc.tar.xz +/gnome-software-40.0.tar.xz diff --git a/0001-gs-app-Add-additional-icon-debug-information.patch b/0001-gs-app-Add-additional-icon-debug-information.patch deleted file mode 100644 index a881ab0..0000000 --- a/0001-gs-app-Add-additional-icon-debug-information.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 81a2e01d407fc903a83b4c1a82749d2591397240 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Tue, 16 Mar 2021 13:33:40 +0000 -Subject: [PATCH 1/4] gs-app: Add additional icon debug information - -Signed-off-by: Philip Withnall ---- - lib/gs-app.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib/gs-app.c b/lib/gs-app.c -index 771743330..cb2549d4c 100644 ---- a/lib/gs-app.c -+++ b/lib/gs-app.c -@@ -1828,11 +1828,12 @@ gs_app_get_icon_for_size (GsApp *app, - * lazily created. */ - for (guint i = 0; priv->icons != NULL && i < priv->icons->len; i++) { - GIcon *icon = priv->icons->pdata[i]; -+ g_autofree gchar *icon_str = g_icon_to_string (icon); - guint icon_width = gs_icon_get_width (icon); - guint icon_scale = gs_icon_get_scale (icon); - -- g_debug ("\tConsidering icon of type %s, width %u×%u", -- G_OBJECT_TYPE_NAME (icon), icon_width, icon_scale); -+ g_debug ("\tConsidering icon of type %s (%s), width %u×%u", -+ G_OBJECT_TYPE_NAME (icon), icon_str, icon_width, icon_scale); - - /* Ignore icons with unknown width and skip over ones which - * are too small. */ --- -2.30.2 - diff --git a/0002-gs-appstream-Fix-handling-of-icons-where-appdata-doe.patch b/0002-gs-appstream-Fix-handling-of-icons-where-appdata-doe.patch deleted file mode 100644 index 333baa8..0000000 --- a/0002-gs-appstream-Fix-handling-of-icons-where-appdata-doe.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 9a63168893a678f97fe6e3bfde2d6e5debf151c3 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Tue, 16 Mar 2021 13:34:13 +0000 -Subject: [PATCH 2/4] =?UTF-8?q?gs-appstream:=20Fix=20handling=20of=20icons?= - =?UTF-8?q?=20where=20appdata=20doesn=E2=80=99t=20specify=20width?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If the `` element in the appdata doesn’t specify a `width` -attribute, `xb_node_get_attr_as_uint()` will return `G_MAXUINT64`. -However, its return value was being assigned to `sz`, which is a -`guint`, and hence it was being truncated. This resulted in icons having -their widths set to `G_MAXUINT`, and hence being prioritised for display -when that was not necessarily correct. - -Fix that by explicitly handling the failure response from -`xb_node_get_attr_as_uint()`. - -Signed-off-by: Philip Withnall - -Fixes: #1171 ---- - plugins/core/gs-appstream.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c -index a9cf97270..22fed1154 100644 ---- a/plugins/core/gs-appstream.c -+++ b/plugins/core/gs-appstream.c -@@ -149,8 +149,12 @@ gs_appstream_new_icon (XbNode *component, XbNode *n, AsIconKind icon_kind, guint - default: - as_icon_set_name (icon, xb_node_get_text (n)); - } -- if (sz == 0) -- sz = xb_node_get_attr_as_uint (n, "width"); -+ if (sz == 0) { -+ guint64 width = xb_node_get_attr_as_uint (n, "width"); -+ if (width > 0 && width < G_MAXUINT) -+ sz = width; -+ } -+ - if (sz > 0) { - as_icon_set_width (icon, sz); - as_icon_set_height (icon, sz); --- -2.30.2 - diff --git a/0003-gs-icon-Work-around-invalid-icon-names-from-some-app.patch b/0003-gs-icon-Work-around-invalid-icon-names-from-some-app.patch deleted file mode 100644 index bca178b..0000000 --- a/0003-gs-icon-Work-around-invalid-icon-names-from-some-app.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 3e86354cc5ccffc5ef27fa9e5ce2e99e3e60bc8c Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Tue, 16 Mar 2021 13:36:23 +0000 -Subject: [PATCH 3/4] gs-icon: Work around invalid icon names from some - appstream files -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Cached icons are supposed to provide a name (like `krita.png`), `width` -and `height` attributes, and then gnome-software can build the path to -the cached icon file according to -https://www.freedesktop.org/software/appstream/docs/sect-AppStream-IconCache.html#spec-iconcache-location. - -Due to a bug in appstream-builder in appstream-glib -(https://github.com/hughsie/appstream-glib/pull/390), some appstream -files – for example, rpmfusion-free-33 – had invalid cached icon names, -which resulted in those icons not being loadable, and not appearing for -their applications. - -As it may take a while for the fix in appstream-builder to be merged and -be used to regenerate all the appstream files for different app -repositories, add a workaround in gnome-software. - -Signed-off-by: Philip Withnall - -Helps: #1171 ---- - lib/gs-icon.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/lib/gs-icon.c b/lib/gs-icon.c -index a88e62d34..955ab0217 100644 ---- a/lib/gs-icon.c -+++ b/lib/gs-icon.c -@@ -200,12 +200,22 @@ gs_icon_load_cached (AsIcon *icon) - { - const gchar *filename = as_icon_get_filename (icon); - const gchar *name = as_icon_get_name (icon); -+ g_autofree gchar *name_allocated = NULL; - g_autofree gchar *full_filename = NULL; - g_autoptr(GFile) file = NULL; - - if (filename == NULL || name == NULL) - return NULL; - -+ /* FIXME: Work around https://github.com/hughsie/appstream-glib/pull/390 -+ * where appstream files generated with appstream-builder from -+ * appstream-glib, with its hidpi option enabled, will contain an -+ * unnecessary size subdirectory in the icon name. */ -+ if (g_str_has_prefix (name, "64x64/")) -+ name = name_allocated = g_strdup (name + strlen ("64x64/")); -+ else if (g_str_has_prefix (name, "128x128/")) -+ name = name_allocated = g_strdup (name + strlen ("128x128/")); -+ - if (!g_str_has_suffix (filename, name)) { - /* Spec: https://www.freedesktop.org/software/appstream/docs/sect-AppStream-IconCache.html#spec-iconcache-location */ - if (as_icon_get_scale (icon) <= 1) { --- -2.30.2 - diff --git a/0004-gs-shell-search-provider-Fix-crash-in-variant-handli.patch b/0004-gs-shell-search-provider-Fix-crash-in-variant-handli.patch deleted file mode 100644 index b83d396..0000000 --- a/0004-gs-shell-search-provider-Fix-crash-in-variant-handli.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 80834ed7d336f103cfc7199fa96c6f2a860be438 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 18 Mar 2021 13:11:36 +0000 -Subject: [PATCH 4/4] gs-shell-search-provider: Fix crash in variant handling - for icons - -Signed-off-by: Philip Withnall - -Fixes: #1179 ---- - src/gs-shell-search-provider.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/gs-shell-search-provider.c b/src/gs-shell-search-provider.c -index 8bafc9a8c..27bbb45f7 100644 ---- a/src/gs-shell-search-provider.c -+++ b/src/gs-shell-search-provider.c -@@ -254,7 +254,7 @@ handle_get_result_metas (GsShellSearchProvider2 *skeleton, - if (icon != NULL) { - g_autofree gchar *icon_str = g_icon_to_string (icon); - if (icon_str != NULL) { -- g_variant_builder_add (&meta, "{sv}", "gicon", icon_str); -+ g_variant_builder_add (&meta, "{sv}", "gicon", g_variant_new_string (icon_str)); - } else { - g_autoptr(GVariant) icon_serialized = g_icon_serialize (icon); - g_variant_builder_add (&meta, "{sv}", "icon", icon_serialized); --- -2.30.2 - diff --git a/gnome-software.spec b/gnome-software.spec index 3c13a51..88cedde 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,25 +11,14 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 40~rc -Release: 2%{?dist} +Version: 40.0 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/40/%{name}-%{tarball_version}.tar.xz -# Fix display of icons for packages and snaps -# https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1171 -# https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/653 -Patch0001: 0001-gs-app-Add-additional-icon-debug-information.patch -Patch0002: 0002-gs-appstream-Fix-handling-of-icons-where-appdata-doe.patch -Patch0003: 0003-gs-icon-Work-around-invalid-icon-names-from-some-app.patch -# Fix crash that sometimes breaks search provider or stops window appearing -# https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1179 -# https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/658 -Patch0004: 0004-gs-shell-search-provider-Fix-crash-in-variant-handli.patch - BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc BuildRequires: gettext @@ -211,6 +200,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon Mar 22 2021 Kalev Lember - 40.0-1 +- Update to 40.0 + * Thu Mar 18 2021 Adam Williamson - 40~rc-2 - Backport a couple of bug fixes from upstream (icon display, crash bug) diff --git a/sources b/sources index f95cf36..a8dc968 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-40.rc.tar.xz) = caea26e84641f5db9dbacdec32e9f2039433e60fbb4548f48a33958eb1bd61415ab35e515100b29cb98a655bcf40ee8e2ea3cee4dd80d3777c2a81cf33848f8a +SHA512 (gnome-software-40.0.tar.xz) = 052c520ab25af4257bb978aaa9e1c7a555f8d24dbd782d9f12f3c3def22e65588d3c76d16e4b3dc26f034a762c2ee3e773026b158d468e9e169369dc3d156a2a