From 869053f7141522847fca8dcb273f4697f62bbd4c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:43:22 +0000 Subject: import gnome-initial-setup-3.22.1-5.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..276ef2b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/gnome-initial-setup-3.22.1.tar.xz diff --git a/.gnome-initial-setup.metadata b/.gnome-initial-setup.metadata new file mode 100644 index 0000000..489f6cf --- /dev/null +++ b/.gnome-initial-setup.metadata @@ -0,0 +1 @@ +4d4b13c42478f96f3b77d75c30929e569c9ffa0a SOURCES/gnome-initial-setup-3.22.1.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-Disable-software-page-as-it-doesn-t-make-sense-in-RH.patch b/SOURCES/0001-Disable-software-page-as-it-doesn-t-make-sense-in-RH.patch new file mode 100644 index 0000000..9be5e75 --- /dev/null +++ b/SOURCES/0001-Disable-software-page-as-it-doesn-t-make-sense-in-RH.patch @@ -0,0 +1,25 @@ +From c2044fdaabf7b1c16d38f610a63c5078d453720e Mon Sep 17 00:00:00 2001 +From: Rui Matos +Date: Wed, 10 May 2017 16:27:15 +0200 +Subject: [PATCH] Disable 'software' page as it doesn't make sense in RHEL + +--- + gnome-initial-setup/gnome-initial-setup.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c +index 0338aa0..c2db63e 100644 +--- a/gnome-initial-setup/gnome-initial-setup.c ++++ b/gnome-initial-setup/gnome-initial-setup.c +@@ -69,7 +69,7 @@ static PageData page_table[] = { + PAGE (network, FALSE), + PAGE (privacy, FALSE), + PAGE (timezone, TRUE), +- PAGE (software, TRUE), ++ /* PAGE (software, TRUE), */ + PAGE (goa, FALSE), + PAGE (account, TRUE), + PAGE (password, TRUE), +-- +2.9.3 + 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 new file mode 100644 index 0000000..22c9e28 --- /dev/null +++ b/SOURCES/0001-data-Update-gnome-session-file-for-gnome-settings-da.patch @@ -0,0 +1,29 @@ +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 new file mode 100644 index 0000000..4e94e3b --- /dev/null +++ b/SOURCES/0001-password-Make-our-password-validation-similar-to-ana.patch @@ -0,0 +1,116 @@ +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 new file mode 100644 index 0000000..e032638 --- /dev/null +++ b/SOURCES/0002-data-Start-gnome-shell-in-the-DisplayServer-autostar.patch @@ -0,0 +1,31 @@ +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 new file mode 100644 index 0000000..dae30b9 --- /dev/null +++ b/SOURCES/0003-data-use-aggregateMenu-component-in-initial-setup-se.patch @@ -0,0 +1,29 @@ +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 new file mode 100644 index 0000000..886b2f7 --- /dev/null +++ b/SOURCES/0004-data-Adjust-to-g-s-d-s-plugin-removals.patch @@ -0,0 +1,22 @@ +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 new file mode 100644 index 0000000..abf3329 --- /dev/null +++ b/SOURCES/honor-anaconda-firstboot-disabled.patch @@ -0,0 +1,227 @@ +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/SPECS/gnome-initial-setup.spec b/SPECS/gnome-initial-setup.spec new file mode 100644 index 0000000..971ecbc --- /dev/null +++ b/SPECS/gnome-initial-setup.spec @@ -0,0 +1,400 @@ +%global nm_version 0.9.6.4 +%global glib_required_version 2.46.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} +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 +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(accountsservice) +BuildRequires: pkgconfig(gnome-desktop-3.0) +BuildRequires: pkgconfig(gstreamer-1.0) +BuildRequires: pkgconfig(cheese) +BuildRequires: pkgconfig(cheese-gtk) >= 3.3.5 +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(geocode-glib-1.0) +BuildRequires: pkgconfig(gweather-3.0) +BuildRequires: pkgconfig(goa-1.0) +BuildRequires: pkgconfig(goa-backend-1.0) +BuildRequires: pkgconfig(gtk+-3.0) >= %{gtk_required_version} +BuildRequires: pkgconfig(glib-2.0) >= %{glib_required_version} +BuildRequires: pkgconfig(gio-2.0) >= %{glib_required_version} +BuildRequires: pkgconfig(gio-unix-2.0) >= %{glib_required_version} +BuildRequires: pkgconfig(gdm) +BuildRequires: pkgconfig(iso-codes) +BuildRequires: pkgconfig(libgeoclue-2.0) >= %{geoclue_version} +BuildRequires: pkgconfig(packagekit-glib2) +BuildRequires: pkgconfig(webkit2gtk-4.0) +BuildRequires: krb5-devel +BuildRequires: ibus-devel +BuildRequires: rest-devel +BuildRequires: polkit-devel +BuildRequires: libsecret-devel + +# gnome-initial-setup is being run by gdm +Requires: gdm +Requires: geoclue2-libs%{?_isa} >= %{geoclue_version} +# we install a rules file +Requires: polkit-js-engine +Requires: /usr/bin/gkbd-keyboard-display + +Requires(pre): shadow-utils + +Provides: user(%name) + +%description +GNOME Initial Setup is an alternative to firstboot, providing +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 + +%build +%configure --enable-software-sources +make %{?_smp_mflags} + +%install +%make_install +find %{buildroot} -name '*.la' -exec rm -f {} ';' + +# Desktop file does not (and probably will not) ever validate, as it uses +# an absolute path /tmp/-style trigger to determine whether to autostart. +# desktop-file-validate %%{buildroot}/%%{_sysconfdir}/xdg/autostart/gnome-welcome-tour.desktop +desktop-file-validate %{buildroot}%{_sysconfdir}/xdg/autostart/gnome-initial-setup-copy-worker.desktop +desktop-file-validate %{buildroot}%{_datadir}/gdm/greeter/applications/gnome-initial-setup.desktop +desktop-file-validate %{buildroot}%{_datadir}/gdm/greeter/applications/setup-shell.desktop + +mkdir -p %{buildroot}%{_localstatedir}/lib/gnome-initial-setup + +%find_lang %{name} + +%pre +useradd -rM -d /run/gnome-initial-setup/ -s /sbin/nologin %{name} &>/dev/null || : + +%files -f %{name}.lang +%license COPYING +%doc README +%{_libexecdir}/gnome-initial-setup +%{_libexecdir}/gnome-initial-setup-copy-worker +%{_libexecdir}/gnome-welcome-tour +%{_sysconfdir}/xdg/autostart/gnome-welcome-tour.desktop +%{_sysconfdir}/xdg/autostart/gnome-initial-setup-copy-worker.desktop +%{_sysconfdir}/xdg/autostart/gnome-initial-setup-first-login.desktop + +%{_datadir}/gdm/greeter/applications/gnome-initial-setup.desktop +%{_datadir}/gdm/greeter/applications/setup-shell.desktop +%{_datadir}/gnome-session/sessions/gnome-initial-setup.session +%{_datadir}/gnome-shell/modes/initial-setup.json +%{_datadir}/polkit-1/rules.d/20-gnome-initial-setup.rules + +%changelog +* Thu Oct 26 2017 Rui Matos - 3.22.1-5 +- Update session definition files to work with GNOME 3.26 + Resolves: rhbz#1506607 + +* Fri May 12 2017 Rui Matos - 3.22.1-4 +- Make our password validation similar to anaconda's + Resolves: rhbz#1447941 + +* Wed May 10 2017 Rui Matos - 3.22.1-3 +- Disable 'software' page as it doesn't make sense in RHEL + Resolves: rhbz#1446735 + +* Thu Mar 9 2017 Rui Matos - 3.22.1-2 +- Honor anaconda's firstboot being disabled + Resolves: rhbz#1226819 + +* Wed Oct 12 2016 Kalev Lember - 3.22.1-1 +- Update to 3.22.1 + +* Mon Sep 19 2016 Kalev Lember - 3.22.0-1 +- Update to 3.22.0 + +* Tue Sep 13 2016 Kalev Lember - 3.21.92-1 +- Update to 3.21.92 + +* Mon Sep 05 2016 Kalev Lember - 3.21.91-2 +- Build the software sources page + +* Sat Sep 03 2016 Kalev Lember - 3.21.91-1 +- Update to 3.21.91 +- Update project URL + +* Wed Apr 13 2016 Kalev Lember - 3.20.1-1 +- Update to 3.20.1 + +* Tue Mar 22 2016 Kalev Lember - 3.20.0-1 +- Update to 3.20.0 + +* Tue Mar 15 2016 Kalev Lember - 3.19.92-1 +- Update to 3.19.92 + +* Tue Mar 01 2016 Richard Hughes - 3.19.91-1 +- Update to 3.19.91 + +* Tue Feb 16 2016 Richard Hughes - 3.19.2-1 +- Update to 3.19.2 + +* Wed Feb 03 2016 Fedora Release Engineering - 3.19.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Oct 28 2015 Kalev Lember - 3.19.1-1 +- Update to 3.19.1 + +* Mon Sep 21 2015 Kalev Lember - 3.18.0-1 +- Update to 3.18.0 + +* Mon Aug 31 2015 Kalev Lember - 3.17.91-1 +- Update to 3.17.91 + +* Mon Aug 17 2015 Kalev Lember - 3.17.90-1 +- Update to 3.17.90 +- Use make_install macro + +* Mon Aug 17 2015 Kalev Lember - 3.17.4-2 +- Rebuilt for libcheese soname bump + +* Mon Jul 27 2015 David King - 3.17.4-1 +- Update to 3.17.4 + +* Wed Jul 22 2015 David King - 3.16.3-3 +- Bump for new gnome-desktop3 + +* Wed Jun 17 2015 Fedora Release Engineering - 3.16.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon May 18 2015 Matthias Clasen - 3.16.3-1 +- Update to 3.16.3 + +* Tue May 12 2015 Kalev Lember - 3.16.2-1 +- Update to 3.16.2 + +* Wed Apr 15 2015 Kalev Lember - 3.16.1-1 +- Update to 3.16.1 + +* Mon Mar 23 2015 Kalev Lember - 3.16.0-1 +- Update to 3.16.0 + +* Wed Mar 18 2015 Kalev Lember - 3.15.92-1 +- Update to 3.15.92 + +* Thu Mar 05 2015 Kalev Lember - 3.15.91.1-1 +- Update to 3.15.91.1 + +* Mon Mar 02 2015 Kalev Lember - 3.15.91-1 +- Update to 3.15.91 +- Use the %%license macro for the COPYING file + +* Thu Feb 19 2015 Matthias Clasen - 3.15.90.1-1 +- Update to 3.15.90.1 + +* Tue Dec 16 2014 Rui Matos - 3.14.2.1-2 +- Resolves: rhbz#1172363 + +* Tue Nov 11 2014 Rui Matos - 3.14.2.1-1 +- Update to 3.14.2.1 + +* Mon Nov 10 2014 Rui Matos - 3.14.2-1 +- Update to 3.14.2 +- Resolves: rhbz#1158442 + +* Fri Oct 31 2014 Rui Matos - 3.14.1-3 +- Resolves: rhbz#1151519 + +* Tue Oct 21 2014 Rui Matos - 3.14.1-2 +- Resolves: rhbz#1154206 + +* Sat Oct 11 2014 Kalev Lember - 3.14.1-1 +- Update to 3.14.1 + +* Tue Sep 23 2014 Kalev Lember - 3.14.0-1 +- Update to 3.14.0 + +* Wed Sep 17 2014 Kalev Lember - 3.13.7-1 +- Update to 3.13.7 + +* Tue Sep 16 2014 Kalev Lember - 3.13.6-1 +- Update to 3.13.6 + +* Mon Sep 08 2014 Adam Williamson - 3.13.5-2 +- backport upstream patch to offer full list of keyboard layouts (BGO #729208) + +* Wed Sep 03 2014 Kalev Lember - 3.13.5-1 +- Update to 3.13.5 + +* Sat Aug 16 2014 Fedora Release Engineering - 3.13.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Wed Aug 13 2014 Matthias Clasen - 3.13.4-2 +- Drop the yelp focus patch (we've dropped the yelp patch it depends on) + +* Fri Jul 25 2014 Kalev Lember - 3.13.4-1 +- Update to 3.13.4 + +* Thu Jul 24 2014 Matthias Clasen - 3.12.1-3 +- Fix a memory corruption crash (#1116478) + +* Sat Jun 07 2014 Fedora Release Engineering - 3.12.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu May 15 2014 Kalev Lember - 3.12.1-1 +- Update to 3.12.1 + +* Tue Mar 25 2014 Kalev Lember - 3.12.0-1 +- Update to 3.12.0 + +* Thu Mar 20 2014 Richard Hughes - 3.11.92-1 +- Update to 3.11.92 + +* Sat Mar 08 2014 Richard Hughes - 3.11.91-1 +- Update to 3.11.91 + +* Fri Feb 28 2014 Richard Hughes - 3.11.90-1 +- Update to 3.11.90 + +* Wed Feb 19 2014 Kalev Lember - 3.10.1.1-5 +- Rebuilt for libgnome-desktop soname bump + +* Fri Nov 29 2013 Rui Matos - 3.10.1.1-4 +- Resolves: rhbz#1035548 - Disables the GOA page in new user mode + +* Thu Nov 28 2013 Rui Matos - 3.10.1.1-3 +- Resolves: rhbz#1027507 - [abrt] gnome-initial-setup-3.10.1.1-2.fc20: magazine_chain_pop_head + +* Fri Nov 1 2013 Matthias Clasen - 3.10.1.1-2 +- Fix goa add dialog to not be empty + +* Mon Oct 28 2013 Richard Hughes - 3.10.1.1-1 +- Update to 3.10.1.1 + +* Thu Sep 26 2013 Kalev Lember - 3.10.0.1-1 +- Update to 3.10.0.1 + +* Wed Sep 25 2013 Kalev Lember - 3.10.0-1 +- Update to 3.10.0 + +* Tue Sep 03 2013 Kalev Lember - 0.12-7 +- Rebuilt for libgnome-desktop soname bump + +* Fri Aug 23 2013 Kalev Lember - 0.12-6 +- Rebuilt for gnome-online-accounts soname bump + +* Fri Aug 09 2013 Kalev Lember - 0.12-5 +- Rebuilt for cogl 1.15.4 soname bump + +* Tue Aug 06 2013 Adam Williamson - 0.12-4 +- rebuild for new libgweather + +* Sat Aug 03 2013 Fedora Release Engineering - 0.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Jun 21 2013 Kalev Lember - 0.12-2 +- Rebuilt for libgweather 3.9.3 soname bump + +* Mon Jun 17 2013 Rui Matos - 0.12-1 +- Update to 0.12 + +* Fri Jun 7 2013 Matthias Clasen - 0.11-2 +- Require polkit-js-engine + +* Tue May 28 2013 Matthias Clasen - 0.11-1 +- Update to 0.11 + +* Tue May 14 2013 Rui Matos - 0.10-1 +- Update to 0.10 +- Add BuildRequires on polkit-devel +- Update files list + +* Thu May 2 2013 Rui Matos - 0.9-2 +- Remove unused patches +- Add build requires for ibus + +* Tue Apr 16 2013 Matthias Clasen - 0.9-1 +- Update to 0.9 + +* Tue Apr 16 2013 Ray Strode 0.8-4 +- Add requires for keyboard viewer app + +* Wed Mar 20 2013 Ray Strode 0.8-3 +- Add cosimoc fix for gd page transitions + +* Wed Mar 20 2013 Ray Strode 0.8-2 +- Disable gd page transitions for now since they don't + completely work right (ask adamw). +- Fix crasher when realmd goes away + +* Tue Mar 19 2013 Matthias Clasen - 0.8-1 +- Update to 0.8 + +* Tue Mar 12 2013 Matthias Clasen - 0.7-1 +- Update to 0.7 + +* Thu Feb 21 2013 Kalev Lember - 0.6-4 +- Rebuilt for cogl soname bump + +* Wed Feb 20 2013 Kalev Lember - 0.6-3 +- Rebuilt for libgnome-desktop soname bump + +* Fri Jan 25 2013 Peter Robinson 0.6-2 +- Rebuild for new cogl + +* Wed Jan 16 2013 Matthias Clasen - 0.6-1 +- 0.6 + +* Fri Jan 11 2013 Matthias Clasen - 0.5-1 +- 0.5 + +* Fri Dec 21 2012 Kalev Lember - 0.4-2 +- Rebuilt for libgweather soname bump + +* Thu Nov 22 2012 Matthias Clasen - 0.4-1 +- 0.4 + +* Fri Oct 26 2012 Jasper St. Pierre - 0.3-3 +- Add krb5 + +* Fri Oct 26 2012 Jasper St. Pierre - 0.3-2 +- 0.3-2 + +* Thu Oct 18 2012 Matthias Clsaen - 0.3-1 +- 0.3 + +* Fri Sep 14 2012 Matthias Clasen - 0.2-2 +- Add Requires: gdm + +* Wed Aug 29 2012 Jasper St. Pierre - 0.2-1 +- Update to 0.2 + +* Fri Jun 08 2012 Jasper St. Pierre - 0.1 +- Initial packaging.