diff --git a/tools/packaging/qemu/patches/tag_patches/qemu5.0-virtiofs-with51bits-dax/no_patches.txt b/tools/packaging/qemu/patches/tag_patches/qemu5.0-virtiofs-with51bits-dax/no_patches.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/packaging/qemu/patches/v5.0.0/0004-virtiofsd-Add-o-allow_direct_io-no_allow_direct_io-o.patch b/tools/packaging/qemu/patches/tag_patches/v5.0.0/0004-virtiofsd-Add-o-allow_direct_io-no_allow_direct_io-o.patch similarity index 100% rename from tools/packaging/qemu/patches/v5.0.0/0004-virtiofsd-Add-o-allow_direct_io-no_allow_direct_io-o.patch rename to tools/packaging/qemu/patches/tag_patches/v5.0.0/0004-virtiofsd-Add-o-allow_direct_io-no_allow_direct_io-o.patch diff --git a/tools/packaging/qemu/patches/v5.0.0/0005-virtiofsd-extract-lo_do_open-from-lo_open.patch b/tools/packaging/qemu/patches/tag_patches/v5.0.0/0005-virtiofsd-extract-lo_do_open-from-lo_open.patch similarity index 100% rename from tools/packaging/qemu/patches/v5.0.0/0005-virtiofsd-extract-lo_do_open-from-lo_open.patch rename to tools/packaging/qemu/patches/tag_patches/v5.0.0/0005-virtiofsd-extract-lo_do_open-from-lo_open.patch diff --git a/tools/packaging/qemu/patches/v5.0.0/0006-virtiofsd-optionally-return-inode-pointer-from-lo_do.patch b/tools/packaging/qemu/patches/tag_patches/v5.0.0/0006-virtiofsd-optionally-return-inode-pointer-from-lo_do.patch similarity index 100% rename from tools/packaging/qemu/patches/v5.0.0/0006-virtiofsd-optionally-return-inode-pointer-from-lo_do.patch rename to tools/packaging/qemu/patches/tag_patches/v5.0.0/0006-virtiofsd-optionally-return-inode-pointer-from-lo_do.patch diff --git a/tools/packaging/qemu/patches/v5.0.0/0007-virtiofsd-prevent-opening-of-special-files-CVE-2020-.patch b/tools/packaging/qemu/patches/tag_patches/v5.0.0/0007-virtiofsd-prevent-opening-of-special-files-CVE-2020-.patch similarity index 100% rename from tools/packaging/qemu/patches/v5.0.0/0007-virtiofsd-prevent-opening-of-special-files-CVE-2020-.patch rename to tools/packaging/qemu/patches/tag_patches/v5.0.0/0007-virtiofsd-prevent-opening-of-special-files-CVE-2020-.patch diff --git a/tools/packaging/qemu/patches/tag_patches/v5.2.0/no_patches.txt b/tools/packaging/qemu/patches/tag_patches/v5.2.0/no_patches.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/packaging/static-build/qemu/Dockerfile b/tools/packaging/static-build/qemu/Dockerfile index 3d6787531f..7fa2915901 100644 --- a/tools/packaging/static-build/qemu/Dockerfile +++ b/tools/packaging/static-build/qemu/Dockerfile @@ -59,9 +59,12 @@ ADD qemu /root/kata_qemu ADD scripts/apply_patches.sh /root/apply_patches.sh ADD static-build /root/static-build +RUN echo "Apply patches for base version" RUN stable_branch=$(cat VERSION | awk 'BEGIN{FS=OFS="."}{print $1 "." $2 ".x"}') && \ /root/apply_patches.sh "/root/kata_qemu/patches/${stable_branch}" +RUN echo "Apply patches for specific qemu version" +RUN /root/apply_patches.sh "/root/kata_qemu/patches/tag_patches/${QEMU_VERSION}" RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | xargs ./configure \ --with-pkgversion=kata-static