From 073e33a3a5dd9cb1608ab5753fd52778056b2dc8 Mon Sep 17 00:00:00 2001 From: Omar Abdulaziz Date: Tue, 24 Sep 2024 11:13:58 +0300 Subject: [PATCH] download virtiofsd-rs binary instead of building --- scripts/install_deps.sh | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index 0e6ce2867..a52d35731 100644 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -4,7 +4,7 @@ set -e CHV_VERSION="v39.0" CHV_URL="https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/${CHV_VERSION}/cloud-hypervisor" RUSTUP_URL="https://sh.rustup.rs" -VIRTIOFSD_REPO="https://gitlab.com/muhamad.azmy/virtiofsd.git" +VIRTIOFSD_REPO="https://gitlab.com/muhamad.azmy/virtiofsd/-/jobs/6547244336/artifacts/download?file_type=archive" RFS_VERSION="v1.1.1" RFS_URL="https://github.com/threefoldtech/rfs/releases/download/${RFS_VERSION}/rfs" @@ -14,24 +14,17 @@ install_chv() { chmod +x /usr/local/bin/cloud-hypervisor } -install_rust() { - echo "Installing rust ..." - curl --proto '=https' --tlsv1.2 -sSf ${RUSTUP_URL} | sh -s -- -y - . "$HOME/.cargo/env" -} install_virtiofsd() { echo "Installing virtiofsd ..." - [ ! -d 'virtiofsd' ] && git clone ${VIRTIOFSD_REPO} - pushd virtiofsd # specially needed for virtiofsd bin apt -y update apt -y install libseccomp-dev libcap-ng-dev - cargo build --release - mv ./target/release/virtiofsd /usr/local/bin/virtiofsd - popd + curl -L -k -o "/tmp/virtiofsd-rs.zip" ${VIRTIOFSD_REPO} + unzip -p /tmp/virtiofsd-rs.zip > /bin/virtiofsd-rs + chmod +x /bin/virtiofsd-rs } install_rfs() { @@ -58,10 +51,6 @@ main() { # install virtiofsd if ! command -v virtiofsd &>/dev/null; then - # install rustup and cargo - if ! command -v cargo &>/dev/null; then - install_rust - fi install_virtiofsd fi