From d1c7555cb2ad3cbda7d67b5bd5b226c48bb21dee Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 3 May 2021 09:38:10 +0200 Subject: [PATCH 01/10] Update to 40.1 --- .gitignore | 120 +------------------------------------------- gnome-software.spec | 7 ++- sources | 2 +- 3 files changed, 7 insertions(+), 122 deletions(-) diff --git a/.gitignore b/.gitignore index 3aae75a..b4345b1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,119 +1 @@ -/gnome-software-0.1.tar.xz -/gnome-software-3.9.1.tar.xz -/gnome-software-3.9.2.tar.xz -/gnome-software-3.9.3.tar.xz -/fedora-20.xml.gz -/fedora-20-icons.tar.gz -/gnome-software-3.10.0.tar.xz -/gnome-software-3.11.1.tar.xz -/fedora-20-codecs.xml -/web-apps.xml -/gnome-software-3.11.2.tar.xz -/gnome-software-3.11.3.tar.xz -/gnome-software-3.11.4.tar.xz -/fedora-rawhide-icons.tar.gz -/fedora-rawhide.xml.gz -/gnome-software-3.11.5.tar.xz -/gnome-software-3.11.90.tar.xz -/gnome-software-3.11.91.tar.xz -/gnome-software-3.11.92.tar.xz -/gnome-software-3.12.0.tar.xz -/gnome-software-3.12.1.tar.xz -/gnome-software-3.13.1.tar.xz -/fedora-21-icons.tar.gz -/fedora-21.xml.gz -/gnome-software-3.13.2.tar.xz -/gnome-software-3.13.3-7491627.tar.xz -/gnome-software-3.13.3.tar.xz -/gnome-software-3.13.4.tar.xz -/gnome-software-3.13.5-5c89189.tar.xz -/gnome-software-3.13.90.tar.xz -/gnome-software-3.13.91.tar.xz -/gnome-software-3.13.92.tar.xz -/gnome-software-3.14.0.tar.xz -/gnome-software-3.14.1.tar.xz -/gnome-software-3.14.2.tar.xz -/gnome-software-3.15.2.tar.xz -/gnome-software-3.15.4.tar.xz -/gnome-software-3.15.90.tar.xz -/gnome-software-3.15.91.tar.xz -/gnome-software-3.15.92.tar.xz -/gnome-software-3.16.0.tar.xz -/gnome-software-3.16.1.tar.xz -/gnome-software-3.16.2.tar.xz -/gnome-software-3.17.1.tar.xz -/gnome-software-3.17.2.tar.xz -/gnome-software-3.17.3.tar.xz -/gnome-software-3.17.90.tar.xz -/gnome-software-3.17.91.tar.xz -/gnome-software-3.17.92.tar.xz -/gnome-software-3.18.0.tar.xz -/gnome-software-3.18.1.tar.xz -/gnome-software-3.18.2.tar.xz -/gnome-software-3.18.3.tar.xz -/gnome-software-3.19.4.tar.xz -/gnome-software-3.19.90.tar.xz -/gnome-software-3.19.91.tar.xz -/gnome-software-3.19.92.tar.xz -/gnome-software-3.20.0.tar.xz -/gnome-software-3.20.1.tar.xz -/gnome-software-3.20.2.tar.xz -/gnome-software-3.21.1.tar.xz -/gnome-software-3.21.2.tar.xz -/gnome-software-3.21.4.tar.xz -/gnome-software-3.21.90.tar.xz -/gnome-software-3.21.91.tar.xz -/gnome-software-3.21.92.tar.xz -/gnome-software-3.22.0.tar.xz -/gnome-software-3.22.1.tar.xz -/gnome-software-3.22.2.tar.xz -/gnome-software-3.23.2.tar.xz -/gnome-software-3.23.3.tar.xz -/gnome-software-3.23.90.tar.xz -/gnome-software-3.23.91.tar.xz -/gnome-software-3.23.92.tar.xz -/gnome-software-3.24.0.tar.xz -/gnome-software-3.24.1.tar.xz -/gnome-software-3.24.2.tar.xz -/gnome-software-3.24.3.tar.xz -/gnome-software-3.25.3.tar.xz -/gnome-software-3.25.4.tar.xz -/gnome-software-3.25.90.tar.xz -/gnome-software-3.25.91.tar.xz -/gnome-software-3.26.0.tar.xz -/gnome-software-3.26.1.tar.xz -/gnome-software-3.26.2.tar.xz -/gnome-software-3.27.2.tar.xz -/gnome-software-3.27.3.tar.xz -/gnome-software-3.27.4.tar.xz -/gnome-software-3.27.90.tar.xz -/gnome-software-3.27.92.tar.xz -/gnome-software-3.28.0.tar.xz -/gnome-software-3.28.1.tar.xz -/gnome-software-3.29.1.tar.xz -/gnome-software-3.29.92.tar.xz -/gnome-software-3.30.0.tar.xz -/gnome-software-3.30.1.tar.xz -/gnome-software-3.30.2.tar.xz -/gnome-software-3.31.1.tar.xz -/gnome-software-3.31.2.tar.xz -/gnome-software-3.31.90.tar.xz -/gnome-software-3.31.92.tar.xz -/gnome-software-3.32.0.tar.xz -/gnome-software-3.32.1.tar.xz -/gnome-software-3.32.2.tar.xz -/gnome-software-3.32.3.tar.xz -/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 -/gnome-software-3.35.91.tar.xz -/gnome-software-3.35.92.tar.xz -/gnome-software-3.36.0.tar.xz -/gnome-software-3.36.1.tar.xz -/gnome-software-3.37.92.tar.xz -/gnome-software-3.38.0.tar.xz -/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 +/gnome-software-*.tar.xz diff --git a/gnome-software.spec b/gnome-software.spec index 7f439c2..afd1597 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,8 +11,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 40.0 -Release: 2%{?dist} +Version: 40.1 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -200,6 +200,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon May 03 2021 Milan Crha - 40.1-1 +- Update to 40.1 + * Fri Mar 26 2021 Kalev Lember - 40.0-2 - Rebuild to fix sysprof-capture symbols leaking into libraries consuming it diff --git a/sources b/sources index a8dc968..2342259 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-40.0.tar.xz) = 052c520ab25af4257bb978aaa9e1c7a555f8d24dbd782d9f12f3c3def22e65588d3c76d16e4b3dc26f034a762c2ee3e773026b158d468e9e169369dc3d156a2a +SHA512 (gnome-software-40.1.tar.xz) = ae805d01896d761dd82a21dedbfafba7e8ffd2d98e99da4548d846aafdf07f9a26dfa2e083ac2dda576f8b1db05bb3f26642d3a6558da86921450049870767fe From af44d7cf1619a577fd6d1c1ec7e821667a10acbe Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 3 May 2021 12:48:24 +0200 Subject: [PATCH 02/10] Add patch for crash under gs_details_page_refresh_all() (i#1227) --- ...sh-under-gs_details_page_refresh_all.patch | 312 ++++++++++++++++++ gnome-software.spec | 7 +- 2 files changed, 318 insertions(+), 1 deletion(-) create mode 100644 001-i1227-crash-under-gs_details_page_refresh_all.patch diff --git a/001-i1227-crash-under-gs_details_page_refresh_all.patch b/001-i1227-crash-under-gs_details_page_refresh_all.patch new file mode 100644 index 0000000..4fcaaf5 --- /dev/null +++ b/001-i1227-crash-under-gs_details_page_refresh_all.patch @@ -0,0 +1,312 @@ +From 64a0eaa4a1b1402a0e5926d0c274cfa962589149 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 29 Apr 2021 15:49:01 +0100 +Subject: [PATCH 1/6] gs-app: Drop requirement for set_version_history() to be + non-NULL + +Signed-off-by: Philip Withnall +--- + lib/gs-app.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/lib/gs-app.c b/lib/gs-app.c +index e8eb9d48b..2db3e6251 100644 +--- a/lib/gs-app.c ++++ b/lib/gs-app.c +@@ -5365,7 +5365,6 @@ gs_app_set_version_history (GsApp *app, GPtrArray *version_history) + GsAppPrivate *priv = gs_app_get_instance_private (app); + g_autoptr(GMutexLocker) locker = NULL; + g_return_if_fail (GS_IS_APP (app)); +- g_return_if_fail (version_history != NULL); + locker = g_mutex_locker_new (&priv->mutex); + _g_set_ptr_array (&priv->version_history, version_history); + } +-- +GitLab + + +From 3229d3d66347c5cd317d12db9b456f8eaefad678 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 29 Apr 2021 15:45:33 +0100 +Subject: [PATCH 2/6] gs-app: Clarify documentation/annotations for version + history + +This clarifies the documentation for the existing behaviour. + +Signed-off-by: Philip Withnall + +Helps: #1227 +--- + lib/gs-app.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/lib/gs-app.c b/lib/gs-app.c +index 2db3e6251..5ef7e9942 100644 +--- a/lib/gs-app.c ++++ b/lib/gs-app.c +@@ -129,7 +129,7 @@ typedef struct + GsPluginAction pending_action; + GsAppPermissions permissions; + gboolean is_update_downloaded; +- GPtrArray *version_history; /* (element-type AsRelease) */ ++ GPtrArray *version_history; /* (element-type AsRelease) (nullable) (owned) */ + } GsAppPrivate; + + enum { +@@ -5337,7 +5337,8 @@ gs_app_set_update_permissions (GsApp *app, GsAppPermissions update_permissions) + * Gets the list of past releases for an application (including the latest + * one). + * +- * Returns: (element-type AsRelease) (transfer none): a list ++ * Returns: (element-type AsRelease) (transfer none) (nullable): a list, or ++ * %NULL if the version history is not known + * + * Since: 40 + **/ +@@ -5352,8 +5353,8 @@ gs_app_get_version_history (GsApp *app) + /** + * gs_app_set_version_history: + * @app: a #GsApp +- * @version_history: (element-type AsRelease): a set of entries representing +- * the version history ++ * @version_history: (element-type AsRelease) (nullable): a set of entries ++ * representing the version history, or %NULL if none are known + * + * Set the list of past releases for an application (including the latest one). + * +-- +GitLab + + +From 7910276e5116db3f51dc5b088f3eb567e2472f17 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 29 Apr 2021 15:46:39 +0100 +Subject: [PATCH 3/6] gs-app: Squash empty arrays to NULL in + gs_app_set_version_history() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This should save a little bit of memory. I have not updated the +documentation to guarantee this behaviour because it’s a little unusual; +simpler to allow callers to continue handling `NULL` and empty array +cases explicitly. + +Signed-off-by: Philip Withnall + +Helps: #1227 +--- + lib/gs-app.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/gs-app.c b/lib/gs-app.c +index 5ef7e9942..6c6bb6fe6 100644 +--- a/lib/gs-app.c ++++ b/lib/gs-app.c +@@ -5366,6 +5366,10 @@ gs_app_set_version_history (GsApp *app, GPtrArray *version_history) + GsAppPrivate *priv = gs_app_get_instance_private (app); + g_autoptr(GMutexLocker) locker = NULL; + g_return_if_fail (GS_IS_APP (app)); ++ ++ if (version_history != NULL && version_history->len == 0) ++ version_history = NULL; ++ + locker = g_mutex_locker_new (&priv->mutex); + _g_set_ptr_array (&priv->version_history, version_history); + } +-- +GitLab + + +From ff5d189202788ec84bf690b8ddb184240ae68e2d Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 29 Apr 2021 15:47:40 +0100 +Subject: [PATCH 4/6] gs-app: Fix generic setters to handle NULL arrays +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The previous implementation of the functions didn’t handle `NULL` +arrays. + +Signed-off-by: Philip Withnall + +Helps: #1227 +--- + lib/gs-app.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/lib/gs-app.c b/lib/gs-app.c +index 6c6bb6fe6..efbc4756a 100644 +--- a/lib/gs-app.c ++++ b/lib/gs-app.c +@@ -184,9 +184,11 @@ _g_set_ptr_array (GPtrArray **array_ptr, GPtrArray *new_array) + { + if (*array_ptr == new_array) + return FALSE; ++ if (new_array != NULL) ++ g_ptr_array_ref (new_array); + if (*array_ptr != NULL) + g_ptr_array_unref (*array_ptr); +- *array_ptr = g_ptr_array_ref (new_array); ++ *array_ptr = new_array; + return TRUE; + } + +@@ -195,9 +197,11 @@ _g_set_array (GArray **array_ptr, GArray *new_array) + { + if (*array_ptr == new_array) + return FALSE; ++ if (new_array != NULL) ++ g_array_ref (new_array); + if (*array_ptr != NULL) + g_array_unref (*array_ptr); +- *array_ptr = g_array_ref (new_array); ++ *array_ptr = new_array; + return TRUE; + } + +-- +GitLab + + +From a9597a3a9c04e5dd4571c24dba54abd95eb9fa92 Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 29 Apr 2021 15:50:36 +0100 +Subject: [PATCH 5/6] gs-details-page: Explicitly handle empty version history + array +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This makes the code a bit more robust. + +It’s not actually needed, as the current behaviour of +gs_app_get_version_history() is to either return `NULL` or a non-empty +array — never an empty array. However, guaranteeing that behaviour would +defy precedent in other APIs, and be confusing to document, so just +handle the case of empty arrays in the callers anyway, to make their +expected behaviour clear. + +Signed-off-by: Philip Withnall +--- + src/gs-app-version-history-dialog.c | 2 +- + src/gs-details-page.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/gs-app-version-history-dialog.c b/src/gs-app-version-history-dialog.c +index 94d55cc0c..5262596a2 100644 +--- a/src/gs-app-version-history-dialog.c ++++ b/src/gs-app-version-history-dialog.c +@@ -34,7 +34,7 @@ populate_version_history (GsAppVersionHistoryDialog *dialog, + gs_container_remove_all (GTK_CONTAINER (dialog->listbox)); + + version_history = gs_app_get_version_history (app); +- if (version_history == NULL) { ++ if (version_history == NULL || version_history->len == 0) { + GtkWidget *row; + row = gs_app_version_history_row_new (); + gs_app_version_history_row_set_info (GS_APP_VERSION_HISTORY_ROW (row), +diff --git a/src/gs-details-page.c b/src/gs-details-page.c +index cf9b4b393..22b38e929 100644 +--- a/src/gs-details-page.c ++++ b/src/gs-details-page.c +@@ -1305,7 +1305,7 @@ gs_details_page_refresh_all (GsDetailsPage *self) + + /* set version history */ + version_history = gs_app_get_version_history (self->app); +- if (version_history == NULL) { ++ if (version_history == NULL || version_history->len == 0) { + const char *version = gs_app_get_version (self->app); + if (version == NULL || *version == '\0') + gtk_widget_set_visible (self->box_version_history_frame, FALSE); +-- +GitLab + + +From bb1cc3a52fca7e98b053f4c9751df28bfd505dec Mon Sep 17 00:00:00 2001 +From: Philip Withnall +Date: Thu, 29 Apr 2021 15:52:43 +0100 +Subject: [PATCH 6/6] gs-app: Change gs_app_get_version_history() to return a + ref +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It seems the version history can be updated from a separate thread while +refreshing. This can cause crashes if the UI thread queries the version +history, then it’s updated from another thread, then the UI thread +starts iterating over the `GPtrArray` it queried — which has since been +freed. + +Fix that by returning a strong ref to the `GPtrArray`, and doing so +under the app’s mutex. + +Signed-off-by: Philip Withnall + +Fixes: #1227 +--- + lib/gs-app.c | 11 ++++++++--- + src/gs-app-version-history-dialog.c | 2 +- + src/gs-details-page.c | 2 +- + 3 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/lib/gs-app.c b/lib/gs-app.c +index efbc4756a..f165df562 100644 +--- a/lib/gs-app.c ++++ b/lib/gs-app.c +@@ -5341,17 +5341,22 @@ gs_app_set_update_permissions (GsApp *app, GsAppPermissions update_permissions) + * Gets the list of past releases for an application (including the latest + * one). + * +- * Returns: (element-type AsRelease) (transfer none) (nullable): a list, or ++ * Returns: (element-type AsRelease) (transfer container) (nullable): a list, or + * %NULL if the version history is not known + * +- * Since: 40 ++ * Since: 41 + **/ + GPtrArray * + gs_app_get_version_history (GsApp *app) + { + GsAppPrivate *priv = gs_app_get_instance_private (app); ++ g_autoptr(GMutexLocker) locker = NULL; + g_return_val_if_fail (GS_IS_APP (app), NULL); +- return priv->version_history; ++ ++ locker = g_mutex_locker_new (&priv->mutex); ++ if (priv->version_history == NULL) ++ return NULL; ++ return g_ptr_array_ref (priv->version_history); + } + + /** +diff --git a/src/gs-app-version-history-dialog.c b/src/gs-app-version-history-dialog.c +index 5262596a2..8b61b7c2b 100644 +--- a/src/gs-app-version-history-dialog.c ++++ b/src/gs-app-version-history-dialog.c +@@ -28,7 +28,7 @@ static void + populate_version_history (GsAppVersionHistoryDialog *dialog, + GsApp *app) + { +- GPtrArray *version_history; ++ g_autoptr(GPtrArray) version_history = NULL; + + /* remove previous */ + gs_container_remove_all (GTK_CONTAINER (dialog->listbox)); +diff --git a/src/gs-details-page.c b/src/gs-details-page.c +index 22b38e929..c985f3b06 100644 +--- a/src/gs-details-page.c ++++ b/src/gs-details-page.c +@@ -1191,7 +1191,7 @@ gs_details_page_refresh_all (GsDetailsPage *self) + guint64 user_integration_bf; + gboolean show_support_box = FALSE; + g_autofree gchar *origin = NULL; +- GPtrArray *version_history; ++ g_autoptr(GPtrArray) version_history = NULL; + guint icon_size; + + if (!gs_page_is_active (GS_PAGE (self))) +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index afd1597..59003bf 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,13 +12,15 @@ Name: gnome-software Version: 40.1 -Release: 1%{?dist} +Release: 2%{?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 +Patch01: 001-i1227-crash-under-gs_details_page_refresh_all.patch + BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc BuildRequires: gettext @@ -200,6 +202,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon May 03 2021 Milan Crha - 40.1-2 +- Add patch for crash under gs_details_page_refresh_all() (i#1227) + * Mon May 03 2021 Milan Crha - 40.1-1 - Update to 40.1 From ca51f70901cd24044f540fd5d4bd9f19cb158840 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 4 Jun 2021 10:32:18 +0200 Subject: [PATCH 03/10] Update to 40.2 --- 0001-crash-with-broken-theme.patch | 48 +++ ...sh-under-gs_details_page_refresh_all.patch | 312 ------------------ gnome-software.spec | 9 +- sources | 2 +- 4 files changed, 55 insertions(+), 316 deletions(-) create mode 100644 0001-crash-with-broken-theme.patch delete mode 100644 001-i1227-crash-under-gs_details_page_refresh_all.patch diff --git a/0001-crash-with-broken-theme.patch b/0001-crash-with-broken-theme.patch new file mode 100644 index 0000000..fd37e80 --- /dev/null +++ b/0001-crash-with-broken-theme.patch @@ -0,0 +1,48 @@ +From 3a644c151f27f439c36170f0958fd21cf1cc54d0 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Thu, 3 Jun 2021 08:33:53 +0200 +Subject: [PATCH] gs-feature-tile: Do not abort when the theme is broken + +Just print a warning when the theme doesn't provide 'theme_fg_color' and +fallback to black color. + +Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1228 +--- + src/gs-feature-tile.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/src/gs-feature-tile.c b/src/gs-feature-tile.c +index 1c85083eb..158af1e56 100644 +--- a/src/gs-feature-tile.c ++++ b/src/gs-feature-tile.c +@@ -268,7 +268,6 @@ gs_feature_tile_refresh (GsAppTile *self) + if (key_colors != tile->key_colors_cache) { + g_autoptr(GArray) colors = NULL; + GdkRGBA fg_rgba; +- gboolean fg_rgba_valid; + GsHSBC fg_hsbc; + + /* Look up the foreground colour for the feature tile, +@@ -283,8 +282,17 @@ gs_feature_tile_refresh (GsAppTile *self) + * @min_abs_contrast contrast with the foreground, so + * that the text is legible. + */ +- fg_rgba_valid = gtk_style_context_lookup_color (context, "theme_fg_color", &fg_rgba); +- g_assert (fg_rgba_valid); ++ if (!gtk_style_context_lookup_color (context, "theme_fg_color", &fg_rgba)) { ++ static gboolean i_know = FALSE; ++ if (!i_know) { ++ i_know = TRUE; ++ g_warning ("The theme doesn't provide 'theme_fg_color', fallbacking to black"); ++ } ++ fg_rgba.red = 0.0; ++ fg_rgba.green = 0.0; ++ fg_rgba.blue = 0.0; ++ fg_rgba.alpha = 1.0; ++ } + + gtk_rgb_to_hsv (fg_rgba.red, fg_rgba.green, fg_rgba.blue, + &fg_hsbc.hue, &fg_hsbc.saturation, &fg_hsbc.brightness); +-- +GitLab + diff --git a/001-i1227-crash-under-gs_details_page_refresh_all.patch b/001-i1227-crash-under-gs_details_page_refresh_all.patch deleted file mode 100644 index 4fcaaf5..0000000 --- a/001-i1227-crash-under-gs_details_page_refresh_all.patch +++ /dev/null @@ -1,312 +0,0 @@ -From 64a0eaa4a1b1402a0e5926d0c274cfa962589149 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 29 Apr 2021 15:49:01 +0100 -Subject: [PATCH 1/6] gs-app: Drop requirement for set_version_history() to be - non-NULL - -Signed-off-by: Philip Withnall ---- - lib/gs-app.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/lib/gs-app.c b/lib/gs-app.c -index e8eb9d48b..2db3e6251 100644 ---- a/lib/gs-app.c -+++ b/lib/gs-app.c -@@ -5365,7 +5365,6 @@ gs_app_set_version_history (GsApp *app, GPtrArray *version_history) - GsAppPrivate *priv = gs_app_get_instance_private (app); - g_autoptr(GMutexLocker) locker = NULL; - g_return_if_fail (GS_IS_APP (app)); -- g_return_if_fail (version_history != NULL); - locker = g_mutex_locker_new (&priv->mutex); - _g_set_ptr_array (&priv->version_history, version_history); - } --- -GitLab - - -From 3229d3d66347c5cd317d12db9b456f8eaefad678 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 29 Apr 2021 15:45:33 +0100 -Subject: [PATCH 2/6] gs-app: Clarify documentation/annotations for version - history - -This clarifies the documentation for the existing behaviour. - -Signed-off-by: Philip Withnall - -Helps: #1227 ---- - lib/gs-app.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/lib/gs-app.c b/lib/gs-app.c -index 2db3e6251..5ef7e9942 100644 ---- a/lib/gs-app.c -+++ b/lib/gs-app.c -@@ -129,7 +129,7 @@ typedef struct - GsPluginAction pending_action; - GsAppPermissions permissions; - gboolean is_update_downloaded; -- GPtrArray *version_history; /* (element-type AsRelease) */ -+ GPtrArray *version_history; /* (element-type AsRelease) (nullable) (owned) */ - } GsAppPrivate; - - enum { -@@ -5337,7 +5337,8 @@ gs_app_set_update_permissions (GsApp *app, GsAppPermissions update_permissions) - * Gets the list of past releases for an application (including the latest - * one). - * -- * Returns: (element-type AsRelease) (transfer none): a list -+ * Returns: (element-type AsRelease) (transfer none) (nullable): a list, or -+ * %NULL if the version history is not known - * - * Since: 40 - **/ -@@ -5352,8 +5353,8 @@ gs_app_get_version_history (GsApp *app) - /** - * gs_app_set_version_history: - * @app: a #GsApp -- * @version_history: (element-type AsRelease): a set of entries representing -- * the version history -+ * @version_history: (element-type AsRelease) (nullable): a set of entries -+ * representing the version history, or %NULL if none are known - * - * Set the list of past releases for an application (including the latest one). - * --- -GitLab - - -From 7910276e5116db3f51dc5b088f3eb567e2472f17 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 29 Apr 2021 15:46:39 +0100 -Subject: [PATCH 3/6] gs-app: Squash empty arrays to NULL in - gs_app_set_version_history() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This should save a little bit of memory. I have not updated the -documentation to guarantee this behaviour because it’s a little unusual; -simpler to allow callers to continue handling `NULL` and empty array -cases explicitly. - -Signed-off-by: Philip Withnall - -Helps: #1227 ---- - lib/gs-app.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/lib/gs-app.c b/lib/gs-app.c -index 5ef7e9942..6c6bb6fe6 100644 ---- a/lib/gs-app.c -+++ b/lib/gs-app.c -@@ -5366,6 +5366,10 @@ gs_app_set_version_history (GsApp *app, GPtrArray *version_history) - GsAppPrivate *priv = gs_app_get_instance_private (app); - g_autoptr(GMutexLocker) locker = NULL; - g_return_if_fail (GS_IS_APP (app)); -+ -+ if (version_history != NULL && version_history->len == 0) -+ version_history = NULL; -+ - locker = g_mutex_locker_new (&priv->mutex); - _g_set_ptr_array (&priv->version_history, version_history); - } --- -GitLab - - -From ff5d189202788ec84bf690b8ddb184240ae68e2d Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 29 Apr 2021 15:47:40 +0100 -Subject: [PATCH 4/6] gs-app: Fix generic setters to handle NULL arrays -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The previous implementation of the functions didn’t handle `NULL` -arrays. - -Signed-off-by: Philip Withnall - -Helps: #1227 ---- - lib/gs-app.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/lib/gs-app.c b/lib/gs-app.c -index 6c6bb6fe6..efbc4756a 100644 ---- a/lib/gs-app.c -+++ b/lib/gs-app.c -@@ -184,9 +184,11 @@ _g_set_ptr_array (GPtrArray **array_ptr, GPtrArray *new_array) - { - if (*array_ptr == new_array) - return FALSE; -+ if (new_array != NULL) -+ g_ptr_array_ref (new_array); - if (*array_ptr != NULL) - g_ptr_array_unref (*array_ptr); -- *array_ptr = g_ptr_array_ref (new_array); -+ *array_ptr = new_array; - return TRUE; - } - -@@ -195,9 +197,11 @@ _g_set_array (GArray **array_ptr, GArray *new_array) - { - if (*array_ptr == new_array) - return FALSE; -+ if (new_array != NULL) -+ g_array_ref (new_array); - if (*array_ptr != NULL) - g_array_unref (*array_ptr); -- *array_ptr = g_array_ref (new_array); -+ *array_ptr = new_array; - return TRUE; - } - --- -GitLab - - -From a9597a3a9c04e5dd4571c24dba54abd95eb9fa92 Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 29 Apr 2021 15:50:36 +0100 -Subject: [PATCH 5/6] gs-details-page: Explicitly handle empty version history - array -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This makes the code a bit more robust. - -It’s not actually needed, as the current behaviour of -gs_app_get_version_history() is to either return `NULL` or a non-empty -array — never an empty array. However, guaranteeing that behaviour would -defy precedent in other APIs, and be confusing to document, so just -handle the case of empty arrays in the callers anyway, to make their -expected behaviour clear. - -Signed-off-by: Philip Withnall ---- - src/gs-app-version-history-dialog.c | 2 +- - src/gs-details-page.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/gs-app-version-history-dialog.c b/src/gs-app-version-history-dialog.c -index 94d55cc0c..5262596a2 100644 ---- a/src/gs-app-version-history-dialog.c -+++ b/src/gs-app-version-history-dialog.c -@@ -34,7 +34,7 @@ populate_version_history (GsAppVersionHistoryDialog *dialog, - gs_container_remove_all (GTK_CONTAINER (dialog->listbox)); - - version_history = gs_app_get_version_history (app); -- if (version_history == NULL) { -+ if (version_history == NULL || version_history->len == 0) { - GtkWidget *row; - row = gs_app_version_history_row_new (); - gs_app_version_history_row_set_info (GS_APP_VERSION_HISTORY_ROW (row), -diff --git a/src/gs-details-page.c b/src/gs-details-page.c -index cf9b4b393..22b38e929 100644 ---- a/src/gs-details-page.c -+++ b/src/gs-details-page.c -@@ -1305,7 +1305,7 @@ gs_details_page_refresh_all (GsDetailsPage *self) - - /* set version history */ - version_history = gs_app_get_version_history (self->app); -- if (version_history == NULL) { -+ if (version_history == NULL || version_history->len == 0) { - const char *version = gs_app_get_version (self->app); - if (version == NULL || *version == '\0') - gtk_widget_set_visible (self->box_version_history_frame, FALSE); --- -GitLab - - -From bb1cc3a52fca7e98b053f4c9751df28bfd505dec Mon Sep 17 00:00:00 2001 -From: Philip Withnall -Date: Thu, 29 Apr 2021 15:52:43 +0100 -Subject: [PATCH 6/6] gs-app: Change gs_app_get_version_history() to return a - ref -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It seems the version history can be updated from a separate thread while -refreshing. This can cause crashes if the UI thread queries the version -history, then it’s updated from another thread, then the UI thread -starts iterating over the `GPtrArray` it queried — which has since been -freed. - -Fix that by returning a strong ref to the `GPtrArray`, and doing so -under the app’s mutex. - -Signed-off-by: Philip Withnall - -Fixes: #1227 ---- - lib/gs-app.c | 11 ++++++++--- - src/gs-app-version-history-dialog.c | 2 +- - src/gs-details-page.c | 2 +- - 3 files changed, 10 insertions(+), 5 deletions(-) - -diff --git a/lib/gs-app.c b/lib/gs-app.c -index efbc4756a..f165df562 100644 ---- a/lib/gs-app.c -+++ b/lib/gs-app.c -@@ -5341,17 +5341,22 @@ gs_app_set_update_permissions (GsApp *app, GsAppPermissions update_permissions) - * Gets the list of past releases for an application (including the latest - * one). - * -- * Returns: (element-type AsRelease) (transfer none) (nullable): a list, or -+ * Returns: (element-type AsRelease) (transfer container) (nullable): a list, or - * %NULL if the version history is not known - * -- * Since: 40 -+ * Since: 41 - **/ - GPtrArray * - gs_app_get_version_history (GsApp *app) - { - GsAppPrivate *priv = gs_app_get_instance_private (app); -+ g_autoptr(GMutexLocker) locker = NULL; - g_return_val_if_fail (GS_IS_APP (app), NULL); -- return priv->version_history; -+ -+ locker = g_mutex_locker_new (&priv->mutex); -+ if (priv->version_history == NULL) -+ return NULL; -+ return g_ptr_array_ref (priv->version_history); - } - - /** -diff --git a/src/gs-app-version-history-dialog.c b/src/gs-app-version-history-dialog.c -index 5262596a2..8b61b7c2b 100644 ---- a/src/gs-app-version-history-dialog.c -+++ b/src/gs-app-version-history-dialog.c -@@ -28,7 +28,7 @@ static void - populate_version_history (GsAppVersionHistoryDialog *dialog, - GsApp *app) - { -- GPtrArray *version_history; -+ g_autoptr(GPtrArray) version_history = NULL; - - /* remove previous */ - gs_container_remove_all (GTK_CONTAINER (dialog->listbox)); -diff --git a/src/gs-details-page.c b/src/gs-details-page.c -index 22b38e929..c985f3b06 100644 ---- a/src/gs-details-page.c -+++ b/src/gs-details-page.c -@@ -1191,7 +1191,7 @@ gs_details_page_refresh_all (GsDetailsPage *self) - guint64 user_integration_bf; - gboolean show_support_box = FALSE; - g_autofree gchar *origin = NULL; -- GPtrArray *version_history; -+ g_autoptr(GPtrArray) version_history = NULL; - guint icon_size; - - if (!gs_page_is_active (GS_PAGE (self))) --- -GitLab - diff --git a/gnome-software.spec b/gnome-software.spec index 59003bf..347fd29 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,15 +11,15 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 40.1 -Release: 2%{?dist} +Version: 40.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/40/%{name}-%{tarball_version}.tar.xz -Patch01: 001-i1227-crash-under-gs_details_page_refresh_all.patch +Patch01: 0001-crash-with-broken-theme.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -202,6 +202,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Fri Jun 04 2021 Milan Crha - 40.2-1 +- Update to 40.2 + * Mon May 03 2021 Milan Crha - 40.1-2 - Add patch for crash under gs_details_page_refresh_all() (i#1227) diff --git a/sources b/sources index 2342259..e57a641 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-40.1.tar.xz) = ae805d01896d761dd82a21dedbfafba7e8ffd2d98e99da4548d846aafdf07f9a26dfa2e083ac2dda576f8b1db05bb3f26642d3a6558da86921450049870767fe +SHA512 (gnome-software-40.2.tar.xz) = ded29be4c59130a4016d43d3e18a67c8cf3fec4761a7a57c067bf075a6f1da5b7726000172e2303ba129b3b5cb8bd22ebfad8fbf0e3248285a4864350f3a1679 From 04329a2f9b3aea42cf4e4b350fa8fb1808ad4700 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 23 Jun 2021 09:15:51 +0200 Subject: [PATCH 04/10] Add patch to automatically install application updates (i#1248) --- ...atically_install_application_updates.patch | 89 +++++++++++++++++++ gnome-software.spec | 6 +- 2 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 0002-gs-update-monitor_automatically_install_application_updates.patch diff --git a/0002-gs-update-monitor_automatically_install_application_updates.patch b/0002-gs-update-monitor_automatically_install_application_updates.patch new file mode 100644 index 0000000..aa98d80 --- /dev/null +++ b/0002-gs-update-monitor_automatically_install_application_updates.patch @@ -0,0 +1,89 @@ +From 69ba099e9d49979a6dacdcd879d98f72744d298a Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Tue, 11 May 2021 11:13:52 +0200 +Subject: [PATCH] gs-update-monitor: Automatically install application updates + +The application updates, so called online updates, should be installed immediately +when found, when the user has enabled automatic updates. + +Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1248 +--- + src/gs-update-monitor.c | 47 +++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 45 insertions(+), 2 deletions(-) + +diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c +index b3209185d..234c7de95 100644 +--- a/src/gs-update-monitor.c ++++ b/src/gs-update-monitor.c +@@ -475,6 +475,7 @@ get_updates_finished_cb (GObject *object, GAsyncResult *res, gpointer data) + guint64 security_timestamp_old = 0; + g_autoptr(GError) error = NULL; + g_autoptr(GsAppList) apps = NULL; ++ gboolean should_download; + + /* get result */ + apps = gs_plugin_loader_job_process_finish (GS_PLUGIN_LOADER (object), res, &error); +@@ -509,7 +510,9 @@ get_updates_finished_cb (GObject *object, GAsyncResult *res, gpointer data) + + g_debug ("got %u updates", gs_app_list_length (apps)); + +- if (should_download_updates (monitor) && ++ should_download = should_download_updates (monitor); ++ ++ if (should_download && + (security_timestamp_old != security_timestamp || + check_if_timestamp_more_than_days_ago (monitor, "install-timestamp", 14))) { + g_autoptr(GsPluginJob) plugin_job = NULL; +@@ -528,8 +531,48 @@ get_updates_finished_cb (GObject *object, GAsyncResult *res, gpointer data) + download_finished_cb, + monitor); + } else { +- notify_about_pending_updates (monitor, apps); ++ g_autoptr(GsAppList) update_online = NULL; ++ g_autoptr(GsAppList) update_offline = NULL; ++ GsAppList *notify_list; ++ ++ update_online = gs_app_list_new (); ++ update_offline = gs_app_list_new (); ++ for (guint i = 0; i < gs_app_list_length (apps); i++) { ++ GsApp *app = gs_app_list_index (apps, i); ++ if (_should_auto_update (app)) { ++ g_debug ("download for auto-update %s", gs_app_get_unique_id (app)); ++ gs_app_list_add (update_online, app); ++ } else { ++ gs_app_list_add (update_offline, app); ++ } ++ } ++ ++ g_debug ("Received %u apps to update, %u are online and %u offline updates; will%s download online updates", ++ gs_app_list_length (apps), ++ gs_app_list_length (update_online), ++ gs_app_list_length (update_offline), ++ should_download ? "" : " not"); ++ ++ if (should_download && gs_app_list_length (update_online) > 0) { ++ g_autoptr(GsPluginJob) plugin_job = NULL; ++ ++ plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_DOWNLOAD, ++ "list", update_online, ++ NULL); ++ g_debug ("Getting %u online updates", gs_app_list_length (update_online)); ++ gs_plugin_loader_job_process_async (monitor->plugin_loader, ++ plugin_job, ++ monitor->cancellable, ++ download_finished_cb, ++ monitor); ++ } ++ ++ if (should_download) ++ notify_list = update_offline; ++ else ++ notify_list = apps; + ++ notify_about_pending_updates (monitor, notify_list); + reset_update_notification_timestamp (monitor); + } + } +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index 347fd29..9b1865d 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,7 +12,7 @@ Name: gnome-software Version: 40.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -20,6 +20,7 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/40/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0002-gs-update-monitor_automatically_install_application_updates.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -202,6 +203,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Wed Jun 23 2021 Milan Crha - 40.2-2 +- Add patch to automatically install application updates (i#1248) + * Fri Jun 04 2021 Milan Crha - 40.2-1 - Update to 40.2 From 266c44639087ce806fa43470b78a408ba9a194d0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 12 Jul 2021 11:52:52 +0200 Subject: [PATCH 05/10] Update to 40.3 --- ...atically_install_application_updates.patch | 89 ------------------- gnome-software.spec | 8 +- sources | 2 +- 3 files changed, 6 insertions(+), 93 deletions(-) delete mode 100644 0002-gs-update-monitor_automatically_install_application_updates.patch diff --git a/0002-gs-update-monitor_automatically_install_application_updates.patch b/0002-gs-update-monitor_automatically_install_application_updates.patch deleted file mode 100644 index aa98d80..0000000 --- a/0002-gs-update-monitor_automatically_install_application_updates.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 69ba099e9d49979a6dacdcd879d98f72744d298a Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Tue, 11 May 2021 11:13:52 +0200 -Subject: [PATCH] gs-update-monitor: Automatically install application updates - -The application updates, so called online updates, should be installed immediately -when found, when the user has enabled automatic updates. - -Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1248 ---- - src/gs-update-monitor.c | 47 +++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 45 insertions(+), 2 deletions(-) - -diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c -index b3209185d..234c7de95 100644 ---- a/src/gs-update-monitor.c -+++ b/src/gs-update-monitor.c -@@ -475,6 +475,7 @@ get_updates_finished_cb (GObject *object, GAsyncResult *res, gpointer data) - guint64 security_timestamp_old = 0; - g_autoptr(GError) error = NULL; - g_autoptr(GsAppList) apps = NULL; -+ gboolean should_download; - - /* get result */ - apps = gs_plugin_loader_job_process_finish (GS_PLUGIN_LOADER (object), res, &error); -@@ -509,7 +510,9 @@ get_updates_finished_cb (GObject *object, GAsyncResult *res, gpointer data) - - g_debug ("got %u updates", gs_app_list_length (apps)); - -- if (should_download_updates (monitor) && -+ should_download = should_download_updates (monitor); -+ -+ if (should_download && - (security_timestamp_old != security_timestamp || - check_if_timestamp_more_than_days_ago (monitor, "install-timestamp", 14))) { - g_autoptr(GsPluginJob) plugin_job = NULL; -@@ -528,8 +531,48 @@ get_updates_finished_cb (GObject *object, GAsyncResult *res, gpointer data) - download_finished_cb, - monitor); - } else { -- notify_about_pending_updates (monitor, apps); -+ g_autoptr(GsAppList) update_online = NULL; -+ g_autoptr(GsAppList) update_offline = NULL; -+ GsAppList *notify_list; -+ -+ update_online = gs_app_list_new (); -+ update_offline = gs_app_list_new (); -+ for (guint i = 0; i < gs_app_list_length (apps); i++) { -+ GsApp *app = gs_app_list_index (apps, i); -+ if (_should_auto_update (app)) { -+ g_debug ("download for auto-update %s", gs_app_get_unique_id (app)); -+ gs_app_list_add (update_online, app); -+ } else { -+ gs_app_list_add (update_offline, app); -+ } -+ } -+ -+ g_debug ("Received %u apps to update, %u are online and %u offline updates; will%s download online updates", -+ gs_app_list_length (apps), -+ gs_app_list_length (update_online), -+ gs_app_list_length (update_offline), -+ should_download ? "" : " not"); -+ -+ if (should_download && gs_app_list_length (update_online) > 0) { -+ g_autoptr(GsPluginJob) plugin_job = NULL; -+ -+ plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_DOWNLOAD, -+ "list", update_online, -+ NULL); -+ g_debug ("Getting %u online updates", gs_app_list_length (update_online)); -+ gs_plugin_loader_job_process_async (monitor->plugin_loader, -+ plugin_job, -+ monitor->cancellable, -+ download_finished_cb, -+ monitor); -+ } -+ -+ if (should_download) -+ notify_list = update_offline; -+ else -+ notify_list = apps; - -+ notify_about_pending_updates (monitor, notify_list); - reset_update_notification_timestamp (monitor); - } - } --- -GitLab - diff --git a/gnome-software.spec b/gnome-software.spec index 9b1865d..dd54a25 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,8 +11,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 40.2 -Release: 2%{?dist} +Version: 40.3 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -20,7 +20,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/40/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 0002-gs-update-monitor_automatically_install_application_updates.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -203,6 +202,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon Jul 12 2021 Milan Crha - 40.3-1 +- Update to 40.3 + * Wed Jun 23 2021 Milan Crha - 40.2-2 - Add patch to automatically install application updates (i#1248) diff --git a/sources b/sources index e57a641..028dcb3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-40.2.tar.xz) = ded29be4c59130a4016d43d3e18a67c8cf3fec4761a7a57c067bf075a6f1da5b7726000172e2303ba129b3b5cb8bd22ebfad8fbf0e3248285a4864350f3a1679 +SHA512 (gnome-software-40.3.tar.xz) = 6070f8f59fa9872282a081b6ba4f740616a799cffae43a8a541ebf4e0d7b189710dbdce679b1e5136a3fff5f8da29ec8e1ed9df7289c0a6ed697eb0ad693271f From 20bb6e2ba83355387edb083516b1982930707046 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 12 Jul 2021 18:32:34 +0200 Subject: [PATCH 06/10] Add rpm-ostree patch to hide packages from the search results; Add patch to implement what-provides search in the Flatpak plugin --- ...e-Hide-only-Web-and-Console-applicat.patch | 29 ++++++++ ...t-gs_plugin_add_search_what_provides.patch | 72 +++++++++++++++++++ gnome-software.spec | 8 ++- 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 0002-Revert-rpm-ostree-Hide-only-Web-and-Console-applicat.patch create mode 100644 0003-flatpak-Implement-gs_plugin_add_search_what_provides.patch diff --git a/0002-Revert-rpm-ostree-Hide-only-Web-and-Console-applicat.patch b/0002-Revert-rpm-ostree-Hide-only-Web-and-Console-applicat.patch new file mode 100644 index 0000000..bcec2fd --- /dev/null +++ b/0002-Revert-rpm-ostree-Hide-only-Web-and-Console-applicat.patch @@ -0,0 +1,29 @@ +From 7667bb916408b61c4630837d4483be266bf6a799 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Mon, 12 Jul 2021 14:54:26 +0200 +Subject: [PATCH 1/2] Revert "rpm-ostree: Hide only Web and Console + applications from the search" + +This reverts commit ef67695cb2e20f0cb1cfcd8965173226dd755b09. + +The correct fix for https://gitlab.gnome.org/GNOME/gnome-software/-/issues/613 +is https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1210 +--- + plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +index 6b1a1351..541b59f8 100644 +--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c ++++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +@@ -1598,6 +1598,7 @@ resolve_available_packages_app (GsPlugin *plugin, + /* set hide-from-search quirk for available apps we don't want to show */ + if (!gs_app_is_installed (app)) { + switch (gs_app_get_kind (app)) { ++ case AS_COMPONENT_KIND_DESKTOP_APP: + case AS_COMPONENT_KIND_WEB_APP: + case AS_COMPONENT_KIND_CONSOLE_APP: + gs_app_add_quirk (app, GS_APP_QUIRK_HIDE_FROM_SEARCH); +-- +2.31.1 + diff --git a/0003-flatpak-Implement-gs_plugin_add_search_what_provides.patch b/0003-flatpak-Implement-gs_plugin_add_search_what_provides.patch new file mode 100644 index 0000000..d0b0e8d --- /dev/null +++ b/0003-flatpak-Implement-gs_plugin_add_search_what_provides.patch @@ -0,0 +1,72 @@ +From f148ef7e91716bf6cac069eb61f0ecb370507dc9 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Thu, 15 Apr 2021 18:49:08 +0200 +Subject: [PATCH 2/2] flatpak: Implement gs_plugin_add_search_what_provides() + +Let the Flatpak plugin search for "what provides" as well. It's the same +search, due to the appstream search terms, and it gets more results to +pick from. + +Related https://gitlab.gnome.org/GNOME/gnome-software/-/issues/613 +Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1210 +--- + plugins/flatpak/gs-plugin-flatpak.c | 33 +++++++++++++++++++++++------ + 1 file changed, 27 insertions(+), 6 deletions(-) + +diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c +index 364bc27d..808e1a56 100644 +--- a/plugins/flatpak/gs-plugin-flatpak.c ++++ b/plugins/flatpak/gs-plugin-flatpak.c +@@ -1444,12 +1444,12 @@ gs_plugin_file_to_app (GsPlugin *plugin, + return TRUE; + } + +-gboolean +-gs_plugin_add_search (GsPlugin *plugin, +- gchar **values, +- GsAppList *list, +- GCancellable *cancellable, +- GError **error) ++static gboolean ++gs_plugin_flatpak_do_search (GsPlugin *plugin, ++ gchar **values, ++ GsAppList *list, ++ GCancellable *cancellable, ++ GError **error) + { + GsPluginData *priv = gs_plugin_get_data (plugin); + for (guint i = 0; i < priv->flatpaks->len; i++) { +@@ -1459,9 +1459,30 @@ gs_plugin_add_search (GsPlugin *plugin, + return FALSE; + } + } ++ + return TRUE; + } + ++gboolean ++gs_plugin_add_search (GsPlugin *plugin, ++ gchar **values, ++ GsAppList *list, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ return gs_plugin_flatpak_do_search (plugin, values, list, cancellable, error); ++} ++ ++gboolean ++gs_plugin_add_search_what_provides (GsPlugin *plugin, ++ gchar **search, ++ GsAppList *list, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ return gs_plugin_flatpak_do_search (plugin, search, list, cancellable, error); ++} ++ + gboolean + gs_plugin_add_categories (GsPlugin *plugin, + GPtrArray *list, +-- +2.31.1 + diff --git a/gnome-software.spec b/gnome-software.spec index dd54a25..36737c2 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,7 +12,7 @@ Name: gnome-software Version: 40.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -20,6 +20,8 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/40/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0002-Revert-rpm-ostree-Hide-only-Web-and-Console-applicat.patch +Patch03: 0003-flatpak-Implement-gs_plugin_add_search_what_provides.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -202,6 +204,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Mon Jul 12 2021 Milan Crha - 40.3-2 +- Add rpm-ostree patch to hide packages from the search results +- Add patch to implement what-provides search in the Flatpak plugin + * Mon Jul 12 2021 Milan Crha - 40.3-1 - Update to 40.3 From b6551cfdd2ced4b4532021b738478c7966f03e5c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 13 Aug 2021 18:23:55 +0200 Subject: [PATCH 07/10] Update to 40.4 --- ...e-Hide-only-Web-and-Console-applicat.patch | 29 -------- ...t-gs_plugin_add_search_what_provides.patch | 72 ------------------- gnome-software.spec | 9 +-- sources | 2 +- 4 files changed, 6 insertions(+), 106 deletions(-) delete mode 100644 0002-Revert-rpm-ostree-Hide-only-Web-and-Console-applicat.patch delete mode 100644 0003-flatpak-Implement-gs_plugin_add_search_what_provides.patch diff --git a/0002-Revert-rpm-ostree-Hide-only-Web-and-Console-applicat.patch b/0002-Revert-rpm-ostree-Hide-only-Web-and-Console-applicat.patch deleted file mode 100644 index bcec2fd..0000000 --- a/0002-Revert-rpm-ostree-Hide-only-Web-and-Console-applicat.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 7667bb916408b61c4630837d4483be266bf6a799 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Mon, 12 Jul 2021 14:54:26 +0200 -Subject: [PATCH 1/2] Revert "rpm-ostree: Hide only Web and Console - applications from the search" - -This reverts commit ef67695cb2e20f0cb1cfcd8965173226dd755b09. - -The correct fix for https://gitlab.gnome.org/GNOME/gnome-software/-/issues/613 -is https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1210 ---- - plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -index 6b1a1351..541b59f8 100644 ---- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -@@ -1598,6 +1598,7 @@ resolve_available_packages_app (GsPlugin *plugin, - /* set hide-from-search quirk for available apps we don't want to show */ - if (!gs_app_is_installed (app)) { - switch (gs_app_get_kind (app)) { -+ case AS_COMPONENT_KIND_DESKTOP_APP: - case AS_COMPONENT_KIND_WEB_APP: - case AS_COMPONENT_KIND_CONSOLE_APP: - gs_app_add_quirk (app, GS_APP_QUIRK_HIDE_FROM_SEARCH); --- -2.31.1 - diff --git a/0003-flatpak-Implement-gs_plugin_add_search_what_provides.patch b/0003-flatpak-Implement-gs_plugin_add_search_what_provides.patch deleted file mode 100644 index d0b0e8d..0000000 --- a/0003-flatpak-Implement-gs_plugin_add_search_what_provides.patch +++ /dev/null @@ -1,72 +0,0 @@ -From f148ef7e91716bf6cac069eb61f0ecb370507dc9 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Thu, 15 Apr 2021 18:49:08 +0200 -Subject: [PATCH 2/2] flatpak: Implement gs_plugin_add_search_what_provides() - -Let the Flatpak plugin search for "what provides" as well. It's the same -search, due to the appstream search terms, and it gets more results to -pick from. - -Related https://gitlab.gnome.org/GNOME/gnome-software/-/issues/613 -Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1210 ---- - plugins/flatpak/gs-plugin-flatpak.c | 33 +++++++++++++++++++++++------ - 1 file changed, 27 insertions(+), 6 deletions(-) - -diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c -index 364bc27d..808e1a56 100644 ---- a/plugins/flatpak/gs-plugin-flatpak.c -+++ b/plugins/flatpak/gs-plugin-flatpak.c -@@ -1444,12 +1444,12 @@ gs_plugin_file_to_app (GsPlugin *plugin, - return TRUE; - } - --gboolean --gs_plugin_add_search (GsPlugin *plugin, -- gchar **values, -- GsAppList *list, -- GCancellable *cancellable, -- GError **error) -+static gboolean -+gs_plugin_flatpak_do_search (GsPlugin *plugin, -+ gchar **values, -+ GsAppList *list, -+ GCancellable *cancellable, -+ GError **error) - { - GsPluginData *priv = gs_plugin_get_data (plugin); - for (guint i = 0; i < priv->flatpaks->len; i++) { -@@ -1459,9 +1459,30 @@ gs_plugin_add_search (GsPlugin *plugin, - return FALSE; - } - } -+ - return TRUE; - } - -+gboolean -+gs_plugin_add_search (GsPlugin *plugin, -+ gchar **values, -+ GsAppList *list, -+ GCancellable *cancellable, -+ GError **error) -+{ -+ return gs_plugin_flatpak_do_search (plugin, values, list, cancellable, error); -+} -+ -+gboolean -+gs_plugin_add_search_what_provides (GsPlugin *plugin, -+ gchar **search, -+ GsAppList *list, -+ GCancellable *cancellable, -+ GError **error) -+{ -+ return gs_plugin_flatpak_do_search (plugin, search, list, cancellable, error); -+} -+ - gboolean - gs_plugin_add_categories (GsPlugin *plugin, - GPtrArray *list, --- -2.31.1 - diff --git a/gnome-software.spec b/gnome-software.spec index 36737c2..1f80c33 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -11,8 +11,8 @@ %global tarball_version %%(echo %{version} | tr '~' '.') Name: gnome-software -Version: 40.3 -Release: 2%{?dist} +Version: 40.4 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -20,8 +20,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/40/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 0002-Revert-rpm-ostree-Hide-only-Web-and-Console-applicat.patch -Patch03: 0003-flatpak-Implement-gs_plugin_add_search_what_provides.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -204,6 +202,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Fri Aug 13 2021 Milan Crha - 40.4-1 +- Update to 40.4 + * Mon Jul 12 2021 Milan Crha - 40.3-2 - Add rpm-ostree patch to hide packages from the search results - Add patch to implement what-provides search in the Flatpak plugin diff --git a/sources b/sources index 028dcb3..a840cab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-40.3.tar.xz) = 6070f8f59fa9872282a081b6ba4f740616a799cffae43a8a541ebf4e0d7b189710dbdce679b1e5136a3fff5f8da29ec8e1ed9df7289c0a6ed697eb0ad693271f +SHA512 (gnome-software-40.4.tar.xz) = 5ef7ad754cb161ad5e181dc9b189fe57066a92ebbe3a5871412b638896a02d6e9114e5fdce91e3225af990a580a1f534b936008ff3a2d50a59154406f055a3e7 From e413338a1b37ee2b23d8e111f74ac916c246efa8 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 1 Sep 2021 12:03:33 +0200 Subject: [PATCH 08/10] Add artwork for F35 upgrades; Add patch to recognize 'Fedora Linux' upgrades --- .gitignore | 1 + 0001-fedora-linux-distro-name.patch | 14 ++++++++++++++ gnome-software.spec | 14 +++++++++++++- sources | 1 + 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 0001-fedora-linux-distro-name.patch diff --git a/.gitignore b/.gitignore index b4345b1..faebe3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /gnome-software-*.tar.xz +/f35.png diff --git a/0001-fedora-linux-distro-name.patch b/0001-fedora-linux-distro-name.patch new file mode 100644 index 0000000..e8fb659 --- /dev/null +++ b/0001-fedora-linux-distro-name.patch @@ -0,0 +1,14 @@ +diff -up gnome-software-3.38.2/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c.fedora-linux-distro-name gnome-software-3.38.2/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c +--- gnome-software-3.38.2/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c.fedora-linux-distro-name 2021-09-01 11:16:33.570032158 +0200 ++++ gnome-software-3.38.2/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c 2021-09-01 11:18:08.091022774 +0200 +@@ -319,7 +319,9 @@ _is_valid_upgrade (GsPlugin *plugin, Pkg + GsPluginData *priv = gs_plugin_get_data (plugin); + + /* only interested in upgrades to the same distro */ +- if (g_strcmp0 (item->name, priv->os_name) != 0) ++ if (g_strcmp0 (item->name, priv->os_name) != 0 && ++ /* Fedora 35+ is renamed to "Fedora Linux" and there is no "id" in the collections/ yet */ ++ g_strcmp0 (item->name, "Fedora Linux") != 0) + return FALSE; + + /* only interested in newer versions, but not more than N+2 */ diff --git a/gnome-software.spec b/gnome-software.spec index 1f80c33..0633c1a 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,14 +12,17 @@ Name: gnome-software Version: 40.4 -Release: 1%{?dist} +Release: 2%{?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 +# Resized and cropped /usr/share/backgrounds/f35/default/f35.png from f35-backgrounds-base +Source1: f35.png Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0001-fedora-linux-distro-name.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -129,6 +132,10 @@ cat >> %{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.software-fedora.gschem official-repos = [ 'anaconda', 'fedora', 'fedora-debuginfo', 'fedora-source', 'koji-override-0', 'koji-override-1', 'rawhide', 'rawhide-debuginfo', 'rawhide-source', 'updates', 'updates-debuginfo', 'updates-source', 'updates-testing', 'updates-testing-debuginfo', 'updates-testing-source', 'fedora-modular', 'fedora-modular-debuginfo', 'fedora-modular-source', 'rawhide-modular', 'rawhide-modular-debuginfo', 'rawhide-modular-source' ] FOE +# Install upgrade background image +mkdir -p %{buildroot}%{_datadir}/gnome-software/backgrounds +cp -a %{SOURCE1} %{buildroot}%{_datadir}/gnome-software/backgrounds/ + %find_lang %name --with-gnome %check @@ -142,6 +149,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/applications/org.gnome.Software.desktop %dir %{_datadir}/gnome-software %{_datadir}/gnome-software/*.png +%{_datadir}/gnome-software/backgrounds/ %{_mandir}/man1/gnome-software.1.gz %{_datadir}/icons/hicolor/*/apps/org.gnome.Software.svg %{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Software-symbolic.svg @@ -202,6 +210,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Wed Sep 01 2021 Milan Crha - 40.4-2 +- Add artwork for F35 upgrades +- Add patch to recognize 'Fedora Linux' upgrades + * Fri Aug 13 2021 Milan Crha - 40.4-1 - Update to 40.4 diff --git a/sources b/sources index a840cab..b796fa4 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (gnome-software-40.4.tar.xz) = 5ef7ad754cb161ad5e181dc9b189fe57066a92ebbe3a5871412b638896a02d6e9114e5fdce91e3225af990a580a1f534b936008ff3a2d50a59154406f055a3e7 +SHA512 (f35.png) = 4fe009fbbbb2477394446a23676220599c4bb5ce6612f1b24a1cdaeace03db3d7cba9035c0e4f02c8a8ae8ddd7064441a7cba6e58bc95c3f749218265d09ece2 From 3619bdee2a48595c28f6d625c54eb2d6cdce0b66 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 15 Sep 2021 09:45:45 +0200 Subject: [PATCH 09/10] Resolves: #2003365 (packagekit: Ensure PkClient::interactive flag being set) --- ...e-PkClient-interactive-flag-being-se.patch | 100 ++++++++++++++++++ gnome-software.spec | 6 +- 2 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 0002-packagekit-Ensure-PkClient-interactive-flag-being-se.patch diff --git a/0002-packagekit-Ensure-PkClient-interactive-flag-being-se.patch b/0002-packagekit-Ensure-PkClient-interactive-flag-being-se.patch new file mode 100644 index 0000000..fd20c95 --- /dev/null +++ b/0002-packagekit-Ensure-PkClient-interactive-flag-being-se.patch @@ -0,0 +1,100 @@ +diff -up gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit.c.3 gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit.c +--- gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit.c.3 2021-08-13 18:05:48.056419100 +0200 ++++ gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit.c 2021-09-13 15:17:14.099810008 +0200 +@@ -335,6 +335,7 @@ gs_plugin_app_install (GsPlugin *plugin, + /* actually install the package */ + gs_packagekit_helper_add_app (helper, app); + g_mutex_lock (&priv->task_mutex); ++ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results = pk_task_install_packages_sync (priv->task, + package_ids, + cancellable, +@@ -412,6 +413,7 @@ gs_plugin_app_install (GsPlugin *plugin, + } + gs_packagekit_helper_add_app (helper, app); + g_mutex_lock (&priv->task_mutex); ++ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results = pk_task_install_packages_sync (priv->task, + (gchar **) array_package_ids->pdata, + cancellable, +@@ -441,6 +443,7 @@ gs_plugin_app_install (GsPlugin *plugin, + gs_app_set_state (app, GS_APP_STATE_INSTALLING); + gs_packagekit_helper_add_app (helper, app); + g_mutex_lock (&priv->task_mutex); ++ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results = pk_task_install_files_sync (priv->task, + package_ids, + cancellable, +@@ -571,6 +574,7 @@ gs_plugin_app_remove (GsPlugin *plugin, + gs_app_set_state (app, GS_APP_STATE_REMOVING); + gs_packagekit_helper_add_app (helper, app); + g_mutex_lock (&priv->task_mutex); ++ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results = pk_task_remove_packages_sync (priv->task, + package_ids, + TRUE, GS_PACKAGEKIT_AUTOREMOVE, +diff -up gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-local.c.3 gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-local.c +--- gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-local.c.3 2021-09-13 15:19:39.444893063 +0200 ++++ gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-local.c 2021-09-13 15:19:43.456895355 +0200 +@@ -59,6 +59,7 @@ gs_plugin_packagekit_refresh_guess_app_i + files = g_strsplit (filename, "\t", -1); + gs_packagekit_helper_add_app (helper, app); + g_mutex_lock (&priv->task_mutex); ++ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results = pk_client_get_files_local (PK_CLIENT (priv->task), + files, + cancellable, +diff -up gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-refine.c.3 gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-refine.c +--- gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-refine.c.3 2021-09-13 15:20:12.020911680 +0200 ++++ gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-refine.c 2021-09-13 15:20:46.033931117 +0200 +@@ -123,6 +123,7 @@ gs_plugin_packagekit_resolve_packages_wi + + /* resolve them all at once */ + g_mutex_lock (&priv->client_mutex); ++ pk_client_set_interactive (priv->client, gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results = pk_client_resolve (priv->client, + filter, + (gchar **) package_ids->pdata, +@@ -214,6 +215,7 @@ gs_plugin_packagekit_refine_from_desktop + to_array[0] = filename; + gs_packagekit_helper_add_app (helper, app); + g_mutex_lock (&priv->client_mutex); ++ pk_client_set_interactive (priv->client, gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results = pk_client_search_files (priv->client, + pk_bitfield_from_enums (PK_FILTER_ENUM_INSTALLED, -1), + (gchar **) to_array, +@@ -297,6 +299,7 @@ gs_plugin_packagekit_refine_updatedetail + + /* get any update details */ + g_mutex_lock (&priv->client_mutex); ++ pk_client_set_interactive (priv->client, gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results = pk_client_get_update_detail (priv->client, + (gchar **) package_ids, + cancellable, +@@ -363,6 +366,7 @@ gs_plugin_packagekit_refine_details2 (Gs + + /* get any details */ + g_mutex_lock (&priv->client_mutex); ++ pk_client_set_interactive (priv->client, gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results = pk_client_get_details (priv->client, + (gchar **) package_ids->pdata, + cancellable, +@@ -415,6 +419,7 @@ gs_plugin_packagekit_refine_update_urgen + /* get the list of updates */ + filter = pk_bitfield_value (PK_FILTER_ENUM_NONE); + g_mutex_lock (&priv->client_mutex); ++ pk_client_set_interactive (priv->client, gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results = pk_client_get_updates (priv->client, + filter, + cancellable, +diff -up gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-refresh.c.3 gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-refresh.c +--- gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-refresh.c.3 2021-08-13 18:05:48.055419200 +0200 ++++ gnome-software-40.4/plugins/packagekit/gs-plugin-packagekit-refresh.c 2021-09-13 15:17:14.099810008 +0200 +@@ -94,6 +94,7 @@ _download_only (GsPlugin *plugin, GsAppL + * we end up downloading a different set of packages than what was + * shown to the user */ + pk_client_set_cache_age (PK_CLIENT (priv->task), G_MAXUINT); ++ pk_client_set_interactive (PK_CLIENT (priv->task), gs_plugin_has_flags (plugin, GS_PLUGIN_FLAGS_INTERACTIVE)); + results2 = pk_task_update_packages_sync (priv->task, + package_ids, + cancellable, diff --git a/gnome-software.spec b/gnome-software.spec index 0633c1a..3c38023 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,7 +12,7 @@ Name: gnome-software Version: 40.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -23,6 +23,7 @@ Source1: f35.png Patch01: 0001-crash-with-broken-theme.patch Patch02: 0001-fedora-linux-distro-name.patch +Patch03: 0002-packagekit-Ensure-PkClient-interactive-flag-being-se.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -210,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Wed Sep 15 2021 Milan Crha - 40.4-3 +- Resolves: #2003365 (packagekit: Ensure PkClient::interactive flag being set) + * Wed Sep 01 2021 Milan Crha - 40.4-2 - Add artwork for F35 upgrades - Add patch to recognize 'Fedora Linux' upgrades From 510329ca374be6f287db23653c42846b4076fcf7 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 1 Oct 2021 10:08:02 +0200 Subject: [PATCH 10/10] Update artwork for F35 upgrades --- gnome-software.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 3c38023..59d530e 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -12,7 +12,7 @@ Name: gnome-software Version: 40.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -211,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Fri Oct 01 2021 Milan Crha - 40.4-4 +- Update artwork for F35 upgrades + * Wed Sep 15 2021 Milan Crha - 40.4-3 - Resolves: #2003365 (packagekit: Ensure PkClient::interactive flag being set) diff --git a/sources b/sources index b796fa4..05694cc 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (gnome-software-40.4.tar.xz) = 5ef7ad754cb161ad5e181dc9b189fe57066a92ebbe3a5871412b638896a02d6e9114e5fdce91e3225af990a580a1f534b936008ff3a2d50a59154406f055a3e7 -SHA512 (f35.png) = 4fe009fbbbb2477394446a23676220599c4bb5ce6612f1b24a1cdaeace03db3d7cba9035c0e4f02c8a8ae8ddd7064441a7cba6e58bc95c3f749218265d09ece2 +SHA512 (f35.png) = 371d301263015ce9edd2605aa893788632226e9e4c66b10b5c9f509ed47d5c945dbb51ee8c2bf01dbf56c1f9180227bef1b8566347ae6e02245453118c4d47a8