mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 20:54:26 +00:00
snap: Build and package rust version of virtiofsd
Update the snap config file to build the rust version of `virtiofsd` for x86_64, but build QEMU's C version for other platforms. Fixes: #4261. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
27d903b76a
commit
49361749ed
@ -317,6 +317,41 @@ parts:
|
|||||||
# Hack: move qemu to /
|
# Hack: move qemu to /
|
||||||
"snap/kata-containers/current/": "./"
|
"snap/kata-containers/current/": "./"
|
||||||
|
|
||||||
|
virtiofsd:
|
||||||
|
plugin: nil
|
||||||
|
after: [godeps]
|
||||||
|
override-build: |
|
||||||
|
# Currently, only one platform uses the new rust virtiofsd. The
|
||||||
|
# others make use of QEMU's C implementation.
|
||||||
|
#
|
||||||
|
# See "tools/packaging/scripts/configure-hypervisor.sh".
|
||||||
|
if [ "$(uname -m)" = 'x86_64' ]
|
||||||
|
then
|
||||||
|
echo "INFO: Building rust version of virtiofsd"
|
||||||
|
else
|
||||||
|
echo "INFO: Building QEMU's C version of virtiofsd"
|
||||||
|
# Handled by the 'qemu' part, so nothing more to do here.
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# put everything in stage
|
||||||
|
cd ${SNAPCRAFT_STAGE}
|
||||||
|
|
||||||
|
export PATH="$PATH:${SNAPCRAFT_STAGE}/bin"
|
||||||
|
export GOPATH=${SNAPCRAFT_STAGE}/gopath
|
||||||
|
|
||||||
|
kata_dir=${GOPATH}/src/github.com/${SNAPCRAFT_PROJECT_NAME}/${SNAPCRAFT_PROJECT_NAME}
|
||||||
|
cd "${kata_dir}"
|
||||||
|
# Download the rust implementation of virtiofsd
|
||||||
|
tools/packaging/static-build/virtiofsd/build-static-virtiofsd.sh
|
||||||
|
sudo install \
|
||||||
|
--owner='root' \
|
||||||
|
--group='root' \
|
||||||
|
--mode=0755 \
|
||||||
|
-D \
|
||||||
|
--target-directory="${SNAPCRAFT_PART_INSTALL}/usr/libexec/" \
|
||||||
|
virtiofsd/virtiofsd
|
||||||
|
|
||||||
cloud-hypervisor:
|
cloud-hypervisor:
|
||||||
plugin: nil
|
plugin: nil
|
||||||
after: [godeps]
|
after: [godeps]
|
||||||
|
Loading…
Reference in New Issue
Block a user