From e80f6de4402b9396bb453f26553d52af04d006df Mon Sep 17 00:00:00 2001 From: "J. Richard Barnette" Date: Fri, 24 Feb 2012 14:08:34 -0800 Subject: [PATCH] Include the Chrome OS private overlay in the chroot, if present. To build recovery images, the initramfs package needs fonts for various languages. The Japanese fonts to use depend on whether it's an internal (Chrome OS) or external (Chromium OS) build. Including the internal Japanese fonts requires additional settings in /etc/make.conf in the chroot. This change updates make_chroot and update_chroot to ensure that the necessary settings are present when appropriate. BUG=chromium-os:26757 TEST=confirm proper packages after chroot creation with private manifest TEST=confirm proper packages after chroot creation with public manifest TEST=confirm proper packages after chroot upgrade with private manifest TEST=confirm proper packages after chroot upgrade with public manifest CQ-DEPEND=I32c4561c47752d96d2769c5429c5e44fe630f8f9 Change-Id: I2b29b32bf4e6b891a2228dc7f93ae0bb3f85e37f Reviewed-on: https://gerrit.chromium.org/gerrit/17372 Tested-by: Richard Barnette Reviewed-by: David James Commit-Ready: Richard Barnette --- sdk_lib/make_chroot.sh | 36 +++---------- sdk_lib/make_conf_util.sh | 107 ++++++++++++++++++++++++++++++++++++++ update_chroot | 16 ++++-- 3 files changed, 125 insertions(+), 34 deletions(-) create mode 100644 sdk_lib/make_conf_util.sh diff --git a/sdk_lib/make_chroot.sh b/sdk_lib/make_chroot.sh index 857e47b97c..4b80468d58 100755 --- a/sdk_lib/make_chroot.sh +++ b/sdk_lib/make_chroot.sh @@ -58,6 +58,8 @@ umask 022 # TODO: replace shflags with something less error-prone, or contribute a fix. set -e +. "${SCRIPT_ROOT}"/sdk_lib/make_conf_util.sh + FULLNAME="ChromeOS Developer" DEFGROUPS="eng,adm,cdrom,floppy,audio,video,portage" PASSWORD=chronos @@ -367,30 +369,11 @@ echo info "Setting up mounts..." # Set up necessary mounts and make sure we clean them up on exit. sudo mkdir -p "${FLAGS_chroot}/${CHROOT_TRUNK}" "${FLAGS_chroot}/run" -PREBUILT_SETUP="$FLAGS_chroot/etc/make.conf.prebuilt_setup" -if [[ -n "$IGNORE_PREFLIGHT_BINHOST" ]]; then - echo 'PORTAGE_BINHOST="$FULL_BINHOST"' -fi | sudo_clobber "$PREBUILT_SETUP" -sudo chmod 0644 "$PREBUILT_SETUP" - -# For bootstrapping from old wget, disable certificate checking. Once we've -# upgraded to new curl (below), certificate checking is re-enabled. See -# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=409938 -sudo_clobber "${FLAGS_chroot}/etc/make.conf.fetchcommand_setup" <<'EOF' -FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --no-check-certificate --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\"" -RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --no-check-certificate --passive-ftp -O \"\${DISTDIR}/\${FILE}\" \"\${URI}\"" -EOF - -sudo_clobber "${FLAGS_chroot}/etc/make.conf.host_setup" <