From 34b0bcfd2f03714f3565a177c352b2010170820b Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 11 Jul 2019 19:24:37 +0300 Subject: [PATCH 1/9] Update to 3.32.4 --- .gitignore | 1 + gnome-software.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a77a6a9..5d5afbf 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,4 @@ /gnome-software-3.32.1.tar.xz /gnome-software-3.32.2.tar.xz /gnome-software-3.32.3.tar.xz +/gnome-software-3.32.4.tar.xz diff --git a/gnome-software.spec b/gnome-software.spec index 29138d6..05d771b 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -13,7 +13,7 @@ %global __requires_exclude ^libdnf[.]so[.].*$ Name: gnome-software -Version: 3.32.3 +Version: 3.32.4 Release: 1%{?dist} Summary: A software center for GNOME @@ -245,6 +245,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Thu Jul 11 2019 Kalev Lember - 3.32.4-1 +- Update to 3.32.4 + * Fri May 24 2019 Kalev Lember - 3.32.3-1 - Update to 3.32.3 diff --git a/sources b/sources index dacd7fe..f6db98a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-software-3.32.3.tar.xz) = c6d1b0e1fc873fc7ae10efee4902cf603913c2b791a777a0aef0307b0d70197a4251a71069f527141c70dea7cad4c706fb090a2381f403689af31ff47b1cd6eb +SHA512 (gnome-software-3.32.4.tar.xz) = 81a32477fe755f57465cfbc3d1c88a2f460d6a21222fd73aced06c92b409023a1ace002c338e713135658896c2c14a7ff8508eeefbc5f648e66d8c8777dee881 From 0151cf81283837c5ce9525a2aa7e8b38d65bb36d Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 18 Sep 2019 12:45:25 +0200 Subject: [PATCH 2/9] Add artwork for F31 upgrades --- .gitignore | 1 + gnome-software.spec | 12 +++++++++++- sources | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5d5afbf..7245e0b 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,4 @@ /gnome-software-3.32.2.tar.xz /gnome-software-3.32.3.tar.xz /gnome-software-3.32.4.tar.xz +/f31.png diff --git a/gnome-software.spec b/gnome-software.spec index 05d771b..6eb98b3 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -14,12 +14,14 @@ Name: gnome-software Version: 3.32.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software center for GNOME License: GPLv2+ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/3.32/%{name}-%{version}.tar.xz +# /usr/share/backgrounds/f31/default/wide/f31.png from f31-backgrounds-base +Source1: f31.png BuildRequires: gcc BuildRequires: gettext @@ -155,6 +157,10 @@ cat >> %{buildroot}%{_datadir}/glib-2.0/schemas/org.gnome.software-fedora.gschem official-repos = [ 'anaconda', 'fedora', 'fedora-debuginfo', 'fedora-source', 'koji-override-0', 'koji-override-1', 'rawhide', 'rawhide-debuginfo', 'rawhide-source', 'updates', 'updates-debuginfo', 'updates-source', 'updates-testing', 'updates-testing-debuginfo', 'updates-testing-source', 'fedora-modular', 'fedora-modular-debuginfo', 'fedora-modular-source', 'rawhide-modular', 'rawhide-modular-debuginfo', 'rawhide-modular-source' ] FOE +# Install upgrade background image +mkdir -p %{buildroot}%{_datadir}/gnome-software/backgrounds +cp -a %{SOURCE1} %{buildroot}%{_datadir}/gnome-software/backgrounds/ + %find_lang %name --with-gnome %check @@ -172,6 +178,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/apps/org.gnome.Software.svg %{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Software-symbolic.svg %{_datadir}/icons/hicolor/scalable/status/software-installed-symbolic.svg +%{_datadir}/gnome-software/backgrounds/ %{_datadir}/gnome-software/featured-*.svg %{_datadir}/gnome-software/featured-*.jpg %{_datadir}/metainfo/org.gnome.Software.appdata.xml @@ -245,6 +252,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Wed Sep 18 2019 Kalev Lember - 3.32.4-2 +- Add artwork for F31 upgrades + * Thu Jul 11 2019 Kalev Lember - 3.32.4-1 - Update to 3.32.4 diff --git a/sources b/sources index f6db98a..8b05b7f 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (gnome-software-3.32.4.tar.xz) = 81a32477fe755f57465cfbc3d1c88a2f460d6a21222fd73aced06c92b409023a1ace002c338e713135658896c2c14a7ff8508eeefbc5f648e66d8c8777dee881 +SHA512 (f31.png) = 69e6c8291d93640d4d6f5d71c3a9e08f65a90c19c38b6036423c236063e68be03b68c2668aae6d8b0a03c7a24bf8ae8e108dfb2a9cd85b7bb232751b3e05bb0f From 67112b32b0b1385fddfaced45da2cbc2b3098380 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 25 Sep 2019 10:26:46 +0200 Subject: [PATCH 3/9] Fix third party repo enabling not working https://bugzilla.redhat.com/show_bug.cgi?id=1749566 --- ...hird-party-repo-enabling-not-working.patch | 77 +++++++++++++++++++ gnome-software.spec | 8 +- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 0001-extras-Fix-third-party-repo-enabling-not-working.patch diff --git a/0001-extras-Fix-third-party-repo-enabling-not-working.patch b/0001-extras-Fix-third-party-repo-enabling-not-working.patch new file mode 100644 index 0000000..cf3a05e --- /dev/null +++ b/0001-extras-Fix-third-party-repo-enabling-not-working.patch @@ -0,0 +1,77 @@ +From 53fb971462c465e53d7da7d40184de88943e30a6 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Tue, 24 Sep 2019 10:41:55 +0200 +Subject: [PATCH] extras: Fix third party repo enabling not working + +Make sure to pass REQUIRE_ORIGIN_HOSTNAME refine flag to all of the +search calls so that we pick up the enabled=0 enabled_metadata=1 repo +name that needs to be enabled. + +https://bugzilla.redhat.com/show_bug.cgi?id=1749566 +--- + src/gs-extras-page.c | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +diff --git a/src/gs-extras-page.c b/src/gs-extras-page.c +index 0b062ea25..d31ad7747 100644 +--- a/src/gs-extras-page.c ++++ b/src/gs-extras-page.c +@@ -672,16 +672,25 @@ gs_extras_page_load (GsExtrasPage *self, GPtrArray *array_search_data) + + /* start new searches, separate one for each codec */ + for (i = 0; i < self->array_search_data->len; i++) { ++ GsPluginRefineFlags refine_flags; + SearchData *search_data; + ++ refine_flags = GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON | ++ GS_PLUGIN_REFINE_FLAGS_REQUIRE_VERSION | ++ GS_PLUGIN_REFINE_FLAGS_REQUIRE_HISTORY | ++ GS_PLUGIN_REFINE_FLAGS_REQUIRE_ORIGIN_HOSTNAME | ++ GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION | ++ GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION | ++ GS_PLUGIN_REFINE_FLAGS_REQUIRE_LICENSE | ++ GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING | ++ GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES; ++ + search_data = g_ptr_array_index (self->array_search_data, i); + if (search_data->search_filename != NULL) { + g_autoptr(GsPluginJob) plugin_job = NULL; + plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_SEARCH_FILES, + "search", search_data->search_filename, +- "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON | +- GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING | +- GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES, ++ "refine-flags", refine_flags, + NULL); + g_debug ("searching filename: '%s'", search_data->search_filename); + gs_plugin_loader_job_process_async (self->plugin_loader, +@@ -695,9 +704,7 @@ gs_extras_page_load (GsExtrasPage *self, GPtrArray *array_search_data) + file = g_file_new_for_path (search_data->package_filename); + plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_FILE_TO_APP, + "file", file, +- "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON | +- GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING | +- GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES, ++ "refine-flags", refine_flags, + NULL); + g_debug ("resolving filename to app: '%s'", search_data->package_filename); + gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job, +@@ -709,14 +716,7 @@ gs_extras_page_load (GsExtrasPage *self, GPtrArray *array_search_data) + g_debug ("searching what provides: '%s'", search_data->search); + plugin_job = gs_plugin_job_newv (GS_PLUGIN_ACTION_SEARCH_PROVIDES, + "search", search_data->search, +- "refine-flags", GS_PLUGIN_REFINE_FLAGS_REQUIRE_ICON | +- GS_PLUGIN_REFINE_FLAGS_REQUIRE_VERSION | +- GS_PLUGIN_REFINE_FLAGS_REQUIRE_HISTORY | +- GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION | +- GS_PLUGIN_REFINE_FLAGS_REQUIRE_DESCRIPTION | +- GS_PLUGIN_REFINE_FLAGS_REQUIRE_LICENSE | +- GS_PLUGIN_REFINE_FLAGS_REQUIRE_RATING | +- GS_PLUGIN_REFINE_FLAGS_ALLOW_PACKAGES, ++ "refine-flags", refine_flags, + NULL); + gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job, + self->search_cancellable, +-- +2.23.0 + diff --git a/gnome-software.spec b/gnome-software.spec index 6eb98b3..afcb6b0 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -14,7 +14,7 @@ Name: gnome-software Version: 3.32.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -23,6 +23,9 @@ Source0: https://download.gnome.org/sources/gnome-software/3.32/%{name}-%{vers # /usr/share/backgrounds/f31/default/wide/f31.png from f31-backgrounds-base Source1: f31.png +# Backported from upstream +Patch0: 0001-extras-Fix-third-party-repo-enabling-not-working.patch + BuildRequires: gcc BuildRequires: gettext BuildRequires: libxslt @@ -252,6 +255,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Wed Sep 25 2019 Kalev Lember - 3.32.4-3 +- Fix third party repo enabling not working (#1749566) + * Wed Sep 18 2019 Kalev Lember - 3.32.4-2 - Add artwork for F31 upgrades From 22f0b24c5013c6632ff191eb7d3cf8a0e4ba0dba Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 14 Nov 2019 15:59:41 +0100 Subject: [PATCH 4/9] Backport a patch to fix gnome-software with latest appstream-glib Avoid showing unwanted entries in the Installed page with latest libappstream-glib. https://github.com/hughsie/appstream-glib/pull/335 --- ...-applications-in-the-installed-panel.patch | 35 +++++++++++++++++++ gnome-software.spec | 6 +++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 0001-Do-not-show-non-applications-in-the-installed-panel.patch diff --git a/0001-Do-not-show-non-applications-in-the-installed-panel.patch b/0001-Do-not-show-non-applications-in-the-installed-panel.patch new file mode 100644 index 0000000..c3ccd6d --- /dev/null +++ b/0001-Do-not-show-non-applications-in-the-installed-panel.patch @@ -0,0 +1,35 @@ +From 314cde9ccff4f0a9eb685b174f7add0f31b1e9c7 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Fri, 11 Oct 2019 16:56:03 +0100 +Subject: [PATCH] Do not show non-applications in the installed panel + +--- + plugins/core/gs-plugin-appstream.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c +index 1f18693bf..4d8ba5173 100644 +--- a/plugins/core/gs-plugin-appstream.c ++++ b/plugins/core/gs-plugin-appstream.c +@@ -517,6 +517,9 @@ gs_plugin_appstream_check_silo (GsPlugin *plugin, + } + } + ++ /* regenerate with each minor release */ ++ xb_builder_append_guid (builder, PACKAGE_VERSION); ++ + /* create per-user cache */ + blobfn = gs_utils_get_cache_filename ("appstream", "components.xmlb", + GS_UTILS_CACHE_FLAG_WRITEABLE, +@@ -925,7 +928,7 @@ gs_plugin_add_installed (GsPlugin *plugin, + locker = g_rw_lock_reader_locker_new (&priv->silo_lock); + + /* get all installed appdata files (notice no 'components/' prefix...) */ +- components = xb_silo_query (priv->silo, "component", 0, NULL); ++ components = xb_silo_query (priv->silo, "component/description/..", 0, NULL); + if (components == NULL) + return TRUE; + for (guint i = 0; i < components->len; i++) { +-- +2.23.0 + diff --git a/gnome-software.spec b/gnome-software.spec index afcb6b0..906af04 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -14,7 +14,7 @@ Name: gnome-software Version: 3.32.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -25,6 +25,7 @@ Source1: f31.png # Backported from upstream Patch0: 0001-extras-Fix-third-party-repo-enabling-not-working.patch +Patch1: 0001-Do-not-show-non-applications-in-the-installed-panel.patch BuildRequires: gcc BuildRequires: gettext @@ -255,6 +256,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Thu Nov 14 2019 Kalev Lember - 3.32.4-4 +- Backport a patch to fix gnome-software with latest appstream-glib + * Wed Sep 25 2019 Kalev Lember - 3.32.4-3 - Fix third party repo enabling not working (#1749566) From 8c2aa2a806174ee55d845edbc7e6917d03b75b80 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 27 Jan 2020 23:35:19 +0100 Subject: [PATCH 5/9] Fix various issues with rpm-ostree distro upgrades --- ...-downgrade-error-when-doing-distro-u.patch | 37 ++++++++ ...ee-Hook-up-distro-upgrade-triggering.patch | 88 +++++++++++++++++++ ...progress-when-downloading-distro-upg.patch | 26 ++++++ gnome-software.spec | 10 ++- 4 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 0001-rpm-ostree-Avoid-downgrade-error-when-doing-distro-u.patch create mode 100644 0002-rpm-ostree-Hook-up-distro-upgrade-triggering.patch create mode 100644 0003-rpm-ostree-Show-progress-when-downloading-distro-upg.patch diff --git a/0001-rpm-ostree-Avoid-downgrade-error-when-doing-distro-u.patch b/0001-rpm-ostree-Avoid-downgrade-error-when-doing-distro-u.patch new file mode 100644 index 0000000..51179c8 --- /dev/null +++ b/0001-rpm-ostree-Avoid-downgrade-error-when-doing-distro-u.patch @@ -0,0 +1,37 @@ +From 1b0f83e1f6d6be12c3d645e28af38e30eb7fa77e Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Wed, 8 Jan 2020 14:57:40 +0100 +Subject: [PATCH 1/3] rpm-ostree: Avoid downgrade error when doing distro + upgrade + +Pass 'allow-downgrade' to rpm-ostree to avoid erroring out when doing a +distro upgrade from a chronologically newer Fedora compose (but older +distro version) to a chronologically older, but newer distro version. +--- + 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 8b0578a78..8e8da6f7a 100644 +--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c ++++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +@@ -1,6 +1,6 @@ + /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * +- * Copyright (C) 2017-2019 Kalev Lember ++ * Copyright (C) 2017-2020 Kalev Lember + * + * SPDX-License-Identifier: GPL-2.0+ + */ +@@ -1412,7 +1412,7 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin, + gs_app_get_version (app)); + + options = make_rpmostree_options_variant (FALSE, /* reboot */ +- FALSE, /* allow-downgrade */ ++ TRUE, /* allow-downgrade */ + FALSE, /* cache-only */ + TRUE, /* download-only */ + FALSE, /* skip-purge */ +-- +2.21.1 + diff --git a/0002-rpm-ostree-Hook-up-distro-upgrade-triggering.patch b/0002-rpm-ostree-Hook-up-distro-upgrade-triggering.patch new file mode 100644 index 0000000..3be66f3 --- /dev/null +++ b/0002-rpm-ostree-Hook-up-distro-upgrade-triggering.patch @@ -0,0 +1,88 @@ +From 2669a70169402abf86253f42f7d2d9bd13e5d070 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Thu, 9 Jan 2020 14:54:18 +0100 +Subject: [PATCH 2/3] rpm-ostree: Hook up distro upgrade triggering + +We were correctly downloading distro upgrades, but never deploying the +new version. + +Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/857 +--- + plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 61 +++++++++++++++++++++++ + 1 file changed, 61 insertions(+) + +diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +index 8e8da6f7a..cccc7f5e0 100644 +--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c ++++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +@@ -928,6 +928,67 @@ gs_plugin_update_app (GsPlugin *plugin, + return TRUE; + } + ++gboolean ++gs_plugin_app_upgrade_trigger (GsPlugin *plugin, ++ GsApp *app, ++ GCancellable *cancellable, ++ GError **error) ++{ ++ GsPluginData *priv = gs_plugin_get_data (plugin); ++ const char *packages[] = { NULL }; ++ g_autofree gchar *new_refspec = NULL; ++ g_autofree gchar *transaction_address = NULL; ++ g_autoptr(GVariant) options = NULL; ++ g_autoptr(TransactionProgress) tp = transaction_progress_new (); ++ ++ /* only process this app if was created by this plugin */ ++ if (g_strcmp0 (gs_app_get_management_plugin (app), gs_plugin_get_name (plugin)) != 0) ++ return TRUE; ++ ++ /* check is distro-upgrade */ ++ if (gs_app_get_kind (app) != AS_APP_KIND_OS_UPGRADE) ++ return TRUE; ++ ++ /* construct new refspec based on the distro version we're upgrading to */ ++ new_refspec = g_strdup_printf ("ostree://fedora/%s/x86_64/silverblue", ++ gs_app_get_version (app)); ++ ++ /* trigger the upgrade */ ++ options = make_rpmostree_options_variant (FALSE, /* reboot */ ++ TRUE, /* allow-downgrade */ ++ TRUE, /* cache-only */ ++ FALSE, /* download-only */ ++ FALSE, /* skip-purge */ ++ FALSE, /* no-pull-base */ ++ FALSE, /* dry-run */ ++ FALSE); /* no-overrides */ ++ ++ if (!gs_rpmostree_os_call_rebase_sync (priv->os_proxy, ++ options, ++ new_refspec, ++ packages, ++ NULL /* fd list */, ++ &transaction_address, ++ NULL /* fd list out */, ++ cancellable, ++ error)) { ++ gs_rpmostree_error_convert (error); ++ return FALSE; ++ } ++ ++ if (!gs_rpmostree_transaction_get_response_sync (priv->sysroot_proxy, ++ transaction_address, ++ tp, ++ cancellable, ++ error)) { ++ gs_rpmostree_error_convert (error); ++ return FALSE; ++ } ++ ++ /* success */ ++ return TRUE; ++} ++ + static gboolean + gs_plugin_repo_enable (GsPlugin *plugin, + GsApp *app, +-- +2.21.1 + diff --git a/0003-rpm-ostree-Show-progress-when-downloading-distro-upg.patch b/0003-rpm-ostree-Show-progress-when-downloading-distro-upg.patch new file mode 100644 index 0000000..4734f1f --- /dev/null +++ b/0003-rpm-ostree-Show-progress-when-downloading-distro-upg.patch @@ -0,0 +1,26 @@ +From 3f8fa5c87c414391b295769db7bb622c44a2916d Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Mon, 27 Jan 2020 23:15:55 +0100 +Subject: [PATCH 3/3] rpm-ostree: Show progress when downloading distro + upgrades + +--- + plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +index cccc7f5e0..0ceb4d2d6 100644 +--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c ++++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +@@ -1482,6 +1482,8 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin, + FALSE); /* no-overrides */ + + gs_app_set_state (app, AS_APP_STATE_INSTALLING); ++ tp->app = g_object_ref (app); ++ + if (!gs_rpmostree_os_call_rebase_sync (priv->os_proxy, + options, + new_refspec, +-- +2.21.1 + diff --git a/gnome-software.spec b/gnome-software.spec index 906af04..b786f05 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -14,7 +14,7 @@ Name: gnome-software Version: 3.32.4 -Release: 4%{?dist} +Release: 5%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -27,6 +27,11 @@ Source1: f31.png Patch0: 0001-extras-Fix-third-party-repo-enabling-not-working.patch Patch1: 0001-Do-not-show-non-applications-in-the-installed-panel.patch +# Fix various issues with rpm-ostree distro upgrades +Patch2: 0001-rpm-ostree-Avoid-downgrade-error-when-doing-distro-u.patch +Patch3: 0002-rpm-ostree-Hook-up-distro-upgrade-triggering.patch +Patch4: 0003-rpm-ostree-Show-progress-when-downloading-distro-upg.patch + BuildRequires: gcc BuildRequires: gettext BuildRequires: libxslt @@ -256,6 +261,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Mon Jan 27 2020 Kalev Lember - 3.32.4-5 +- Fix various issues with rpm-ostree distro upgrades + * Thu Nov 14 2019 Kalev Lember - 3.32.4-4 - Backport a patch to fix gnome-software with latest appstream-glib From e3002b277b4eddd5253fcbd6d014e306dea6c6b0 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 31 Jan 2020 13:48:10 +0100 Subject: [PATCH 6/9] Backport one more rpm-ostree distro upgrade fix --- ...-error-out-when-distro-upgrade-ref-i.patch | 51 +++++++++++++++++++ gnome-software.spec | 6 ++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 0001-rpm-ostree-Don-t-error-out-when-distro-upgrade-ref-i.patch diff --git a/0001-rpm-ostree-Don-t-error-out-when-distro-upgrade-ref-i.patch b/0001-rpm-ostree-Don-t-error-out-when-distro-upgrade-ref-i.patch new file mode 100644 index 0000000..4ad09f0 --- /dev/null +++ b/0001-rpm-ostree-Don-t-error-out-when-distro-upgrade-ref-i.patch @@ -0,0 +1,51 @@ +From 0c72aabd518632f5ad7f0851d3ea2d7c32eecc9a Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Fri, 31 Jan 2020 14:21:20 +0100 +Subject: [PATCH] rpm-ostree: Don't error out when distro upgrade ref is + already deployed + +--- + plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +index 0ceb4d2d..3811f935 100644 +--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c ++++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c +@@ -982,7 +982,14 @@ gs_plugin_app_upgrade_trigger (GsPlugin *plugin, + cancellable, + error)) { + gs_rpmostree_error_convert (error); +- return FALSE; ++ ++ if (g_strrstr ((*error)->message, "Old and new refs are equal")) { ++ /* don't error out if the correct tree is already deployed */ ++ g_debug ("ignoring rpm-ostree error: %s", (*error)->message); ++ g_clear_error (error); ++ } else { ++ return FALSE; ++ } + } + + /* success */ +@@ -1504,8 +1511,15 @@ gs_plugin_app_upgrade_download (GsPlugin *plugin, + cancellable, + error)) { + gs_rpmostree_error_convert (error); +- gs_app_set_state_recover (app); +- return FALSE; ++ ++ if (g_strrstr ((*error)->message, "Old and new refs are equal")) { ++ /* don't error out if the correct tree is already deployed */ ++ g_debug ("ignoring rpm-ostree error: %s", (*error)->message); ++ g_clear_error (error); ++ } else { ++ gs_app_set_state_recover (app); ++ return FALSE; ++ } + } + + /* state is known */ +-- +2.24.1 + diff --git a/gnome-software.spec b/gnome-software.spec index b786f05..3f95197 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -14,7 +14,7 @@ Name: gnome-software Version: 3.32.4 -Release: 5%{?dist} +Release: 6%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -31,6 +31,7 @@ Patch1: 0001-Do-not-show-non-applications-in-the-installed-panel.patch Patch2: 0001-rpm-ostree-Avoid-downgrade-error-when-doing-distro-u.patch Patch3: 0002-rpm-ostree-Hook-up-distro-upgrade-triggering.patch Patch4: 0003-rpm-ostree-Show-progress-when-downloading-distro-upg.patch +Patch5: 0001-rpm-ostree-Don-t-error-out-when-distro-upgrade-ref-i.patch BuildRequires: gcc BuildRequires: gettext @@ -261,6 +262,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Fri Jan 31 2020 Kalev Lember - 3.32.4-6 +- Backport one more rpm-ostree distro upgrade fix + * Mon Jan 27 2020 Kalev Lember - 3.32.4-5 - Fix various issues with rpm-ostree distro upgrades From be21694461382359c4df1cd7132ca701ad10fcc6 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 6 Mar 2020 11:18:11 +0100 Subject: [PATCH 7/9] Add artwork for F32 Beta upgrades --- .gitignore | 1 + gnome-software.spec | 8 +++++++- sources | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7245e0b..597a5d7 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,4 @@ /gnome-software-3.32.3.tar.xz /gnome-software-3.32.4.tar.xz /f31.png +/f32.png diff --git a/gnome-software.spec b/gnome-software.spec index 3f95197..aa9b3a5 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -14,7 +14,7 @@ Name: gnome-software Version: 3.32.4 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -22,6 +22,8 @@ URL: https://wiki.gnome.org/Apps/Software Source0: https://download.gnome.org/sources/gnome-software/3.32/%{name}-%{version}.tar.xz # /usr/share/backgrounds/f31/default/wide/f31.png from f31-backgrounds-base Source1: f31.png +# /usr/share/backgrounds/f32/default/f32.png from f32-backgrounds-base +Source2: f32.png # Backported from upstream Patch0: 0001-extras-Fix-third-party-repo-enabling-not-working.patch @@ -170,6 +172,7 @@ 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 @@ -262,6 +265,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Fri Mar 06 2020 Kalev Lember - 3.32.4-7 +- Add artwork for F32 Beta upgrades + * Fri Jan 31 2020 Kalev Lember - 3.32.4-6 - Backport one more rpm-ostree distro upgrade fix diff --git a/sources b/sources index 8b05b7f..faad478 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ SHA512 (gnome-software-3.32.4.tar.xz) = 81a32477fe755f57465cfbc3d1c88a2f460d6a21222fd73aced06c92b409023a1ace002c338e713135658896c2c14a7ff8508eeefbc5f648e66d8c8777dee881 SHA512 (f31.png) = 69e6c8291d93640d4d6f5d71c3a9e08f65a90c19c38b6036423c236063e68be03b68c2668aae6d8b0a03c7a24bf8ae8e108dfb2a9cd85b7bb232751b3e05bb0f +SHA512 (f32.png) = 1f5259d5dd096f1c2226a4d4565acf9b374ff763553f279dfc65356298a5ee057b8f5c208e226e0a44c8bf0e0da06daabd36d38a336725a8e3a1fe9dab0667ca From 068fd3d73e9508958d806e04573f2801f83cd4dd Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 3 Apr 2020 19:07:37 +0200 Subject: [PATCH 8/9] Use black text on F32 distro upgrade background image --- ...lack-font-for-Fedora-distro-upgrades.patch | 53 +++++++++++++++++++ ...-distro-upgrade-css-for-the-HC-theme.patch | 43 +++++++++++++++ gnome-software.spec | 9 +++- 3 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 0001-Use-black-font-for-Fedora-distro-upgrades.patch create mode 100644 0002-Add-distro-upgrade-css-for-the-HC-theme.patch diff --git a/0001-Use-black-font-for-Fedora-distro-upgrades.patch b/0001-Use-black-font-for-Fedora-distro-upgrades.patch new file mode 100644 index 0000000..27041f0 --- /dev/null +++ b/0001-Use-black-font-for-Fedora-distro-upgrades.patch @@ -0,0 +1,53 @@ +From d683ff504a176d9aa0e9ca3b833ddb33ba17645a Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Fri, 3 Apr 2020 15:46:50 +0200 +Subject: [PATCH 1/2] Use black font for Fedora distro upgrades + +This makes the text more legible on light backgrounds (such as the F32 +distro upgrade background). + +Fixes https://gitlab.gnome.org/GNOME/gnome-software/issues/956 +--- + .../gs-plugin-fedora-pkgdb-collections.c | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 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 e41bbc88..5862bae5 100644 +--- a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c ++++ b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c +@@ -229,8 +229,7 @@ _get_upgrade_css_background (guint version) + if (g_file_test (filename2, G_FILE_TEST_EXISTS)) + return g_strdup_printf ("url('%s')", filename2); + +- /* fall back to solid colour */ +- return g_strdup_printf ("#151E65"); ++ return NULL; + } + + static gint +@@ -295,13 +294,16 @@ _create_upgrade_from_info (GsPlugin *plugin, PkgdbItem *item) + item->version); + gs_app_set_url (app, AS_URL_KIND_HOMEPAGE, url); + +- /* use a fancy background */ ++ /* use a fancy background if possible */ + background = _get_upgrade_css_background (item->version); +- css = g_strdup_printf ("background: %s;" +- "background-position: center;" +- "background-size: cover;", +- background); +- gs_app_set_metadata (app, "GnomeSoftware::UpgradeBanner-css", css); ++ if (background != NULL) { ++ css = g_strdup_printf ("background: %s;" ++ "background-position: center;" ++ "background-size: cover;" ++ "color: black;", ++ background); ++ gs_app_set_metadata (app, "GnomeSoftware::UpgradeBanner-css", css); ++ } + + /* save in the cache */ + gs_plugin_cache_add (plugin, cache_key, app); +-- +2.25.2 + diff --git a/0002-Add-distro-upgrade-css-for-the-HC-theme.patch b/0002-Add-distro-upgrade-css-for-the-HC-theme.patch new file mode 100644 index 0000000..17977fa --- /dev/null +++ b/0002-Add-distro-upgrade-css-for-the-HC-theme.patch @@ -0,0 +1,43 @@ +From b4309196a15b1b59b7cc095b7d8ab8f5b2424e06 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Fri, 3 Apr 2020 16:00:12 +0200 +Subject: [PATCH 2/2] Add distro upgrade css for the HC theme + +Just copy the regular css over so that the banner doesn't look +completely off. +--- + src/gtk-style-hc.css | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/src/gtk-style-hc.css b/src/gtk-style-hc.css +index 959823e6..1006649e 100644 +--- a/src/gtk-style-hc.css ++++ b/src/gtk-style-hc.css +@@ -222,6 +222,24 @@ button.star, .button.star { + padding: 16px; + } + ++.upgrade-banner { ++ background-color: #1c5288; ++ padding: 0px; ++ border-radius: 4px; ++ border: 1px solid darker(@theme_bg_color); ++ color: @theme_selected_fg_color; ++} ++ ++.upgrade-buttons { ++ padding: 18px; ++ border-bottom-left-radius: 4px; ++ border-bottom-right-radius: 4px; ++} ++ ++.upgrade-progressbar { ++ box-shadow: none ++} ++ + .eol-box { + background-color: @theme_selected_bg_color; + border: 1px solid shade(@theme_selected_bg_color, 0.8); +-- +2.25.2 + diff --git a/gnome-software.spec b/gnome-software.spec index aa9b3a5..2254cb4 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -14,7 +14,7 @@ Name: gnome-software Version: 3.32.4 -Release: 7%{?dist} +Release: 8%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -35,6 +35,10 @@ Patch3: 0002-rpm-ostree-Hook-up-distro-upgrade-triggering.patch Patch4: 0003-rpm-ostree-Show-progress-when-downloading-distro-upg.patch Patch5: 0001-rpm-ostree-Don-t-error-out-when-distro-upgrade-ref-i.patch +# Use black text on F32 distro upgrade background image +Patch6: 0001-Use-black-font-for-Fedora-distro-upgrades.patch +Patch7: 0002-Add-distro-upgrade-css-for-the-HC-theme.patch + BuildRequires: gcc BuildRequires: gettext BuildRequires: libxslt @@ -265,6 +269,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Fri Apr 03 2020 Kalev Lember - 3.32.4-8 +- Use black text on F32 distro upgrade background image + * Fri Mar 06 2020 Kalev Lember - 3.32.4-7 - Add artwork for F32 Beta upgrades From 6c66925b20bc628b923482ba0e3f7ce86346554e Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Thu, 23 Apr 2020 14:43:33 +0200 Subject: [PATCH 9/9] Add final F32 artwork --- ...F32-upgrade-banner-position-and-font.patch | 29 +++++++++++++++++++ gnome-software.spec | 8 +++-- sources | 2 +- 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 0001-Fine-tune-F32-upgrade-banner-position-and-font.patch diff --git a/0001-Fine-tune-F32-upgrade-banner-position-and-font.patch b/0001-Fine-tune-F32-upgrade-banner-position-and-font.patch new file mode 100644 index 0000000..3f3afca --- /dev/null +++ b/0001-Fine-tune-F32-upgrade-banner-position-and-font.patch @@ -0,0 +1,29 @@ +From 9f6ada1d9caf72c77da75aa860643a4ac20796d2 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Thu, 23 Apr 2020 14:37:21 +0200 +Subject: [PATCH] Fine-tune F32 upgrade banner position and font + +As per discussion with jimmac on #fedora-design. +--- + .../gs-plugin-fedora-pkgdb-collections.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 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 5862bae5..0de24161 100644 +--- a/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c ++++ b/plugins/fedora-pkgdb-collections/gs-plugin-fedora-pkgdb-collections.c +@@ -298,9 +298,9 @@ _create_upgrade_from_info (GsPlugin *plugin, PkgdbItem *item) + background = _get_upgrade_css_background (item->version); + if (background != NULL) { + css = g_strdup_printf ("background: %s;" +- "background-position: center;" ++ "background-position: top;" + "background-size: cover;" +- "color: black;", ++ "color: white; text-shadow: 0 2px 2px rgba(0,0,0,0.5);", + background); + gs_app_set_metadata (app, "GnomeSoftware::UpgradeBanner-css", css); + } +-- +2.26.0 + diff --git a/gnome-software.spec b/gnome-software.spec index 2254cb4..b76e601 100644 --- a/gnome-software.spec +++ b/gnome-software.spec @@ -14,7 +14,7 @@ Name: gnome-software Version: 3.32.4 -Release: 8%{?dist} +Release: 9%{?dist} Summary: A software center for GNOME License: GPLv2+ @@ -35,9 +35,10 @@ Patch3: 0002-rpm-ostree-Hook-up-distro-upgrade-triggering.patch Patch4: 0003-rpm-ostree-Show-progress-when-downloading-distro-upg.patch Patch5: 0001-rpm-ostree-Don-t-error-out-when-distro-upgrade-ref-i.patch -# Use black text on F32 distro upgrade background image +# Fine-tune F32 upgrade banner position and font Patch6: 0001-Use-black-font-for-Fedora-distro-upgrades.patch Patch7: 0002-Add-distro-upgrade-css-for-the-HC-theme.patch +Patch8: 0001-Fine-tune-F32-upgrade-banner-position-and-font.patch BuildRequires: gcc BuildRequires: gettext @@ -269,6 +270,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_mandir}/man1/gnome-software-editor.1* %changelog +* Thu Apr 23 2020 Kalev Lember - 3.32.4-9 +- Add final F32 artwork + * Fri Apr 03 2020 Kalev Lember - 3.32.4-8 - Use black text on F32 distro upgrade background image diff --git a/sources b/sources index faad478..5bdc810 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (gnome-software-3.32.4.tar.xz) = 81a32477fe755f57465cfbc3d1c88a2f460d6a21222fd73aced06c92b409023a1ace002c338e713135658896c2c14a7ff8508eeefbc5f648e66d8c8777dee881 SHA512 (f31.png) = 69e6c8291d93640d4d6f5d71c3a9e08f65a90c19c38b6036423c236063e68be03b68c2668aae6d8b0a03c7a24bf8ae8e108dfb2a9cd85b7bb232751b3e05bb0f -SHA512 (f32.png) = 1f5259d5dd096f1c2226a4d4565acf9b374ff763553f279dfc65356298a5ee057b8f5c208e226e0a44c8bf0e0da06daabd36d38a336725a8e3a1fe9dab0667ca +SHA512 (f32.png) = 2adc08c5f4ca95f3fbf970bb77d4fda12ea4935d8bff707381d867d9ae90cf35b118444681dffb49229810d7c72f346d3f524d5bd7867d88c71b3ce8c04e1e05