diff mbox series

[v1,27/42] tests/docker: use --arch-only for installing deps

Message ID 20190904203013.9028-28-alex.bennee@linaro.org
State Superseded
Headers show
Series current testing/next queue (podman, docker, ci) | expand

Commit Message

Alex Bennée Sept. 4, 2019, 8:29 p.m. UTC
The Debian QEMU packages require a bunch of cross compilers for
building firmware which aren't available on all host architectures.
Using --arch-only skips this particular requirement and allows us to
install just the dependencies we need.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 tests/docker/dockerfiles/debian-arm64-cross.docker    | 2 +-
 tests/docker/dockerfiles/debian-armel-cross.docker    | 2 +-
 tests/docker/dockerfiles/debian-armhf-cross.docker    | 2 +-
 tests/docker/dockerfiles/debian-mips-cross.docker     | 6 +++---
 tests/docker/dockerfiles/debian-mips64el-cross.docker | 2 +-
 tests/docker/dockerfiles/debian-mipsel-cross.docker   | 2 +-
 tests/docker/dockerfiles/debian-ppc64el-cross.docker  | 2 +-
 tests/docker/dockerfiles/debian-s390x-cross.docker    | 2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

-- 
2.20.1

Comments

Philippe Mathieu-Daudé Sept. 7, 2019, 11:40 a.m. UTC | #1
On 9/4/19 10:29 PM, Alex Bennée wrote:
> The Debian QEMU packages require a bunch of cross compilers for

> building firmware which aren't available on all host architectures.

> Using --arch-only skips this particular requirement and allows us to

> install just the dependencies we need.


Nice finding!

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>


Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>


> ---

>  tests/docker/dockerfiles/debian-arm64-cross.docker    | 2 +-

>  tests/docker/dockerfiles/debian-armel-cross.docker    | 2 +-

>  tests/docker/dockerfiles/debian-armhf-cross.docker    | 2 +-

>  tests/docker/dockerfiles/debian-mips-cross.docker     | 6 +++---

>  tests/docker/dockerfiles/debian-mips64el-cross.docker | 2 +-

>  tests/docker/dockerfiles/debian-mipsel-cross.docker   | 2 +-

>  tests/docker/dockerfiles/debian-ppc64el-cross.docker  | 2 +-

>  tests/docker/dockerfiles/debian-s390x-cross.docker    | 2 +-

>  8 files changed, 10 insertions(+), 10 deletions(-)

> 

> diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker

> index 55045ff5d5a..09ca0a1ba79 100644

> --- a/tests/docker/dockerfiles/debian-arm64-cross.docker

> +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker

> @@ -13,7 +13,7 @@ RUN apt update && \

>          crossbuild-essential-arm64

>  RUN apt update && \

>      DEBIAN_FRONTEND=noninteractive eatmydata \

> -    apt build-dep -yy -a arm64 qemu

> +    apt build-dep -yy -a arm64 --arch-only qemu

>  

>  # Specify the cross prefix for this image (see tests/docker/common.rc)

>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-

> diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker

> index 363a162a253..15378f8ea2c 100644

> --- a/tests/docker/dockerfiles/debian-armel-cross.docker

> +++ b/tests/docker/dockerfiles/debian-armel-cross.docker

> @@ -11,7 +11,7 @@ RUN dpkg --add-architecture armel && \

>      apt update && \

>      apt install -yy crossbuild-essential-armel && \

>      DEBIAN_FRONTEND=noninteractive eatmydata \

> -    apt build-dep -yy -a armel qemu

> +    apt build-dep -yy -a armel --arch-only qemu

>  

>  # Specify the cross prefix for this image (see tests/docker/common.rc)

>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi-

> diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker

> index d5365881e79..4a20af6fe1a 100644

> --- a/tests/docker/dockerfiles/debian-armhf-cross.docker

> +++ b/tests/docker/dockerfiles/debian-armhf-cross.docker

> @@ -13,7 +13,7 @@ RUN apt update && \

>          crossbuild-essential-armhf

>  RUN apt update && \

>      DEBIAN_FRONTEND=noninteractive eatmydata \

> -    apt build-dep -yy -a armhf qemu

> +    apt build-dep -yy -a armhf --arch-only qemu

>  

>  # Specify the cross prefix for this image (see tests/docker/common.rc)

>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-

> diff --git a/tests/docker/dockerfiles/debian-mips-cross.docker b/tests/docker/dockerfiles/debian-mips-cross.docker

> index a54efa7253a..08a8e1c29cc 100644

> --- a/tests/docker/dockerfiles/debian-mips-cross.docker

> +++ b/tests/docker/dockerfiles/debian-mips-cross.docker

> @@ -1,9 +1,9 @@

>  #

>  # Docker mips cross-compiler target

>  #

> -# This docker target builds on the debian Stretch base image.

> +# This docker target builds on the debian Buster base image.

>  #

> -FROM qemu:debian9

> +FROM qemu:debian10

>  

>  MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>

>  

> @@ -16,7 +16,7 @@ RUN apt update && \

>  

>  RUN apt update && \

>      DEBIAN_FRONTEND=noninteractive eatmydata \

> -    apt build-dep -yy -a mips qemu

> +    apt build-dep -yy -a mips --arch-only qemu

>  

>  # Specify the cross prefix for this image (see tests/docker/common.rc)

>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips-linux-gnu-

> diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker

> index a1481e16e2c..2fca1124053 100644

> --- a/tests/docker/dockerfiles/debian-mips64el-cross.docker

> +++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker

> @@ -17,7 +17,7 @@ RUN dpkg --add-architecture mips64el && \

>  

>  RUN apt update && \

>      DEBIAN_FRONTEND=noninteractive eatmydata \

> -    apt build-dep -yy -a mips64el qemu

> +    apt build-dep -yy -a mips64el --arch-only qemu

>  

>  # Specify the cross prefix for this image (see tests/docker/common.rc)

>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips64el-linux-gnuabi64-

> diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker

> index 88accad2692..4abf7832ac6 100644

> --- a/tests/docker/dockerfiles/debian-mipsel-cross.docker

> +++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker

> @@ -16,7 +16,7 @@ RUN apt update && \

>  

>  RUN apt update && \

>      DEBIAN_FRONTEND=noninteractive eatmydata \

> -    apt build-dep -yy -a mipsel qemu

> +    apt build-dep -yy -a mipsel --arch-only qemu

>  

>  # Specify the cross prefix for this image (see tests/docker/common.rc)

>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsel-linux-gnu-

> diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker

> index f10883c8188..9973df9ff74 100644

> --- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker

> +++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker

> @@ -12,7 +12,7 @@ RUN dpkg --add-architecture ppc64el && \

>  

>  RUN apt update && \

>      DEBIAN_FRONTEND=noninteractive eatmydata \

> -    apt build-dep -yy -a ppc64el qemu

> +    apt build-dep -yy -a ppc64el --arch-only qemu

>  

>  # Specify the cross prefix for this image (see tests/docker/common.rc)

>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-

> diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker

> index efa346007d6..eb73c988559 100644

> --- a/tests/docker/dockerfiles/debian-s390x-cross.docker

> +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker

> @@ -17,7 +17,7 @@ RUN apt update && \

>  

>  RUN apt update && \

>      DEBIAN_FRONTEND=noninteractive eatmydata \

> -    apt build-dep -yy -a s390x qemu

> +    apt build-dep -yy -a s390x --arch-only qemu

>  

>  # Specify the cross prefix for this image (see tests/docker/common.rc)

>  ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-

>
diff mbox series

Patch

diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/docker/dockerfiles/debian-arm64-cross.docker
index 55045ff5d5a..09ca0a1ba79 100644
--- a/tests/docker/dockerfiles/debian-arm64-cross.docker
+++ b/tests/docker/dockerfiles/debian-arm64-cross.docker
@@ -13,7 +13,7 @@  RUN apt update && \
         crossbuild-essential-arm64
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a arm64 qemu
+    apt build-dep -yy -a arm64 --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
diff --git a/tests/docker/dockerfiles/debian-armel-cross.docker b/tests/docker/dockerfiles/debian-armel-cross.docker
index 363a162a253..15378f8ea2c 100644
--- a/tests/docker/dockerfiles/debian-armel-cross.docker
+++ b/tests/docker/dockerfiles/debian-armel-cross.docker
@@ -11,7 +11,7 @@  RUN dpkg --add-architecture armel && \
     apt update && \
     apt install -yy crossbuild-essential-armel && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a armel qemu
+    apt build-dep -yy -a armel --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi-
diff --git a/tests/docker/dockerfiles/debian-armhf-cross.docker b/tests/docker/dockerfiles/debian-armhf-cross.docker
index d5365881e79..4a20af6fe1a 100644
--- a/tests/docker/dockerfiles/debian-armhf-cross.docker
+++ b/tests/docker/dockerfiles/debian-armhf-cross.docker
@@ -13,7 +13,7 @@  RUN apt update && \
         crossbuild-essential-armhf
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a armhf qemu
+    apt build-dep -yy -a armhf --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-
diff --git a/tests/docker/dockerfiles/debian-mips-cross.docker b/tests/docker/dockerfiles/debian-mips-cross.docker
index a54efa7253a..08a8e1c29cc 100644
--- a/tests/docker/dockerfiles/debian-mips-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips-cross.docker
@@ -1,9 +1,9 @@ 
 #
 # Docker mips cross-compiler target
 #
-# This docker target builds on the debian Stretch base image.
+# This docker target builds on the debian Buster base image.
 #
-FROM qemu:debian9
+FROM qemu:debian10
 
 MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>
 
@@ -16,7 +16,7 @@  RUN apt update && \
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a mips qemu
+    apt build-dep -yy -a mips --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips-linux-gnu-
diff --git a/tests/docker/dockerfiles/debian-mips64el-cross.docker b/tests/docker/dockerfiles/debian-mips64el-cross.docker
index a1481e16e2c..2fca1124053 100644
--- a/tests/docker/dockerfiles/debian-mips64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-mips64el-cross.docker
@@ -17,7 +17,7 @@  RUN dpkg --add-architecture mips64el && \
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a mips64el qemu
+    apt build-dep -yy -a mips64el --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=mips64el-linux-gnuabi64-
diff --git a/tests/docker/dockerfiles/debian-mipsel-cross.docker b/tests/docker/dockerfiles/debian-mipsel-cross.docker
index 88accad2692..4abf7832ac6 100644
--- a/tests/docker/dockerfiles/debian-mipsel-cross.docker
+++ b/tests/docker/dockerfiles/debian-mipsel-cross.docker
@@ -16,7 +16,7 @@  RUN apt update && \
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a mipsel qemu
+    apt build-dep -yy -a mipsel --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsel-linux-gnu-
diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
index f10883c8188..9973df9ff74 100644
--- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
@@ -12,7 +12,7 @@  RUN dpkg --add-architecture ppc64el && \
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a ppc64el qemu
+    apt build-dep -yy -a ppc64el --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker
index efa346007d6..eb73c988559 100644
--- a/tests/docker/dockerfiles/debian-s390x-cross.docker
+++ b/tests/docker/dockerfiles/debian-s390x-cross.docker
@@ -17,7 +17,7 @@  RUN apt update && \
 
 RUN apt update && \
     DEBIAN_FRONTEND=noninteractive eatmydata \
-    apt build-dep -yy -a s390x qemu
+    apt build-dep -yy -a s390x --arch-only qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-