From a915f082665befaa3cfeda332f33f618a133e946 Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Thu, 16 Dec 2021 17:58:20 -0300 Subject: [PATCH] packaging/qemu: Use partial git clone The static build of QEMU takes a good amount of time on cloning the source tree because we do a full git clone. In order to speed up that operation this changed the Dockerfile so that it is carried out a partial clone by using --depth=1 argument. Fixes #3291 Signed-off-by: Wainer dos Santos Moschetta --- tools/packaging/static-build/qemu/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/packaging/static-build/qemu/Dockerfile b/tools/packaging/static-build/qemu/Dockerfile index cb15ddeace..a4602ec1c5 100644 --- a/tools/packaging/static-build/qemu/Dockerfile +++ b/tools/packaging/static-build/qemu/Dockerfile @@ -52,12 +52,12 @@ RUN [ "$(uname -m)" != "s390x" ] && apt-get install -y libpmem-dev || true ARG QEMU_REPO -RUN cd .. && git clone "${QEMU_REPO}" qemu +RUN cd .. && git clone --depth=1 "${QEMU_REPO}" qemu # commit/tag/branch ARG QEMU_VERSION -RUN git checkout "${QEMU_VERSION}" +RUN git fetch --depth=1 origin "${QEMU_VERSION}" && git checkout FETCH_HEAD RUN git clone https://github.com/qemu/capstone.git capstone RUN git clone https://github.com/qemu/keycodemapdb.git ui/keycodemapdb RUN git clone https://github.com/qemu/meson.git meson