mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 13:06:59 +02:00
fix(enter_chroot): Use .boto from the user's HOME
We don't have any private overlays but users will likely have their own credentials in ~/.boto so make it available in the chroot.
This commit is contained in:
parent
82b7949c5f
commit
17c609192a
@ -83,6 +83,8 @@ FILES_TO_COPY_TO_CHROOT=(
|
|||||||
.gdata_token # Auth token for Google Docs on chromium.org
|
.gdata_token # Auth token for Google Docs on chromium.org
|
||||||
.disable_build_stats_upload # Presence of file disables command stats upload
|
.disable_build_stats_upload # Presence of file disables command stats upload
|
||||||
.netrc # May contain required source fetching credentials
|
.netrc # May contain required source fetching credentials
|
||||||
|
.boto # Auth information for gsutil
|
||||||
|
.boto-key.p12 # Service account key for gsutil
|
||||||
)
|
)
|
||||||
|
|
||||||
INNER_CHROME_ROOT=$FLAGS_chrome_root_mount # inside chroot
|
INNER_CHROME_ROOT=$FLAGS_chrome_root_mount # inside chroot
|
||||||
@ -434,18 +436,6 @@ setup_env() {
|
|||||||
# semaphores.
|
# semaphores.
|
||||||
chmod -R 777 "${FLAGS_chroot}/dev/shm"
|
chmod -R 777 "${FLAGS_chroot}/dev/shm"
|
||||||
|
|
||||||
# If the private overlays are installed, gsutil can use those credentials.
|
|
||||||
# We're also installing credentials for use by sudoed invocations.
|
|
||||||
boto='src/private-overlays/coreos-overlay/googlestorage_account.boto'
|
|
||||||
if [ -s "${FLAGS_trunk}/${boto}" ]; then
|
|
||||||
if [ ! -L "${FLAGS_chroot}/home/${SUDO_USER}/.boto" ]; then
|
|
||||||
user_symlink "trunk/${boto}" "${FLAGS_chroot}/home/${SUDO_USER}/.boto"
|
|
||||||
fi
|
|
||||||
if [ ! -L "${FLAGS_chroot}/root/.boto" ]; then
|
|
||||||
ln -sf "${CHROOT_TRUNK_DIR}/${boto}" "${FLAGS_chroot}/root/.boto"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Have found a few chroots where ~/.gsutil is owned by root:root, probably
|
# Have found a few chroots where ~/.gsutil is owned by root:root, probably
|
||||||
# as a result of old gsutil or tools. This causes permission errors when
|
# as a result of old gsutil or tools. This causes permission errors when
|
||||||
# gsutil cp tries to create its cache files, so ensure the user can
|
# gsutil cp tries to create its cache files, so ensure the user can
|
||||||
|
Loading…
Reference in New Issue
Block a user