[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 04/18] tests/docker: update debian-arm64-cross with lci-t
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v2 04/18] tests/docker: update debian-arm64-cross with lci-tool |
Date: |
Mon, 28 Feb 2022 09:28:28 +0000 |
User-agent: |
Mutt/2.1.5 (2021-12-30) |
$SUBJECT =~ s/lci-tool/lcitool/
On Fri, Feb 25, 2022 at 05:20:07PM +0000, Alex Bennée wrote:
> Using lci-tool update debian-arm64-cross to a Debian 11 based system.
Likewise
> As a result we can drop debian-arm64-test-cross just for building
> tests.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Message-Id: <20220211160309.335014-5-alex.bennee@linaro.org>
> ---
> .gitlab-ci.d/container-cross.yml | 10 +-
> tests/docker/Makefile.include | 3 -
> .../dockerfiles/debian-arm64-cross.docker | 186 +++++++++++++++---
> .../debian-arm64-test-cross.docker | 13 --
> tests/lcitool/refresh | 11 ++
> tests/tcg/configure.sh | 2 +-
> 6 files changed, 173 insertions(+), 52 deletions(-)
> delete mode 100644 tests/docker/dockerfiles/debian-arm64-test-cross.docker
>
> +RUN export DEBIAN_FRONTEND=noninteractive && \
> + apt-get update && \
> + apt-get install -y eatmydata && \
> + eatmydata apt-get dist-upgrade -y && \
> + eatmydata apt-get install --no-install-recommends -y \
> + bash \
...snip native packages...
> + texinfo && \
> + eatmydata apt-get autoremove -y && \
> + eatmydata apt-get autoclean -y && \
> + sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
> + dpkg-reconfigure locales
>
> -RUN apt update && \
> - DEBIAN_FRONTEND=noninteractive eatmydata \
> - apt install -y --no-install-recommends \
> - libbz2-dev:arm64 \
> - liblzo2-dev:arm64 \
> - librdmacm-dev:arm64 \
> - libsnappy-dev:arm64 \
> - libxen-dev:arm64
> +ENV LANG "en_US.UTF-8"
> +ENV MAKE "/usr/bin/make"
> +ENV NINJA "/usr/bin/ninja"
> +ENV PYTHON "/usr/bin/python3"
> +ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
>
> -# nettle
> -ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS --enable-nettle
> +RUN export DEBIAN_FRONTEND=noninteractive && \
> + dpkg --add-architecture arm64 && \
> + eatmydata apt-get update && \
> + eatmydata apt-get dist-upgrade -y && \
> + eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
> + eatmydata apt-get install --no-install-recommends -y \
> + g++-aarch64-linux-gnu \
...snip cross packages...
> + zlib1g-dev:arm64 && \
> + eatmydata apt-get autoremove -y && \
> + eatmydata apt-get autoclean -y && \
> + mkdir -p /usr/local/share/meson/cross && \
> + echo "[binaries]\n\
> +c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
> +ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
> +strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
> +pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\
> +\n\
> +[host_machine]\n\
> +system = 'linux'\n\
> +cpu_family = 'aarch64'\n\
> +cpu = 'aarch64'\n\
> +endian = 'little'" > /usr/local/share/meson/cross/aarch64-linux-gnu && \
> + dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show
> > /packages.txt && \
> + mkdir -p /usr/libexec/ccache-wrappers && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-c++
> && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-cc
> && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-g++
> && \
> + ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-gcc
> +
> +ENV ABI "aarch64-linux-gnu"
> +ENV MESON_OPTS "--cross-file=aarch64-linux-gnu"
> +ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
> +ENV DEF_TARGET_LIST aarch64-softmmu,aarch64-linux-user
This cross dockerfile is a fully self-contained image.
Traditionally QEMU has had a split image for Debian cross targets,
where there is a base with common native packages, and then a
layer for the cross packages.
lcitool is capable of generating the image in this split format
using the arg
--layers {all,native,foreign}
Personally I think it is simpler to just use the fully self
contained image, as it would simplify our gitlab pipeline
to only need 1 build stage for containers. The cost is that
we'll not be sharing layers for native packages and more wall
clock time building since we're installing the same native
packages over & over.
I'm not saying to change your patch, I just wanted to point
out the possibility in case someone cares strongly about
keeping a split layer model for cross containers.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- [PATCH v2 00/18] testing and semihosting pre-PR, Alex Bennée, 2022/02/25
- [PATCH v2 02/18] tests/docker: add NOUSER for alpine image, Alex Bennée, 2022/02/25
- [PATCH v2 04/18] tests/docker: update debian-arm64-cross with lci-tool, Alex Bennée, 2022/02/25
- [PATCH v2 01/18] tests/docker: restore TESTS/IMAGES filtering, Alex Bennée, 2022/02/25
- [PATCH v2 10/18] tests/tcg/ppc64: clean-up handling of byte-reverse, Alex Bennée, 2022/02/25
- [PATCH v2 05/18] tests/docker: update debian-s390x-cross with lcitool, Alex Bennée, 2022/02/25
- [PATCH v2 06/18] tests/docker: introduce debian-riscv64-test-cross, Alex Bennée, 2022/02/25
- [PATCH v2 09/18] gitlab: add a new aarch32 custom runner definition, Alex Bennée, 2022/02/25