mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 14:58:16 +00:00
qemu-virtiofs: Update to qemu 5.0 + virtiofs + dax
[ Port from packaging commit cbe53bdb14e303830fa9f2d5a7f3c9161a32f033 ] Update build scripts for qemu-virtiofs. - virtiofs-0.3 patches are not needed - Sync build on how vanilla qemu is built - Apply patches for virtiofsd if any (none today) - Apply patches that are used for the qemu vanilla - Apply patches in order Fixes: #461 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com> Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
committed by
Bo Chen
parent
3ec05a9f95
commit
04b156f604
@@ -1,4 +1,4 @@
|
||||
from ubuntu:18.04
|
||||
from ubuntu:20.04
|
||||
|
||||
ARG QEMU_VIRTIOFS_REPO
|
||||
# commit/tag/branch
|
||||
@@ -19,37 +19,57 @@ RUN apt-get --no-install-recommends install -y \
|
||||
flex \
|
||||
gawk \
|
||||
libaudit-dev \
|
||||
libblkid-dev \
|
||||
libcap-dev \
|
||||
libcap-ng-dev \
|
||||
libdw-dev \
|
||||
libelf-dev \
|
||||
libffi-dev \
|
||||
libglib2.0-0 \
|
||||
libglib2.0-dev \
|
||||
libglib2.0-dev git \
|
||||
libltdl-dev \
|
||||
libmount-dev \
|
||||
libpixman-1-dev \
|
||||
libpmem-dev \
|
||||
libseccomp-dev \
|
||||
libseccomp2 \
|
||||
libselinux1-dev \
|
||||
libtool \
|
||||
patch \
|
||||
make \
|
||||
pkg-config \
|
||||
pkg-config \
|
||||
python \
|
||||
python-dev \
|
||||
rsync \
|
||||
seccomp \
|
||||
libseccomp2 \
|
||||
zlib1g-dev
|
||||
|
||||
RUN cd .. && git clone "${QEMU_VIRTIOFS_REPO}" qemu-virtiofs
|
||||
RUN git checkout "${QEMU_VIRTIOFS_TAG}"
|
||||
ADD qemu/patches/virtiofsd/0001-add-time-to-seccomp.patch /root/0001-add-time-to-seccomp.patch
|
||||
ADD qemu/patches/virtiofsd/0002-libvhost-user-Fix-the-VHOST_USER_PROTOCOL_F_SLAVE_SE.patch /root/0002-libvhost-user-Fix-the-VHOST_USER_PROTOCOL_F_SLAVE_SE.patch
|
||||
RUN patch -p1 < /root/0001-add-time-to-seccomp.patch
|
||||
RUN patch -p1 < /root/0002-libvhost-user-Fix-the-VHOST_USER_PROTOCOL_F_SLAVE_SE.patch
|
||||
|
||||
ADD scripts/configure-hypervisor.sh /root/configure-hypervisor.sh
|
||||
RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | sed -e 's|--enable-rbd||g' -e 's|--disable-seccomp||g' | xargs ./configure \
|
||||
ADD qemu/patches/ /root/kata_qemu_patches
|
||||
|
||||
# Apply experimental specific patches
|
||||
# Patches to quick fix virtiofs fork
|
||||
ENV VIRTIOFS_PATCHES_DIR=/root/kata_qemu_patches/${QEMU_VIRTIOFS_TAG}/
|
||||
RUN find "${VIRTIOFS_PATCHES_DIR}" -name '*.patch' -type f |sort -t- -k1,1n > patches_virtiofs
|
||||
RUN echo "Patches to apply for virtiofs fixes:"
|
||||
RUN cat patches_virtiofs
|
||||
RUN [ ! -s patches_virtiofs ] || git apply $(cat patches_virtiofs)
|
||||
|
||||
RUN cat VERSION | awk 'BEGIN{FS=OFS="."}{print $1 "." $2 ".x"}' > stable_branch
|
||||
RUN echo "root/kata_qemu_patches/$(cat stable_branch)/" > patches_qemu_dir
|
||||
RUN echo "patches dir $(cat patches_qemu_dir)"
|
||||
RUN find "$(cat patches_qemu_dir)" -name '*.patch' -type f |sort -t- -k1,1n > patches_qemu
|
||||
RUN echo "Patches to apply for qemu:"
|
||||
RUN cat patches_qemu
|
||||
RUN [ ! -s patches_qemu ] || git apply $(cat patches_qemu )
|
||||
|
||||
RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | sed -e 's|--disable-seccomp||g' | xargs ./configure \
|
||||
--with-pkgversion=kata-static
|
||||
|
||||
RUN make -j$(nproc)
|
||||
RUN make -j$(nproc) virtiofsd
|
||||
RUN make install DESTDIR=/tmp/qemu-virtiofs-static
|
||||
|
Reference in New Issue
Block a user