From f31125fe92f056fda48f5226aebf9d295ffc640c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 28 Feb 2022 17:35:35 +0100 Subject: [PATCH 1/2] version: Bump cloud-hypervisor to b0324f85571c441f MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This bump brings a fix on the build script, for ARM, so we can use the very same build script everywhere. The commit of our interest is b0324f85571c441f840e9bdeb25410514a00bb74: ``` scripts: Fix musl build on aarch64 Adding the missing TARGET_CC environment variable to get the build to complete correctly. Fixes #3776 Signed-off-by: Sebastien Boeuf Signed-off-by: Fabiano FidĂȘncio --- versions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions.yaml b/versions.yaml index c1b10ce893..50d07d23c5 100644 --- a/versions.yaml +++ b/versions.yaml @@ -75,7 +75,7 @@ assets: url: "https://github.com/cloud-hypervisor/cloud-hypervisor" uscan-url: >- https://github.com/cloud-hypervisor/cloud-hypervisor/tags.*/v?(\d\S+)\.tar\.gz - version: "5343e09e7b8dbd5dd8ac0d90a3ad52037490dd86" + version: "b0324f85571c441f840e9bdeb25410514a00bb74" firecracker: description: "Firecracker micro-VMM" From a67b93bb035f25f99cbfdf2b2ef99a0c882c2af0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Sun, 20 Feb 2022 20:16:30 +0100 Subject: [PATCH 2/2] snap: clh: Re-use kata-deploy script here MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current snap build for clh is broken as it's not aware of how to build the binary from sources. Instead of fixing it here, let's take advantage of the kata-deploy script, which is capable of building from sources, and re-use it here. Fixes: #3693 Signed-off-by: Fabiano FidĂȘncio --- snap/snapcraft.yaml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 4f90329c1d..173c0f7b73 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -320,17 +320,20 @@ parts: plugin: nil after: [godeps] override-build: | - export GOPATH=${SNAPCRAFT_STAGE}/gopath - yq=${SNAPCRAFT_STAGE}/yq - kata_dir=${GOPATH}/src/github.com/${SNAPCRAFT_PROJECT_NAME}/${SNAPCRAFT_PROJECT_NAME} - versions_file="${kata_dir}/versions.yaml" - version="$(${yq} r ${versions_file} assets.hypervisor.cloud_hypervisor.version)" - url="https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/${version}" - curl -L ${url}/cloud-hypervisor-static -o cloud-hypervisor - curl -LO ${url}/clh-remote + sudo apt-get -y update + sudo apt-get -y install ca-certificates curl gnupg lsb-release + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --batch --yes --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + sudo apt-get -y update + sudo apt-get -y install docker-ce docker-ce-cli containerd.io + sudo systemctl start docker.socket - install -D cloud-hypervisor ${SNAPCRAFT_PART_INSTALL}/usr/bin/cloud-hypervisor - install -D clh-remote ${SNAPCRAFT_PART_INSTALL}/usr/bin/clh-remote + export GOPATH=${SNAPCRAFT_STAGE}/gopath + kata_dir=${GOPATH}/src/github.com/${SNAPCRAFT_PROJECT_NAME}/${SNAPCRAFT_PROJECT_NAME} + cd ${kata_dir} + sudo -E NO_TTY=true make cloud-hypervisor-tarball + tar xvJpf build/kata-static-cloud-hypervisor.tar.xz -C /tmp/ + install -D /tmp/opt/kata/bin/cloud-hypervisor ${SNAPCRAFT_PART_INSTALL}/usr/bin/cloud-hypervisor apps: runtime: