From 1c165c055b4ed3c45708c3b8641fae67222980d5 Mon Sep 17 00:00:00 2001 From: Kris Rambish Date: Tue, 25 Oct 2011 12:17:26 -0700 Subject: [PATCH] Make the autotest sub dir world readable TEST=Ran it BUG=chromium-os:22069 STATUS=Fixed Change-Id: Id6e96e5602c02956b6a1592ff54ad60935e1620e Reviewed-on: http://gerrit.chromium.org/gerrit/10660 Commit-Ready: Kris Rambish Reviewed-by: Kris Rambish Tested-by: Kris Rambish Reviewed-by: Stanley Wong --- mod_test_image_for_pyauto.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) mode change 100755 => 100644 mod_test_image_for_pyauto.sh diff --git a/mod_test_image_for_pyauto.sh b/mod_test_image_for_pyauto.sh old mode 100755 new mode 100644 index 418ad4b42f..08a4e00d53 --- a/mod_test_image_for_pyauto.sh +++ b/mod_test_image_for_pyauto.sh @@ -4,7 +4,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# Script to modify a keyfob-based chromeos test image to have pyauto installed. +# Script to modify a keyfob-based chromeos test image to install pyauto. # --- BEGIN COMMON.SH BOILERPLATE --- # Load common CrOS utilities. Inside the chroot this file is installed in @@ -89,8 +89,13 @@ ROOT_FS_AUTOTEST_DIR="${ROOT_FS_DIR}/usr/local/autotest" # Copy all of the needed pyauto deps onto the image sudo mkdir "${ROOT_FS_AUTOTEST_DIR}" sudo mkdir "${ROOT_FS_DIR}/usr/local/autotest/deps/" + +if [ ! -d "${FLAGS_build_root}/client/cros" ]; then + die "The required path: ${FLAGS_build_root}/client/cros does not exist." +fi sudo cp -r "${FLAGS_build_root}/client/cros" \ "${ROOT_FS_DIR}/usr/local/autotest/" + sudo cp -r $CHROME_DEP "${ROOT_FS_DIR}/usr/local/autotest/deps" sudo cp -r $PYAUTO_DEP "${ROOT_FS_DIR}/usr/local/autotest/deps" @@ -143,6 +148,11 @@ fi sudo chown -R 1000 "${ROOT_FS_DIR}/usr/local/autotest" sudo chgrp -R 1000 "${ROOT_FS_DIR}/usr/local/autotest" +# Based on how the autotest package it extracted the user running in the chroot +# may not have access to navigate into this folder because own the owner +# (chronos) has access. This fixes that so that other can as well. +sudo chmod 747 -R "${ROOT_FS_DIR}/usr/local/autotest" + # Setup permissions and symbolic links for item in chrome_test pyauto_dep; do pushd .