From d39b8d811c042747d873de9eec4bfe84649cdd92 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:30:17 +0000 Subject: import gnome-software-3.22.7-5.el7 --- diff --git a/SOURCES/0001-flatpak-Set-the-correct-origin-when-installing-a-fla.patch b/SOURCES/0001-flatpak-Set-the-correct-origin-when-installing-a-fla.patch new file mode 100644 index 0000000..e85c06c --- /dev/null +++ b/SOURCES/0001-flatpak-Set-the-correct-origin-when-installing-a-fla.patch @@ -0,0 +1,44 @@ +From 3b305e27d1c0f51f2dc42bb9ad58eb90396f44c4 Mon Sep 17 00:00:00 2001 +From: Joaquim Rocha +Date: Sat, 1 Jul 2017 01:33:00 +0200 +Subject: [PATCH] flatpak: Set the correct origin when installing a flatpakref + +When installing a flatpakref, part of the process is to install its +ref file, and the code was assuming that this installation always +results in a new remote (named as app_name-origin). However, if there +is already a remote with the same URI as the one coming from the ref +file, it will not add the new one in order to avoid redudancy. + +Since the GsApp representing the one in the flatpakref was being +assigned the "app_name-origin" as its origin, it would fail to install +later because this expected origin may not exist (as explained above). + +To fix this, once the ref file is installed, we get the resulting +remote's name (i.e. a new one or the existing one) and override the +app's origin with it, which will allow the installation to succeed. +--- + src/plugins/gs-flatpak.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c +index c5a0df3ddc03..55ebba169fb7 100644 +--- a/src/plugins/gs-flatpak.c ++++ b/src/plugins/gs-flatpak.c +@@ -2513,6 +2513,14 @@ gs_flatpak_app_install (GsFlatpak *self, + return FALSE; + } + ++ /* the installation of the ref file above will not create a new remote for ++ * the app if its URL is already configured as another remote, thus we ++ * need to update the app origin to match that or it may end up with ++ * an nonexistent origin; and we first need to set the origin to NULL to ++ * circumvent the safety check... */ ++ gs_app_set_origin (app, NULL); ++ gs_app_set_origin (app, flatpak_remote_ref_get_remote_name (xref2)); ++ + /* update search tokens for new remote */ + if (!gs_flatpak_refresh_appstream (self, G_MAXUINT, 0, cancellable, error)) + return FALSE; +-- +1.8.3.1 + diff --git a/SOURCES/0001-packagekit-Never-call-GetDetails-when-there-are-no-s.patch b/SOURCES/0001-packagekit-Never-call-GetDetails-when-there-are-no-s.patch new file mode 100644 index 0000000..1825e00 --- /dev/null +++ b/SOURCES/0001-packagekit-Never-call-GetDetails-when-there-are-no-s.patch @@ -0,0 +1,27 @@ +From 810b31a71812a0738c1114edc3ac61b8f55751b9 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Tue, 19 Sep 2017 11:50:03 +0100 +Subject: [PATCH 1/2] packagekit: Never call GetDetails when there are no + source IDs + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1445651 +--- + src/plugins/gs-plugin-packagekit-refine.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c +index 2e4c1dfd..b5c6f990 100644 +--- a/src/plugins/gs-plugin-packagekit-refine.c ++++ b/src/plugins/gs-plugin-packagekit-refine.c +@@ -520,6 +520,8 @@ gs_plugin_packagekit_refine_details (GsPlugin *plugin, + g_ptr_array_add (package_ids, g_strdup (package_id)); + } + } ++ if (package_ids->len == 0) ++ return TRUE; + g_ptr_array_add (package_ids, NULL); + + data.app = NULL; +-- +2.13.5 + diff --git a/SOURCES/0001-trivial-Add-another-application-to-the-blacklist.patch b/SOURCES/0001-trivial-Add-another-application-to-the-blacklist.patch new file mode 100644 index 0000000..a4923cd --- /dev/null +++ b/SOURCES/0001-trivial-Add-another-application-to-the-blacklist.patch @@ -0,0 +1,24 @@ +From 3780bee0daab26359d3755038cf5650ed118c174 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Fri, 3 Nov 2017 14:38:24 +0000 +Subject: [PATCH] trivial: Add another application to the blacklist + +--- + src/plugins/gs-plugin-hardcoded-blacklist.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/plugins/gs-plugin-hardcoded-blacklist.c b/src/plugins/gs-plugin-hardcoded-blacklist.c +index 8656a61e..0203f140 100644 +--- a/src/plugins/gs-plugin-hardcoded-blacklist.c ++++ b/src/plugins/gs-plugin-hardcoded-blacklist.c +@@ -57,6 +57,7 @@ gs_plugin_refine_app (GsPlugin *plugin, + "tracker-preferences.desktop", + "Uninstall*.desktop", + "wine-*.desktop", ++ "gnome-session-properties.desktop", + NULL }; + + /* not set yet */ +-- +2.14.3 + diff --git a/SOURCES/0002-trivial-Add-some-error-prefixes-to-better-chase-down.patch b/SOURCES/0002-trivial-Add-some-error-prefixes-to-better-chase-down.patch new file mode 100644 index 0000000..58b90ac --- /dev/null +++ b/SOURCES/0002-trivial-Add-some-error-prefixes-to-better-chase-down.patch @@ -0,0 +1,282 @@ +From 67f10091c97f5c5975fe620948803cec2e81aa34 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Tue, 19 Sep 2017 11:50:41 +0100 +Subject: [PATCH 2/2] trivial: Add some error prefixes to better chase down + bugs + +--- + src/plugins/gs-plugin-packagekit-local.c | 8 ++++++-- + src/plugins/gs-plugin-packagekit-origin.c | 4 +++- + src/plugins/gs-plugin-packagekit-refine.c | 24 ++++++++++++++++++------ + src/plugins/gs-plugin-packagekit-refresh.c | 5 ++++- + src/plugins/gs-plugin-packagekit-upgrade.c | 1 + + src/plugins/gs-plugin-packagekit.c | 28 ++++++++++++++++++++++------ + 6 files changed, 54 insertions(+), 16 deletions(-) + +diff --git a/src/plugins/gs-plugin-packagekit-local.c b/src/plugins/gs-plugin-packagekit-local.c +index 7d76c702..5e8d8022 100644 +--- a/src/plugins/gs-plugin-packagekit-local.c ++++ b/src/plugins/gs-plugin-packagekit-local.c +@@ -102,8 +102,10 @@ gs_plugin_packagekit_refresh_guess_app_id (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to get files local: "); + return FALSE; ++ } + array = pk_results_get_files_array (results); + if (array->len == 0) { + g_set_error (error, +@@ -180,8 +182,10 @@ gs_plugin_file_to_app (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to get details local: "); + return FALSE; ++ } + + /* get results */ + array = pk_results_get_details_array (results); +diff --git a/src/plugins/gs-plugin-packagekit-origin.c b/src/plugins/gs-plugin-packagekit-origin.c +index 4d81963c..4e6b3d14 100644 +--- a/src/plugins/gs-plugin-packagekit-origin.c ++++ b/src/plugins/gs-plugin-packagekit-origin.c +@@ -86,8 +86,10 @@ gs_plugin_packagekit_origin_ensure_sources (GsPlugin *plugin, + cancellable, + NULL, plugin, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to get repo list: "); + return FALSE; ++ } + array = pk_results_get_repo_detail_array (results); + for (i = 0; i < array->len; i++) { + rd = g_ptr_array_index (array, i); +diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c +index b5c6f990..ec471f83 100644 +--- a/src/plugins/gs-plugin-packagekit-refine.c ++++ b/src/plugins/gs-plugin-packagekit-refine.c +@@ -276,8 +276,10 @@ gs_plugin_packagekit_resolve_packages (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to resolve packages: "); + return FALSE; ++ } + + /* get results */ + packages = pk_results_get_package_array (results); +@@ -315,8 +317,10 @@ gs_plugin_packagekit_refine_from_desktop (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to refine from desktop file: "); + return FALSE; ++ } + + /* get results */ + packages = pk_results_get_package_array (results); +@@ -393,8 +397,10 @@ gs_plugin_packagekit_refine_updatedetails (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to refine update details: "); + return FALSE; ++ } + + /* set the update details for the update */ + array = pk_results_get_update_detail_array (results); +@@ -535,8 +541,10 @@ gs_plugin_packagekit_refine_details (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to refine details: "); + return FALSE; ++ } + + /* set the update details for the update */ + array = pk_results_get_details_array (results); +@@ -574,8 +582,10 @@ gs_plugin_packagekit_refine_update_urgency (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to get updates: "); + return FALSE; ++ } + + /* set the update severity for the app */ + sack = pk_results_get_package_sack (results); +@@ -765,8 +775,10 @@ gs_plugin_packagekit_refine_distro_upgrade (GsPlugin *plugin, + error); + pk_client_set_cache_age (priv->client, cache_age_save); + +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to refine distro upgrades: "); + return FALSE; ++ } + list = gs_app_list_new (); + if (!gs_plugin_packagekit_add_results (plugin, list, results, error)) + return FALSE; +diff --git a/src/plugins/gs-plugin-packagekit-refresh.c b/src/plugins/gs-plugin-packagekit-refresh.c +index 68b81c5f..71c4d6fa 100644 +--- a/src/plugins/gs-plugin-packagekit-refresh.c ++++ b/src/plugins/gs-plugin-packagekit-refresh.c +@@ -124,8 +124,10 @@ gs_plugin_refresh (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to get updates: "); + return FALSE; ++ } + } + + /* download all the packages themselves */ +@@ -145,6 +147,7 @@ gs_plugin_refresh (GsPlugin *plugin, + gs_plugin_packagekit_progress_cb, &data, + error); + if (results2 == NULL) { ++ g_prefix_error (error, "failed to update packages: "); + gs_plugin_packagekit_convert_gerror (error); + return FALSE; + } +diff --git a/src/plugins/gs-plugin-packagekit-upgrade.c b/src/plugins/gs-plugin-packagekit-upgrade.c +index 6791efc4..7a35df11 100644 +--- a/src/plugins/gs-plugin-packagekit-upgrade.c ++++ b/src/plugins/gs-plugin-packagekit-upgrade.c +@@ -104,6 +104,7 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin, + gs_plugin_packagekit_progress_cb, &data, + error); + if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to upgrade system: "); + gs_app_set_state_recover (app); + return FALSE; + } +diff --git a/src/plugins/gs-plugin-packagekit.c b/src/plugins/gs-plugin-packagekit.c +index d0aecbc5..2059e117 100644 +--- a/src/plugins/gs-plugin-packagekit.c ++++ b/src/plugins/gs-plugin-packagekit.c +@@ -132,8 +132,10 @@ gs_plugin_add_sources_related (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to get packages: "); + return FALSE; ++ } + ret = gs_plugin_packagekit_add_results (plugin, + installed, + results, +@@ -186,8 +188,10 @@ gs_plugin_add_sources (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to get repo list: "); + return FALSE; ++ } + hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + array = pk_results_get_repo_detail_array (results); + for (i = 0; i < array->len; i++) { +@@ -238,8 +242,10 @@ gs_plugin_app_source_enable (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to enable repo: "); + return FALSE; ++ } + return TRUE; + } + +@@ -302,6 +308,7 @@ gs_plugin_app_install (GsPlugin *plugin, + gs_plugin_packagekit_progress_cb, &data, + error); + if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to install packages: "); + gs_app_set_state_recover (app); + return FALSE; + } +@@ -371,6 +378,7 @@ gs_plugin_app_install (GsPlugin *plugin, + gs_plugin_packagekit_progress_cb, &data, + error); + if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to install packages: "); + gs_app_set_state_recover (app); + return FALSE; + } +@@ -396,6 +404,7 @@ gs_plugin_app_install (GsPlugin *plugin, + gs_plugin_packagekit_progress_cb, &data, + error); + if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to install files: "); + gs_app_set_state_recover (app); + return FALSE; + } +@@ -445,8 +454,10 @@ gs_plugin_app_source_disable (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to disable source: "); + return FALSE; ++ } + return TRUE; + } + +@@ -547,6 +558,7 @@ gs_plugin_app_remove (GsPlugin *plugin, + gs_plugin_packagekit_progress_cb, &data, + error); + if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to remove packages: "); + gs_app_set_state_recover (app); + return FALSE; + } +@@ -587,8 +599,10 @@ gs_plugin_add_search_files (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to search for files: "); + return FALSE; ++ } + + /* add results */ + return gs_plugin_packagekit_add_results (plugin, list, results, error); +@@ -621,8 +635,10 @@ gs_plugin_add_search_what_provides (GsPlugin *plugin, + cancellable, + gs_plugin_packagekit_progress_cb, &data, + error); +- if (!gs_plugin_packagekit_results_valid (results, error)) ++ if (!gs_plugin_packagekit_results_valid (results, error)) { ++ g_prefix_error (error, "failed to search what provides: "); + return FALSE; ++ } + + /* add results */ + return gs_plugin_packagekit_add_results (plugin, list, results, error); +-- +2.13.5 + diff --git a/SPECS/gnome-software.spec b/SPECS/gnome-software.spec index 95043e8..46dab9b 100644 --- a/SPECS/gnome-software.spec +++ b/SPECS/gnome-software.spec @@ -13,7 +13,7 @@ Name: gnome-software Version: 3.22.7 -Release: 1%{?dist} +Release: 5%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -26,6 +26,16 @@ Patch2: 0001-Change-the-name-of-the-application-to-Application-In.patch # Update translations Patch3: downstream-translations.patch +# No error when a GsApp has no valid sources +Patch4: 0001-packagekit-Never-call-GetDetails-when-there-are-no-s.patch +Patch5: 0002-trivial-Add-some-error-prefixes-to-better-chase-down.patch + +# Blacklist the session manager +Patch6: 0001-trivial-Add-another-application-to-the-blacklist.patch + +# Fix flatpakref installation +Patch7: 0001-flatpak-Set-the-correct-origin-when-installing-a-fla.patch + BuildRequires: gettext BuildRequires: intltool BuildRequires: libxslt @@ -85,6 +95,10 @@ the source tree. Most users do not need this subpackage installed. %setup -q %patch2 -p1 -b .funky-name %patch3 -p1 -b .downstream-translations +%patch4 -p1 -b .ignore-no-source-ids +%patch5 -p1 -b .better-error-messages +%patch6 -p1 -b .no-session-manager +%patch7 -p1 -b .flatpakref-installation %build %configure \ @@ -114,7 +128,6 @@ desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.deskto cat >> %{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.software-fedora.gschema.override << FOE [org.gnome.software] official-sources = [ 'rhel-7' ] -nonfree-sources = [ 'google-chrome' ] FOE %find_lang %name --with-gnome @@ -201,6 +214,23 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_datadir}/gtk-doc/html/gnome-software %changelog +* Wed Feb 07 2018 Kalev Lember - 3.22.7-5 +- Backport a fix for installing flatpakref files +- Resolves: #1509883 + +* Tue Jan 23 2018 Ray Strode - 3.22.7-4 +- Drop non-free sources from schema to avoid confusing infobar at startup + Resolves: #1514113 + +* Fri Nov 03 2017 Richard Hughes - 3.22.7-3 +- Never show 'Startup Applications' in the search results +- Note: the other issue shown in the bug is likely a dupe of #1445651 +- Resolves: #1481145 + +* Tue Sep 19 2017 Richard Hughes - 3.22.7-2 +- Backport two fixes to fix a common error message +- Resolves: #1445651 + * Tue Mar 14 2017 Kalev Lember - 3.22.7-1 - Update to 3.22.7 - Resolves: #1386961