From f7afad3f86e9b27c1532fb1e52c55eb27b680532 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 15 Aug 2022 13:37:14 +0200 Subject: [PATCH 01/15] Add patch for install-queue (RH bug #2118265) --- 0002-install-queue.patch | 112 +++++++++++++++++++++++++++++++++++++++ gnome-software.spec | 6 ++- 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 0002-install-queue.patch diff --git a/0002-install-queue.patch b/0002-install-queue.patch new file mode 100644 index 0000000..698d1d0 --- /dev/null +++ b/0002-install-queue.patch @@ -0,0 +1,112 @@ +From d9e28b8cb59c805f2df8954637f2056467ff1be3 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 10 Aug 2022 13:41:46 +0200 +Subject: [PATCH 1/2] packagekit: Allow install of apps in the "queued for + install" state + +Treat the "queued for install" state the same as if "available/updatable" +state is set. Without that trying to install anything using PackageKit +plugin leads to an "Unsupported" error. +--- + plugins/packagekit/gs-plugin-packagekit.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c +index 58d627276..85f941648 100644 +--- a/plugins/packagekit/gs-plugin-packagekit.c ++++ b/plugins/packagekit/gs-plugin-packagekit.c +@@ -519,6 +519,7 @@ gs_plugin_app_install (GsPlugin *plugin, + switch (gs_app_get_state (app)) { + case GS_APP_STATE_AVAILABLE: + case GS_APP_STATE_UPDATABLE: ++ case GS_APP_STATE_QUEUED_FOR_INSTALL: + source_ids = gs_app_get_source_ids (app); + if (source_ids->len == 0) { + g_set_error_literal (error, +-- +GitLab + + +From 71ce53a21373670f32b936194d46ab073df77a63 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Wed, 10 Aug 2022 14:24:51 +0200 +Subject: [PATCH 2/2] gs-plugin-loader: Add not removed from the install-queue + file + +The plugin loader has two places, which maintain the pending queue, +but they do not agree on the update of the install-queue file. Let +the functions be re-used, to avoid the problem. +--- + lib/gs-plugin-loader.c | 27 +++++++++++++++++---------- + 1 file changed, 17 insertions(+), 10 deletions(-) + +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index 073008d55..e3f48666a 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -88,6 +88,7 @@ struct _GsPluginLoader + + static void gs_plugin_loader_monitor_network (GsPluginLoader *plugin_loader); + static void add_app_to_install_queue (GsPluginLoader *plugin_loader, GsApp *app); ++static gboolean remove_app_from_install_queue (GsPluginLoader *plugin_loader, GsApp *app); + static void gs_plugin_loader_process_in_thread_pool_cb (gpointer data, gpointer user_data); + static void gs_plugin_loader_status_changed_cb (GsPlugin *plugin, + GsApp *app, +@@ -1078,17 +1079,22 @@ gs_plugin_loader_pending_apps_add (GsPluginLoader *plugin_loader, + GsPluginLoaderHelper *helper) + { + GsAppList *list = gs_plugin_job_get_list (helper->plugin_job); +- g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&plugin_loader->pending_apps_mutex); +- +- if (plugin_loader->pending_apps == NULL) +- plugin_loader->pending_apps = gs_app_list_new (); + + g_assert (gs_app_list_length (list) > 0); + for (guint i = 0; i < gs_app_list_length (list); i++) { + GsApp *app = gs_app_list_index (list, i); +- gs_app_list_add (plugin_loader->pending_apps, app); +- /* make sure the progress is properly initialized */ +- gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN); ++ switch (gs_plugin_job_get_action (helper->plugin_job)) { ++ case GS_PLUGIN_ACTION_INSTALL: ++ add_app_to_install_queue (plugin_loader, app); ++ /* make sure the progress is properly initialized */ ++ gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN); ++ break; ++ case GS_PLUGIN_ACTION_REMOVE: ++ remove_app_from_install_queue (plugin_loader, app); ++ break; ++ default: ++ break; ++ } + } + g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader)); + } +@@ -1098,13 +1104,11 @@ gs_plugin_loader_pending_apps_remove (GsPluginLoader *plugin_loader, + GsPluginLoaderHelper *helper) + { + GsAppList *list = gs_plugin_job_get_list (helper->plugin_job); +- g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&plugin_loader->pending_apps_mutex); + + g_assert (gs_app_list_length (list) > 0); + for (guint i = 0; i < gs_app_list_length (list); i++) { + GsApp *app = gs_app_list_index (list, i); +- if (plugin_loader->pending_apps != NULL) +- gs_app_list_remove (plugin_loader->pending_apps, app); ++ remove_app_from_install_queue (plugin_loader, app); + + /* check the app is not still in an action helper */ + switch (gs_app_get_state (app)) { +@@ -1272,6 +1276,9 @@ remove_app_from_install_queue (GsPluginLoader *plugin_loader, GsApp *app) + g_mutex_unlock (&plugin_loader->pending_apps_mutex); + + if (ret) { ++ if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) ++ gs_app_set_state (app, GS_APP_STATE_UNKNOWN); ++ + id = g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader)); + g_source_set_name_by_id (id, "[gnome-software] emit_pending_apps_idle"); + save_install_queue (plugin_loader); +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index 59d9ebe..e141c89 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 43.beta -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -26,6 +26,7 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0002-install-queue.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -212,6 +213,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Mon Aug 15 2022 Milan Crha - 43.beta-2 +- Add patch for install-queue + * Fri Aug 05 2022 Milan Crha - 43.beta-1 - Update to 43.beta From b9716a4ef70ab8bad6b2ad02df3bb17ce004a9e5 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 17 Aug 2022 15:52:58 +0200 Subject: [PATCH 02/15] Resolves: #2119089 (No enough apps to show for the "Editor's Choice" section) --- gnome-software.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index e141c89..cd0dec2 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 43.beta -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -130,9 +130,6 @@ This package includes the rpm-ostree backend. # remove unneeded dpkg plugin rm %{buildroot}%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_dpkg.so -# not meant to be installed by the distros -rm %{buildroot}%{_datadir}/swcatalog/xml/org.gnome.Software.Curated.xml - # make the software center load faster desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.desktop \ --set-key=X-AppInstall-Package --set-value=%{name} @@ -191,6 +188,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %dir %{_datadir}/swcatalog %dir %{_datadir}/swcatalog/xml %{_datadir}/swcatalog/xml/gnome-pwa-list-foss.xml +%{_datadir}/swcatalog/xml/org.gnome.Software.Curated.xml %{_datadir}/swcatalog/xml/org.gnome.Software.Featured.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service %{_datadir}/dbus-1/services/org.gnome.Software.service @@ -213,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Wed Aug 17 2022 Milan Crha - 43.beta-3 +- Resolves: #2119089 (No enough apps to show for the "Editor's Choice" section) + * Mon Aug 15 2022 Milan Crha - 43.beta-2 - Add patch for install-queue From 869c9002d622e6711efad7b57b204b806fc892f3 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 18 Aug 2022 07:37:04 +0200 Subject: [PATCH 03/15] Add rpminspect.yaml (settings for the RUNPATH test) --- rpminspect.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 rpminspect.yaml diff --git a/rpminspect.yaml b/rpminspect.yaml new file mode 100644 index 0000000..ef70fcd --- /dev/null +++ b/rpminspect.yaml @@ -0,0 +1,7 @@ +--- +runpath: + allowed_paths: + - /usr/lib/gnome-software + - /usr/lib/rpm-ostree + - /usr/lib64/gnome-software + - /usr/lib64/rpm-ostree From a266972be3ad2757dbdc6aa625b7eb3c401d51c4 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 2 Sep 2022 10:51:15 +0200 Subject: [PATCH 04/15] Update to 43.rc --- 0002-install-queue.patch | 112 --------------------------------------- gnome-software.spec | 13 +++-- sources | 2 +- 3 files changed, 9 insertions(+), 118 deletions(-) delete mode 100644 0002-install-queue.patch diff --git a/0002-install-queue.patch b/0002-install-queue.patch deleted file mode 100644 index 698d1d0..0000000 --- a/0002-install-queue.patch +++ /dev/null @@ -1,112 +0,0 @@ -From d9e28b8cb59c805f2df8954637f2056467ff1be3 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 10 Aug 2022 13:41:46 +0200 -Subject: [PATCH 1/2] packagekit: Allow install of apps in the "queued for - install" state - -Treat the "queued for install" state the same as if "available/updatable" -state is set. Without that trying to install anything using PackageKit -plugin leads to an "Unsupported" error. ---- - plugins/packagekit/gs-plugin-packagekit.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c -index 58d627276..85f941648 100644 ---- a/plugins/packagekit/gs-plugin-packagekit.c -+++ b/plugins/packagekit/gs-plugin-packagekit.c -@@ -519,6 +519,7 @@ gs_plugin_app_install (GsPlugin *plugin, - switch (gs_app_get_state (app)) { - case GS_APP_STATE_AVAILABLE: - case GS_APP_STATE_UPDATABLE: -+ case GS_APP_STATE_QUEUED_FOR_INSTALL: - source_ids = gs_app_get_source_ids (app); - if (source_ids->len == 0) { - g_set_error_literal (error, --- -GitLab - - -From 71ce53a21373670f32b936194d46ab073df77a63 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Wed, 10 Aug 2022 14:24:51 +0200 -Subject: [PATCH 2/2] gs-plugin-loader: Add not removed from the install-queue - file - -The plugin loader has two places, which maintain the pending queue, -but they do not agree on the update of the install-queue file. Let -the functions be re-used, to avoid the problem. ---- - lib/gs-plugin-loader.c | 27 +++++++++++++++++---------- - 1 file changed, 17 insertions(+), 10 deletions(-) - -diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c -index 073008d55..e3f48666a 100644 ---- a/lib/gs-plugin-loader.c -+++ b/lib/gs-plugin-loader.c -@@ -88,6 +88,7 @@ struct _GsPluginLoader - - static void gs_plugin_loader_monitor_network (GsPluginLoader *plugin_loader); - static void add_app_to_install_queue (GsPluginLoader *plugin_loader, GsApp *app); -+static gboolean remove_app_from_install_queue (GsPluginLoader *plugin_loader, GsApp *app); - static void gs_plugin_loader_process_in_thread_pool_cb (gpointer data, gpointer user_data); - static void gs_plugin_loader_status_changed_cb (GsPlugin *plugin, - GsApp *app, -@@ -1078,17 +1079,22 @@ gs_plugin_loader_pending_apps_add (GsPluginLoader *plugin_loader, - GsPluginLoaderHelper *helper) - { - GsAppList *list = gs_plugin_job_get_list (helper->plugin_job); -- g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&plugin_loader->pending_apps_mutex); -- -- if (plugin_loader->pending_apps == NULL) -- plugin_loader->pending_apps = gs_app_list_new (); - - g_assert (gs_app_list_length (list) > 0); - for (guint i = 0; i < gs_app_list_length (list); i++) { - GsApp *app = gs_app_list_index (list, i); -- gs_app_list_add (plugin_loader->pending_apps, app); -- /* make sure the progress is properly initialized */ -- gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN); -+ switch (gs_plugin_job_get_action (helper->plugin_job)) { -+ case GS_PLUGIN_ACTION_INSTALL: -+ add_app_to_install_queue (plugin_loader, app); -+ /* make sure the progress is properly initialized */ -+ gs_app_set_progress (app, GS_APP_PROGRESS_UNKNOWN); -+ break; -+ case GS_PLUGIN_ACTION_REMOVE: -+ remove_app_from_install_queue (plugin_loader, app); -+ break; -+ default: -+ break; -+ } - } - g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader)); - } -@@ -1098,13 +1104,11 @@ gs_plugin_loader_pending_apps_remove (GsPluginLoader *plugin_loader, - GsPluginLoaderHelper *helper) - { - GsAppList *list = gs_plugin_job_get_list (helper->plugin_job); -- g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&plugin_loader->pending_apps_mutex); - - g_assert (gs_app_list_length (list) > 0); - for (guint i = 0; i < gs_app_list_length (list); i++) { - GsApp *app = gs_app_list_index (list, i); -- if (plugin_loader->pending_apps != NULL) -- gs_app_list_remove (plugin_loader->pending_apps, app); -+ remove_app_from_install_queue (plugin_loader, app); - - /* check the app is not still in an action helper */ - switch (gs_app_get_state (app)) { -@@ -1272,6 +1276,9 @@ remove_app_from_install_queue (GsPluginLoader *plugin_loader, GsApp *app) - g_mutex_unlock (&plugin_loader->pending_apps_mutex); - - if (ret) { -+ if (gs_app_get_state (app) == GS_APP_STATE_QUEUED_FOR_INSTALL) -+ gs_app_set_state (app, GS_APP_STATE_UNKNOWN); -+ - id = g_idle_add (emit_pending_apps_idle, g_object_ref (plugin_loader)); - g_source_set_name_by_id (id, "[gnome-software] emit_pending_apps_idle"); - save_install_queue (plugin_loader); --- -GitLab - diff --git a/gnome-software.spec b/gnome-software.spec index cd0dec2..9545378 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -17,8 +17,8 @@ %global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ Name: gnome-software -Version: 43.beta -Release: 3%{?dist} +Version: 43.rc +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -26,7 +26,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 0002-install-queue.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -56,7 +55,6 @@ BuildRequires: pkgconfig(polkit-gobject-1) BuildRequires: pkgconfig(rpm) BuildRequires: pkgconfig(rpm-ostree-1) BuildRequires: pkgconfig(sysprof-capture-4) -BuildRequires: pkgconfig(valgrind) BuildRequires: pkgconfig(xmlb) >= %{libxmlb_version} Requires: appstream-data @@ -154,7 +152,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %doc AUTHORS README.md %license COPYING %{_bindir}/gnome-software -%{_datadir}/applications/gnome-software-local-file.desktop +%{_datadir}/applications/gnome-software-local-file-flatpak.desktop +%{_datadir}/applications/gnome-software-local-file-fwupd.desktop +%{_datadir}/applications/gnome-software-local-file-packagekit.desktop %{_datadir}/applications/org.gnome.Software.desktop %{_mandir}/man1/gnome-software.1* %{_datadir}/icons/hicolor/*/apps/org.gnome.Software.svg @@ -211,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Fri Sep 02 2022 Milan Crha - 43.rc-1 +- Update to 43.rc + * Wed Aug 17 2022 Milan Crha - 43.beta-3 - Resolves: #2119089 (No enough apps to show for the "Editor's Choice" section) diff --git a/sources b/sources index 27a6c41..edd91e5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-43.beta.tar.xz) = 9dd2d1f3bebf4715dfbe4db636ca068ac53ae4d463d20f02421eb2990edc75e3b29b78436b8539027056042b6dda2ff55e9d6add1c5c9f8693899ce7a80065de +SHA512 (gnome-software-43.rc.tar.xz) = b843e30ad842500cbab19ce32566162961ce50d7ef2e4a9f7cdf969acb2ce074de6928dfa8c3813a1e89fb91868d7fc17daa6e9c36db7c45255e6e8b80552340 From f19bd39d0e3de43e25dd637233fb584ff1f554cb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 13 Sep 2022 09:11:57 +0200 Subject: [PATCH 05/15] Resolves: #2124869 (Cannot install RPM package file) --- 0002-install-rpm-file.patch | 108 ++++++++++++++++++++++++++++++++++++ gnome-software.spec | 6 +- 2 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 0002-install-rpm-file.patch diff --git a/0002-install-rpm-file.patch b/0002-install-rpm-file.patch new file mode 100644 index 0000000..745ceb7 --- /dev/null +++ b/0002-install-rpm-file.patch @@ -0,0 +1,108 @@ +From e706a530aeeba360fd60fa7ccde63a147f1e14d4 Mon Sep 17 00:00:00 2001 +Date: Wed, 7 Sep 2022 16:18:50 +0200 +Subject: [PATCH 1/2] gs-details-page: Filter out alternatives without origin + +When an alternative app has no origin set, it cannot be installed or +even shown in the GUI, thus filter such alternatives out. + +Helps https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1895 +--- + src/gs-details-page.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/gs-details-page.c b/src/gs-details-page.c +index cfe3cc797..d35ee0a98 100644 +--- a/src/gs-details-page.c ++++ b/src/gs-details-page.c +@@ -1637,6 +1637,16 @@ _set_app (GsDetailsPage *self, GsApp *app) + self, 0); + } + ++static gboolean ++gs_details_page_filter_origin (GsApp *app, ++ gpointer user_data) ++{ ++ /* Keep only local apps or those, which have an origin set */ ++ return gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL || ++ gs_app_get_local_file (app) != NULL || ++ gs_app_get_origin (app) != NULL; ++} ++ + /* show the UI and do operations that should not block page load */ + static void + gs_details_page_load_stage2 (GsDetailsPage *self, +@@ -1676,6 +1686,7 @@ gs_details_page_load_stage2 (GsDetailsPage *self, + query = gs_app_query_new ("alternate-of", self->app, + "refine-flags", GS_DETAILS_PAGE_REFINE_FLAGS, + "dedupe-flags", GS_APP_LIST_FILTER_FLAG_NONE, ++ "filter-func", gs_details_page_filter_origin, + "sort-func", gs_utils_app_sort_priority, + NULL); + plugin_job2 = gs_plugin_job_list_apps_new (query, GS_PLUGIN_LIST_APPS_FLAGS_INTERACTIVE); +-- +GitLab + + +From 7962414c7ef62494512a93df5855249debc39415 Mon Sep 17 00:00:00 2001 +Date: Wed, 7 Sep 2022 16:58:34 +0200 +Subject: [PATCH 2/2] gs-details-page: Include local file as an alternative + when not installed + +It's not enough to add the local file to the GsAppList, because it can +contain an app with the same ID, thus the local file app won't be added +to the list. + +Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1895 +--- + src/gs-details-page.c | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/gs-details-page.c b/src/gs-details-page.c +index d35ee0a98..50b80e159 100644 +--- a/src/gs-details-page.c ++++ b/src/gs-details-page.c +@@ -645,6 +645,7 @@ gs_details_page_get_alternates_cb (GObject *source_object, + GtkWidget *select_row = NULL; + GtkWidget *origin_row_by_packaging_format = NULL; + gint origin_row_by_packaging_format_index = 0; ++ guint n_rows = 0; + + self->origin_by_packaging_format = FALSE; + gs_widget_remove_all (self->origin_popover_list_box, (GsRemoveFunc) gtk_list_box_remove); +@@ -699,7 +700,15 @@ gs_details_page_get_alternates_cb (GObject *source_object, + /* add the local file to the list so that we can carry it over when + * switching between alternates */ + if (self->app_local_file != NULL) { +- gs_app_list_add (list, self->app_local_file); ++ if (gs_app_get_state (self->app_local_file) != GS_APP_STATE_INSTALLED) { ++ GtkWidget *row = gs_origin_popover_row_new (self->app_local_file); ++ gtk_widget_show (row); ++ gtk_list_box_append (GTK_LIST_BOX (self->origin_popover_list_box), row); ++ first_row = row; ++ select_row = row; ++ n_rows++; ++ } ++ + /* Do not allow change of the app by the packaging format when it's a local file */ + origin_by_packaging_format = FALSE; + } +@@ -716,6 +725,7 @@ gs_details_page_get_alternates_cb (GObject *source_object, + GsApp *app = gs_app_list_index (list, i); + GtkWidget *row = gs_origin_popover_row_new (app); + gtk_widget_show (row); ++ n_rows++; + if (first_row == NULL) + first_row = row; + if (app == self->app || ( +@@ -766,7 +776,7 @@ gs_details_page_get_alternates_cb (GObject *source_object, + } + + /* Do not show the "selected" check when there's only one app in the list */ +- if (select_row && gs_app_list_length (list) > 1) ++ if (select_row && n_rows > 1) + gs_origin_popover_row_set_selected (GS_ORIGIN_POPOVER_ROW (select_row), TRUE); + else if (select_row) + gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (select_row), FALSE); +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index 9545378..6979b0c 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 43.rc -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -26,6 +26,7 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch +Patch02: 0002-install-rpm-file.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -211,6 +212,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Tue Sep 13 2022 Milan Crha - 43.rc-2 +- Resolves: #2124869 (Cannot install RPM package file) + * Fri Sep 02 2022 Milan Crha - 43.rc-1 - Update to 43.rc From 8de47672c8ad3ac2eda974e8ab9ef657ae62fa43 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 16 Sep 2022 08:39:15 +0200 Subject: [PATCH 06/15] Update to 43.0 --- gnome-software.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 6979b0c..063211e 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -17,8 +17,8 @@ %global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ Name: gnome-software -Version: 43.rc -Release: 2%{?dist} +Version: 43.0 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -212,6 +212,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Fri Sep 16 2022 Milan Crha - 43.0-1 +- Update to 43.0 + * Tue Sep 13 2022 Milan Crha - 43.rc-2 - Resolves: #2124869 (Cannot install RPM package file) diff --git a/sources b/sources index edd91e5..2cc3ac4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-43.rc.tar.xz) = b843e30ad842500cbab19ce32566162961ce50d7ef2e4a9f7cdf969acb2ce074de6928dfa8c3813a1e89fb91868d7fc17daa6e9c36db7c45255e6e8b80552340 +SHA512 (gnome-software-43.0.tar.xz) = bcf64e4d3d847c660fd1c1a2356235569560bc315fb6b0d2e459dfb1bbee7bf97d9a14f7c8ef1129e01241385cd1540d1499f9cc9ad99a996965feb48e698d6a From a63799d564aa7df4c1472d7fe6363bad29a81929 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Tue, 27 Sep 2022 18:53:43 +0200 Subject: [PATCH 07/15] Rebuild to fix sysprof-capture symbols leaking into libraries consuming it --- gnome-software.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnome-software.spec b/gnome-software.spec index 063211e..ffcafcf 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 43.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -212,6 +212,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Tue Sep 27 2022 Kalev Lember - 43.0-2 +- Rebuild to fix sysprof-capture symbols leaking into libraries consuming it + * Fri Sep 16 2022 Milan Crha - 43.0-1 - Update to 43.0 From b0d5dd5afa7b7ca84a624367b6a333533a2cc9a1 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 5 Oct 2022 18:52:53 +0200 Subject: [PATCH 08/15] Resolves: #2132292 (rpm-ostree plugin refuses to update) --- 0003-rpm-ostree-download-size.patch | 38 +++++++++++++++++++++++++++++ gnome-software.spec | 6 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 0003-rpm-ostree-download-size.patch diff --git a/0003-rpm-ostree-download-size.patch b/0003-rpm-ostree-download-size.patch new file mode 100644 index 0000000..e353dd1 --- /dev/null +++ b/0003-rpm-ostree-download-size.patch @@ -0,0 +1,38 @@ +From 823f49dc59eb1a6a00c80084a8ac37782df124fa Mon Sep 17 00:00:00 2001 +Date: Mon, 26 Sep 2022 15:11:25 +0200 +Subject: [PATCH] rpm-ostree: Mark apps as downloaded + +There was a typo in the changes of the gs_app_set_size_download() API, +the `0` meant the app is downloaded, not that the size is unknown. +With this fixed, the Updates page offers to `Restart & Update`, instead +of `Download`, which does nothing, because the rpm-stree plugin +does not implement corresponding GsPlugin function. +--- + plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +index 6984ff95b..1b4f758da 100644 +--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c ++++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +@@ -749,7 +749,7 @@ app_from_modified_pkg_variant (GsPlugin *plugin, GVariant *variant) + gs_app_set_management_plugin (app, plugin); + gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT); + app_set_rpm_ostree_packaging_format (app); +- gs_app_set_size_download (app, GS_SIZE_TYPE_UNKNOWN, 0); ++ gs_app_set_size_download (app, GS_SIZE_TYPE_VALID, 0); + gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC); + gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE); + gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM); +@@ -788,7 +788,7 @@ app_from_single_pkg_variant (GsPlugin *plugin, GVariant *variant, gboolean addit + gs_app_set_management_plugin (app, plugin); + gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT); + app_set_rpm_ostree_packaging_format (app); +- gs_app_set_size_download (app, GS_SIZE_TYPE_UNKNOWN, 0); ++ gs_app_set_size_download (app, GS_SIZE_TYPE_VALID, 0); + gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC); + gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE); + gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM); +-- +GitLab + diff --git a/gnome-software.spec b/gnome-software.spec index ffcafcf..40d50e3 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 43.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -27,6 +27,7 @@ Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-install-rpm-file.patch +Patch03: 0003-rpm-ostree-download-size.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -212,6 +213,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Wed Oct 05 2022 Milan Crha - 43.0-3 +- Resolves: #2132292 (rpm-ostree plugin refuses to update) + * Tue Sep 27 2022 Kalev Lember - 43.0-2 - Rebuild to fix sysprof-capture symbols leaking into libraries consuming it From 7d5bc8727e89f7171c0a4472c2e3bd8eeb52e877 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Mon, 17 Oct 2022 10:40:58 +0200 Subject: [PATCH 09/15] Resolves: #2135289 (RPMs preferred over Flatpak on Silverblue) --- ...et-the-plugin-better-than-rpm-ostree.patch | 28 ++++++++++ ...app-plugin-priority-in-gs_app_compar.patch | 52 +++++++++++++++++++ ...ob-list-apps-Filter-out-invalid-apps.patch | 49 +++++++++++++++++ gnome-software.spec | 9 +++- 4 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 0001-flatpak-Set-the-plugin-better-than-rpm-ostree.patch create mode 100644 0001-gs-app-Use-real-app-plugin-priority-in-gs_app_compar.patch create mode 100644 0001-gs-plugin-job-list-apps-Filter-out-invalid-apps.patch diff --git a/0001-flatpak-Set-the-plugin-better-than-rpm-ostree.patch b/0001-flatpak-Set-the-plugin-better-than-rpm-ostree.patch new file mode 100644 index 0000000..5c9b573 --- /dev/null +++ b/0001-flatpak-Set-the-plugin-better-than-rpm-ostree.patch @@ -0,0 +1,28 @@ +From 604e2e976ee678e7e31e0f9ff60058e9036967fc Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Fri, 14 Oct 2022 09:29:30 +0200 +Subject: [PATCH] flatpak: Set the plugin better than rpm-ostree + +It's already set better than packagekit, thus it's better than rpm-ostree +as well. + +Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1941 +--- + plugins/flatpak/gs-plugin-flatpak.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c +index 8bb612fcd..7c893ef67 100644 +--- a/plugins/flatpak/gs-plugin-flatpak.c ++++ b/plugins/flatpak/gs-plugin-flatpak.c +@@ -96,6 +96,7 @@ gs_plugin_flatpak_init (GsPluginFlatpak *self) + + /* prioritize over packages */ + gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_BETTER_THAN, "packagekit"); ++ gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_BETTER_THAN, "rpm-ostree"); + + /* set name of MetaInfo file */ + gs_plugin_set_appstream_id (plugin, "org.gnome.Software.Plugin.Flatpak"); +-- +2.37.3 + diff --git a/0001-gs-app-Use-real-app-plugin-priority-in-gs_app_compar.patch b/0001-gs-app-Use-real-app-plugin-priority-in-gs_app_compar.patch new file mode 100644 index 0000000..b15420e --- /dev/null +++ b/0001-gs-app-Use-real-app-plugin-priority-in-gs_app_compar.patch @@ -0,0 +1,52 @@ +From 39be84f7e4c903f6973115f809e3a288731e2d11 Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Fri, 14 Oct 2022 09:18:28 +0200 +Subject: [PATCH] gs-app: Use real app/plugin priority in + gs_app_compare_priority() + +As Owen found out and reported in #1940, change in https://gitlab.gnome.org/GNOME/gnome-software/-/commit/e11a60b4a2ddadacbfbb1a8325b1e8daee574138 +did not consider the fact that gs_app_compare_priority() bypasses +the gs_app_get_priority(), thus the plugin priority was not +considered anymore. + +Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1940 +--- + lib/gs-app.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/lib/gs-app.c b/lib/gs-app.c +index d4b3f912a..51215c7e0 100644 +--- a/lib/gs-app.c ++++ b/lib/gs-app.c +@@ -400,14 +400,17 @@ gs_app_compare_priority (GsApp *app1, GsApp *app2) + { + GsAppPrivate *priv1 = gs_app_get_instance_private (app1); + GsAppPrivate *priv2 = gs_app_get_instance_private (app2); ++ guint prio1, prio2; + + g_return_val_if_fail (GS_IS_APP (app1), 0); + g_return_val_if_fail (GS_IS_APP (app2), 0); + + /* prefer prio */ +- if (priv1->priority > priv2->priority) ++ prio1 = gs_app_get_priority (app1); ++ prio2 = gs_app_get_priority (app2); ++ if (prio1 > prio2) + return -1; +- if (priv1->priority < priv2->priority) ++ if (prio1 < prio2) + return 1; + + /* fall back to bundle kind */ +@@ -5143,7 +5146,7 @@ gs_app_get_priority (GsApp *app) + if (priv->priority == 0) { + g_autoptr(GsPlugin) plugin = gs_app_dup_management_plugin (app); + if (plugin != NULL) +- return gs_plugin_get_priority (plugin); ++ priv->priority = gs_plugin_get_priority (plugin); + } + + return priv->priority; +-- +2.37.3 + diff --git a/0001-gs-plugin-job-list-apps-Filter-out-invalid-apps.patch b/0001-gs-plugin-job-list-apps-Filter-out-invalid-apps.patch new file mode 100644 index 0000000..1597f92 --- /dev/null +++ b/0001-gs-plugin-job-list-apps-Filter-out-invalid-apps.patch @@ -0,0 +1,49 @@ +From 79515873a275fff8f3f0713fb232e463358865bf Mon Sep 17 00:00:00 2001 +From: Georges Basile Stavracas Neto +Date: Thu, 29 Sep 2022 10:18:22 -0300 +Subject: [PATCH] gs-plugin-job-list-apps: Filter out invalid apps + +This filtering was lost with 7d54958d4e46e27af2cbdfc7f529611f4709d7fe. + +Filter out invalid apps as it did before. + +Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1932 +--- + lib/gs-plugin-job-list-apps.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/lib/gs-plugin-job-list-apps.c b/lib/gs-plugin-job-list-apps.c +index 811c7c08f..a556387e5 100644 +--- a/lib/gs-plugin-job-list-apps.c ++++ b/lib/gs-plugin-job-list-apps.c +@@ -136,6 +136,19 @@ gs_plugin_job_list_apps_set_property (GObject *object, + } + } + ++static gboolean ++filter_valid_apps (GsApp *app, ++ gpointer user_data) ++{ ++ GsPluginJobListApps *self = GS_PLUGIN_JOB_LIST_APPS (user_data); ++ GsPluginRefineFlags refine_flags = GS_PLUGIN_REFINE_FLAGS_NONE; ++ ++ if (self->query) ++ refine_flags = gs_app_query_get_refine_flags (self->query); ++ ++ return gs_plugin_loader_app_is_valid (app, refine_flags); ++} ++ + static gboolean + app_filter_qt_for_gtk_and_compatible (GsApp *app, + gpointer user_data) +@@ -345,6 +358,7 @@ finish_task (GTask *task, + /* Standard filtering. + * + * FIXME: It feels like this filter should be done in a different layer. */ ++ gs_app_list_filter (merged_list, filter_valid_apps, self); + gs_app_list_filter (merged_list, app_filter_qt_for_gtk_and_compatible, plugin_loader); + + /* Caller-specified filtering. */ +-- +2.37.3 + diff --git a/gnome-software.spec b/gnome-software.spec index 40d50e3..e127318 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -18,7 +18,7 @@ Name: gnome-software Version: 43.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -28,6 +28,9 @@ Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarbal Patch01: 0001-crash-with-broken-theme.patch Patch02: 0002-install-rpm-file.patch Patch03: 0003-rpm-ostree-download-size.patch +Patch04: 0001-gs-plugin-job-list-apps-Filter-out-invalid-apps.patch +Patch05: 0001-gs-app-Use-real-app-plugin-priority-in-gs_app_compar.patch +Patch06: 0001-flatpak-Set-the-plugin-better-than-rpm-ostree.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -213,6 +216,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Mon Oct 17 2022 Tomas Popela - 43.0-4 +- Resolves: #2135289 (RPM packaged applications are presented in + GNOME Software and preferred over Flatpaks on Silverblue) + * Wed Oct 05 2022 Milan Crha - 43.0-3 - Resolves: #2132292 (rpm-ostree plugin refuses to update) From 6fc4db5ad2ded917b9245ab098464ff0c40c227f Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 24 Oct 2022 07:57:57 +0200 Subject: [PATCH 10/15] Update to 43.1 --- ...et-the-plugin-better-than-rpm-ostree.patch | 28 ---------- ...app-plugin-priority-in-gs_app_compar.patch | 52 ------------------- ...ob-list-apps-Filter-out-invalid-apps.patch | 49 ----------------- gnome-software.spec | 12 ++--- sources | 2 +- 5 files changed, 6 insertions(+), 137 deletions(-) delete mode 100644 0001-flatpak-Set-the-plugin-better-than-rpm-ostree.patch delete mode 100644 0001-gs-app-Use-real-app-plugin-priority-in-gs_app_compar.patch delete mode 100644 0001-gs-plugin-job-list-apps-Filter-out-invalid-apps.patch diff --git a/0001-flatpak-Set-the-plugin-better-than-rpm-ostree.patch b/0001-flatpak-Set-the-plugin-better-than-rpm-ostree.patch deleted file mode 100644 index 5c9b573..0000000 --- a/0001-flatpak-Set-the-plugin-better-than-rpm-ostree.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 604e2e976ee678e7e31e0f9ff60058e9036967fc Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Fri, 14 Oct 2022 09:29:30 +0200 -Subject: [PATCH] flatpak: Set the plugin better than rpm-ostree - -It's already set better than packagekit, thus it's better than rpm-ostree -as well. - -Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1941 ---- - plugins/flatpak/gs-plugin-flatpak.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c -index 8bb612fcd..7c893ef67 100644 ---- a/plugins/flatpak/gs-plugin-flatpak.c -+++ b/plugins/flatpak/gs-plugin-flatpak.c -@@ -96,6 +96,7 @@ gs_plugin_flatpak_init (GsPluginFlatpak *self) - - /* prioritize over packages */ - gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_BETTER_THAN, "packagekit"); -+ gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_BETTER_THAN, "rpm-ostree"); - - /* set name of MetaInfo file */ - gs_plugin_set_appstream_id (plugin, "org.gnome.Software.Plugin.Flatpak"); --- -2.37.3 - diff --git a/0001-gs-app-Use-real-app-plugin-priority-in-gs_app_compar.patch b/0001-gs-app-Use-real-app-plugin-priority-in-gs_app_compar.patch deleted file mode 100644 index b15420e..0000000 --- a/0001-gs-app-Use-real-app-plugin-priority-in-gs_app_compar.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 39be84f7e4c903f6973115f809e3a288731e2d11 Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Fri, 14 Oct 2022 09:18:28 +0200 -Subject: [PATCH] gs-app: Use real app/plugin priority in - gs_app_compare_priority() - -As Owen found out and reported in #1940, change in https://gitlab.gnome.org/GNOME/gnome-software/-/commit/e11a60b4a2ddadacbfbb1a8325b1e8daee574138 -did not consider the fact that gs_app_compare_priority() bypasses -the gs_app_get_priority(), thus the plugin priority was not -considered anymore. - -Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1940 ---- - lib/gs-app.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/lib/gs-app.c b/lib/gs-app.c -index d4b3f912a..51215c7e0 100644 ---- a/lib/gs-app.c -+++ b/lib/gs-app.c -@@ -400,14 +400,17 @@ gs_app_compare_priority (GsApp *app1, GsApp *app2) - { - GsAppPrivate *priv1 = gs_app_get_instance_private (app1); - GsAppPrivate *priv2 = gs_app_get_instance_private (app2); -+ guint prio1, prio2; - - g_return_val_if_fail (GS_IS_APP (app1), 0); - g_return_val_if_fail (GS_IS_APP (app2), 0); - - /* prefer prio */ -- if (priv1->priority > priv2->priority) -+ prio1 = gs_app_get_priority (app1); -+ prio2 = gs_app_get_priority (app2); -+ if (prio1 > prio2) - return -1; -- if (priv1->priority < priv2->priority) -+ if (prio1 < prio2) - return 1; - - /* fall back to bundle kind */ -@@ -5143,7 +5146,7 @@ gs_app_get_priority (GsApp *app) - if (priv->priority == 0) { - g_autoptr(GsPlugin) plugin = gs_app_dup_management_plugin (app); - if (plugin != NULL) -- return gs_plugin_get_priority (plugin); -+ priv->priority = gs_plugin_get_priority (plugin); - } - - return priv->priority; --- -2.37.3 - diff --git a/0001-gs-plugin-job-list-apps-Filter-out-invalid-apps.patch b/0001-gs-plugin-job-list-apps-Filter-out-invalid-apps.patch deleted file mode 100644 index 1597f92..0000000 --- a/0001-gs-plugin-job-list-apps-Filter-out-invalid-apps.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 79515873a275fff8f3f0713fb232e463358865bf Mon Sep 17 00:00:00 2001 -From: Georges Basile Stavracas Neto -Date: Thu, 29 Sep 2022 10:18:22 -0300 -Subject: [PATCH] gs-plugin-job-list-apps: Filter out invalid apps - -This filtering was lost with 7d54958d4e46e27af2cbdfc7f529611f4709d7fe. - -Filter out invalid apps as it did before. - -Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1932 ---- - lib/gs-plugin-job-list-apps.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/lib/gs-plugin-job-list-apps.c b/lib/gs-plugin-job-list-apps.c -index 811c7c08f..a556387e5 100644 ---- a/lib/gs-plugin-job-list-apps.c -+++ b/lib/gs-plugin-job-list-apps.c -@@ -136,6 +136,19 @@ gs_plugin_job_list_apps_set_property (GObject *object, - } - } - -+static gboolean -+filter_valid_apps (GsApp *app, -+ gpointer user_data) -+{ -+ GsPluginJobListApps *self = GS_PLUGIN_JOB_LIST_APPS (user_data); -+ GsPluginRefineFlags refine_flags = GS_PLUGIN_REFINE_FLAGS_NONE; -+ -+ if (self->query) -+ refine_flags = gs_app_query_get_refine_flags (self->query); -+ -+ return gs_plugin_loader_app_is_valid (app, refine_flags); -+} -+ - static gboolean - app_filter_qt_for_gtk_and_compatible (GsApp *app, - gpointer user_data) -@@ -345,6 +358,7 @@ finish_task (GTask *task, - /* Standard filtering. - * - * FIXME: It feels like this filter should be done in a different layer. */ -+ gs_app_list_filter (merged_list, filter_valid_apps, self); - gs_app_list_filter (merged_list, app_filter_qt_for_gtk_and_compatible, plugin_loader); - - /* Caller-specified filtering. */ --- -2.37.3 - diff --git a/gnome-software.spec b/gnome-software.spec index e127318..4b60ca8 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -17,8 +17,8 @@ %global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ Name: gnome-software -Version: 43.0 -Release: 4%{?dist} +Version: 43.1 +Release: 1%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -26,11 +26,6 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/43/%{name}-%{tarball_version}.tar.xz Patch01: 0001-crash-with-broken-theme.patch -Patch02: 0002-install-rpm-file.patch -Patch03: 0003-rpm-ostree-download-size.patch -Patch04: 0001-gs-plugin-job-list-apps-Filter-out-invalid-apps.patch -Patch05: 0001-gs-app-Use-real-app-plugin-priority-in-gs_app_compar.patch -Patch06: 0001-flatpak-Set-the-plugin-better-than-rpm-ostree.patch BuildRequires: docbook-style-xsl BuildRequires: desktop-file-utils @@ -216,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Mon Oct 24 2022 Milan Crha - 43.1-1 +- Update to 43.1 + * Mon Oct 17 2022 Tomas Popela - 43.0-4 - Resolves: #2135289 (RPM packaged applications are presented in GNOME Software and preferred over Flatpaks on Silverblue) diff --git a/sources b/sources index 2cc3ac4..d76eee5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-43.0.tar.xz) = bcf64e4d3d847c660fd1c1a2356235569560bc315fb6b0d2e459dfb1bbee7bf97d9a14f7c8ef1129e01241385cd1540d1499f9cc9ad99a996965feb48e698d6a +SHA512 (gnome-software-43.1.tar.xz) = 5494622e1c52bcf660df8ab83cd73720ccab3c767f8870b6a23bd83c396972c508beb365e6df143055e3a7d9e77b42f01ea73a49d8dcdcf97aaeada0fe9f03e5 From a9d9eb9799f07be7a52d4bcae69e6b16623268cf Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 24 Oct 2022 07:58:55 +0200 Subject: [PATCH 11/15] Delete obsolete patches --- 0002-install-rpm-file.patch | 108 ---------------------------- 0003-rpm-ostree-download-size.patch | 38 ---------- 2 files changed, 146 deletions(-) delete mode 100644 0002-install-rpm-file.patch delete mode 100644 0003-rpm-ostree-download-size.patch diff --git a/0002-install-rpm-file.patch b/0002-install-rpm-file.patch deleted file mode 100644 index 745ceb7..0000000 --- a/0002-install-rpm-file.patch +++ /dev/null @@ -1,108 +0,0 @@ -From e706a530aeeba360fd60fa7ccde63a147f1e14d4 Mon Sep 17 00:00:00 2001 -Date: Wed, 7 Sep 2022 16:18:50 +0200 -Subject: [PATCH 1/2] gs-details-page: Filter out alternatives without origin - -When an alternative app has no origin set, it cannot be installed or -even shown in the GUI, thus filter such alternatives out. - -Helps https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1895 ---- - src/gs-details-page.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - -diff --git a/src/gs-details-page.c b/src/gs-details-page.c -index cfe3cc797..d35ee0a98 100644 ---- a/src/gs-details-page.c -+++ b/src/gs-details-page.c -@@ -1637,6 +1637,16 @@ _set_app (GsDetailsPage *self, GsApp *app) - self, 0); - } - -+static gboolean -+gs_details_page_filter_origin (GsApp *app, -+ gpointer user_data) -+{ -+ /* Keep only local apps or those, which have an origin set */ -+ return gs_app_get_state (app) == GS_APP_STATE_AVAILABLE_LOCAL || -+ gs_app_get_local_file (app) != NULL || -+ gs_app_get_origin (app) != NULL; -+} -+ - /* show the UI and do operations that should not block page load */ - static void - gs_details_page_load_stage2 (GsDetailsPage *self, -@@ -1676,6 +1686,7 @@ gs_details_page_load_stage2 (GsDetailsPage *self, - query = gs_app_query_new ("alternate-of", self->app, - "refine-flags", GS_DETAILS_PAGE_REFINE_FLAGS, - "dedupe-flags", GS_APP_LIST_FILTER_FLAG_NONE, -+ "filter-func", gs_details_page_filter_origin, - "sort-func", gs_utils_app_sort_priority, - NULL); - plugin_job2 = gs_plugin_job_list_apps_new (query, GS_PLUGIN_LIST_APPS_FLAGS_INTERACTIVE); --- -GitLab - - -From 7962414c7ef62494512a93df5855249debc39415 Mon Sep 17 00:00:00 2001 -Date: Wed, 7 Sep 2022 16:58:34 +0200 -Subject: [PATCH 2/2] gs-details-page: Include local file as an alternative - when not installed - -It's not enough to add the local file to the GsAppList, because it can -contain an app with the same ID, thus the local file app won't be added -to the list. - -Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1895 ---- - src/gs-details-page.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/src/gs-details-page.c b/src/gs-details-page.c -index d35ee0a98..50b80e159 100644 ---- a/src/gs-details-page.c -+++ b/src/gs-details-page.c -@@ -645,6 +645,7 @@ gs_details_page_get_alternates_cb (GObject *source_object, - GtkWidget *select_row = NULL; - GtkWidget *origin_row_by_packaging_format = NULL; - gint origin_row_by_packaging_format_index = 0; -+ guint n_rows = 0; - - self->origin_by_packaging_format = FALSE; - gs_widget_remove_all (self->origin_popover_list_box, (GsRemoveFunc) gtk_list_box_remove); -@@ -699,7 +700,15 @@ gs_details_page_get_alternates_cb (GObject *source_object, - /* add the local file to the list so that we can carry it over when - * switching between alternates */ - if (self->app_local_file != NULL) { -- gs_app_list_add (list, self->app_local_file); -+ if (gs_app_get_state (self->app_local_file) != GS_APP_STATE_INSTALLED) { -+ GtkWidget *row = gs_origin_popover_row_new (self->app_local_file); -+ gtk_widget_show (row); -+ gtk_list_box_append (GTK_LIST_BOX (self->origin_popover_list_box), row); -+ first_row = row; -+ select_row = row; -+ n_rows++; -+ } -+ - /* Do not allow change of the app by the packaging format when it's a local file */ - origin_by_packaging_format = FALSE; - } -@@ -716,6 +725,7 @@ gs_details_page_get_alternates_cb (GObject *source_object, - GsApp *app = gs_app_list_index (list, i); - GtkWidget *row = gs_origin_popover_row_new (app); - gtk_widget_show (row); -+ n_rows++; - if (first_row == NULL) - first_row = row; - if (app == self->app || ( -@@ -766,7 +776,7 @@ gs_details_page_get_alternates_cb (GObject *source_object, - } - - /* Do not show the "selected" check when there's only one app in the list */ -- if (select_row && gs_app_list_length (list) > 1) -+ if (select_row && n_rows > 1) - gs_origin_popover_row_set_selected (GS_ORIGIN_POPOVER_ROW (select_row), TRUE); - else if (select_row) - gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (select_row), FALSE); --- -GitLab - diff --git a/0003-rpm-ostree-download-size.patch b/0003-rpm-ostree-download-size.patch deleted file mode 100644 index e353dd1..0000000 --- a/0003-rpm-ostree-download-size.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 823f49dc59eb1a6a00c80084a8ac37782df124fa Mon Sep 17 00:00:00 2001 -Date: Mon, 26 Sep 2022 15:11:25 +0200 -Subject: [PATCH] rpm-ostree: Mark apps as downloaded - -There was a typo in the changes of the gs_app_set_size_download() API, -the `0` meant the app is downloaded, not that the size is unknown. -With this fixed, the Updates page offers to `Restart & Update`, instead -of `Download`, which does nothing, because the rpm-stree plugin -does not implement corresponding GsPlugin function. ---- - plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -index 6984ff95b..1b4f758da 100644 ---- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c -@@ -749,7 +749,7 @@ app_from_modified_pkg_variant (GsPlugin *plugin, GVariant *variant) - gs_app_set_management_plugin (app, plugin); - gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT); - app_set_rpm_ostree_packaging_format (app); -- gs_app_set_size_download (app, GS_SIZE_TYPE_UNKNOWN, 0); -+ gs_app_set_size_download (app, GS_SIZE_TYPE_VALID, 0); - gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC); - gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE); - gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM); -@@ -788,7 +788,7 @@ app_from_single_pkg_variant (GsPlugin *plugin, GVariant *variant, gboolean addit - gs_app_set_management_plugin (app, plugin); - gs_app_add_quirk (app, GS_APP_QUIRK_NEEDS_REBOOT); - app_set_rpm_ostree_packaging_format (app); -- gs_app_set_size_download (app, GS_SIZE_TYPE_UNKNOWN, 0); -+ gs_app_set_size_download (app, GS_SIZE_TYPE_VALID, 0); - gs_app_set_kind (app, AS_COMPONENT_KIND_GENERIC); - gs_app_set_bundle_kind (app, AS_BUNDLE_KIND_PACKAGE); - gs_app_set_scope (app, AS_COMPONENT_SCOPE_SYSTEM); --- -GitLab - From 2b59804686a453e1f778e39a85cb737fc3e43de1 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 2 Dec 2022 12:59:29 +0100 Subject: [PATCH 12/15] Update to 43.2 --- gnome-software.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 4b60ca8..00f7621 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -17,7 +17,7 @@ %global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ Name: gnome-software -Version: 43.1 +Version: 43.2 Release: 1%{?dist} Summary: A software center for GNOME @@ -211,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Fri Dec 02 2022 Milan Crha - 43.2-1 +- Update to 43.2 + * Mon Oct 24 2022 Milan Crha - 43.1-1 - Update to 43.1 diff --git a/sources b/sources index d76eee5..9799f5b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-43.1.tar.xz) = 5494622e1c52bcf660df8ab83cd73720ccab3c767f8870b6a23bd83c396972c508beb365e6df143055e3a7d9e77b42f01ea73a49d8dcdcf97aaeada0fe9f03e5 +SHA512 (gnome-software-43.2.tar.xz) = d011418536706d2c5693581bd322008b5eb0fdf766ec96f1775135efb0fecec42dbc126ea2a66465b2169afb38b48fed1246516197e3bbf9d75b96e339d6ba33 From b4fb103d8804d45538d6d06c6b4f93b03512b6d0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 9 Jan 2023 09:54:04 +0100 Subject: [PATCH 13/15] Update to 43.3 --- gnome-software.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 00f7621..10e291e 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -17,7 +17,7 @@ %global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ Name: gnome-software -Version: 43.2 +Version: 43.3 Release: 1%{?dist} Summary: A software center for GNOME @@ -211,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Mon Jan 09 2023 Milan Crha - 43.3-1 +- Update to 43.3 + * Fri Dec 02 2022 Milan Crha - 43.2-1 - Update to 43.2 diff --git a/sources b/sources index 9799f5b..91f45b0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-43.2.tar.xz) = d011418536706d2c5693581bd322008b5eb0fdf766ec96f1775135efb0fecec42dbc126ea2a66465b2169afb38b48fed1246516197e3bbf9d75b96e339d6ba33 +SHA512 (gnome-software-43.3.tar.xz) = e80c57d75a1805897913c6e5216c610556cbee2617a3e44dd83c366d10b8ae05ffe5f2ac79490ff77bb7a6f8c25ae91477543da26fa3f7794de01ba93ab26591 From 82988db3a2a26a59c6ba350d1a5063264784ffd0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 10 Feb 2023 09:29:52 +0100 Subject: [PATCH 14/15] Update to 43.4 --- gnome-software.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 10e291e..3c5728f 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -17,7 +17,7 @@ %global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ Name: gnome-software -Version: 43.3 +Version: 43.4 Release: 1%{?dist} Summary: A software center for GNOME @@ -211,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Fri Feb 10 2023 Milan Crha - 43.4-1 +- Update to 43.4 + * Mon Jan 09 2023 Milan Crha - 43.3-1 - Update to 43.3 diff --git a/sources b/sources index 91f45b0..e2d22ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-43.3.tar.xz) = e80c57d75a1805897913c6e5216c610556cbee2617a3e44dd83c366d10b8ae05ffe5f2ac79490ff77bb7a6f8c25ae91477543da26fa3f7794de01ba93ab26591 +SHA512 (gnome-software-43.4.tar.xz) = 3e4c8d29569238ffa116beb8e711f05172572b9b31de7d6f5ff1e26465c9f5be97e465f44ea2f6889e1a6c2b626a2de13b99d2e348a4ef150dca3d56c84ab5cd From 15e94382f2fd36d24faa1813b3cccaad972568d5 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 3 Mar 2023 13:56:53 +0100 Subject: [PATCH 15/15] Update to 43.5 --- gnome-software.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gnome-software.spec b/gnome-software.spec index 3c5728f..68c4d73 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -17,7 +17,7 @@ %global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$ Name: gnome-software -Version: 43.4 +Version: 43.5 Release: 1%{?dist} Summary: A software center for GNOME @@ -211,6 +211,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software/ %changelog +* Fri Mar 03 2023 Milan Crha - 43.5-1 +- Update to 43.5 + * Fri Feb 10 2023 Milan Crha - 43.4-1 - Update to 43.4 diff --git a/sources b/sources index e2d22ca..8f77711 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-43.4.tar.xz) = 3e4c8d29569238ffa116beb8e711f05172572b9b31de7d6f5ff1e26465c9f5be97e465f44ea2f6889e1a6c2b626a2de13b99d2e348a4ef150dca3d56c84ab5cd +SHA512 (gnome-software-43.5.tar.xz) = c3d0b05122f5444b1db00719b99f80771ac2ee25ac3caea053bdc734e9faa9730263d20408d4bd87430141392613504b8dff59917eb6a97765302f04ff4306d0