From a9c0f7db6f804d0db6f44c7ad5d1f9e60adfdd51 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 23 Mar 2022 16:41:45 -0700 Subject: [PATCH] Backport proposed upstream fix for keyring issue (#2066424) --- ...pport-GNOME-42-dark-theme-preference.patch | 48 ------------------- 144.patch | 41 ++++++++++++++++ gnome-initial-setup.spec | 11 +++-- 3 files changed, 49 insertions(+), 51 deletions(-) delete mode 100644 0001-Revert-Support-GNOME-42-dark-theme-preference.patch create mode 100644 144.patch diff --git a/0001-Revert-Support-GNOME-42-dark-theme-preference.patch b/0001-Revert-Support-GNOME-42-dark-theme-preference.patch deleted file mode 100644 index 9f2afef..0000000 --- a/0001-Revert-Support-GNOME-42-dark-theme-preference.patch +++ /dev/null @@ -1,48 +0,0 @@ -From f292954b5e4ebf8775f48e269b4a840e3043d412 Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Mon, 21 Mar 2022 17:19:28 -0700 -Subject: [PATCH] Revert "Support GNOME 42 dark theme preference" - -This reverts commit d91dd17bd8169aa8f20a141f33b6c8298a573ee5. ---- - gnome-initial-setup/gnome-initial-setup.c | 4 ---- - gnome-initial-setup/meson.build | 1 - - 2 files changed, 5 deletions(-) - -diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c -index 245a1334..a4c67110 100644 ---- a/gnome-initial-setup/gnome-initial-setup.c -+++ b/gnome-initial-setup/gnome-initial-setup.c -@@ -27,7 +27,6 @@ - #include - #include - #include --#include - - #ifdef HAVE_CHEESE - #include -@@ -290,9 +289,6 @@ main (int argc, char *argv[]) - #endif - - gtk_init (&argc, &argv); -- hdy_init (); -- hdy_style_manager_set_color_scheme (hdy_style_manager_get_default (), -- HDY_COLOR_SCHEME_PREFER_LIGHT); - - g_message ("Starting gnome-initial-setup"); - if (gis_get_mock_mode ()) -diff --git a/gnome-initial-setup/meson.build b/gnome-initial-setup/meson.build -index 4ee9ff39..43321ec7 100644 ---- a/gnome-initial-setup/meson.build -+++ b/gnome-initial-setup/meson.build -@@ -44,7 +44,6 @@ dependencies = [ - dependency ('gdm', version: '>= 3.8.3'), - dependency ('geocode-glib-1.0'), - dependency ('libgeoclue-2.0', version: '>= 2.3.1'), -- dependency ('libhandy-1', version: '>= 1.5.90', fallback: ['libhandy', 'libhandy_dep']), - cc.find_library('m', required: false), - dependency ('pango', version: '>= 1.32.5'), - dependency ('rest-0.7'), --- -2.35.1 - diff --git a/144.patch b/144.patch new file mode 100644 index 0000000..461cb88 --- /dev/null +++ b/144.patch @@ -0,0 +1,41 @@ +From bf5502df3e1d12a7a28ced86752c94baf509dbe0 Mon Sep 17 00:00:00 2001 +From: Will Thompson +Date: Wed, 23 Mar 2022 16:08:31 +0000 +Subject: [PATCH] Tell libhandy not to use Settings portal + +By default, libhandy reads settings from the Settings portal, which causes +the portal to be started, which causes gnome-keyring to be started. This +interferes with our attempt to manually start gnome-keyring and set the +login keyring password to a well-known value, which we overwrite with +the user's password once they choose one. + +To avoid this problem, set an environment variable to tell libhandy not +to use the portal. + +Fixes: https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/141 +--- + gnome-initial-setup/gnome-initial-setup.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c +index 245a1334..fe9a88db 100644 +--- a/gnome-initial-setup/gnome-initial-setup.c ++++ b/gnome-initial-setup/gnome-initial-setup.c +@@ -276,6 +276,14 @@ main (int argc, char *argv[]) + + g_unsetenv ("GIO_USE_VFS"); + ++ /* By default, libhandy reads settings from the Settings portal, which causes ++ * the portal to be started, which causes gnome-keyring to be started. This ++ * interferes with our attempt below to manually start gnome-keyring and set ++ * the login keyring password to a well-known value, which we overwrite with ++ * the user's password once they choose one. ++ */ ++ g_setenv ("HDY_DISABLE_PORTAL", "1", /* overwrite */ TRUE); ++ + context = g_option_context_new (_("— GNOME initial setup")); + g_option_context_add_main_entries (context, entries, NULL); + +-- +GitLab + diff --git a/gnome-initial-setup.spec b/gnome-initial-setup.spec index 3b8c1d9..fe528be 100644 --- a/gnome-initial-setup.spec +++ b/gnome-initial-setup.spec @@ -9,17 +9,19 @@ Name: gnome-initial-setup Version: 42.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Bootstrapping your OS License: GPLv2+ URL: https://wiki.gnome.org/Design/OS/InitialSetup Source0: https://download.gnome.org/sources/%{name}/42/%{name}-%{tarball_version}.tar.xz Source1: vendor.conf -# Revert dark theme support - it breaks setting new user keyring password: +# Tell libhandy not to use Settings portal +# Fixes setting new user keyring password # https://bugzilla.redhat.com/show_bug.cgi?id=2066424 # https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/141 -Patch0: 0001-Revert-Support-GNOME-42-dark-theme-preference.patch +# https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/144 +Patch0: 144.patch BuildRequires: meson BuildRequires: gcc @@ -111,6 +113,9 @@ useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} &>/dev/null || %{_datadir}/gnome-initial-setup/vendor.conf %changelog +* Wed Mar 23 2022 Adam Williamson - 42.0-3 +- Backport proposed upstream fix for keyring issue (#2066424) + * Mon Mar 21 2022 Adam Williamson - 42.0-2 - Revert dark theme support to fix user keyring password (#2066424)