import gnome-software-3.36.1-8.el8

This commit is contained in:
CentOS Sources 2021-05-25 04:12:20 +00:00 committed by Andrew Lukoshko
parent c72592b2a2
commit e0c9e6eacf
4 changed files with 195 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From b50003ed83cab2c6cf6654e5972d6ee3e2303eb6 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 16 Feb 2021 16:09:08 +0100
Subject: [PATCH] odrs: Cannot be disabled by filling empty 'review-server'
setting
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1143
---
plugins/odrs/gs-plugin-odrs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/plugins/odrs/gs-plugin-odrs.c b/plugins/odrs/gs-plugin-odrs.c
index f0c0c3b91..2c9bd878d 100644
--- a/plugins/odrs/gs-plugin-odrs.c
+++ b/plugins/odrs/gs-plugin-odrs.c
@@ -175,6 +175,8 @@ gs_plugin_initialize (GsPlugin *plugin)
/* set name of MetaInfo file */
gs_plugin_set_appstream_id (plugin, "org.gnome.Software.Plugin.Odrs");
+
+ gs_plugin_set_enabled (plugin, priv->review_server && *priv->review_server);
}
static GArray *
--
GitLab

View File

@ -0,0 +1,57 @@
From 98dbef8b5a547d3d920d377022e20d2e63519b2f Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 16 Feb 2021 12:58:19 +0100
Subject: [PATCH 1/2] GsApplication: Crash when run as root
The `search_provider` is not initialized in this case, leading
to NULL dereference. Skip the call in such cases, because the search
provider is not that important.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1142
---
src/gs-application.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gs-application.c b/src/gs-application.c
index 48f0c6aac..fdb5f55c4 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -912,7 +912,8 @@ static void
gs_application_setup_search_provider (GsApplication *app)
{
gs_application_initialize_plugins (app);
- gs_shell_search_provider_setup (app->search_provider, app->plugin_loader);
+ if (app->search_provider)
+ gs_shell_search_provider_setup (app->search_provider, app->plugin_loader);
}
static void
--
GitLab
From 0055bfa8535bb7c5ccd9ace244d71b2885a47daa Mon Sep 17 00:00:00 2001
From: Philip Withnall <philip@tecnocode.co.uk>
Date: Mon, 22 Feb 2021 11:41:05 +0000
Subject: [PATCH 2/2] Apply 1 suggestion(s) to 1 file(s)
---
src/gs-application.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gs-application.c b/src/gs-application.c
index fdb5f55c4..f05f6f718 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -49,7 +49,7 @@ struct _GsApplication {
#ifdef HAVE_PACKAGEKIT
GsDbusHelper *dbus_helper;
#endif
- GsShellSearchProvider *search_provider;
+ GsShellSearchProvider *search_provider; /* (nullable) (owned) */
GSettings *settings;
GSimpleActionGroup *action_map;
guint shell_loaded_handler_id;
--
GitLab

View File

@ -0,0 +1,97 @@
diff -up gnome-software-3.36.1/lib/gs-plugin.c.1888404 gnome-software-3.36.1/lib/gs-plugin.c
--- gnome-software-3.36.1/lib/gs-plugin.c.1888404 2021-05-24 13:50:34.302612057 +0200
+++ gnome-software-3.36.1/lib/gs-plugin.c 2021-05-24 13:50:39.160609728 +0200
@@ -1398,6 +1398,44 @@ gs_plugin_cache_lookup (GsPlugin *plugin
}
/**
+ * gs_plugin_cache_lookup_by_state:
+ * @plugin: a #GsPlugin
+ * @list: a #GsAppList to add applications to
+ * @state: a #AsAppState
+ *
+ * Adds each cached #GsApp with state @state into the @list.
+ * When the state is %AS_APP_STATE_UNKNOWN, then adds all
+ * cached applications.
+ *
+ * Since: 3.36.1-8
+ **/
+void
+gs_plugin_cache_lookup_by_state (GsPlugin *plugin,
+ GsAppList *list,
+ AsAppState state)
+{
+ GsPluginPrivate *priv;
+ GHashTableIter iter;
+ gpointer value;
+ g_autoptr(GMutexLocker) locker = NULL;
+
+ g_return_if_fail (GS_IS_PLUGIN (plugin));
+ g_return_if_fail (GS_IS_APP_LIST (list));
+
+ priv = gs_plugin_get_instance_private (plugin);
+ locker = g_mutex_locker_new (&priv->cache_mutex);
+
+ g_hash_table_iter_init (&iter, priv->cache);
+ while (g_hash_table_iter_next (&iter, NULL, &value)) {
+ GsApp *app = value;
+
+ if (state == AS_APP_STATE_UNKNOWN ||
+ state == gs_app_get_state (app))
+ gs_app_list_add (list, app);
+ }
+}
+
+/**
* gs_plugin_cache_remove:
* @plugin: a #GsPlugin
* @key: a key which matches
diff -up gnome-software-3.36.1/lib/gs-plugin.h.1888404 gnome-software-3.36.1/lib/gs-plugin.h
--- gnome-software-3.36.1/lib/gs-plugin.h.1888404 2021-05-24 13:50:34.302612057 +0200
+++ gnome-software-3.36.1/lib/gs-plugin.h 2021-05-24 13:50:39.160609728 +0200
@@ -102,6 +102,9 @@ gboolean gs_plugin_check_distro_id (Gs
const gchar *distro_id);
GsApp *gs_plugin_cache_lookup (GsPlugin *plugin,
const gchar *key);
+void gs_plugin_cache_lookup_by_state (GsPlugin *plugin,
+ GsAppList *list,
+ AsAppState state);
void gs_plugin_cache_add (GsPlugin *plugin,
const gchar *key,
GsApp *app);
diff -up gnome-software-3.36.1/lib/gs-plugin-loader.c.1888404 gnome-software-3.36.1/lib/gs-plugin-loader.c
--- gnome-software-3.36.1/lib/gs-plugin-loader.c.1888404 2021-05-24 13:50:34.302612057 +0200
+++ gnome-software-3.36.1/lib/gs-plugin-loader.c 2021-05-24 13:50:39.159609728 +0200
@@ -1273,7 +1273,7 @@ static gboolean
gs_plugin_loader_app_is_valid_updatable (GsApp *app, gpointer user_data)
{
return gs_plugin_loader_app_is_valid (app, user_data) &&
- gs_app_is_updatable (app);
+ (gs_app_is_updatable (app) || gs_app_get_state (app) == AS_APP_STATE_INSTALLING);
}
static gboolean
diff -up gnome-software-3.36.1/plugins/flatpak/gs-plugin-flatpak.c.1888404 gnome-software-3.36.1/plugins/flatpak/gs-plugin-flatpak.c
--- gnome-software-3.36.1/plugins/flatpak/gs-plugin-flatpak.c.1888404 2021-05-24 13:50:34.310612054 +0200
+++ gnome-software-3.36.1/plugins/flatpak/gs-plugin-flatpak.c 2021-05-24 13:50:39.161609727 +0200
@@ -218,6 +218,7 @@ gs_plugin_add_updates (GsPlugin *plugin,
if (!gs_flatpak_add_updates (flatpak, list, cancellable, error))
return FALSE;
}
+ gs_plugin_cache_lookup_by_state (plugin, list, AS_APP_STATE_INSTALLING);
return TRUE;
}
diff -up gnome-software-3.36.1/src/gs-updates-page.c.1888404 gnome-software-3.36.1/src/gs-updates-page.c
--- gnome-software-3.36.1/src/gs-updates-page.c.1888404 2021-05-24 13:50:39.161609727 +0200
+++ gnome-software-3.36.1/src/gs-updates-page.c 2021-05-24 13:51:00.211599638 +0200
@@ -139,7 +139,8 @@ gs_updates_page_invalidate (GsUpdatesPag
static GsUpdatesSectionKind
_get_app_section (GsApp *app)
{
- if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE_LIVE) {
+ if (gs_app_get_state (app) == AS_APP_STATE_UPDATABLE_LIVE ||
+ gs_app_get_state (app) == AS_APP_STATE_INSTALLING) {
if (gs_app_get_kind (app) == AS_APP_KIND_FIRMWARE)
return GS_UPDATES_SECTION_KIND_ONLINE_FIRMWARE;
return GS_UPDATES_SECTION_KIND_ONLINE;

View File

@ -14,7 +14,7 @@
Name: gnome-software
Version: 3.36.1
Release: 5%{?dist}
Release: 8%{?dist}
Summary: A software center for GNOME
License: GPLv2+
@ -35,6 +35,10 @@ Patch4: 0001-Improve-the-heuristic-for-detecting-old-style-AppStr.patch
# Fix flatpak updates and removals when same ref occurs in multiple remotes
Patch5: gnome-software-3.36.1-unrelated-refs.patch
Patch6: be-able-to-disable-odrs.patch
Patch7: crash-when-run-as-root.patch
Patch8: gs-updates-page-keep-showing-installing-apps.patch
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: libxslt
@ -221,6 +225,15 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_datadir}/gtk-doc/html/gnome-software
%changelog
* Mon May 24 2021 Milan Crha <mcrha@redhat.com> - 3.36.1-8
- Resolves: #1888404 (Updates page hides ongoing updates on refresh)
* Mon May 24 2021 Milan Crha <mcrha@redhat.com> - 3.36.1-7
- Resolves: #1873297 (Crash when run as root)
* Mon May 24 2021 Milan Crha <mcrha@redhat.com> - 3.36.1-6
- Resolves: #1791478 (Cannot completely disable ODRS (GNOME Ratings))
* Wed Feb 17 2021 Milan Crha <mcrha@redhat.com> - 3.36.1-5
- Fix flatpak updates and removals when same ref occurs in multiple remotes
- Resolves: #1888407