From a6320a47e8f5a5e565547a245537011cfac6f670 Mon Sep 17 00:00:00 2001 From: Salvador Fuentes Date: Tue, 27 Mar 2018 13:44:34 -0600 Subject: [PATCH] CI: Move from qemu 2.7 to qemu 2.11 Instead of using a custom version of qemu, we should use qemu version from upstream. Fixes #163. Signed-off-by: Salvador Fuentes --- .ci/install_qemu.sh | 25 ++++++++++++++++++++++++ .ci/install_qemu_lite.sh | 41 ---------------------------------------- .ci/setup.sh | 3 +++ .ci/setup_env_fedora.sh | 4 ++-- .ci/setup_env_ubuntu.sh | 4 ++-- 5 files changed, 32 insertions(+), 45 deletions(-) create mode 100755 .ci/install_qemu.sh delete mode 100755 .ci/install_qemu_lite.sh diff --git a/.ci/install_qemu.sh b/.ci/install_qemu.sh new file mode 100755 index 0000000000..52c3647d06 --- /dev/null +++ b/.ci/install_qemu.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# +# Copyright (c) 2018 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -e + +QEMU_REPO="github.com/kata-containers/qemu" +QEMU_DIR="qemu" +KATA_QEMU_BRANCH="stable-2.11" + +git clone "https://${QEMU_REPO}" + +pushd "$QEMU_DIR" +git checkout "$KATA_QEMU_BRANCH" + +echo "Build Qemu" +./configure.sh +make + +echo "Install Qemu" +sudo -E make install +popd diff --git a/.ci/install_qemu_lite.sh b/.ci/install_qemu_lite.sh deleted file mode 100755 index 9afdc4f4ae..0000000000 --- a/.ci/install_qemu_lite.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2017-2018 Intel Corporation -# -# SPDX-License-Identifier: Apache-2.0 -# - -set -e - -arch=$(arch) - -if [ "$#" -ne 3 ]; then - echo "Usage: $0 " - echo " Install the QEMU_LITE_VERSION from clear CLEAR_RELEASE." - exit 1 -fi - -clear_release="$1" -qemu_lite_version="$2" -distro="$3" -qemu_lite_bin="qemu-lite-bin-${qemu_lite_version}.${arch}.rpm" -qemu_lite_data="qemu-lite-data-${qemu_lite_version}.${arch}.rpm" - -echo -e "Install qemu-lite ${qemu_lite_version}" - -# download packages -curl -LO "https://download.clearlinux.org/releases/${clear_release}/clear/${arch}/os/Packages/${qemu_lite_bin}" -curl -LO "https://download.clearlinux.org/releases/${clear_release}/clear/${arch}/os/Packages/${qemu_lite_data}" - -# install packages -if [ "$distro" == "ubuntu" ]; then - sudo alien -i "./${qemu_lite_bin}" - sudo alien -i "./${qemu_lite_data}" -elif [ "$distro" == "fedora" ]; then - sudo rpm -ihv "./${qemu_lite_bin}" --nodeps - sudo rpm -ihv "./${qemu_lite_data}" --nodeps -fi - -# cleanup -rm -f "./${qemu_lite_bin}" -rm -f "./${qemu_lite_data}" diff --git a/.ci/setup.sh b/.ci/setup.sh index 377c30a394..b9e590dc30 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -35,6 +35,9 @@ else die "Unsupported architecture: $arch" fi +echo "Install Qemu" +bash -f ${cidir}/install_qemu.sh + echo "Install shim" bash -f ${cidir}/install_shim.sh diff --git a/.ci/setup_env_fedora.sh b/.ci/setup_env_fedora.sh index dfea34b3aa..690117bee2 100755 --- a/.ci/setup_env_fedora.sh +++ b/.ci/setup_env_fedora.sh @@ -29,8 +29,8 @@ echo "Install kata containers dependencies" chronic sudo -E dnf -y groupinstall "Development tools" chronic sudo -E dnf -y install libtool automake autoconf bc pixman numactl-libs -echo "Install qemu-lite binary" -"${cidir}/install_qemu_lite.sh" "${qemu_lite_clear_release}" "${qemu_lite_sha}" "$ID" +echo "Install qemu dependencies" +sudo -E dnf -y install libcap-devel libattr-devel libcap-ng-devel zlib-devel pixman-devel echo "Install kata containers image" "${cidir}/install_kata_image.sh" diff --git a/.ci/setup_env_ubuntu.sh b/.ci/setup_env_ubuntu.sh index c5ccf219aa..0ea30ad431 100755 --- a/.ci/setup_env_ubuntu.sh +++ b/.ci/setup_env_ubuntu.sh @@ -25,8 +25,8 @@ if ! command -v docker > /dev/null; then "${cidir}/../cmd/container-manager/manage_ctr_mgr.sh" docker install fi -echo "Install qemu-lite binary" -"${cidir}/install_qemu_lite.sh" "${qemu_lite_clear_release}" "${qemu_lite_sha}" "$ID" +echo "Install qemu dependencies" +sudo -E apt install -y libcap-dev libattr1-dev libcap-ng-dev echo "Install kata-containers image" "${cidir}/install_kata_image.sh"