diff --git a/.gitignore b/.gitignore index a469f77..e966aa5 100644 --- a/.gitignore +++ b/.gitignore @@ -90,3 +90,6 @@ /gnome-software-3.27.92.tar.xz /gnome-software-3.28.0.tar.xz /gnome-software-3.28.1.tar.xz +/gnome-software-3.28.2.tar.xz +/f29.png +/f30.png diff --git a/0001-Include-the-distro-version-in-Fedora-distro-upgrade-.patch b/0001-Include-the-distro-version-in-Fedora-distro-upgrade-.patch new file mode 100644 index 0000000..f51c077 --- /dev/null +++ b/0001-Include-the-distro-version-in-Fedora-distro-upgrade-.patch @@ -0,0 +1,55 @@ +From 7afc2c4e3f4ffac704b28098eae3136313d791d3 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Mon, 8 Oct 2018 11:02:50 +0200 +Subject: [PATCH 1/2] Include the distro version in Fedora distro upgrade app + IDs + +If we use just "org.fedoraproject.Fedora", GsAppList deduplicates based +on the app ID and only keeps on of the returned apps. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1628497 +--- + .../gs-plugin-fedora-pkgdb-collections.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c +index fc644ad47..5b8137e3d 100644 +--- a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c ++++ b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c +@@ -1,6 +1,6 @@ + /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * +- * Copyright (C) 2016-2017 Kalev Lember ++ * Copyright (C) 2016-2018 Kalev Lember + * Copyright (C) 2017 Richard Hughes + * + * Licensed under the GNU General Public License Version 2 +@@ -280,6 +280,7 @@ static GsApp * + _create_upgrade_from_info (GsPlugin *plugin, PkgdbItem *item) + { + GsApp *app; ++ g_autofree gchar *app_id = NULL; + g_autofree gchar *app_version = NULL; + g_autofree gchar *background = NULL; + g_autofree gchar *cache_key = NULL; +@@ -293,7 +294,7 @@ _create_upgrade_from_info (GsPlugin *plugin, PkgdbItem *item) + if (app != NULL) + return app; + +- /* create app */ ++ app_id = g_strdup_printf ("org.fedoraproject.Fedora-%u", item->version); + app_version = g_strdup_printf ("%u", item->version); + + /* icon from disk */ +@@ -302,7 +303,7 @@ _create_upgrade_from_info (GsPlugin *plugin, PkgdbItem *item) + as_icon_set_filename (ic, "/usr/share/pixmaps/fedora-logo-sprite.png"); + + /* create */ +- app = gs_app_new ("org.fedoraproject.Fedora"); ++ app = gs_app_new (app_id); + gs_app_set_state (app, AS_APP_STATE_AVAILABLE); + gs_app_set_kind (app, AS_APP_KIND_OS_UPGRADE); + gs_app_set_name (app, GS_APP_QUALITY_LOWEST, item->name); +-- +2.19.1 + diff --git a/0001-appstream-Don-t-compare-appstream-origin-to-package-.patch b/0001-appstream-Don-t-compare-appstream-origin-to-package-.patch deleted file mode 100644 index 52b3ab2..0000000 --- a/0001-appstream-Don-t-compare-appstream-origin-to-package-.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c -index 3cd95c586eae..8e558824caca 100644 ---- a/plugins/core/gs-plugin-appstream.c -+++ b/plugins/core/gs-plugin-appstream.c -@@ -527,7 +527,7 @@ gs_plugin_refine_wildcard (GsPlugin *plugin, - g_autoptr(GsApp) new = NULL; - - /* is compatible */ --#if AS_CHECK_VERSION(0,7,8) -+#if AS_CHECK_VERSION(0,7,7) - if (!as_utils_unique_id_match (gs_app_get_unique_id (app), - as_app_get_unique_id (item), - AS_UNIQUE_ID_MATCH_FLAG_SCOPE | diff --git a/0002-Sort-distro-upgrades-in-the-plugin-loader.patch b/0002-Sort-distro-upgrades-in-the-plugin-loader.patch new file mode 100644 index 0000000..d68517a --- /dev/null +++ b/0002-Sort-distro-upgrades-in-the-plugin-loader.patch @@ -0,0 +1,76 @@ +From be925f12287faee9d4c65635a3e69d18617b0213 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Mon, 8 Oct 2018 11:34:15 +0200 +Subject: [PATCH 2/2] Sort distro upgrades in the plugin loader + +... so that we can rely on the order in UI code. +--- + lib/gs-plugin-loader.c | 13 +++++++++++++ + src/gs-update-monitor.c | 5 +++-- + src/gs-updates-page.c | 3 ++- + 3 files changed, 18 insertions(+), 3 deletions(-) + +diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c +index 2fb02e3c6..033438a88 100644 +--- a/lib/gs-plugin-loader.c ++++ b/lib/gs-plugin-loader.c +@@ -1484,6 +1484,13 @@ gs_plugin_loader_app_sort_match_value_cb (GsApp *app1, GsApp *app2, gpointer use + return 0; + } + ++static gint ++gs_plugin_loader_app_sort_version_cb (GsApp *app1, GsApp *app2, gpointer user_data) ++{ ++ return as_utils_vercmp (gs_app_get_version (app1), ++ gs_app_get_version (app2)); ++} ++ + /******************************************************************************/ + + static gboolean +@@ -3673,6 +3680,12 @@ gs_plugin_loader_job_process_async (GsPluginLoader *plugin_loader, + gs_plugin_loader_app_sort_name_cb); + } + break; ++ case GS_PLUGIN_ACTION_GET_DISTRO_UPDATES: ++ if (gs_plugin_job_get_sort_func (plugin_job) == NULL) { ++ gs_plugin_job_set_sort_func (plugin_job, ++ gs_plugin_loader_app_sort_version_cb); ++ } ++ break; + default: + break; + } +diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c +index 3441b161f..2f39ae0bd 100644 +--- a/src/gs-update-monitor.c ++++ b/src/gs-update-monitor.c +@@ -308,8 +308,9 @@ get_upgrades_finished_cb (GObject *object, + g_settings_set (monitor->settings, "upgrade-notification-timestamp", "x", + g_date_time_to_unix (now)); + +- /* just get the first result : FIXME, do we sort these by date? */ +- app = gs_app_list_index (apps, 0); ++ /* rely on the app list already being sorted with the ++ * chronologically newest release last */ ++ app = gs_app_list_index (apps, gs_app_list_length (apps) - 1); + + /* TRANSLATORS: this is a distro upgrade, the replacement would be the + * distro name, e.g. 'Fedora' */ +diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c +index cd9db05d4..e84293e03 100644 +--- a/src/gs-updates-page.c ++++ b/src/gs-updates-page.c +@@ -1084,7 +1084,8 @@ gs_updates_page_get_upgrades_cb (GObject *source_object, + gs_updates_page_clear_flag (self, GS_UPDATES_PAGE_FLAG_HAS_UPGRADES); + gtk_widget_set_visible (self->upgrade_banner, FALSE); + } else { +- /* rely on the app list already being sorted */ ++ /* rely on the app list already being sorted with the ++ * chronologically newest release last */ + GsApp *app = gs_app_list_index (list, gs_app_list_length (list) - 1); + g_debug ("got upgrade %s", gs_app_get_id (app)); + gs_upgrade_banner_set_app (GS_UPGRADE_BANNER (self->upgrade_banner), app); +-- +2.19.1 + diff --git a/116.patch b/116.patch new file mode 100644 index 0000000..cf9d7e8 --- /dev/null +++ b/116.patch @@ -0,0 +1,38 @@ +From 086f4b4bf3ce478a9a1cb009f56a7c08d1aa6e57 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 11 Oct 2018 19:12:01 -0700 +Subject: [PATCH] Ensure generic-updates plugin runs after packagekit-refine + +9eab01082b07acd525b8a390ab6b43136cf400a5 made generic-updates +check the 'scope' and 'kind' for a package update before adding +it to the generic 'OS Updates' "app" which is used to display +updates for packages that aren't appdata-ified. The 'scope' and +'kind' for package updates are set by packagekit-refine...but +that change did not ensure that generic-updates runs *after* +packagekit-refine. This can result in gnome-software failing to +'see' these generic updates on a first update scan, and only +picking them up on a retry. To fix this, we should ensure that +packagekit-refine runs before generic-updates. + +https://bugzilla.redhat.com/show_bug.cgi?id=1638563 + +Signed-off-by: Adam Williamson +--- + plugins/core/gs-plugin-generic-updates.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/plugins/core/gs-plugin-generic-updates.c b/plugins/core/gs-plugin-generic-updates.c +index d8e2db39..ef79c65b 100644 +--- a/plugins/core/gs-plugin-generic-updates.c ++++ b/plugins/core/gs-plugin-generic-updates.c +@@ -28,6 +28,7 @@ void + gs_plugin_initialize (GsPlugin *plugin) + { + gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_RUN_AFTER, "appstream"); ++ gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_RUN_AFTER, "packagekit-refine"); + } + + static gboolean +-- +2.18.1 + diff --git a/gnome-software.spec b/gnome-software.spec index c331b55..c8c3253 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -2,24 +2,33 @@ %global gtk3_version 3.22.4 %global json_glib_version 1.2.0 %global packagekit_version 1.1.1 -%global appstream_glib_version 0.7.7-2 +%global appstream_glib_version 0.7.8 %global libsoup_version 2.52.0 %global gsettings_desktop_schemas_version 3.12.0 %global gnome_desktop_version 3.18.0 -%global fwupd_version 1.0.3 +%global fwupd_version 1.0.7 %global flatpak_version 0.9.4 Name: gnome-software -Version: 3.28.1 -Release: 1%{?dist} +Version: 3.28.2 +Release: 5%{?dist} Summary: A software center for GNOME License: GPLv2+ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/3.28/%{name}-%{version}.tar.xz +# /usr/share/backgrounds/f29/default/wide/f29.png from f29-backgrounds-base +Source1: f29.png +# /usr/share/backgrounds/f30/default/wide/f30.png from f30-backgrounds-base +Source2: f30.png -# Lower appstream-glib version check as we have new API backported -Patch2: 0001-appstream-Don-t-compare-appstream-origin-to-package-.patch +Patch0: 0001-Include-the-distro-version-in-Fedora-distro-upgrade-.patch +Patch1: 0002-Sort-distro-upgrades-in-the-plugin-loader.patch +# Fixes an ordering issue which often causes the first scan for updates +# to miss 'generic' ones +# https://gitlab.gnome.org/GNOME/gnome-software/merge_requests/116 +# https://bugzilla.redhat.com/show_bug.cgi?id=1638563 +Patch2: 116.patch BuildRequires: gettext BuildRequires: libxslt @@ -45,7 +54,9 @@ BuildRequires: rpm-ostree-devel BuildRequires: libgudev1-devel BuildRequires: valgrind-devel BuildRequires: liboauth-devel +%if 0%{?fedora} BuildRequires: snapd-glib-devel +%endif Requires: appstream-data %if 0%{?fedora} @@ -90,6 +101,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description editor Editor for designing banners for GNOME Software. +%if 0%{?fedora} %package snap Summary: Support for Ubuntu Snap packages Requires: %{name}%{?_isa} = %{version}-%{release} @@ -97,13 +109,18 @@ Supplements: (gnome-software%{?_isa} and snapd%{?_isa}) %description snap Adds support for Snap packages from the Snap store. +%endif %prep %autosetup -p1 %build %meson \ +%if 0%{?fedora} -Denable-snap=true \ +%else + -Denable-snap=false \ +%endif -Denable-gudev=true \ -Denable-packagekit=true \ -Denable-external-appstream=false \ @@ -126,6 +143,11 @@ cat >> %{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.software-fedora.gschem official-repos = [ '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' ] FOE +# Install upgrade background image +mkdir -p %{buildroot}%{_datadir}/gnome-software/backgrounds +cp -a %{SOURCE1} %{buildroot}%{_datadir}/gnome-software/backgrounds/ +cp -a %{SOURCE2} %{buildroot}%{_datadir}/gnome-software/backgrounds/ + %find_lang %name --with-gnome %check @@ -141,6 +163,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gnome-software/*.png %{_mandir}/man1/gnome-software.1.gz %{_datadir}/icons/hicolor/*/apps/* +%{_datadir}/gnome-software/backgrounds/ %{_datadir}/gnome-software/featured-*.svg %{_datadir}/gnome-software/featured-*.jpg %{_datadir}/metainfo/org.gnome.Software.appdata.xml @@ -197,9 +220,11 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_libexecdir}/gnome-software-cmd %{_libexecdir}/gnome-software-restarter +%if 0%{?fedora} %files snap %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_snap.so %{_datadir}/metainfo/org.gnome.Software.Plugin.Snap.metainfo.xml +%endif %files devel %{_libdir}/pkgconfig/gnome-software.pc @@ -213,6 +238,21 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Sun Apr 28 2019 Kalev Lember - 3.28.2-5 +- Add artwork for F30 upgrades + +* Thu Oct 11 2018 Adam Williamson - 3.28.2-4 +- Backport MR#116 to fix bug with generic updates (#1638563) + +* Mon Oct 08 2018 Kalev Lember - 3.28.2-3 +- Backport fixes for N+2 distro upgrades (#1628497) + +* Thu Sep 06 2018 Kalev Lember - 3.28.2-2 +- Add artwork for F29 Beta upgrades + +* Wed May 09 2018 Kalev Lember - 3.28.2-1 +- Update to 3.28.2 + * Mon Apr 09 2018 Kalev Lember - 3.28.1-1 - Update to 3.28.1 diff --git a/sources b/sources index b1a55d5..0227970 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ -SHA512 (gnome-software-3.28.1.tar.xz) = 9a2b040307c5c4eb38e0cce41cd830f54e68adf6ac02f2aea30c1894ef2ec8e332dd1bfce699602629843cced4c3f660324e0aa8698591a57c40b13a3e474ded +SHA512 (gnome-software-3.28.2.tar.xz) = ca22ea589c19f3c5aae32fb2540646d3b3c8faf86f857dd414caf61b716bc50dea16281955c594a629f684da5ac87eeada6ac68247a9b0545600b739fa436dd7 +SHA512 (f29.png) = 7bcb036c9edf069e65edeabbb08460321dedf996d40ae71a8e1e1ba4131288e60a15c5c7e3115229a2850cade018f0ff935da3ee439768597e37830cad5e77bb +SHA512 (f30.png) = 0e90083bda910c13ca9c08b8cde09ffdc8cf9176d84406539235ed3da71ca8bdf5342bf0dfbbd74f6052dffc8c8035e03c6f7ed4d578fa0e84af43e6993df32f