diff --git a/static-build/qemu/Dockerfile b/static-build/qemu/Dockerfile index 34ab29805f..410a17e2c3 100644 --- a/static-build/qemu/Dockerfile +++ b/static-build/qemu/Dockerfile @@ -39,9 +39,15 @@ RUN git clone https://github.com/qemu/capstone.git capstone RUN git clone https://github.com/qemu/keycodemapdb.git ui/keycodemapdb ADD scripts/configure-hypervisor.sh /root/configure-hypervisor.sh -ADD qemu/patches/* /root/kata_qemu_patches +ADD qemu/patches/ /root/kata_qemu_patches -RUN for patch in /root/kata_qemu_patches/*.patch; do git apply "$patch"; done +RUN \ + cat VERSION; \ + stable_branch=$(cat VERSION | awk 'BEGIN{FS=OFS="."}{print $1 "." $2 ".x"}');\ + for patch in $(find /root/kata_qemu_patches/${stable_branch}/ -name '*.patch'); do\ + echo "apply $patch";\ + git apply "$patch"; \ + done RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | xargs ./configure \ --with-pkgversion=kata-static