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 <wainersm@redhat.com>
This commit is contained in:
Wainer dos Santos Moschetta 2021-12-16 17:58:20 -03:00
parent 39cf2b27c1
commit 5d49ccd613

View File

@ -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