[PATCH v1 21/25] tests/docker: update and flatten debian-hexagon-cross

Alex Bennée posted 25 patches 3 years, 5 months ago
Maintainers: Ed Maste <emaste@freebsd.org>, Li-Wen Hsu <lwhsu@freebsd.org>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Thomas Huth <thuth@redhat.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Cleber Rosa <crosa@redhat.com>
[PATCH v1 21/25] tests/docker: update and flatten debian-hexagon-cross
Posted by Alex Bennée 3 years, 5 months ago
Update to the latest stable Debian. While we are at it flatten into a
single dockerfile as we do not need anything from the base image to
build the toolchain.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 .../docker/dockerfiles/debian-hexagon-cross.docker  | 13 ++++++++++---
 .../dockerfiles/debian-loongarch-cross.docker       |  3 +--
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker
index d5dc299dc1..822c108953 100644
--- a/tests/docker/dockerfiles/debian-hexagon-cross.docker
+++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker
@@ -7,7 +7,7 @@
 # triggered by re-builds on other base images given it takes a long
 # time to build.
 #
-FROM qemu/debian10
+FROM docker.io/library/debian:bullseye-slim
 
 # Install common build utilities
 RUN apt update && \
@@ -15,11 +15,18 @@ RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
     apt install -y --no-install-recommends \
         bison \
+        ca-certificates \
+        clang \
         cmake \
         flex \
+        gcc \
         lld \
+        make \
+        ninja-build \
+        python3 \
         rsync \
-        wget
+        wget \
+        xz-utils
 
 ENV TOOLCHAIN_INSTALL /usr/local
 ENV ROOTFS /usr/local
@@ -32,7 +39,7 @@ ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh
 
 RUN cd /root/hexagon-toolchain && ./build-toolchain.sh
 
-FROM debian:buster-slim
+FROM docker.io/library/debian:bullseye-slim
 # Duplicate deb line as deb-src
 RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
 # Install QEMU build deps for use in CI
diff --git a/tests/docker/dockerfiles/debian-loongarch-cross.docker b/tests/docker/dockerfiles/debian-loongarch-cross.docker
index 48fe64c51b..ff6a5505be 100644
--- a/tests/docker/dockerfiles/debian-loongarch-cross.docker
+++ b/tests/docker/dockerfiles/debian-loongarch-cross.docker
@@ -1,8 +1,7 @@
 #
 # Docker cross-compiler target
 #
-# This docker target builds on the debian11 base image,
-# using a prebuilt toolchains for LoongArch64 from:
+# This docker target uses prebuilt toolchains for LoongArch64 from:
 # https://github.com/loongson/build-tools/releases
 #
 FROM docker.io/library/debian:bullseye-slim
-- 
2.30.2


Re: [PATCH v1 21/25] tests/docker: update and flatten debian-hexagon-cross
Posted by Thomas Huth 3 years, 5 months ago
On 26/08/2022 19.21, Alex Bennée wrote:
> Update to the latest stable Debian. While we are at it flatten into a
> single dockerfile as we do not need anything from the base image to
> build the toolchain.

You apparently need some stuff from the base image since you're adding gcc, 
make and some other stuff here?

> diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker
> index d5dc299dc1..822c108953 100644
> --- a/tests/docker/dockerfiles/debian-hexagon-cross.docker
> +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker
> @@ -7,7 +7,7 @@
>   # triggered by re-builds on other base images given it takes a long
>   # time to build.
>   #
> -FROM qemu/debian10
> +FROM docker.io/library/debian:bullseye-slim

debian:11-slim ?

...
> @@ -32,7 +39,7 @@ ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh
>   
>   RUN cd /root/hexagon-toolchain && ./build-toolchain.sh
>   
> -FROM debian:buster-slim
> +FROM docker.io/library/debian:bullseye-slim

dito

>   # Duplicate deb line as deb-src
>   RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
>   # Install QEMU build deps for use in CI
> diff --git a/tests/docker/dockerfiles/debian-loongarch-cross.docker b/tests/docker/dockerfiles/debian-loongarch-cross.docker
> index 48fe64c51b..ff6a5505be 100644
> --- a/tests/docker/dockerfiles/debian-loongarch-cross.docker
> +++ b/tests/docker/dockerfiles/debian-loongarch-cross.docker
> @@ -1,8 +1,7 @@
>   #
>   # Docker cross-compiler target
>   #
> -# This docker target builds on the debian11 base image,
> -# using a prebuilt toolchains for LoongArch64 from:
> +# This docker target uses prebuilt toolchains for LoongArch64 from:
>   # https://github.com/loongson/build-tools/releases
>   #
>   FROM docker.io/library/debian:bullseye-slim

The update to the comment looks unnecessary?

  Thomas