From 7427ed38d95c4897b15976b68d50e495571e97c0 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Wed, 17 Jan 2024 12:36:39 -0600 Subject: [PATCH] Update to 46.alpha --- gnome-initial-setup.spec | 20 ++- live-user-mode.patch | 255 +++++++++++++++++++++------------------ sources | 2 +- 3 files changed, 152 insertions(+), 125 deletions(-) diff --git a/gnome-initial-setup.spec b/gnome-initial-setup.spec index c5b8064..7221381 100644 --- a/gnome-initial-setup.spec +++ b/gnome-initial-setup.spec @@ -7,8 +7,14 @@ %global tarball_version %%(echo %{version} | tr '~' '.') +%if 0%{?rhel} +%bcond_with webkitgtk +%else +%bcond_without webkitgtk +%endif + Name: gnome-initial-setup -Version: 45.0 +Version: 46.alpha Release: %autorelease Summary: Bootstrapping your OS @@ -31,8 +37,6 @@ BuildRequires: pkgconfig(gio-2.0) >= %{glib_required_version} BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib_required_version} BuildRequires: pkgconfig(glib-2.0) >= %{glib_required_version} BuildRequires: pkgconfig(gnome-desktop-4) -BuildRequires: pkgconfig(goa-1.0) -BuildRequires: pkgconfig(goa-backend-1.0) BuildRequires: pkgconfig(gsettings-desktop-schemas) BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gtk4) >= %{gtk_required_version} @@ -51,7 +55,9 @@ BuildRequires: pkgconfig(pango) BuildRequires: pkgconfig(polkit-gobject-1) BuildRequires: pkgconfig(pwquality) BuildRequires: pkgconfig(rest-1.0) +%if %{with webkitgtk} BuildRequires: pkgconfig(webkitgtk-6.0) +%endif BuildRequires: gnome-desktop4 >= %{gnome_desktop_version} # gnome-initial-setup is being run by gdm @@ -76,7 +82,12 @@ you through configuring it. It is integrated with gdm. %autosetup -p1 -n %{name}-%{tarball_version} %build -%meson -Dparental_controls=disabled +%meson \ + -Dparental_controls=disabled \ +%if !%{with webkitgtk} + -Dwebkitgtk=disabled \ +%endif + %{nil} %meson_build %install @@ -100,7 +111,6 @@ useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} &>/dev/null || %ghost %{_localstatedir}/gnome-initial-setup/state %{_libexecdir}/gnome-initial-setup %{_libexecdir}/gnome-initial-setup-copy-worker -%{_libexecdir}/gnome-initial-setup-goa-helper %{_sysconfdir}/xdg/autostart/gnome-initial-setup-copy-worker.desktop %{_sysconfdir}/xdg/autostart/gnome-initial-setup-first-login.desktop %{_datadir}/applications/gnome-initial-setup.desktop diff --git a/live-user-mode.patch b/live-user-mode.patch index d849e60..221f726 100644 --- a/live-user-mode.patch +++ b/live-user-mode.patch @@ -1,7 +1,7 @@ -From 0e875c6e060147a1357dcc5ef90534786adb6a53 Mon Sep 17 00:00:00 2001 +From 575edeab57c891a7053279c676e82bebe53222d3 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 15 Aug 2023 10:53:41 -0400 -Subject: [PATCH 01/10] gnome-initial-setup: Bump GLib required version to 2.76 +Subject: [PATCH 01/11] gnome-initial-setup: Bump GLib required version to 2.76 This gives us GStrvBuilder, g_ptr_array_sort_values, etc --- @@ -10,12 +10,12 @@ This gives us GStrvBuilder, g_ptr_array_sort_values, etc 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gnome-initial-setup/meson.build b/gnome-initial-setup/meson.build -index a6a014d1..64fa834a 100644 +index beb96ecd..32b3fe46 100644 --- a/gnome-initial-setup/meson.build +++ b/gnome-initial-setup/meson.build -@@ -52,7 +52,7 @@ dependencies = [ +@@ -51,7 +51,7 @@ dependencies = [ + dependency ('gsettings-desktop-schemas', version: '>= 3.37.1'), dependency ('fontconfig'), - dependency ('goa-1.0'), dependency ('gtk4', version: '>= 4.6'), - dependency ('glib-2.0', version: '>= 2.63.1'), + dependency ('glib-2.0', version: '>= 2.76.0'), @@ -23,7 +23,7 @@ index a6a014d1..64fa834a 100644 dependency ('gdm', version: '>= 3.8.3'), gweather_dep, diff --git a/meson.build b/meson.build -index 2e40a2e2..fba4d96a 100644 +index 5d30fcd1..00e24d7b 100644 --- a/meson.build +++ b/meson.build @@ -30,8 +30,8 @@ conf.set_quoted('LIBEXECDIR', libexec_dir) @@ -38,13 +38,13 @@ index 2e40a2e2..fba4d96a 100644 enable_systemd = get_option('systemd') if enable_systemd -- -2.41.0 +2.43.0 -From 94c458dd6d8a2081884bfdc62a4405933b4bf3f6 Mon Sep 17 00:00:00 2001 +From 60a2db34bd50d561e716a63dd526ee7ff4810a29 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Sat, 9 Sep 2023 17:07:46 -0400 -Subject: [PATCH 02/10] keyboard: Don't require localed for existing user mode +Subject: [PATCH 02/11] keyboard: Don't require localed for existing user mode If we're in existing user mode, the user may not have permission to set the system keymap. @@ -76,13 +76,13 @@ index fa41230f..da384495 100644 } -- -2.41.0 +2.43.0 -From 73fe1db72017c1be6346525c2b68cf109d31effe Mon Sep 17 00:00:00 2001 +From 1478cce3663bfa276066c073be3bbb65bc4b1785 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 8 Sep 2023 11:02:39 -0400 -Subject: [PATCH 03/10] language: Don't proceed until localed has set locale +Subject: [PATCH 03/11] language: Don't proceed until localed has set locale In sysmte modes, the keyboard page requires reading the locale from localed, so we need to make sure the setting has been applied before @@ -165,13 +165,13 @@ index 87b9f2d8..26a01257 100644 } -- -2.41.0 +2.43.0 -From e020f546a68101f2691190bdfb2d396da79b8ae0 Mon Sep 17 00:00:00 2001 +From e8d5b6a4c1ee9bfb3f8ed7dbe5f25053fae7a1ae Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 24 Aug 2023 21:19:40 -0400 -Subject: [PATCH 04/10] keyboard: Get default input sources from gnome-desktop +Subject: [PATCH 04/11] keyboard: Get default input sources from gnome-desktop Right now, we figure out the default input sources ourselves, based on the current locale and layout information coming from @@ -779,13 +779,13 @@ index da384495..f2bfe164 100644 if (gis_driver_get_mode (GIS_PAGE (self)->driver) == GIS_DRIVER_MODE_NEW_USER) priv->permission = polkit_permission_new_sync ("org.freedesktop.locale1.set-keyboard", NULL, NULL, NULL); -- -2.41.0 +2.43.0 -From 7fa6c5e1a2152e65d4935f6f9bed0e419ff61a64 Mon Sep 17 00:00:00 2001 +From 7b83c89d8b2fe2f9de5f7f364a7af5f2f4fcc605 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Sun, 13 Aug 2023 09:09:56 -0400 -Subject: [PATCH 05/10] driver: Specify mode via flags instead of boolean +Subject: [PATCH 05/11] driver: Specify mode via flags instead of boolean At the moment we just have system mode and new user mode, but we're actually going to want other modes (such as @@ -797,14 +797,14 @@ two modes, so this commit changes it use bit flags instead. --- gnome-initial-setup/gis-driver.c | 17 ++- gnome-initial-setup/gis-driver.h | 8 +- - gnome-initial-setup/gnome-initial-setup.c | 128 +++++++++++++--------- - 3 files changed, 93 insertions(+), 60 deletions(-) + gnome-initial-setup/gnome-initial-setup.c | 126 +++++++++++++--------- + 3 files changed, 92 insertions(+), 59 deletions(-) diff --git a/gnome-initial-setup/gis-driver.c b/gnome-initial-setup/gis-driver.c -index 98b4fc3e..d3013063 100644 +index 0b3f542f..4325b631 100644 --- a/gnome-initial-setup/gis-driver.c +++ b/gnome-initial-setup/gis-driver.c -@@ -36,8 +36,6 @@ +@@ -30,8 +30,6 @@ #include "cc-common-language.h" #include "gis-assistant.h" @@ -813,7 +813,7 @@ index 98b4fc3e..d3013063 100644 /* Statically include this for now. Maybe later * we'll generate this from glib-mkenums. */ GType -@@ -45,12 +43,13 @@ gis_driver_mode_get_type (void) { +@@ -39,12 +37,13 @@ gis_driver_mode_get_type (void) { static GType enum_type_id = 0; if (G_UNLIKELY (!enum_type_id)) { @@ -829,7 +829,7 @@ index 98b4fc3e..d3013063 100644 } return enum_type_id; } -@@ -651,7 +650,7 @@ gis_driver_set_property (GObject *object, +@@ -645,7 +644,7 @@ gis_driver_set_property (GObject *object, switch ((GisDriverProperty) prop_id) { case PROP_MODE: @@ -882,10 +882,10 @@ index 9b935e24..b57db2e2 100644 void gis_driver_set_user_permissions (GisDriver *driver, diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c -index 113ded36..59955779 100644 +index adb04075..a079c705 100644 --- a/gnome-initial-setup/gnome-initial-setup.c +++ b/gnome-initial-setup/gnome-initial-setup.c -@@ -56,27 +56,27 @@ typedef GisPage *(*PreparePage) (GisDriver *driver); +@@ -55,26 +55,26 @@ typedef GisPage *(*PreparePage) (GisDriver *driver); typedef struct { const gchar *page_id; PreparePage prepare_page_func; @@ -904,7 +904,6 @@ index 113ded36..59955779 100644 - PAGE (privacy, FALSE), - PAGE (timezone, TRUE), - PAGE (software, TRUE), -- PAGE (goa, FALSE), - PAGE (account, TRUE), - PAGE (password, TRUE), + PAGE (welcome, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), @@ -914,7 +913,6 @@ index 113ded36..59955779 100644 + PAGE (privacy, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), + PAGE (timezone, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), + PAGE (software, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), -+ PAGE (goa, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), + PAGE (account, GIS_DRIVER_MODE_NEW_USER), + PAGE (password, GIS_DRIVER_MODE_NEW_USER), #ifdef HAVE_PARENTAL_CONTROLS @@ -928,7 +926,7 @@ index 113ded36..59955779 100644 { NULL }, }; -@@ -107,26 +107,15 @@ should_skip_page (const gchar *page_id, +@@ -105,26 +105,15 @@ should_skip_page (const gchar *page_id, } static gchar ** @@ -963,7 +961,7 @@ index 113ded36..59955779 100644 /* This code will read the keyfile containing vendor customization options and * look for options under the "pages" group, and supports the following keys: -@@ -134,28 +123,68 @@ pages_to_skip_from_file (GisDriver *driver, +@@ -132,28 +121,68 @@ pages_to_skip_from_file (GisDriver *driver, * - new_user_only (optional): list of pages to be skipped in existing user mode * - existing_user_only (optional): list of pages to be skipped in new user mode * @@ -1043,7 +1041,7 @@ index 113ded36..59955779 100644 } static void -@@ -198,7 +227,8 @@ rebuild_pages_cb (GisDriver *driver) +@@ -196,7 +225,8 @@ rebuild_pages_cb (GisDriver *driver) GisAssistant *assistant; GisPage *current_page; gchar **skip_pages; @@ -1053,7 +1051,7 @@ index 113ded36..59955779 100644 assistant = gis_driver_get_assistant (driver); current_page = gis_assistant_get_current_page (assistant); -@@ -217,13 +247,13 @@ rebuild_pages_cb (GisDriver *driver) +@@ -215,13 +245,13 @@ rebuild_pages_cb (GisDriver *driver) ++page_data; } @@ -1071,13 +1069,13 @@ index 113ded36..59955779 100644 skipped = TRUE; -- -2.41.0 +2.43.0 -From 1f5bb5b4cc7d2e9a1933f0665172ccd88d2962f2 Mon Sep 17 00:00:00 2001 +From 68391446ee06083a06899cdadb09ca90b4b40af3 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 30 Aug 2023 15:08:23 -0400 -Subject: [PATCH 06/10] assistant: Show Back button on summary page +Subject: [PATCH 06/11] assistant: Show Back button on summary page commit f60b4622350468f7ef17f79d9bc6679bf8cce7b9 changed the assistant to no longer show the back and forward buttons on the @@ -1092,9 +1090,9 @@ bunch of pages the user could potentially want to revisit. This commit shows the back button on the last page (either the summary page or the install page). --- - gnome-initial-setup/gis-assistant.c | 14 ++++++---- - .../pages/summary/gis-summary-page.c | 26 ++++++++++--------- - 2 files changed, 23 insertions(+), 17 deletions(-) + gnome-initial-setup/gis-assistant.c | 14 +++++++++----- + .../pages/summary/gis-summary-page.c | 16 +++++++++------- + 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/gnome-initial-setup/gis-assistant.c b/gnome-initial-setup/gis-assistant.c index a3122b71..8a7fc52b 100644 @@ -1156,14 +1154,13 @@ index a3122b71..8a7fc52b 100644 { if (!gis_page_save_data (l->data, error)) diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.c b/gnome-initial-setup/pages/summary/gis-summary-page.c -index 0aee2dad..85de7060 100644 +index 0aee2dad..8a526b64 100644 --- a/gnome-initial-setup/pages/summary/gis-summary-page.c +++ b/gnome-initial-setup/pages/summary/gis-summary-page.c -@@ -180,6 +180,20 @@ log_user_in (GisSummaryPage *page) +@@ -180,6 +180,15 @@ log_user_in (GisSummaryPage *page) static void done_cb (GtkButton *button, GisSummaryPage *page) { -+ GisSummaryPagePrivate *priv = gis_summary_page_get_instance_private (page); + g_autoptr (GError) error = NULL; + + if (!gis_driver_save_data (GIS_PAGE (page)->driver, &error)) @@ -1172,20 +1169,14 @@ index 0aee2dad..85de7060 100644 + * provided to them. */ + g_warning ("Error saving data: %s", error->message); + } -+ -+ gis_driver_get_user_permissions (GIS_PAGE (page)->driver, -+ &priv->user_account, -+ &priv->user_password); + gis_ensure_stamp_files (GIS_PAGE (page)->driver); switch (gis_driver_get_mode (GIS_PAGE (page)->driver)) -@@ -200,18 +214,6 @@ gis_summary_page_shown (GisPage *page) - { - GisSummaryPage *summary = GIS_SUMMARY_PAGE (page); +@@ -202,13 +211,6 @@ gis_summary_page_shown (GisPage *page) GisSummaryPagePrivate *priv = gis_summary_page_get_instance_private (summary); -- g_autoptr(GError) local_error = NULL; -- + g_autoptr(GError) local_error = NULL; + - if (!gis_driver_save_data (GIS_PAGE (page)->driver, &local_error)) - { - /* FIXME: This should probably be shown to the user and some options @@ -1193,20 +1184,17 @@ index 0aee2dad..85de7060 100644 - g_warning ("Error saving data: %s", local_error->message); - } - -- gis_driver_get_user_permissions (GIS_PAGE (page)->driver, -- &priv->user_account, -- &priv->user_password); - - gtk_widget_grab_focus (priv->start_button); - } + gis_driver_get_user_permissions (GIS_PAGE (page)->driver, + &priv->user_account, + &priv->user_password); -- -2.41.0 +2.43.0 -From eb0ed3cf845fd47f24edc01bda5456bd73cea319 Mon Sep 17 00:00:00 2001 +From f1e4b58ced27b028e13dd9bb29794419dc08fb72 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Sun, 13 Aug 2023 09:39:07 -0400 -Subject: [PATCH 07/10] gnome-initial-setup: Add live user mode +Subject: [PATCH 07/11] gnome-initial-setup: Add live user mode This commit adds a new "live user" mode meant to be run in live image environments. @@ -1220,9 +1208,9 @@ or just jump into the live session instead. gnome-initial-setup/gis-driver.h | 4 +- gnome-initial-setup/gis-util.c | 122 ++++++ gnome-initial-setup/gis-util.h | 4 + - gnome-initial-setup/gnome-initial-setup.c | 26 +- + gnome-initial-setup/gnome-initial-setup.c | 24 +- .../pages/account/gis-account-pages.c | 21 + - .../pages/install/gis-install-page.c | 388 ++++++++++++++++++ + .../pages/install/gis-install-page.c | 382 ++++++++++++++++++ .../pages/install/gis-install-page.css | 11 + .../pages/install/gis-install-page.h | 52 +++ .../pages/install/gis-install-page.ui | 51 +++ @@ -1232,7 +1220,7 @@ or just jump into the live session instead. .../pages/language/gis-language-page.c | 5 +- gnome-initial-setup/pages/meson.build | 1 + .../pages/password/gis-password-page.c | 6 + - 17 files changed, 707 insertions(+), 18 deletions(-) + 17 files changed, 700 insertions(+), 17 deletions(-) create mode 100644 gnome-initial-setup/pages/install/gis-install-page.c create mode 100644 gnome-initial-setup/pages/install/gis-install-page.css create mode 100644 gnome-initial-setup/pages/install/gis-install-page.h @@ -1255,10 +1243,10 @@ index 02fd21d0..881efde9 100644 if (actionMatches) { if (subject.local) diff --git a/gnome-initial-setup/gis-driver.c b/gnome-initial-setup/gis-driver.c -index d3013063..b18a3808 100644 +index 4325b631..6a4727cc 100644 --- a/gnome-initial-setup/gis-driver.c +++ b/gnome-initial-setup/gis-driver.c -@@ -46,6 +46,8 @@ gis_driver_mode_get_type (void) { +@@ -40,6 +40,8 @@ gis_driver_mode_get_type (void) { static const GFlagsValue values[] = { { GIS_DRIVER_MODE_NEW_USER, "GIS_DRIVER_MODE_NEW_USER", "new_user" }, { GIS_DRIVER_MODE_EXISTING_USER, "GIS_DRIVER_MODE_EXISTING_USER", "existing_user" }, @@ -1267,9 +1255,9 @@ index d3013063..b18a3808 100644 { GIS_DRIVER_MODE_ALL, "GIS_DRIVER_MODE_ALL", "all" }, { 0, NULL, NULL } }; -@@ -791,7 +793,7 @@ gis_driver_startup (GApplication *app) - webkit_web_context_set_sandbox_enabled (context, TRUE); - #endif +@@ -786,7 +788,7 @@ gis_driver_startup (GApplication *app) + + G_APPLICATION_CLASS (gis_driver_parent_class)->startup (app); - if (driver->mode == GIS_DRIVER_MODE_NEW_USER) + if (driver->mode & GIS_DRIVER_MODE_SYSTEM) @@ -1434,10 +1422,10 @@ index 5041bddd..80d4f9a0 100644 +typedef char * (* GisVariableLookupFunc) (const char *key, gpointer user_data); +void gis_substitute_variables_in_text (char **text, GisVariableLookupFunc lookup_func, gpointer user_data); diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c -index 59955779..bc7a4ee9 100644 +index a079c705..02ca2808 100644 --- a/gnome-initial-setup/gnome-initial-setup.c +++ b/gnome-initial-setup/gnome-initial-setup.c -@@ -41,13 +41,16 @@ +@@ -40,13 +40,16 @@ #include "pages/parental-controls/gis-parental-controls-page.h" #include "pages/password/gis-password-page.h" #include "pages/summary/gis-summary-page.h" @@ -1454,7 +1442,7 @@ index 59955779..bc7a4ee9 100644 static GPtrArray *skipped_pages; -@@ -65,18 +68,20 @@ static PageData page_table[] = { +@@ -64,17 +67,19 @@ static PageData page_table[] = { PAGE (welcome, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), PAGE (language, GIS_DRIVER_MODE_ALL), PAGE (keyboard, GIS_DRIVER_MODE_ALL), @@ -1464,12 +1452,10 @@ index 59955779..bc7a4ee9 100644 - PAGE (timezone, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), + PAGE (timezone, GIS_DRIVER_MODE_ALL), PAGE (software, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), - PAGE (goa, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), - PAGE (account, GIS_DRIVER_MODE_NEW_USER), -- PAGE (password, GIS_DRIVER_MODE_NEW_USER), + /* In live user mode, the account page isn't displayed, it just quietly creates the live user */ + PAGE (account, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_LIVE_USER), -+ PAGE (password, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_LIVE_USER), + PAGE (password, GIS_DRIVER_MODE_NEW_USER), #ifdef HAVE_PARENTAL_CONTROLS PAGE (parental_controls, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), PAGE (parent_password, GIS_DRIVER_MODE_NEW_USER | GIS_DRIVER_MODE_EXISTING_USER), @@ -1479,7 +1465,7 @@ index 59955779..bc7a4ee9 100644 { NULL }, }; -@@ -120,8 +125,8 @@ pages_to_skip_from_file (GisDriver *driver) +@@ -118,8 +123,8 @@ pages_to_skip_from_file (GisDriver *driver) /* This code will read the keyfile containing vendor customization options and * look for options under the "pages" group, and supports the following keys: * - skip (optional): list of pages to be skipped always @@ -1490,7 +1476,7 @@ index 59955779..bc7a4ee9 100644 * * In addition it will look for options under the "{mode} pages" group where {mode} is the * current driver mode for the following keys: -@@ -277,6 +282,8 @@ get_mode (void) +@@ -275,6 +280,8 @@ get_mode (void) { if (force_existing_user_mode) return GIS_DRIVER_MODE_EXISTING_USER; @@ -1499,7 +1485,7 @@ index 59955779..bc7a4ee9 100644 else return GIS_DRIVER_MODE_NEW_USER; } -@@ -310,6 +317,8 @@ main (int argc, char *argv[]) +@@ -308,6 +315,8 @@ main (int argc, char *argv[]) GOptionEntry entries[] = { { "existing-user", 0, 0, G_OPTION_ARG_NONE, &force_existing_user_mode, _("Force existing user mode"), NULL }, @@ -1508,7 +1494,7 @@ index 59955779..bc7a4ee9 100644 { NULL } }; -@@ -328,6 +337,9 @@ main (int argc, char *argv[]) +@@ -326,6 +335,9 @@ main (int argc, char *argv[]) g_option_context_parse (context, &argc, &argv, NULL); @@ -1518,7 +1504,7 @@ index 59955779..bc7a4ee9 100644 bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); -@@ -346,7 +358,7 @@ main (int argc, char *argv[]) +@@ -344,7 +356,7 @@ main (int argc, char *argv[]) * the keyring manually so that we can pass the credentials * along to the new user in the handoff. */ @@ -1561,10 +1547,10 @@ index d9cc8d9f..8b0d8e99 100644 NULL); diff --git a/gnome-initial-setup/pages/install/gis-install-page.c b/gnome-initial-setup/pages/install/gis-install-page.c new file mode 100644 -index 00000000..0b816ee5 +index 00000000..36ed7539 --- /dev/null +++ b/gnome-initial-setup/pages/install/gis-install-page.c -@@ -0,0 +1,388 @@ +@@ -0,0 +1,382 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* + * Copyright (C) 2023 Red Hat @@ -1724,28 +1710,18 @@ index 00000000..0b816ee5 +} + +static void -+hide_and_save (GisInstallPage *page) ++on_try_button_clicked (GtkButton *button, ++ GisInstallPage *page) +{ -+ GisInstallPagePrivate *priv = gis_install_page_get_instance_private (page); -+ g_autoptr (GError) error = NULL; + -+ gis_driver_hide_window (GIS_PAGE (page)->driver); ++ g_autoptr (GError) error = NULL; + + if (!gis_driver_save_data (GIS_PAGE (page)->driver, &error)) + g_warning ("Error saving data: %s", error->message); + -+ gis_driver_get_user_permissions (GIS_PAGE (page)->driver, -+ &priv->user_account, -+ &priv->user_password); -+ + gis_ensure_stamp_files (GIS_PAGE (page)->driver); -+} + -+static void -+on_try_button_clicked (GtkButton *button, -+ GisInstallPage *page) -+{ -+ hide_and_save (page); ++ gis_driver_hide_window (GIS_PAGE (page)->driver); + log_user_in (page); +} + @@ -1827,7 +1803,7 @@ index 00000000..0b816ee5 +on_install_button_clicked (GtkButton *button, + GisInstallPage *page) +{ -+ hide_and_save (page); ++ gis_driver_hide_window (GIS_PAGE (page)->driver); + run_installer (page); +} + @@ -1838,6 +1814,10 @@ index 00000000..0b816ee5 + GisInstallPagePrivate *priv = gis_install_page_get_instance_private (install); + g_autoptr(GError) local_error = NULL; + ++ gis_driver_get_user_permissions (GIS_PAGE (page)->driver, ++ &priv->user_account, ++ &priv->user_password); ++ + gtk_widget_grab_focus (priv->install_button); +} + @@ -2187,7 +2167,7 @@ index 26a01257..17117fa1 100644 priv->permission = polkit_permission_new_sync ("org.freedesktop.locale1.set-locale", NULL, NULL, NULL); diff --git a/gnome-initial-setup/pages/meson.build b/gnome-initial-setup/pages/meson.build -index 32305018..5ac4a80d 100644 +index 8d327f69..ff8406ba 100644 --- a/gnome-initial-setup/pages/meson.build +++ b/gnome-initial-setup/pages/meson.build @@ -1,5 +1,6 @@ @@ -2215,13 +2195,13 @@ index 6c12ca38..3d648c48 100644 "driver", driver, NULL); -- -2.41.0 +2.43.0 -From c3a9c8f407f3885226d29253821558a3ad5f567e Mon Sep 17 00:00:00 2001 +From 3f15601af333aeddb8e4458e69f81023a8184a8f Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 16 Aug 2023 10:47:13 -0400 -Subject: [PATCH 08/10] initial-setup: Don't show duplicated pages between +Subject: [PATCH 08/11] initial-setup: Don't show duplicated pages between modes It's possible a user just got asked questions in live mode @@ -2251,10 +2231,10 @@ index 6a4ef7df..0bfccf56 100644 + strip_directory : true +) diff --git a/gnome-initial-setup/gis-driver.c b/gnome-initial-setup/gis-driver.c -index b18a3808..41cd6e38 100644 +index 6a4727cc..78265527 100644 --- a/gnome-initial-setup/gis-driver.c +++ b/gnome-initial-setup/gis-driver.c -@@ -107,6 +107,8 @@ struct _GisDriver { +@@ -101,6 +101,8 @@ struct _GisDriver { const gchar *vendor_conf_file_path; GKeyFile *vendor_conf_file; @@ -2263,7 +2243,7 @@ index b18a3808..41cd6e38 100644 }; G_DEFINE_TYPE (GisDriver, gis_driver, ADW_TYPE_APPLICATION) -@@ -137,6 +139,7 @@ gis_driver_finalize (GObject *object) +@@ -131,6 +133,7 @@ gis_driver_finalize (GObject *object) g_clear_object (&driver->user_account); g_clear_pointer (&driver->vendor_conf_file, g_key_file_free); @@ -2272,10 +2252,10 @@ index b18a3808..41cd6e38 100644 g_clear_object (&driver->parent_account); g_free (driver->parent_password); diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c -index bc7a4ee9..2bd2d375 100644 +index 02ca2808..4e2aa5af 100644 --- a/gnome-initial-setup/gnome-initial-setup.c +++ b/gnome-initial-setup/gnome-initial-setup.c -@@ -49,6 +49,8 @@ +@@ -48,6 +48,8 @@ #define VENDOR_EXISTING_USER_ONLY_KEY "existing_user_only" #define VENDOR_LIVE_USER_ONLY_KEY "live_user_only" @@ -2284,7 +2264,7 @@ index bc7a4ee9..2bd2d375 100644 static gboolean force_existing_user_mode; static gboolean force_live_user_mode; -@@ -121,6 +123,7 @@ pages_to_skip_from_file (GisDriver *driver) +@@ -119,6 +121,7 @@ pages_to_skip_from_file (GisDriver *driver) g_autofree char *mode_group = NULL; g_autoptr (GFlagsClass) driver_mode_flags_class = NULL; const GFlagsValue *driver_mode_flags = NULL; @@ -2292,7 +2272,7 @@ index bc7a4ee9..2bd2d375 100644 /* This code will read the keyfile containing vendor customization options and * look for options under the "pages" group, and supports the following keys: -@@ -189,6 +192,26 @@ pages_to_skip_from_file (GisDriver *driver) +@@ -187,6 +190,26 @@ pages_to_skip_from_file (GisDriver *driver) } } @@ -2319,7 +2299,7 @@ index bc7a4ee9..2bd2d375 100644 return g_strv_builder_end (builder); } -@@ -398,6 +421,46 @@ main (int argc, char *argv[]) +@@ -396,6 +419,46 @@ main (int argc, char *argv[]) return status; } @@ -2366,7 +2346,7 @@ index bc7a4ee9..2bd2d375 100644 void gis_ensure_stamp_files (GisDriver *driver) { -@@ -409,6 +472,8 @@ gis_ensure_stamp_files (GisDriver *driver) +@@ -407,6 +470,8 @@ gis_ensure_stamp_files (GisDriver *driver) g_warning ("Unable to create %s: %s", done_file, error->message); g_clear_error (&error); } @@ -2376,7 +2356,7 @@ index bc7a4ee9..2bd2d375 100644 /** diff --git a/meson.build b/meson.build -index fba4d96a..6997a2ee 100644 +index 00e24d7b..95fe8e51 100644 --- a/meson.build +++ b/meson.build @@ -14,19 +14,23 @@ po_dir = join_paths(meson.current_source_dir(), 'po') @@ -2404,13 +2384,13 @@ index fba4d96a..6997a2ee 100644 conf.set_quoted('G_LOG_DOMAIN', 'InitialSetup') conf.set('G_LOG_USE_STRUCTURED', true) -- -2.41.0 +2.43.0 -From 27d34e93c7d60a7425addb5dbead95444568a670 Mon Sep 17 00:00:00 2001 +From 935b2cca6dd7e3ce31e2540d90e5864190885d81 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Sun, 13 Aug 2023 16:33:49 -0400 -Subject: [PATCH 09/10] polkit: Add fedora specfic rules +Subject: [PATCH 09/11] polkit: Add fedora specfic rules We should probably add some way to check vendor.conf for the policy updates instead of a hardcoded list. @@ -2433,13 +2413,13 @@ index 881efde9..f5b7d981 100644 if (actionMatches) { if (subject.local) -- -2.41.0 +2.43.0 -From ba07fbf5e3506e97a9047a8460e6ff196aa0be3b Mon Sep 17 00:00:00 2001 +From 03073bd42bf01f5d051f299860be40afd1844447 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Tue, 22 Aug 2023 13:51:40 -0400 -Subject: [PATCH 10/10] gnome-initial-setup: Read /etc/sysconfig/anaconda +Subject: [PATCH 10/11] gnome-initial-setup: Read /etc/sysconfig/anaconda Just as /var/lib/gnome-initial-setup/state may show pages the user has already answered, on Fedora, /etc/sysconfig/anaconda shows pages the user has @@ -2451,10 +2431,10 @@ This commit skips those from the --new-user mode as well. 1 file changed, 23 insertions(+) diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c -index 2bd2d375..474dfc58 100644 +index 4e2aa5af..2de3ecab 100644 --- a/gnome-initial-setup/gnome-initial-setup.c +++ b/gnome-initial-setup/gnome-initial-setup.c -@@ -198,6 +198,8 @@ pages_to_skip_from_file (GisDriver *driver) +@@ -196,6 +196,8 @@ pages_to_skip_from_file (GisDriver *driver) if (driver_mode & GIS_DRIVER_MODE_NEW_USER) { g_autoptr(GKeyFile) state = NULL; gboolean state_loaded; @@ -2463,7 +2443,7 @@ index 2bd2d375..474dfc58 100644 state = g_key_file_new (); state_loaded = g_key_file_load_from_file (state, STATE_FILE, G_KEY_FILE_NONE, &error); -@@ -210,6 +212,27 @@ pages_to_skip_from_file (GisDriver *driver) +@@ -208,6 +210,27 @@ pages_to_skip_from_file (GisDriver *driver) g_clear_pointer (&skip_pages, g_strfreev); } } @@ -2492,5 +2472,42 @@ index 2bd2d375..474dfc58 100644 return g_strv_builder_end (builder); -- -2.41.0 +2.43.0 + + +From baaa29d56bbb91f3ad15f90e3db98eea446b9adb Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Wed, 17 Jan 2024 12:29:54 -0600 +Subject: [PATCH 11/11] Fix criticals in set_localed_input() + +If the default input sources do not match the current input sources, +these won't be set in set_input_settings() and we shouldn't try to use +them. + +Fixes: (gnome-initial-setup:41149): GLib-CRITICAL **: 10:09:25.599: g_strjoinv: assertion 'str_array != NULL' failed +--- + gnome-initial-setup/pages/keyboard/gis-keyboard-page.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c +index 7801667c..3b59a0bf 100644 +--- a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c ++++ b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c +@@ -253,12 +253,12 @@ set_localed_input (GisKeyboardPage *self) + g_autofree char *variants = NULL; + g_autofree char *options = NULL; + +- if (!priv->localed) ++ if (!priv->localed || !priv->system_layouts || !priv->system_variants) + return; + + layouts = g_strjoinv (",", priv->system_layouts); + variants = g_strjoinv (",", priv->system_variants); +- options = g_strjoinv (",", priv->system_options); ++ options = priv->system_options ? g_strjoinv (",", priv->system_options) : g_strdup (""); + + g_dbus_proxy_call (priv->localed, + "SetX11Keyboard", +-- +2.43.0 diff --git a/sources b/sources index 43aeecf..00bdf17 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-initial-setup-45.0.tar.xz) = 1690736fd9d2d54ec471dbded074abe24f9ee3e8c434028a01d2059b07cc13d112ed67db14ef9ec9cd8d1de81d33fde603b65a6a9bc9c415a34ea61e112c4652 +SHA512 (gnome-initial-setup-46.alpha.tar.xz) = dcd1aa67805e0db70de0bb8dc529c08a691e229c14135fa1ef4a454ee735c6552614e03815d655392bf2714fa5edca9c74fe7286fac4128beb669169afb73c1d