From e6c2a53953cf615631492010a6ed300294eb6fd6 Mon Sep 17 00:00:00 2001 From: Archana Shinde Date: Wed, 13 Nov 2019 16:59:17 -0800 Subject: [PATCH] release: Pass the qemu tarball name as a docker build arg Rather than hardcoding the tarball name to be generated in the Dockerfile, pass this as an argument. Signed-off-by: Archana Shinde --- static-build/qemu-virtiofs/Dockerfile | 3 ++- static-build/qemu-virtiofs/build-static-qemu-virtiofs.sh | 1 + static-build/qemu/Dockerfile | 3 ++- static-build/qemu/build-static-qemu.sh | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/static-build/qemu-virtiofs/Dockerfile b/static-build/qemu-virtiofs/Dockerfile index f3b9aee3e..828cf2de5 100644 --- a/static-build/qemu-virtiofs/Dockerfile +++ b/static-build/qemu-virtiofs/Dockerfile @@ -3,6 +3,7 @@ from ubuntu:18.04 ARG QEMU_VIRTIOFS_REPO # commit/tag/branch ARG QEMU_VIRTIOFS_TAG +ARG QEMU_TARBALL ARG PREFIX WORKDIR /root/qemu-virtiofs @@ -49,4 +50,4 @@ RUN make -j$(nproc) virtiofsd RUN make install DESTDIR=/tmp/qemu-virtiofs-static RUN mv /tmp/qemu-virtiofs-static/"${PREFIX}"/bin/qemu-system-x86_64 /tmp/qemu-virtiofs-static/"${PREFIX}"/bin/qemu-virtiofs-system-x86_64 RUN chmod +x virtiofsd && mv virtiofsd /tmp/qemu-virtiofs-static/opt/kata/bin/ -RUN cd /tmp/qemu-virtiofs-static && tar -czvf kata-qemu-static.tar.gz * +RUN cd /tmp/qemu-virtiofs-static && tar -czvf "${QEMU_TARBALL}" * diff --git a/static-build/qemu-virtiofs/build-static-qemu-virtiofs.sh b/static-build/qemu-virtiofs/build-static-qemu-virtiofs.sh index 49b07d743..c8765cf0b 100755 --- a/static-build/qemu-virtiofs/build-static-qemu-virtiofs.sh +++ b/static-build/qemu-virtiofs/build-static-qemu-virtiofs.sh @@ -32,6 +32,7 @@ sudo docker build \ --build-arg https_proxy="${https_proxy}" \ --build-arg QEMU_VIRTIOFS_REPO="${qemu_virtiofs_repo}" \ --build-arg QEMU_VIRTIOFS_TAG="${qemu_virtiofs_tag}" \ + --build-arg QEMU_TARBALL="${qemu_virtiofs_tar}" \ --build-arg PREFIX="${prefix}" \ "${packaging_dir}" \ -f "${script_dir}/Dockerfile" \ diff --git a/static-build/qemu/Dockerfile b/static-build/qemu/Dockerfile index 3d79f853d..2b127b6fd 100644 --- a/static-build/qemu/Dockerfile +++ b/static-build/qemu/Dockerfile @@ -3,6 +3,7 @@ from ubuntu:18.04 ARG QEMU_REPO # commit/tag/branch ARG QEMU_VERSION +ARG QEMU_TARBALL ARG PREFIX WORKDIR /root/qemu @@ -54,4 +55,4 @@ RUN PREFIX="${PREFIX}" /root/configure-hypervisor.sh -s kata-qemu | xargs ./conf RUN make -j$(nproc) RUN make install DESTDIR=/tmp/qemu-static -RUN cd /tmp/qemu-static && tar -czvf kata-qemu-static.tar.gz * +RUN cd /tmp/qemu-static && tar -czvf "${QEMU_TARBALL}" * diff --git a/static-build/qemu/build-static-qemu.sh b/static-build/qemu/build-static-qemu.sh index 56d2bab31..793988956 100755 --- a/static-build/qemu/build-static-qemu.sh +++ b/static-build/qemu/build-static-qemu.sh @@ -46,6 +46,7 @@ sudo docker build \ --build-arg https_proxy="${https_proxy}" \ --build-arg QEMU_REPO="${qemu_repo}" \ --build-arg QEMU_VERSION="${qemu_version}" \ + --build-arg QEMU_TARBALL="${qemu_tar}" \ --build-arg PREFIX="${prefix}" \ "${packaging_dir}" \ -f "${script_dir}/Dockerfile" \