From b78e8446655720614f586268cd90b1b45abd2795 Mon Sep 17 00:00:00 2001 From: "Jiamei.Xie" Date: Fri, 11 Oct 2019 09:36:43 +0000 Subject: [PATCH] Fix chromedriver dependency issue for aarch64. Make the booststrap.sh install correct chromedriver for aarch64 Change-Id: Iefa98ed7918725f00fb8db131cae12383c44c42e Signed-off-by: Jiamei.Xie --- bootstrap.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 6c9ef84988f..a4117ab9b35 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -279,9 +279,25 @@ function install_chromedriver() { local version="$1" local dist="$2" - curl -sL "https://chromedriver.storage.googleapis.com/$version/chromedriver_linux64.zip" > chromedriver_linux64.zip - unzip -o -q chromedriver_linux64.zip -d "$dist" - rm chromedriver_linux64.zip + if [ "$(arch)" == "aarch64" ] ; then + os=$(cat /etc/*release | grep "^ID=" | cut -d '=' -f 2) + case $os in + ubuntu|debian) + sudo apt-get update -y && sudo apt install -y --no-install-recommends unzip libglib2.0-0 libnss3 libx11-6 + ;; + centos|fedora) + sudo yum update -y && yum install -y libX11 unzip wget + ;; + esac + echo "For Arm64, using prebuilt binary from electron (https://github.com/electron/electron/) of version 76.0.3809.126" + wget https://github.com/electron/electron/releases/download/v6.0.3/chromedriver-v6.0.3-linux-arm64.zip + unzip -o -q chromedriver-v6.0.3-linux-arm64.zip -d "$dist" + rm chromedriver-v6.0.3-linux-arm64.zip + else + curl -sL "https://chromedriver.storage.googleapis.com/$version/chromedriver_linux64.zip" > chromedriver_linux64.zip + unzip -o -q chromedriver_linux64.zip -d "$dist" + rm chromedriver_linux64.zip + fi } if [ "$BUILD_PYTHON" == 1 ] ; then install_dep "chromedriver" "73.0.3683.20" "$VTROOT/dist/chromedriver" install_chromedriver