packaging: fix cloud-hypervisor binary path

1. ensure build-static-clh.sh puts cloud-hypervisor under ./cloud-hypervisor directory
2. install cloud-hypervisor/cloud-hypervisor binary

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao 2020-10-10 18:49:35 +08:00
parent 7b53041bad
commit 7bb3e562bc
2 changed files with 4 additions and 2 deletions

View File

@ -175,7 +175,7 @@ install_clh() {
kata_version="${kata_version}" "${pkg_root_dir}/static-build/cloud-hypervisor/build-static-clh.sh"
info "Install static cloud-hypervisor"
mkdir -p "${destdir}/opt/kata/bin/"
sudo install -D --owner root --group root --mode 0744 cloud-hypervisor "${destdir}/opt/kata/bin/cloud-hypervisor"
sudo install -D --owner root --group root --mode 0744 cloud-hypervisor/cloud-hypervisor "${destdir}/opt/kata/bin/cloud-hypervisor"
pushd "${destdir}"
# create tarball for github release action
tar -czvf ../kata-static-clh.tar.gz *

View File

@ -31,7 +31,9 @@ pull_clh_released_binary() {
info "Download cloud-hypervisor version: ${cloud_hypervisor_version}"
cloud_hypervisor_binary="https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/${cloud_hypervisor_version}/cloud-hypervisor-static"
curl --fail -L ${cloud_hypervisor_binary} -o cloud-hypervisor || return 1
curl --fail -L ${cloud_hypervisor_binary} -o cloud-hypervisor-static || return 1
mkdir -p cloud-hypervisor
mv -f cloud-hypervisor-static cloud-hypervisor/cloud-hypervisor
}
build_clh_from_source() {