diff --git a/.gitignore b/.gitignore index 276ef2b..ddb4942 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/gnome-initial-setup-3.22.1.tar.xz +SOURCES/gnome-initial-setup-3.28.0.tar.xz diff --git a/.gnome-initial-setup.metadata b/.gnome-initial-setup.metadata index 489f6cf..01d9151 100644 --- a/.gnome-initial-setup.metadata +++ b/.gnome-initial-setup.metadata @@ -1 +1 @@ -4d4b13c42478f96f3b77d75c30929e569c9ffa0a SOURCES/gnome-initial-setup-3.22.1.tar.xz +79d6f8ce89086aba95c1fd519053af523d4409ea SOURCES/gnome-initial-setup-3.28.0.tar.xz diff --git a/SOURCES/0001-data-Update-gnome-session-file-for-gnome-settings-da.patch b/SOURCES/0001-data-Update-gnome-session-file-for-gnome-settings-da.patch deleted file mode 100644 index 22c9e28..0000000 --- a/SOURCES/0001-data-Update-gnome-session-file-for-gnome-settings-da.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 76c617b7a4b11d6d8abaae843f2daa6aa8924b42 Mon Sep 17 00:00:00 2001 -From: Jeremy Bicha -Date: Tue, 7 Feb 2017 15:21:20 -0500 -Subject: [PATCH 1/4] data: Update gnome-session file for gnome-settings-daemon - 3.23 - -gnome-settings-daemon has been split up into separate daemons, which -means we'll need to invoke those separately. - -See https://git.gnome.org/browse/gnome-session/commit?id=18b6e567e1a -for the corresponding change to the regular session file. - -https://bugzilla.gnome.org/show_bug.cgi?id=778309 ---- - data/gnome-initial-setup.session | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/gnome-initial-setup.session b/data/gnome-initial-setup.session -index b24da3d..0d81bb1 100644 ---- a/data/gnome-initial-setup.session -+++ b/data/gnome-initial-setup.session -@@ -1,3 +1,3 @@ - [GNOME Session] - Name=GNOME Initial Setup --RequiredComponents=setup-shell;gnome-initial-setup;gnome-settings-daemon; -+RequiredComponents=setup-shell;gnome-initial-setup;org.gnome.SettingsDaemon.A11yKeyboard;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Clipboard;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Mouse;org.gnome.SettingsDaemon.Orientation;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XRANDR;org.gnome.SettingsDaemon.XSettings; --- -2.13.6 - diff --git a/SOURCES/0001-password-Make-our-password-validation-similar-to-ana.patch b/SOURCES/0001-password-Make-our-password-validation-similar-to-ana.patch deleted file mode 100644 index 4e94e3b..0000000 --- a/SOURCES/0001-password-Make-our-password-validation-similar-to-ana.patch +++ /dev/null @@ -1,116 +0,0 @@ -From b4965b4cdf0500d112d0068209e73e826a38fe74 Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Fri, 12 May 2017 17:06:03 +0200 -Subject: [PATCH] password: Make our password validation similar to anaconda's - -Anaconda uses the following parameters: - -* password is set but libpwquality returned an error: "password is - weak" & 1/4 of the strength meter filled in -* no error error and pwquality score <30: "password is fair" & 2/4 of - the strength meter filled in -* no error error and pwquality score <70: "password is good" & 3/4 of - the strength meter filled in -* no error error and pwquality score >70: "password is strong" & 4/4 - of the strength meter filled in -* user can use a "weak password" or a too short password by overriding - the warning -* an empty user password can be used (but user has to tick in a - checkbox to enable that) - -We don't have a checkbox to allow empty passwords but otherwise should -behave the same with this patch. ---- - .../pages/password/gis-password-page.c | 24 ++++++++-------------- - gnome-initial-setup/pages/password/pw-utils.c | 9 +++----- - 2 files changed, 11 insertions(+), 22 deletions(-) - -diff --git a/gnome-initial-setup/pages/password/gis-password-page.c b/gnome-initial-setup/pages/password/gis-password-page.c -index 5acd5c8..7189034 100644 ---- a/gnome-initial-setup/pages/password/gis-password-page.c -+++ b/gnome-initial-setup/pages/password/gis-password-page.c -@@ -46,7 +46,6 @@ struct _GisPasswordPagePrivate - GtkWidget *password_explanation; - GtkWidget *confirm_explanation; - gboolean valid_confirm; -- gboolean valid_password; - guint timeout_id; - const gchar *username; - }; -@@ -59,7 +58,7 @@ page_validate (GisPasswordPage *page) - { - GisPasswordPagePrivate *priv = gis_password_page_get_instance_private (page); - -- return priv->valid_confirm && priv->valid_password; -+ return priv->valid_confirm; - } - - static void -@@ -130,7 +129,7 @@ validate (GisPasswordPage *page) - gtk_level_bar_set_value (GTK_LEVEL_BAR (priv->password_strength), strength_level); - gtk_label_set_label (GTK_LABEL (priv->password_explanation), long_hint); - -- if (strlen (password) > 0 && strength_level <= 0) -+ if (strength_level <= 1) - set_entry_validation_error (GTK_ENTRY (priv->password_entry), _("This is a weak password.")); - else - clear_entry_validation_error (GTK_ENTRY (priv->password_entry)); -@@ -138,18 +137,12 @@ validate (GisPasswordPage *page) - gtk_label_set_label (GTK_LABEL (priv->confirm_explanation), ""); - priv->valid_confirm = FALSE; - -- priv->valid_password = (strength_level > 0); -- if (priv->valid_password) -- set_entry_validation_checkmark (GTK_ENTRY (priv->password_entry)); -- -- if (strlen (password) > 0 && strlen (verify) > 0) { -- priv->valid_confirm = (strcmp (password, verify) == 0); -- if (!priv->valid_confirm) { -- gtk_label_set_label (GTK_LABEL (priv->confirm_explanation), _("The passwords do not match.")); -- } -- else { -- set_entry_validation_checkmark (GTK_ENTRY (priv->confirm_entry)); -- } -+ priv->valid_confirm = (strcmp (password, verify) == 0); -+ if (!priv->valid_confirm) { -+ gtk_label_set_label (GTK_LABEL (priv->confirm_explanation), _("The passwords do not match.")); -+ } -+ else { -+ set_entry_validation_checkmark (GTK_ENTRY (priv->confirm_entry)); - } - - update_page_validation (page); -@@ -175,7 +168,6 @@ password_changed (GtkWidget *w, - clear_entry_validation_error (GTK_ENTRY (w)); - clear_entry_validation_error (GTK_ENTRY (priv->confirm_entry)); - -- priv->valid_password = FALSE; - update_page_validation (page); - - if (priv->timeout_id != 0) -diff --git a/gnome-initial-setup/pages/password/pw-utils.c b/gnome-initial-setup/pages/password/pw-utils.c -index 6025277..f41fa8b 100644 ---- a/gnome-initial-setup/pages/password/pw-utils.c -+++ b/gnome-initial-setup/pages/password/pw-utils.c -@@ -138,15 +138,12 @@ pw_strength (const gchar *password, - - strength = CLAMP (0.01 * rv, 0.0, 1.0); - if (rv < 0) { -- *hint = C_("Password strength", "Strength: Weak"); -- } -- else if (strength < 0.50) { - level = 1; -- *hint = C_("Password strength", "Strength: Low"); -- } else if (strength < 0.75) { -+ *hint = C_("Password strength", "Strength: Weak"); -+ } else if (strength < 0.30) { - level = 2; - *hint = C_("Password strength", "Strength: Medium"); -- } else if (strength < 0.90) { -+ } else if (strength < 0.70) { - level = 3; - *hint = C_("Password strength", "Strength: Good"); - } else { --- -2.9.3 - diff --git a/SOURCES/0002-data-Start-gnome-shell-in-the-DisplayServer-autostar.patch b/SOURCES/0002-data-Start-gnome-shell-in-the-DisplayServer-autostar.patch deleted file mode 100644 index e032638..0000000 --- a/SOURCES/0002-data-Start-gnome-shell-in-the-DisplayServer-autostar.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c9307bfb1cb885b858b83c511369ac089bda4ada Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Tue, 21 Mar 2017 18:56:04 +0100 -Subject: [PATCH 2/4] data: Start gnome-shell in the DisplayServer autostart - phase - -This is what gnome-shell itself does nowadays and it's required for -gnome-settings-daemon which starts in the Initialization phase to not -block waiting for gnome-shell which would in turn prevent gnome-shell -to start and thus deadlock the session. - -https://bugzilla.gnome.org/show_bug.cgi?id=780362 ---- - data/setup-shell.desktop | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/setup-shell.desktop b/data/setup-shell.desktop -index 7fa1e7f..cce175e 100644 ---- a/data/setup-shell.desktop -+++ b/data/setup-shell.desktop -@@ -3,6 +3,6 @@ Type=Application - Name=GNOME Shell - Exec=gnome-shell --mode=initial-setup - X-GNOME-AutoRestart=true --X-GNOME-Autostart-Phase=WindowManager -+X-GNOME-Autostart-Phase=DisplayServer - X-GNOME-Provides=panel;windowmanager; - X-GNOME-Autostart-Notify=true --- -2.13.6 - diff --git a/SOURCES/0003-data-use-aggregateMenu-component-in-initial-setup-se.patch b/SOURCES/0003-data-use-aggregateMenu-component-in-initial-setup-se.patch deleted file mode 100644 index dae30b9..0000000 --- a/SOURCES/0003-data-use-aggregateMenu-component-in-initial-setup-se.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 8f3951335e9d209a6716bd9d18eb9cf291afefd9 Mon Sep 17 00:00:00 2001 -From: Cosimo Cecchi -Date: Mon, 5 Jun 2017 13:34:49 -0700 -Subject: [PATCH 3/4] data: use aggregateMenu component in initial-setup - session - -The 'battery' and 'volume' components don't exist anymore, and have been -replaced with the 'aggregateMenu'. - -https://bugzilla.gnome.org/show_bug.cgi?id=783452 ---- - data/initial-setup.json | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/initial-setup.json b/data/initial-setup.json -index e6814f3..5cbda2a 100644 ---- a/data/initial-setup.json -+++ b/data/initial-setup.json -@@ -3,6 +3,6 @@ - "components": ["networkAgent"], - "panel": { "left": [], - "center": [], -- "right": ["a11yGreeter", "keyboard", "volume", "battery"] -+ "right": ["a11yGreeter", "keyboard", "aggregateMenu"] - } - } --- -2.13.6 - diff --git a/SOURCES/0004-data-Adjust-to-g-s-d-s-plugin-removals.patch b/SOURCES/0004-data-Adjust-to-g-s-d-s-plugin-removals.patch deleted file mode 100644 index 886b2f7..0000000 --- a/SOURCES/0004-data-Adjust-to-g-s-d-s-plugin-removals.patch +++ /dev/null @@ -1,22 +0,0 @@ -From e614fd3b41b9f81ed5d0a75c06e7d008264d7c62 Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Fri, 9 Jun 2017 15:14:22 +0200 -Subject: [PATCH 4/4] data: Adjust to g-s-d's plugin removals - -The orientation and xrandr plugins have been removed. ---- - data/gnome-initial-setup.session | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/data/gnome-initial-setup.session b/data/gnome-initial-setup.session -index 0d81bb1..80d2475 100644 ---- a/data/gnome-initial-setup.session -+++ b/data/gnome-initial-setup.session -@@ -1,3 +1,3 @@ - [GNOME Session] - Name=GNOME Initial Setup --RequiredComponents=setup-shell;gnome-initial-setup;org.gnome.SettingsDaemon.A11yKeyboard;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Clipboard;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Mouse;org.gnome.SettingsDaemon.Orientation;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XRANDR;org.gnome.SettingsDaemon.XSettings; -+RequiredComponents=setup-shell;gnome-initial-setup;org.gnome.SettingsDaemon.A11yKeyboard;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Clipboard;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Mouse;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings; --- -2.13.6 - diff --git a/SOURCES/honor-anaconda-firstboot-disabled.patch b/SOURCES/honor-anaconda-firstboot-disabled.patch deleted file mode 100644 index abf3329..0000000 --- a/SOURCES/honor-anaconda-firstboot-disabled.patch +++ /dev/null @@ -1,227 +0,0 @@ -From 0eb339c99a851f4b8358c034fb3069a3543732cd Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Tue, 24 Jan 2017 19:19:30 +0100 -Subject: [PATCH 1/3] summary: Move stamp file creation to a global function - -This will be useful in other places. Note that the "done" stamp file -is now created in both existing user and new user modes. - -https://bugzilla.gnome.org/show_bug.cgi?id=777707 ---- - gnome-initial-setup/gnome-initial-setup.c | 21 +++++++++++++++++ - gnome-initial-setup/gnome-initial-setup.h | 2 ++ - .../pages/summary/gis-summary-page.c | 26 +--------------------- - 3 files changed, 24 insertions(+), 25 deletions(-) - -diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c -index 396bbea..2ec91b9 100644 ---- a/gnome-initial-setup/gnome-initial-setup.c -+++ b/gnome-initial-setup/gnome-initial-setup.c -@@ -242,3 +242,24 @@ main (int argc, char *argv[]) - g_option_context_free (context); - return status; - } -+ -+void -+gis_ensure_stamp_files (void) -+{ -+ gchar *file; -+ GError *error = NULL; -+ -+ file = g_build_filename (g_get_user_config_dir (), "run-welcome-tour", NULL); -+ if (!g_file_set_contents (file, "yes", -1, &error)) { -+ g_warning ("Unable to create %s: %s", file, error->message); -+ g_clear_error (&error); -+ } -+ g_free (file); -+ -+ file = g_build_filename (g_get_user_config_dir (), "gnome-initial-setup-done", NULL); -+ if (!g_file_set_contents (file, "yes", -1, &error)) { -+ g_warning ("Unable to create %s: %s", file, error->message); -+ g_clear_error (&error); -+ } -+ g_free (file); -+} -diff --git a/gnome-initial-setup/gnome-initial-setup.h b/gnome-initial-setup/gnome-initial-setup.h -index 6dce853..dc5cf60 100644 ---- a/gnome-initial-setup/gnome-initial-setup.h -+++ b/gnome-initial-setup/gnome-initial-setup.h -@@ -35,5 +35,7 @@ typedef struct _GisPage GisPage; - #include "gis-page.h" - #include "gis-keyring.h" - -+void gis_ensure_stamp_files (void); -+ - #endif /* __GNOME_INITIAL_SETUP_H__ */ - -diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.c b/gnome-initial-setup/pages/summary/gis-summary-page.c -index db54924..6260181 100644 ---- a/gnome-initial-setup/pages/summary/gis-summary-page.c -+++ b/gnome-initial-setup/pages/summary/gis-summary-page.c -@@ -214,32 +214,9 @@ log_user_in (GisSummaryPage *page) - } - - static void --add_setup_done_file (void) --{ -- gchar *gis_done_path; -- GError *error = NULL; -- -- gis_done_path = g_build_filename (g_get_user_config_dir (), -- "gnome-initial-setup-done", -- NULL); -- -- if (!g_file_set_contents (gis_done_path, "yes", -1, &error)) { -- g_warning ("Unable to create %s: %s", gis_done_path, error->message); -- g_clear_error (&error); -- } -- -- g_free (gis_done_path); --} -- --static void - done_cb (GtkButton *button, GisSummaryPage *page) - { -- gchar *file; -- -- /* the tour is triggered by $XDG_CONFIG_HOME/run-welcome-tour */ -- file = g_build_filename (g_get_user_config_dir (), "run-welcome-tour", NULL); -- g_file_set_contents (file, "yes", -1, NULL); -- g_free (file); -+ gis_ensure_stamp_files (); - - switch (gis_driver_get_mode (GIS_PAGE (page)->driver)) - { -@@ -248,7 +225,6 @@ done_cb (GtkButton *button, GisSummaryPage *page) - log_user_in (page); - break; - case GIS_DRIVER_MODE_EXISTING_USER: -- add_setup_done_file (); - g_application_quit (G_APPLICATION (GIS_PAGE (page)->driver)); - default: - break; --- -2.9.3 - -From 09dcc40cf61e68dddbe7720e3f60c639107ceb37 Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Tue, 24 Jan 2017 19:22:09 +0100 -Subject: [PATCH 2/3] copy-worker: Copy the "done" stamp file too - -For consistency, instead of creating the "done" stamp file here, we -can let g-i-s handle that and just copy it along with all the others. - -https://bugzilla.gnome.org/show_bug.cgi?id=777707 ---- - gnome-initial-setup/gnome-initial-setup-copy-worker.c | 10 +--------- - 1 file changed, 1 insertion(+), 9 deletions(-) - -diff --git a/gnome-initial-setup/gnome-initial-setup-copy-worker.c b/gnome-initial-setup/gnome-initial-setup-copy-worker.c -index 500d274..c041399 100644 ---- a/gnome-initial-setup/gnome-initial-setup-copy-worker.c -+++ b/gnome-initial-setup/gnome-initial-setup-copy-worker.c -@@ -71,9 +71,7 @@ main (int argc, - { - GFile *src; - GFile *dest; -- GError *error = NULL; - char *initial_setup_homedir; -- gchar *gis_done_file_path; - - initial_setup_homedir = get_gnome_initial_setup_home_dir (); - if (initial_setup_homedir == NULL) -@@ -90,17 +88,11 @@ main (int argc, - #define FILE(path) \ - move_file_from_homedir (src, dest, path); - -+ FILE (".config/gnome-initial-setup-done"); - FILE (".config/run-welcome-tour"); - FILE (".config/dconf/user"); - FILE (".config/goa-1.0/accounts.conf"); - FILE (".local/share/keyrings/login.keyring"); - -- gis_done_file_path = g_build_filename (g_get_user_config_dir (), -- "gnome-initial-setup-done", -- NULL); -- -- if (!g_file_set_contents (gis_done_file_path, "yes", -1, &error)) -- g_warning ("Unable to create %s: %s", gis_done_file_path, error->message); -- - return EXIT_SUCCESS; - } --- -2.9.3 - -From 76e7cb35eab553e555aecb481bc6c791ce8f53fc Mon Sep 17 00:00:00 2001 -From: Rui Matos -Date: Mon, 23 Jan 2017 19:42:44 +0100 -Subject: [PATCH 3/3] Exit gracefully if we are disabled systemwide - -Sysadmins might want to disable any kind of initial setup for their -users, perhaps because they pre-configure their environments. We -should provide an easy way to do it. - -At least the anaconda installer provides an option to skip any kind -post-install setup tools so, for now we're only adding support for -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 +++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c -index 2ec91b9..0338aa0 100644 ---- a/gnome-initial-setup/gnome-initial-setup.c -+++ b/gnome-initial-setup/gnome-initial-setup.c -@@ -186,6 +186,31 @@ get_mode (void) - return GIS_DRIVER_MODE_NEW_USER; - } - -+static gboolean -+initial_setup_disabled_by_anaconda (void) -+{ -+ GKeyFile *key_file; -+ const gchar *file_name = "/etc/sysconfig/anaconda"; -+ gboolean disabled = FALSE; -+ GError *error = NULL; -+ -+ 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; -+ } -+ -+ disabled = g_key_file_get_boolean (key_file, "General", -+ "post_install_tools_disabled", NULL); -+ out: -+ g_key_file_unref (key_file); -+ return disabled; -+} -+ - int - main (int argc, char *argv[]) - { -@@ -226,6 +251,15 @@ main (int argc, char *argv[]) - - mode = get_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 (); -+ 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 --- -2.9.3 - diff --git a/SOURCES/honor-firstboot-disabled.patch b/SOURCES/honor-firstboot-disabled.patch new file mode 100644 index 0000000..958d1d9 --- /dev/null +++ b/SOURCES/honor-firstboot-disabled.patch @@ -0,0 +1,88 @@ +From b2659246f3e2afcbf51a92ee6839775de4e6487a 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 + +Sysadmins might want to disable any kind of initial setup for their +users, perhaps because they pre-configure their environments. We +should provide an easy way to do it. + +At least the anaconda installer provides an option to skip any kind +post-install setup tools so, for now we're only adding support for +that but more might be added in the future. + +https://bugzilla.gnome.org/show_bug.cgi?id=777707 +--- + gnome-initial-setup/Makefile.am | 3 ++- + gnome-initial-setup/gnome-initial-setup.c | 34 +++++++++++++++++++++++++++++++ + 2 files changed, 36 insertions(+), 1 deletion(-) + +diff --git a/gnome-initial-setup/Makefile.am b/gnome-initial-setup/Makefile.am +index d275dda..465b598 100644 +--- a/gnome-initial-setup/Makefile.am ++++ b/gnome-initial-setup/Makefile.am +@@ -11,7 +11,8 @@ AM_CPPFLAGS = \ + -DUIDIR="\"$(uidir)\"" \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + -DLIBLOCALEDIR=\""$(prefix)/lib/locale"\" \ +- -DDATADIR=\""$(datadir)"\" ++ -DDATADIR=\""$(datadir)"\" \ ++ -DSYSCONFDIR=\""$(sysconfdir)"\" + + libexec_PROGRAMS = gnome-initial-setup gnome-initial-setup-copy-worker + +diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c +index 2ec91b9..10b5f84 100644 +--- a/gnome-initial-setup/gnome-initial-setup.c ++++ b/gnome-initial-setup/gnome-initial-setup.c +@@ -186,6 +186,31 @@ 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; ++ ++ 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; ++ } ++ ++ disabled = g_key_file_get_boolean (key_file, "General", ++ "post_install_tools_disabled", NULL); ++ out: ++ g_key_file_unref (key_file); ++ return disabled; ++} ++ + int + main (int argc, char *argv[]) + { +@@ -226,6 +251,15 @@ main (int argc, char *argv[]) + + mode = get_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 (); ++ 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 +-- +2.9.3 + diff --git a/SPECS/gnome-initial-setup.spec b/SPECS/gnome-initial-setup.spec index 971ecbc..f698c5e 100644 --- a/SPECS/gnome-initial-setup.spec +++ b/SPECS/gnome-initial-setup.spec @@ -1,34 +1,27 @@ -%global nm_version 0.9.6.4 -%global glib_required_version 2.46.0 +%global nm_version 1.2 +%global nma_version 1.0 +%global glib_required_version 2.53.0 %global gtk_required_version 3.11.3 %global geoclue_version 2.3.1 Name: gnome-initial-setup -Version: 3.22.1 -Release: 5%{?dist} +Version: 3.28.0 +Release: 1%{?dist} Summary: Bootstrapping your OS License: GPLv2+ URL: https://wiki.gnome.org/Design/OS/InitialSetup -Source0: https://download.gnome.org/sources/%{name}/3.22/%{name}-%{version}.tar.xz -Patch0: honor-anaconda-firstboot-disabled.patch +Source0: https://download.gnome.org/sources/%{name}/3.28/%{name}-%{version}.tar.xz +Patch0: honor-firstboot-disabled.patch Patch1: 0001-Disable-software-page-as-it-doesn-t-make-sense-in-RH.patch -Patch2: 0001-password-Make-our-password-validation-similar-to-ana.patch - -Patch3: 0001-data-Update-gnome-session-file-for-gnome-settings-da.patch -Patch4: 0002-data-Start-gnome-shell-in-the-DisplayServer-autostar.patch -Patch5: 0003-data-use-aggregateMenu-component-in-initial-setup-se.patch -Patch6: 0004-data-Adjust-to-g-s-d-s-plugin-removals.patch - BuildRequires: krb5-devel BuildRequires: desktop-file-utils BuildRequires: intltool BuildRequires: libpwquality-devel BuildRequires: pkgconfig(NetworkManager) >= %{nm_version} -BuildRequires: pkgconfig(libnm-glib) >= %{nm_version} -BuildRequires: pkgconfig(libnm-util) >= %{nm_version} -BuildRequires: pkgconfig(libnm-gtk) +BuildRequires: pkgconfig(libnm) >= %{nm_version} +BuildRequires: pkgconfig(libnma) >= %{nma_version} BuildRequires: pkgconfig(accountsservice) BuildRequires: pkgconfig(gnome-desktop-3.0) BuildRequires: pkgconfig(gstreamer-1.0) @@ -53,10 +46,13 @@ BuildRequires: ibus-devel BuildRequires: rest-devel BuildRequires: polkit-devel BuildRequires: libsecret-devel +BuildRequires: automake autoconf +BuildRequires: gnome-common # gnome-initial-setup is being run by gdm Requires: gdm Requires: geoclue2-libs%{?_isa} >= %{geoclue_version} +Requires: glib2%{?_isa} >= %{glib_required_version} # we install a rules file Requires: polkit-js-engine Requires: /usr/bin/gkbd-keyboard-display @@ -71,16 +67,10 @@ a good setup experience to welcome you to your system, and walks you through configuring it. It is integrated with gdm. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 +%autosetup -p1 %build +autoreconf -fi %configure --enable-software-sources make %{?_smp_mflags} @@ -119,6 +109,10 @@ useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} &>/dev/null || %{_datadir}/polkit-1/rules.d/20-gnome-initial-setup.rules %changelog +* Wed Jun 06 2018 Richard Hughes - 3.28.0-1 +- Update to 3.28.0 +- Resolves: #1568175 + * Thu Oct 26 2017 Rui Matos - 3.22.1-5 - Update session definition files to work with GNOME 3.26 Resolves: rhbz#1506607