From 10a093f02db3cd7878e93e8ae0c6a42ef4c08899 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Tue, 5 Dec 2023 10:25:37 +0000 Subject: [PATCH 1/4] fbe: Remove obsolete skip_pages_file support This was introduced in 6740898c301d456652f955e6f65d3bd58a5d71b9 but gnome-initial-setup upstream instead grew support for reading a list of pages to skip from a keyfile, so in c4af6b082b027248c601e9a1f8fcd9a19d725cf7 (also known as https://github.com/endlessm/endless-image-config/commit/f241f006d704ebf48b72c8c1c2060549ecb413ea) this was removed everywhere except this hook. https://phabricator.endlessm.com/T35040 --- hooks/image/50-branding-fbe | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hooks/image/50-branding-fbe b/hooks/image/50-branding-fbe index dc191d38..ed83a3ac 100644 --- a/hooks/image/50-branding-fbe +++ b/hooks/image/50-branding-fbe @@ -24,8 +24,3 @@ CONFIG_BASENAME=$(basename "${EIB_IMAGE_BRANDING_FBE_CONFIG}") for SUBST_VAR in ${EIB_IMAGE_BRANDING_SUBST_VARS}; do sed -i "s|@${SUBST_VAR}@|${!SUBST_VAR}|g" "${CONFIG_DIR}"/"${CONFIG_BASENAME}" done - -# The skipped pages file and the logo are optional -if [ -n "${EIB_IMAGE_BRANDING_FBE_SKIP_PAGES_FILE}" ]; then - cp "${EIB_IMAGE_BRANDING_FBE_SKIP_PAGES_FILE}" "${CONFIG_DIR}"/ -fi From 584834607f3ac7f6a74786f6f01522e60aee348c Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Tue, 5 Dec 2023 10:29:17 +0000 Subject: [PATCH 2/4] fbe: Remove branding_subst_vars support The only use of this variable was removed in September 2019. https://github.com/endlessm/endless-image-config/commit/30510a986f52687ebffda1929a01b5976205cd5a https://phabricator.endlessm.com/T35040 --- hooks/image/50-branding-fbe | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hooks/image/50-branding-fbe b/hooks/image/50-branding-fbe index ed83a3ac..96fa2e6f 100644 --- a/hooks/image/50-branding-fbe +++ b/hooks/image/50-branding-fbe @@ -18,9 +18,3 @@ CONFIG_DIR="${OSTREE_VAR}"/lib/eos-image-defaults/branding mkdir -p "${CONFIG_DIR}" cp "${EIB_IMAGE_BRANDING_FBE_CONFIG}" "${CONFIG_DIR}"/ - -CONFIG_BASENAME=$(basename "${EIB_IMAGE_BRANDING_FBE_CONFIG}") - -for SUBST_VAR in ${EIB_IMAGE_BRANDING_SUBST_VARS}; do - sed -i "s|@${SUBST_VAR}@|${!SUBST_VAR}|g" "${CONFIG_DIR}"/"${CONFIG_BASENAME}" -done From 29da5200440c0feea9d611399af2734d642d2e80 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Tue, 5 Dec 2023 10:32:06 +0000 Subject: [PATCH 3/4] fbe: Adopt upstream vendor.conf path Previously we built GNOME Initial Setup to use the path /var/lib/eos-image-defaults/branding/gnome-initial-setup.conf and installed the keyfile specified in the '[image] branding_fbe_config' key there. (There was no validation that its name was actually gnome-initial-setup.conf, which was necessary for it to work.) When we contributed this feature upstream to gnome-initial-setup, the path was made configurable with a build-time parameter, with no default. Some time later, Initial Setup started reading /etc/gnome-initial-setup/vendor.conf if present; and /usr/share/gnome-initial-setup/vendor.conf otherwise. It retained a build-time parameter, which we continued to set; but setting that parameter disabled *both* of the upstream paths. With the upstream behaviour, it is possible to ship overrides in the immutable bit of the OS, and further override them in /etc. This is in my opinion preferable to what we have historically done, to always write a file in /var for all images, even if the specific image does not want any image-specific customisation of Initial Setup. Install any config file to the upstream path in /etc, matching a build configuration change I will make in our gnome-initial-setup package. https://phabricator.endlessm.com/T35040 --- hooks/image/50-branding-fbe | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hooks/image/50-branding-fbe b/hooks/image/50-branding-fbe index 96fa2e6f..65c7c158 100644 --- a/hooks/image/50-branding-fbe +++ b/hooks/image/50-branding-fbe @@ -1,7 +1,6 @@ -# Adds the configuration file and assets to customize the welcome page of the FBE. +# Adds a configuration file to customise GNOME Initial Setup. # -# The file will live in /var/lib/eos-image-defaults/branding/gnome-initial-setup.conf, -# and any related resources (e.g. logo) under /var/lib/eos-image-defaults/branding/assets. +# The file will live in /etc/gnome-initial-setup/vendor.conf. if [ -z "${EIB_IMAGE_BRANDING_FBE_CONFIG}" ]; then exit 0 @@ -14,7 +13,7 @@ if [ "$CHECK" != OK ]; then exit 1 fi -CONFIG_DIR="${OSTREE_VAR}"/lib/eos-image-defaults/branding +CONFIG_PATH="${OSTREE_DEPLOYMENT}"/etc/gnome-initial-setup/vendor.conf -mkdir -p "${CONFIG_DIR}" -cp "${EIB_IMAGE_BRANDING_FBE_CONFIG}" "${CONFIG_DIR}"/ +mkdir -p "$(dirname "$CONFIG_PATH")" +cp "${EIB_IMAGE_BRANDING_FBE_CONFIG}" "$CONFIG_PATH" From 747668493fbfe9d98e94eb11aee2f56fe1dc11ee Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Tue, 5 Dec 2023 10:42:47 +0000 Subject: [PATCH 4/4] Remove default gnome-initial-setup vendor.conf This will instead be installed by eos-theme, to a location in /usr. https://phabricator.endlessm.com/T35040 --- config/defaults.ini | 2 +- .../gnome-initial-setup/default/gnome-initial-setup.conf | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 data/branding/gnome-initial-setup/default/gnome-initial-setup.conf diff --git a/config/defaults.ini b/config/defaults.ini index 53da81c0..28afed2d 100644 --- a/config/defaults.ini +++ b/config/defaults.ini @@ -222,7 +222,7 @@ branding_desktop_config = branding_desktop_logo = # Brand-specific configuration for the First Boot Experience -branding_fbe_config = ${build:datadir}/branding/gnome-initial-setup/default/gnome-initial-setup.conf +branding_fbe_config = # Environment variables to substitute in branding configuration files branding_subst_vars_add = diff --git a/data/branding/gnome-initial-setup/default/gnome-initial-setup.conf b/data/branding/gnome-initial-setup/default/gnome-initial-setup.conf deleted file mode 100644 index abc69c82..00000000 --- a/data/branding/gnome-initial-setup/default/gnome-initial-setup.conf +++ /dev/null @@ -1,5 +0,0 @@ -[pages] -run_welcome_tour=false - -[Language] -initial_languages=en_US.UTF-8;pt_BR.UTF-8;es_MX.UTF-8;id_ID.UTF-8;fr_FR.UTF-8;ar_AE.UTF-8;ru_RU.UTF_8;ro_RO.UTF-8