Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
CI: Move from qemu 2.7 to qemu 2.11
Browse files Browse the repository at this point in the history
Instead of using a custom version of qemu, we should
use qemu version from upstream.

Fixes #163.

Depends-on: github.com/kata-containers/runtime#119

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
  • Loading branch information
chavafg committed Mar 28, 2018
1 parent 8fc087e commit 94bbf8a
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 45 deletions.
42 changes: 42 additions & 0 deletions .ci/install_qemu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#

set -e

QEMU_REPO="github.com/qemu/qemu"
QEMU_DIR="qemu"
KATA_QEMU_BRANCH="stable-2.11"
PACKAGING_REPO="github.com/kata-containers/packaging"
QEMU_CONFIG_SCRIPT="configure-hypervisor.sh"

git clone "https://${QEMU_REPO}"

# Get qemu configuration script and copy to
# the qemu repository
go get -d "$PACKAGING_REPO" || true
cp "${GOPATH}/src/${PACKAGING_REPO}/scripts/${QEMU_CONFIG_SCRIPT}" "${QEMU_DIR}"

pushd "$QEMU_DIR"
git checkout "$KATA_QEMU_BRANCH"

echo "Build Qemu"
# Patch to not fail on --disable-static
curl https://raw.githubusercontent.com/clearcontainers/packaging/master/qemu-lite/configure.patch | patch -p1
eval "./${QEMU_CONFIG_SCRIPT}" "qemu" | xargs ./configure
make -j $(nproc)

echo "Install Qemu"
sudo -E make install

# Workaround:
# As we currently do not have a package that installs
# qemu under /usr/bin/, create a symlink.
# this should be solved when we define and have the packages
# in a repository.
sudo ln -sf $(command -v qemu-system-x86_64) /usr/bin/

popd
41 changes: 0 additions & 41 deletions .ci/install_qemu_lite.sh

This file was deleted.

3 changes: 3 additions & 0 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions .ci/setup_env_fedora.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ 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"
chronic sudo -E dnf -y install libcap-devel libattr-devel \
libcap-ng-devel zlib-devel pixman-devel librbd-dev

echo "Install kata containers image"
"${cidir}/install_kata_image.sh"
Expand Down
4 changes: 2 additions & 2 deletions .ci/setup_env_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
chronic sudo -E apt install -y libcap-dev libattr1-dev libcap-ng-dev librbd-dev

echo "Install kata-containers image"
"${cidir}/install_kata_image.sh"
Expand Down

0 comments on commit 94bbf8a

Please sign in to comment.