Compare commits

...
Sign in to create a new pull request.

14 commits

Author SHA1 Message Date
Kalev Lember
9b1bd01402 Update artwork for F33 Final upgrades 2020-10-16 11:25:44 +02:00
Kalev Lember
20e756d6f4 Add artwork for F33 Beta upgrades 2020-09-09 11:13:39 +02:00
Kalev Lember
69b0aa6dec Add final F32 artwork 2020-04-23 14:45:22 +02:00
Kalev Lember
0a801ec139 Use black text on F32 distro upgrade background image 2020-04-03 19:07:37 +02:00
Kalev Lember
96de893fed Show correct button for distro upgrades 2020-03-06 11:24:33 +01:00
Kalev Lember
49b34dc5e9 Backport one more rpm-ostree distro upgrade fix 2020-03-06 11:20:46 +01:00
Kalev Lember
8907933e33 Fix various issues with rpm-ostree distro upgrades 2020-03-06 11:20:13 +01:00
Kalev Lember
a46849c7a0 Add artwork for F32 Beta upgrades 2020-03-06 11:18:11 +01:00
Richard Hughes
bcf7d2f7f5 Update to 3.34.2 2019-11-25 10:16:02 +00:00
Kalev Lember
778f8afc33 Backport patches to fix a crash in gs_flatpak_get_installation
https://bugzilla.redhat.com/show_bug.cgi?id=1762689
2019-10-18 13:59:19 +02:00
Kalev Lember
2042db16f2 Update renamed appstream ids for GNOME 3.34 2019-10-14 20:03:14 +02:00
Richard Hughes
2c178a1a44 Simpler patch 2019-10-11 19:38:45 +01:00
Richard Hughes
6788827f4d Backport a better patch 2019-10-11 16:30:22 +01:00
Richard Hughes
fe804139e3 Backport a patch to correct the applications shown in the installed list 2019-10-10 09:37:37 +01:00
11 changed files with 446 additions and 3 deletions

3
.gitignore vendored
View file

@ -106,3 +106,6 @@
/gnome-software-3.32.4.tar.xz
/gnome-software-3.34.0.tar.xz
/gnome-software-3.34.1.tar.xz
/gnome-software-3.34.2.tar.xz
/f32.png
/f33.png

View file

@ -0,0 +1,29 @@
From 9f6ada1d9caf72c77da75aa860643a4ac20796d2 Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
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

View file

@ -0,0 +1,53 @@
From d683ff504a176d9aa0e9ca3b833ddb33ba17645a Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
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

View file

@ -0,0 +1,37 @@
From 1b0f83e1f6d6be12c3d645e28af38e30eb7fa77e Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
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 <klember@redhat.com>
+ * Copyright (C) 2017-2020 Kalev Lember <klember@redhat.com>
*
* 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

View file

@ -0,0 +1,51 @@
From 0c72aabd518632f5ad7f0851d3ea2d7c32eecc9a Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
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

View file

@ -0,0 +1,49 @@
From 8b8f38fad7983e8ce30bb0b569cd42f18f524a90 Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
Date: Mon, 2 Mar 2020 15:37:52 +0100
Subject: [PATCH] upgrade banner: Show the correct button when NEEDS_REBOOT
quirk is set
The logic here is that all distro upgrades need a reboot to *use* it,
but only some need a reboot to *deploy* it. We use the
GS_APP_QUIRK_NEEDS_REBOOT to denote distro upgrades that need to reboot
to deploy it, e.g. PackageKit distro upgrades or rpm-ostree rebases.
---
src/gs-upgrade-banner.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/gs-upgrade-banner.c b/src/gs-upgrade-banner.c
index 51b369f5..8abe1d43 100644
--- a/src/gs-upgrade-banner.c
+++ b/src/gs-upgrade-banner.c
@@ -57,20 +57,19 @@ gs_upgrade_banner_refresh (GsUpgradeBanner *self)
name_bold = g_strdup_printf ("<b>%s</b>", gs_app_get_name (priv->app));
version_bold = g_strdup_printf ("<b>%s</b>", gs_app_get_version (priv->app));
- /* Show the right button text. Distributions which are based on OSTree
- * dont need a post-reboot installation step. */
+ /* Distributions that need to reboot to deploy the upgrade show the "Install" button */
if (gs_app_has_quirk (priv->app, GS_APP_QUIRK_NEEDS_REBOOT)) {
- gtk_button_set_label (GTK_BUTTON (priv->button_upgrades_install),
- _("_Restart Now"));
- gtk_label_set_text (GTK_LABEL (priv->label_upgrades_warning),
- _("Updates will be applied when the "
- "computer is restarted."));
- } else {
gtk_button_set_label (GTK_BUTTON (priv->button_upgrades_install),
_("_Install"));
gtk_label_set_text (GTK_LABEL (priv->label_upgrades_warning),
_("It is recommended that you back up your "
"data and files before upgrading."));
+ } else {
+ gtk_button_set_label (GTK_BUTTON (priv->button_upgrades_install),
+ _("_Restart Now"));
+ gtk_label_set_text (GTK_LABEL (priv->label_upgrades_warning),
+ _("Updates will be applied when the "
+ "computer is restarted."));
}
/* Refresh the title. Normally a distro upgrade state goes from
--
2.24.1

View file

@ -0,0 +1,43 @@
From b4309196a15b1b59b7cc095b7d8ab8f5b2424e06 Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
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

View file

@ -0,0 +1,88 @@
From 2669a70169402abf86253f42f7d2d9bd13e5d070 Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
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

View file

@ -0,0 +1,26 @@
From 3f8fa5c87c414391b295769db7bb622c44a2916d Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
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

View file

@ -11,13 +11,31 @@
%global libxmlb_version 0.1.7
Name: gnome-software
Version: 3.34.1
Release: 1%{?dist}
Version: 3.34.2
Release: 6%{?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.34/%{name}-%{version}.tar.xz
# /usr/share/backgrounds/f32/default/f32.png from f32-backgrounds-base
Source1: f32.png
# /usr/share/backgrounds/f33/default/f33.png from f33-backgrounds-base
Source2: f33.png
# Show correct button for distro upgrades
Patch1: 0001-upgrade-banner-Show-the-correct-button-when-NEEDS_RE.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
Patch5: 0001-rpm-ostree-Don-t-error-out-when-distro-upgrade-ref-i.patch
# 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
@ -135,6 +153,11 @@ 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/
cp -a %{SOURCE2} %{buildroot}%{_datadir}/gnome-software/backgrounds/
%find_lang %name --with-gnome
%check
@ -152,6 +175,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
@ -220,6 +244,44 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_mandir}/man1/gnome-software-editor.1*
%changelog
* Fri Oct 16 2020 Kalev Lember <klember@redhat.com> - 3.34.2-6
- Update artwork for F33 Final upgrades
* Wed Sep 09 2020 Kalev Lember <klember@redhat.com> - 3.34.2-5
- Add artwork for F33 Beta upgrades
* Thu Apr 23 2020 Kalev Lember <klember@redhat.com> - 3.34.2-4
- Add final F32 artwork
* Fri Apr 03 2020 Kalev Lember <klember@redhat.com> - 3.34.2-3
- Use black text on F32 distro upgrade background image
* Fri Mar 06 2020 Kalev Lember <klember@redhat.com> - 3.34.2-2
- Add artwork for F32 Beta upgrades
- Fix various issues with rpm-ostree distro upgrades
- Show correct button for distro upgrades
* Mon Nov 25 2019 Richard Hughes <rhughes@redhat.com> - 3.34.2-1
- Update to 3.34.2
* Fri Oct 18 2019 Kalev Lember <klember@redhat.com> - 3.34.1-6
- Backport patches to fix a crash in gs_flatpak_get_installation (#1762689)
* Mon Oct 14 2019 Kalev Lember <klember@redhat.com> - 3.34.1-5
- Update renamed appstream ids for GNOME 3.34
* Fri Oct 11 2019 Richard Hughes <rhughes@redhat.com> - 3.34.1-4
- Backport a simpler to correct the installed applications
- Resolves #1759193
* Fri Oct 11 2019 Richard Hughes <rhughes@redhat.com> - 3.34.1-3
- Backport a better patch to correct the installed applications
- Resolves #1759193
* Thu Oct 10 2019 Richard Hughes <rhughes@redhat.com> - 3.34.1-2
- Backport a patch to correct the applications shown in the installed list
- Resolves #1759193
* Mon Oct 07 2019 Kalev Lember <klember@redhat.com> - 3.34.1-1
- Update to 3.34.1

View file

@ -1 +1,3 @@
SHA512 (gnome-software-3.34.1.tar.xz) = 04bb9a587d90950966518c964256d29dfecd567ebb4996ad012c0bb3ed262bcd745a37887b4949ffbb4bac06f9fa3e19d342d14c6a82ef8762f5727fbf79468a
SHA512 (gnome-software-3.34.2.tar.xz) = 4deb09530fbeeadd54e69d03ef4cecaef47c6766bce0ec5230bb090d27e54664577a227416933b6ec4780249f4565e51202a25517fba5dd040fd895bd3a26397
SHA512 (f32.png) = 2adc08c5f4ca95f3fbf970bb77d4fda12ea4935d8bff707381d867d9ae90cf35b118444681dffb49229810d7c72f346d3f524d5bd7867d88c71b3ce8c04e1e05
SHA512 (f33.png) = 371b492d89f245c28f8ee56e154bcfdb4af0a5416323faab08cad0632993e82512301676ef21e26fce371c7d0af3c53b6a2c3539f43f5a6fa5fdc9f6911f6ad7