From e8d2323085d37e33ebda75bac256594c6445a315 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Aug 24 2020 14:44:27 +0000 Subject: Update to 3.37.91.1 ... and also rebase honor-firstboot-disabled.patch to deal with gis_ensure_stamp_files() now taking a GjsDriver parameter, and update it to use g_autoptr(). I've also now submitted it upstream after talking to wjt: https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/101 --- diff --git a/.gitignore b/.gitignore index 62f5967..b43bc68 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,4 @@ /gnome-initial-setup-3.37.1.tar.xz /gnome-initial-setup-3.37.3.tar.xz /gnome-initial-setup-3.37.91.tar.xz +/gnome-initial-setup-3.37.91.1.tar.xz diff --git a/gnome-initial-setup.spec b/gnome-initial-setup.spec index 2e98140..13c1163 100644 --- a/gnome-initial-setup.spec +++ b/gnome-initial-setup.spec @@ -5,7 +5,7 @@ %global geoclue_version 2.3.1 Name: gnome-initial-setup -Version: 3.37.91 +Version: 3.37.91.1 Release: 1%{?dist} Summary: Bootstrapping your OS @@ -13,6 +13,7 @@ License: GPLv2+ URL: https://wiki.gnome.org/Design/OS/InitialSetup Source0: https://download.gnome.org/sources/%{name}/3.37/%{name}-%{version}.tar.xz Source1: vendor.conf +# https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/merge_requests/101 Patch0: honor-firstboot-disabled.patch BuildRequires: meson @@ -108,6 +109,10 @@ useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} &>/dev/null || %{_datadir}/gnome-initial-setup/vendor.conf %changelog +* Mon Aug 24 2020 Kalev Lember - 3.37.91.1-1 +- Update to 3.37.91.1 +- Rebase honor-firstboot-disabled.patch + * Mon Aug 17 2020 Kalev Lember - 3.37.91-1 - Update to 3.37.91 diff --git a/honor-firstboot-disabled.patch b/honor-firstboot-disabled.patch index 5218971..787a275 100644 --- a/honor-firstboot-disabled.patch +++ b/honor-firstboot-disabled.patch @@ -1,4 +1,4 @@ -From cb0b65b5d1ea9edd83ecea035fe344b0ffa877f2 Mon Sep 17 00:00:00 2001 +From 538a8fa09a02f682496f98bda8f4f4a5566eee86 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Mon, 23 Jan 2017 19:42:44 +0100 Subject: [PATCH] Exit gracefully if we are disabled systemwide @@ -13,64 +13,58 @@ that but more might be added in the future. https://bugzilla.gnome.org/show_bug.cgi?id=777707 --- - gnome-initial-setup/gnome-initial-setup.c | 34 +++++++++++++++++++++++ + gnome-initial-setup/gnome-initial-setup.c | 28 +++++++++++++++++++++++ meson.build | 1 + - 2 files changed, 35 insertions(+) + 2 files changed, 29 insertions(+) diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c -index 6aa018f..b904f47 100644 +index 107be55..0ab987a 100644 --- a/gnome-initial-setup/gnome-initial-setup.c +++ b/gnome-initial-setup/gnome-initial-setup.c -@@ -239,6 +239,31 @@ get_mode (void) +@@ -240,6 +240,24 @@ get_mode (void) return GIS_DRIVER_MODE_NEW_USER; } +static gboolean +initial_setup_disabled_by_anaconda (void) +{ -+ GKeyFile *key_file; + const gchar *file_name = SYSCONFDIR "/sysconfig/anaconda"; -+ gboolean disabled = FALSE; -+ GError *error = NULL; ++ g_autoptr(GError) error = NULL; ++ g_autoptr(GKeyFile) key_file = g_key_file_new (); + -+ key_file = g_key_file_new (); + if (!g_key_file_load_from_file (key_file, file_name, G_KEY_FILE_NONE, &error)) { + if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT) && + !g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_NOT_FOUND)) { + g_warning ("Could not read %s: %s", file_name, error->message); + } -+ g_error_free (error); -+ goto out; ++ return FALSE; + } + -+ disabled = g_key_file_get_boolean (key_file, "General", -+ "post_install_tools_disabled", NULL); -+ out: -+ g_key_file_unref (key_file); -+ return disabled; ++ return g_key_file_get_boolean (key_file, "General", "post_install_tools_disabled", NULL); +} + int main (int argc, char *argv[]) { -@@ -279,6 +304,15 @@ main (int argc, char *argv[]) - skipped_pages = g_ptr_array_new_with_free_func ((GDestroyNotify) gtk_widget_destroy); - mode = get_mode (); +@@ -289,6 +307,16 @@ main (int argc, char *argv[]) + gis_ensure_login_keyring (); + driver = gis_driver_new (mode); ++ + /* We only do this in existing-user mode, because if gdm launches us + * in new-user mode and we just exit, gdm's special g-i-s session + * never terminates. */ + if (initial_setup_disabled_by_anaconda () && + mode == GIS_DRIVER_MODE_EXISTING_USER) { -+ gis_ensure_stamp_files (); ++ gis_ensure_stamp_files (driver); + exit (EXIT_SUCCESS); + } + - /* When we are running as the gnome-initial-setup user we - * dont have a normal user session and need to initialize - * the keyring manually so that we can pass the credentials + g_signal_connect (driver, "rebuild-pages", G_CALLBACK (rebuild_pages_cb), NULL); + status = g_application_run (G_APPLICATION (driver), argc, argv); + diff --git a/meson.build b/meson.build -index a34b2e0..b3ab068 100644 +index 0fd952f..13986ac 100644 --- a/meson.build +++ b/meson.build @@ -25,6 +25,7 @@ conf.set_quoted('GNOMELOCALEDIR', locale_dir) diff --git a/sources b/sources index 8e0b7b9..74afa41 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-initial-setup-3.37.91.tar.xz) = c6163b8155dc8c4621c2e84d052c021b52a552464782fd0c3520d095495656a401f60af48ab243554f3cb4cd1a5eeff8e1a16dda9c296ba1667c527717feb51f +SHA512 (gnome-initial-setup-3.37.91.1.tar.xz) = a05eb6c7f588c465da9243cb080cf047bc162a4657b52162a12232fa38d27781d7590fb6442960e8d40b50b585183930ac901849d0473bd88b61e3eb62916b40