Update to 3.35.2

This commit is contained in:
Richard Hughes 2019-11-25 09:41:07 +00:00
parent 9704cc1ded
commit de96612cc3
7 changed files with 10 additions and 345 deletions

1
.gitignore vendored
View File

@ -106,3 +106,4 @@
/gnome-software-3.32.4.tar.xz
/gnome-software-3.34.0.tar.xz
/gnome-software-3.34.1.tar.xz
/gnome-software-3.35.2.tar.xz

View File

@ -1,29 +0,0 @@
commit 65ab13c42001d125ec10322e488e5dd4b29a61f6
Author: Richard Hughes <richard@hughsie.com>
Date: Fri Oct 11 16:56:03 2019 +0100
Do not show non-applications in the installed panel
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index 1f18693b..4d8ba517 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -517,6 +517,9 @@ gs_plugin_appstream_check_silo (GsPlugin *plugin,
}
}
+ /* regenerate with each minor release */
+ xb_builder_append_guid (builder, PACKAGE_VERSION);
+
/* create per-user cache */
blobfn = gs_utils_get_cache_filename ("appstream", "components.xmlb",
GS_UTILS_CACHE_FLAG_WRITEABLE,
@@ -925,7 +928,7 @@ gs_plugin_add_installed (GsPlugin *plugin,
locker = g_rw_lock_reader_locker_new (&priv->silo_lock);
/* get all installed appdata files (notice no 'components/' prefix...) */
- components = xb_silo_query (priv->silo, "component", 0, NULL);
+ components = xb_silo_query (priv->silo, "component/description/..", 0, NULL);
if (components == NULL)
return TRUE;
for (guint i = 0; i < components->len; i++) {

View File

@ -1,66 +0,0 @@
From d2c8b8b531792ff83163fd705b8bd2fd2d690884 Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
Date: Mon, 14 Oct 2019 19:53:41 +0200
Subject: [PATCH] Update renamed appstream ids for GNOME 3.34
---
data/assets/org.gnome.Software.Featured.xml | 8 ++++----
plugins/core/gs-plugin-hardcoded-popular.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/data/assets/org.gnome.Software.Featured.xml b/data/assets/org.gnome.Software.Featured.xml
index 188210f79..351de5604 100644
--- a/data/assets/org.gnome.Software.Featured.xml
+++ b/data/assets/org.gnome.Software.Featured.xml
@@ -84,7 +84,7 @@ text-shadow: none;</value>
</custom>
</component>
<component>
- <id>org.gnome.Boxes</id>
+ <id>org.gnome.Boxes.desktop</id>
<categories>
<category>Featured</category>
</categories>
@@ -111,7 +111,7 @@ text-shadow: none;
</custom>
</component>
<component>
- <id>org.gnome.SoundRecorder</id>
+ <id>org.gnome.SoundRecorder.desktop</id>
<custom>
<value key="GnomeSoftware::FeatureTile-css">border: 1px solid #bbb;
/* background: #f6f5f4 url('file://@datadir@/gnome-software/featured-sound-recorder.svg')
@@ -305,7 +305,7 @@ text-shadow: none;</value>
</custom>
</component>
<component>
- <id>org.gnome.Todo</id>
+ <id>org.gnome.Todo.desktop</id>
<custom>
<value key="GnomeSoftware::FeatureTile-css">border: 1px solid transparent;
background: url('file://@datadir@/gnome-software/featured-todo-bg.jpg') center 40% repeat;
@@ -341,7 +341,7 @@ background: #1b2838 url('http://people.gnome.org/~jimmac/gnome-software/steam-lo
</custom>
</component>
<component>
- <id>org.gnome.tetravex</id>
+ <id>org.gnome.Tetravex</id>
<custom>
<value key="GnomeSoftware::FeatureTile-css">border: 1px solid transparent;
background: url('file://@datadir@/gnome-software/featured-tetravex-bg.jpg') center 45% repeat;
diff --git a/plugins/core/gs-plugin-hardcoded-popular.c b/plugins/core/gs-plugin-hardcoded-popular.c
index 7a2465998..3998a813b 100644
--- a/plugins/core/gs-plugin-hardcoded-popular.c
+++ b/plugins/core/gs-plugin-hardcoded-popular.c
@@ -26,7 +26,7 @@ gs_plugin_add_popular (GsPlugin *plugin,
const gchar *apps[] = {
"org.gnome.Builder.desktop",
"org.gnome.Calculator.desktop",
- "org.gnome.clocks",
+ "org.gnome.clocks.desktop",
"org.gnome.Dictionary.desktop",
"org.gnome.Documents.desktop",
"org.gnome.Evince",
--
2.23.0

View File

@ -1,109 +0,0 @@
From cb926ab2645dbb548530c72f409d10736e584a2f Mon Sep 17 00:00:00 2001
From: Will Thompson <will@willthompson.co.uk>
Date: Fri, 27 Sep 2019 13:23:51 +0100
Subject: [PATCH 1/2] flatpak: factor out function to group by installation
I reworked it slightly to never put empty lists into the map, and to
make the caller iterate the hash table rather than looking up each
GsFlatpak * again. I think this is a bit clearer.
This will be reused in gs_plugin_download().
---
plugins/flatpak/gs-plugin-flatpak.c | 70 +++++++++++++++++++----------
1 file changed, 46 insertions(+), 24 deletions(-)
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index 007eab752..b4bc9a90d 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -405,6 +405,41 @@ _ref_to_app (FlatpakTransaction *transaction, const gchar *ref, GsPlugin *plugin
return gs_plugin_flatpak_find_app_by_ref (plugin, ref, NULL, NULL);
}
+/*
+ * Returns: (transfer full) (element-type GsFlatpak GsAppList):
+ * a map from GsFlatpak to non-empty lists of apps from @list associated
+ * with that installation.
+ */
+static GHashTable *
+_group_apps_by_installation (GsPlugin *plugin,
+ GsAppList *list)
+{
+ g_autoptr(GHashTable) applist_by_flatpaks = NULL;
+
+ /* list of apps to be handled by each flatpak installation */
+ applist_by_flatpaks = g_hash_table_new_full (g_direct_hash, g_direct_equal,
+ (GDestroyNotify) g_object_unref,
+ (GDestroyNotify) g_object_unref);
+
+ /* put each app into the correct per-GsFlatpak list */
+ for (guint i = 0; i < gs_app_list_length (list); i++) {
+ GsApp *app = gs_app_list_index (list, i);
+ GsFlatpak *flatpak = gs_plugin_flatpak_get_handler (plugin, app);
+ if (flatpak != NULL) {
+ GsAppList *list_tmp = g_hash_table_lookup (applist_by_flatpaks, flatpak);
+ if (list_tmp == NULL) {
+ list_tmp = gs_app_list_new ();
+ g_hash_table_insert (applist_by_flatpaks,
+ g_object_ref (flatpak),
+ list_tmp);
+ }
+ gs_app_list_add (list_tmp, app);
+ }
+ }
+
+ return g_steal_pointer (&applist_by_flatpaks);
+}
+
static FlatpakTransaction *
_build_transaction (GsPlugin *plugin, GsFlatpak *flatpak,
GCancellable *cancellable, GError **error)
@@ -759,34 +794,21 @@ gs_plugin_update (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- GsPluginData *priv = gs_plugin_get_data (plugin);
g_autoptr(GHashTable) applist_by_flatpaks = NULL;
+ GHashTableIter iter;
+ gpointer key, value;
- /* list of apps to be handled by each flatpak installation */
- applist_by_flatpaks = g_hash_table_new_full (g_direct_hash, g_direct_equal,
- NULL, (GDestroyNotify) g_object_unref);
- for (guint i = 0; i < priv->flatpaks->len; i++) {
- g_hash_table_insert (applist_by_flatpaks,
- g_ptr_array_index (priv->flatpaks, i),
- gs_app_list_new ());
- }
+ /* build and run transaction for each flatpak installation */
+ applist_by_flatpaks = _group_apps_by_installation (plugin, list);
+ g_hash_table_iter_init (&iter, applist_by_flatpaks);
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
+ GsFlatpak *flatpak = GS_FLATPAK (key);
+ GsAppList *list_tmp = GS_APP_LIST (value);
- /* put each app into the correct per-GsFlatpak list */
- for (guint i = 0; i < gs_app_list_length (list); i++) {
- GsApp *app = gs_app_list_index (list, i);
- GsFlatpak *flatpak = gs_plugin_flatpak_get_handler (plugin, app);
- if (flatpak != NULL) {
- GsAppList *list_tmp = g_hash_table_lookup (applist_by_flatpaks, flatpak);
- gs_app_list_add (list_tmp, app);
- }
- }
+ g_assert (GS_IS_FLATPAK (flatpak));
+ g_assert (list_tmp != NULL);
+ g_assert (gs_app_list_length (list_tmp) > 0);
- /* build and run transaction for each flatpak installation */
- for (guint j = 0; j < priv->flatpaks->len; j++) {
- GsFlatpak *flatpak = g_ptr_array_index (priv->flatpaks, j);
- GsAppList *list_tmp = GS_APP_LIST (g_hash_table_lookup (applist_by_flatpaks, flatpak));
- if (gs_app_list_length (list_tmp) == 0)
- continue;
if (!gs_plugin_flatpak_update (plugin, flatpak, list_tmp, cancellable, error))
return FALSE;
}
--
2.23.0

View File

@ -1,118 +0,0 @@
From ba103a6cbb27a4e01524a5c27f76266613f87936 Mon Sep 17 00:00:00 2001
From: Will Thompson <will@willthompson.co.uk>
Date: Fri, 27 Sep 2019 13:44:27 +0100
Subject: [PATCH 2/2] flatpak: download Flatpak updates in the correct
installation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Unfortunately the fix in 3e1fe203b40248f571be2a804027acd8e23dc54e is
incomplete: the call to _build_transaction() later in the function also
assumes that 'flatpak' is non-NULL.
Apply the same fix as 12c3f646 to gs_plugin_download() as
opposed to gs_plugin_update() to group the apps by their flatpak
installation, and download each group independently.
---
plugins/flatpak/gs-plugin-flatpak.c | 74 +++++++++++++++--------------
1 file changed, 39 insertions(+), 35 deletions(-)
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index b4bc9a90d..aed246fac 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -475,51 +475,55 @@ gboolean
gs_plugin_download (GsPlugin *plugin, GsAppList *list,
GCancellable *cancellable, GError **error)
{
- GsFlatpak *flatpak = NULL;
- g_autoptr(FlatpakTransaction) transaction = NULL;
- g_autoptr(GsAppList) list_tmp = gs_app_list_new ();
+ g_autoptr(GHashTable) applist_by_flatpaks = NULL;
+ GHashTableIter iter;
+ gpointer key, value;
- /* not supported */
- for (guint i = 0; i < gs_app_list_length (list); i++) {
- GsApp *app = gs_app_list_index (list, i);
- flatpak = gs_plugin_flatpak_get_handler (plugin, app);
- if (flatpak != NULL)
- gs_app_list_add (list_tmp, app);
- }
- if (gs_app_list_length (list_tmp) == 0)
- return TRUE;
+ /* build and run transaction for each flatpak installation */
+ applist_by_flatpaks = _group_apps_by_installation (plugin, list);
+ g_hash_table_iter_init (&iter, applist_by_flatpaks);
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
+ GsFlatpak *flatpak = GS_FLATPAK (key);
+ GsAppList *list_tmp = GS_APP_LIST (value);
+ g_autoptr(FlatpakTransaction) transaction = NULL;
- if (!gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)) {
- g_autoptr(GError) error_local = NULL;
+ g_assert (GS_IS_FLATPAK (flatpak));
+ g_assert (list_tmp != NULL);
+ g_assert (gs_app_list_length (list_tmp) > 0);
- if (!gs_metered_block_app_list_on_download_scheduler (list_tmp, cancellable, &error_local)) {
- g_warning ("Failed to block on download scheduler: %s",
- error_local->message);
- g_clear_error (&error_local);
+ if (!gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)) {
+ g_autoptr(GError) error_local = NULL;
+
+ if (!gs_metered_block_app_list_on_download_scheduler (list_tmp, cancellable, &error_local)) {
+ g_warning ("Failed to block on download scheduler: %s",
+ error_local->message);
+ g_clear_error (&error_local);
+ }
}
- }
- /* build and run non-deployed transaction */
- transaction = _build_transaction (plugin, flatpak, cancellable, error);
- if (transaction == NULL) {
- gs_flatpak_error_convert (error);
- return FALSE;
- }
- flatpak_transaction_set_no_deploy (transaction, TRUE);
- for (guint i = 0; i < gs_app_list_length (list_tmp); i++) {
- GsApp *app = gs_app_list_index (list_tmp, i);
- g_autofree gchar *ref = NULL;
+ /* build and run non-deployed transaction */
+ transaction = _build_transaction (plugin, flatpak, cancellable, error);
+ if (transaction == NULL) {
+ gs_flatpak_error_convert (error);
+ return FALSE;
+ }
+ flatpak_transaction_set_no_deploy (transaction, TRUE);
+ for (guint i = 0; i < gs_app_list_length (list_tmp); i++) {
+ GsApp *app = gs_app_list_index (list_tmp, i);
+ g_autofree gchar *ref = NULL;
- ref = gs_flatpak_app_get_ref_display (app);
- if (!flatpak_transaction_add_update (transaction, ref, NULL, NULL, error)) {
+ ref = gs_flatpak_app_get_ref_display (app);
+ if (!flatpak_transaction_add_update (transaction, ref, NULL, NULL, error)) {
+ gs_flatpak_error_convert (error);
+ return FALSE;
+ }
+ }
+ if (!gs_flatpak_transaction_run (transaction, cancellable, error)) {
gs_flatpak_error_convert (error);
return FALSE;
}
}
- if (!gs_flatpak_transaction_run (transaction, cancellable, error)) {
- gs_flatpak_error_convert (error);
- return FALSE;
- }
+
return TRUE;
}
--
2.23.0

View File

@ -11,20 +11,14 @@
%global libxmlb_version 0.1.7
Name: gnome-software
Version: 3.34.1
Release: 6%{?dist}
Version: 3.35.2
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/3.34/%{name}-%{version}.tar.xz
# Backported from upstream
Patch1: 0001-Do-not-show-non-applications-in-the-installed-panel.patch
Patch2: 0001-Update-renamed-appstream-ids-for-GNOME-3.34.patch
Patch3: 0001-flatpak-factor-out-function-to-group-by-installation.patch
Patch4: 0002-flatpak-download-Flatpak-updates-in-the-correct-inst.patch
BuildRequires: gcc
BuildRequires: gettext
BuildRequires: libxslt
@ -77,6 +71,7 @@ Requires: libxmlb%{?_isa} >= %{libxmlb_version}
Recommends: PackageKit%{?_isa} >= %{packagekit_version}
Obsoletes: gnome-software-snap < 3.33.1
Obsoletes: gnome-software-editor < 3.35.1
# this is not a library version
%define gs_plugin_version 13
@ -93,13 +88,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
These development files are for building gnome-software plugins outside
the source tree. Most users do not need this subpackage installed.
%package editor
Summary: Banner designer for GNOME Software
Requires: %{name}%{?_isa} = %{version}-%{release}
%description editor
Editor for designing banners for GNOME Software.
%package rpm-ostree
Summary: rpm-ostree backend for gnome-software
Requires: %{name}%{?_isa} = %{version}-%{release}
@ -118,6 +106,7 @@ This package includes the rpm-ostree backend.
%build
%meson \
-Dsnap=false \
-Dmalcontent=false \
-Dgudev=true \
-Dpackagekit=true \
-Dexternal_appstream=false \
@ -171,13 +160,12 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_desktop-menu-path.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_dummy.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_epiphany.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fedora_langpacks.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fedora-langpacks.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fedora-pkgdb-collections.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_flatpak.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fwupd.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_generic-updates.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-blacklist.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-featured.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-popular.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_icons.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_key-colors-metadata.so
@ -220,12 +208,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_includedir}/gnome-software/*.h
%{_datadir}/gtk-doc/html/gnome-software
%files editor
%{_bindir}/gnome-software-editor
%{_datadir}/applications/org.gnome.Software.Editor.desktop
%{_mandir}/man1/gnome-software-editor.1*
%changelog
* Mon Nov 25 2019 Richard Hughes <rhughes@redhat.com> - 3.35.2-1
- Update to 3.35.2.
* Fri Oct 18 2019 Kalev Lember <klember@redhat.com> - 3.34.1-6
- Backport patches to fix a crash in gs_flatpak_get_installation (#1762689)

View File

@ -1 +1 @@
SHA512 (gnome-software-3.34.1.tar.xz) = 04bb9a587d90950966518c964256d29dfecd567ebb4996ad012c0bb3ed262bcd745a37887b4949ffbb4bac06f9fa3e19d342d14c6a82ef8762f5727fbf79468a
SHA512 (gnome-software-3.35.2.tar.xz) = 3bb351fc7f4c81ac30d1de60f3509e6adf86275ab7c83d5046d8f8c4dd45bae5497caf41d051afde5764cc29bd37c04142f3a94be6af2f5a2d7993f5c02e54a8