mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-07 14:36:43 +00:00
snap: Build virtiofsd using the kata-deploy scripts
Let's build virtiofsd using the kata-deploy build scripts, which
simplifies and unifies the way we build our components.
Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
(cherry picked from commit 0bc5baafb9
)
This commit is contained in:
parent
1772df5ac2
commit
ab83ab6be5
@ -321,35 +321,23 @@ parts:
|
|||||||
|
|
||||||
virtiofsd:
|
virtiofsd:
|
||||||
plugin: nil
|
plugin: nil
|
||||||
after: [godeps, rustdeps]
|
after: [godeps, rustdeps, docker]
|
||||||
override-build: |
|
override-build: |
|
||||||
source "${SNAPCRAFT_PROJECT_DIR}/snap/local/snap-common.sh"
|
source "${SNAPCRAFT_PROJECT_DIR}/snap/local/snap-common.sh"
|
||||||
|
|
||||||
# Currently, powerpc makes use of the QEMU's C implementation.
|
|
||||||
# The other platforms make use of the new rust virtiofsd.
|
|
||||||
#
|
|
||||||
# See "tools/packaging/scripts/configure-hypervisor.sh".
|
|
||||||
if [ "${arch}" == "ppc64le" ]
|
|
||||||
then
|
|
||||||
echo "INFO: Building QEMU's C version of virtiofsd"
|
|
||||||
# Handled by the 'qemu' part, so nothing more to do here.
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "INFO: Building rust version of virtiofsd"
|
echo "INFO: Building rust version of virtiofsd"
|
||||||
fi
|
|
||||||
|
|
||||||
cd "${kata_dir}"
|
cd "${SNAPCRAFT_PROJECT_DIR}"
|
||||||
|
# Clean-up build dir in case it already exists
|
||||||
|
sudo -E NO_TTY=true make virtiofsd-tarball
|
||||||
|
|
||||||
export PATH=${PATH}:${HOME}/.cargo/bin
|
|
||||||
# Download the rust implementation of virtiofsd
|
|
||||||
tools/packaging/static-build/virtiofsd/build-static-virtiofsd.sh
|
|
||||||
sudo install \
|
sudo install \
|
||||||
--owner='root' \
|
--owner='root' \
|
||||||
--group='root' \
|
--group='root' \
|
||||||
--mode=0755 \
|
--mode=0755 \
|
||||||
-D \
|
-D \
|
||||||
--target-directory="${SNAPCRAFT_PART_INSTALL}/usr/libexec/" \
|
--target-directory="${SNAPCRAFT_PART_INSTALL}/usr/libexec/" \
|
||||||
virtiofsd/virtiofsd
|
build/virtiofsd/builddir/virtiofsd/virtiofsd
|
||||||
|
|
||||||
cloud-hypervisor:
|
cloud-hypervisor:
|
||||||
plugin: nil
|
plugin: nil
|
||||||
|
Loading…
Reference in New Issue
Block a user