diff --git a/.gitignore b/.gitignore index 9464e10..4e53948 100644 --- a/.gitignore +++ b/.gitignore @@ -82,3 +82,14 @@ /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.26.3.tar.xz +/gnome-software-3.26.4.tar.xz +/gnome-software-3.26.5.tar.xz +/gnome-software-3.26.6.tar.xz +/gnome-software-3.26.7.tar.xz +/f28.png +/gnome-software-3.28.0.tar.xz +/gnome-software-3.28.1.tar.xz +/gnome-software-3.28.2.tar.xz +/f29.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/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 f625a13..88c46ab 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -1,25 +1,34 @@ %global glib2_version 2.46.0 %global gtk3_version 3.22.4 -%global json_glib_version 1.1.1 +%global json_glib_version 1.2.0 %global packagekit_version 1.1.1 -%global appstream_glib_version 0.7.1 -%global libsoup_version 2.51.92 -%global gsettings_desktop_schemas_version 3.11.5 -%global gnome_desktop_version 3.17.92 -%global fwupd_version 0.9.7 +%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.7 %global flatpak_version 0.9.4 -# this should be set using "--without packagekit" when atomic -%bcond_without packagekit - Name: gnome-software -Version: 3.26.1 -Release: 1%{?dist} +Version: 3.28.2 +Release: 4%{?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.26/%{name}-%{version}.tar.xz +Source0: https://download.gnome.org/sources/gnome-software/3.28/%{name}-%{version}.tar.xz +# /usr/share/backgrounds/f28/default/standard/f28.png from f28-backgrounds-base +Source1: f28.png +# /usr/share/backgrounds/f29/default/wide/f29.png from f29-backgrounds-base +Source2: f29.png + +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 @@ -29,27 +38,28 @@ BuildRequires: fwupd-devel >= %{fwupd_version} BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gnome-desktop3-devel BuildRequires: gsettings-desktop-schemas-devel >= %{gsettings_desktop_schemas_version} +BuildRequires: gspell-devel BuildRequires: gtk3-devel >= %{gtk3_version} BuildRequires: gtk-doc -BuildRequires: gtkspell3-devel BuildRequires: json-glib-devel >= %{json_glib_version} BuildRequires: libappstream-glib-devel >= %{appstream_glib_version} BuildRequires: libsoup-devel BuildRequires: meson -%if %{with packagekit} BuildRequires: PackageKit-glib-devel >= %{packagekit_version} -%endif BuildRequires: polkit-devel BuildRequires: libsecret-devel BuildRequires: flatpak-devel >= %{flatpak_version} BuildRequires: ostree-devel -BuildRequires: rpm-devel BuildRequires: libgudev1-devel BuildRequires: valgrind-devel BuildRequires: liboauth-devel BuildRequires: snapd-glib-devel +%if 0%{?fedora} == 27 +Requires: appstream-data >= 27-9 +%else Requires: appstream-data +%endif %if 0%{?fedora} Requires: epiphany-runtime %endif @@ -95,7 +105,6 @@ Editor for designing banners for GNOME Software. %package snap Summary: Support for Ubuntu Snap packages Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: snapd-login-service Supplements: (gnome-software%{?_isa} and snapd%{?_isa}) %description snap @@ -108,13 +117,11 @@ Adds support for Snap packages from the Snap store. %meson \ -Denable-snap=true \ -Denable-gudev=true \ -%if %{with packagekit} -Denable-packagekit=true \ -%else - -Denable-packagekit=false \ -%endif -Denable-external-appstream=false \ + -Denable-rpm-ostree=false \ -Denable-tests=false \ + -Denable-ubuntuone=false \ -Denable-ubuntu-reviews=false %meson_build @@ -128,9 +135,14 @@ desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.deskto # set up for Fedora cat >> %{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.software-fedora.gschema.override << FOE [org.gnome.software] -official-sources = [ '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' ] +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 @@ -151,7 +163,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || : glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %files -f %{name}.lang -%doc AUTHORS README +%doc AUTHORS README.md %license COPYING %{_bindir}/gnome-software %{_datadir}/applications/gnome-software-local-file.desktop @@ -160,6 +172,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_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 @@ -176,7 +189,6 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_dummy.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_epiphany.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fedora-pkgdb-collections.so -%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fedora-tagger-usage.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_flatpak.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fwupd.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_generic-updates.so @@ -189,32 +201,26 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_modalias.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_odrs.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_os-release.so -%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_ostree.so -%if %{with packagekit} %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-history.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-local.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-offline.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-proxy.so +%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-refine-repos.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-refine.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-refresh.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-upgrade.so +%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-url-to-app.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit.so -%endif %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_provenance-license.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_provenance.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_repos.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so -%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_rpm.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_shell-extensions.so %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_steam.so -%if %{with packagekit} %{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_systemd-updates.so -%endif -%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_ubuntuone.so %{_sysconfdir}/xdg/autostart/gnome-software-service.desktop -%if %{with packagekit} +%{_datadir}/app-info/xmls/org.gnome.Software.Featured.xml %{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service -%endif %{_datadir}/dbus-1/services/org.gnome.Software.service %{_datadir}/gnome-shell/search-providers/org.gnome.Software-search-provider.ini %{_datadir}/glib-2.0/schemas/org.gnome.software.gschema.xml @@ -234,11 +240,68 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %files editor %{_bindir}/gnome-software-editor -%{_datadir}/app-info/xmls/org.gnome.Software.Featured.xml %{_datadir}/applications/org.gnome.Software.Editor.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* 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 + +* Wed Apr 18 2018 Kalev Lember - 3.28.1-1.1 +- Sync F28 upgrade background image with final F28 artwork + +* Mon Apr 09 2018 Kalev Lember - 3.28.1-1 +- Update to 3.28.1 + +* Thu Mar 15 2018 Kalev Lember - 3.28.0-4 +- Fix opening results from gnome-shell search provider + +* Wed Mar 14 2018 Kalev Lember - 3.28.0-3 +- Fix crash on initial run with no network (#1554986) + +* Tue Mar 13 2018 Kalev Lember - 3.28.0-2 +- Backport an upstream patch to fix shell extensions app ID + +* Mon Mar 12 2018 Kalev Lember - 3.28.0-1 +- Update to 3.28.0 +- Move org.gnome.Software.Featured.xml from -editor to main package + +* Fri Mar 02 2018 Kalev Lember - 3.26.7-1 +- Update to 3.26.7 +- Ship a background image for F28 beta upgrades + +* Thu Feb 08 2018 Kalev Lember - 3.26.6-1 +- Update to 3.26.6 +- Add fedora-workstation-repositories to nonfree-sources schema defaults + +* Mon Jan 08 2018 Kalev Lember - 3.26.5-1 +- Update to 3.26.5 +- Drop unused --without packagekit option + +* Sun Dec 17 2017 Kalev Lember - 3.26.4-1 +- Update to 3.26.4 + +* Tue Nov 21 2017 Kalev Lember - 3.26.3-1 +- Update to 3.26.3 + +* Thu Nov 09 2017 Kalev Lember - 3.26.2-1 +- Update to 3.26.2 + +* Wed Oct 25 2017 Kalev Lember - 3.26.1-3 +- Fix "too many results returned" error after distro upgrades (#1496489) + +* Tue Oct 10 2017 Kalev Lember - 3.26.1-2 +- Backport a flatpakref installation fix + * Sun Oct 08 2017 Kalev Lember - 3.26.1-1 - Update to 3.26.1 diff --git a/sources b/sources index af97085..8c11af2 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ -SHA512 (gnome-software-3.26.1.tar.xz) = 4996de18a6b1b6f04d72cc4c9c71104acdf6157abf043348e2929ad526d47400976d2e3b88095fbff19a392fd5130219c519cc6c8dd2b823f2550a8fd8aa67a0 +SHA512 (gnome-software-3.28.2.tar.xz) = ca22ea589c19f3c5aae32fb2540646d3b3c8faf86f857dd414caf61b716bc50dea16281955c594a629f684da5ac87eeada6ac68247a9b0545600b739fa436dd7 +SHA512 (f28.png) = 468ece7c735d3f11f863c347aa22752ff5805effa47e4e3b97dd3b777ab5705423edc4e51c3491885128e684f243362e79f9f8ec42277bd0673abea48a36d5b2 +SHA512 (f29.png) = 7bcb036c9edf069e65edeabbb08460321dedf996d40ae71a8e1e1ba4131288e60a15c5c7e3115229a2850cade018f0ff935da3ee439768597e37830cad5e77bb