diff mbox series

[v1,1/2] new: dockerfiles/debian-s390-cross

Message ID 20170227143028.16428-2-alex.bennee@linaro.org
State Superseded
Headers show
Series s390x cross Docker target | expand

Commit Message

Alex Bennée Feb. 27, 2017, 2:30 p.m. UTC
This adds an s390 cross build target to our library of docker setups.
There is an issue with the xfslibs-dev:s390x package having a clash so
we do a || apt-get -f install to fixup the rest of the dependencies.

This doesn't build on the debian.docker file as we are using the
multilib compiler which is only available in stretch (the current
testing repo).

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

CC: Christian Borntraeger <borntraeger@de.ibm.com>
---
 tests/docker/dockerfiles/debian-s390x-cross.docker | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-s390x-cross.docker

-- 
2.11.0

Comments

Philippe Mathieu-Daudé Feb. 28, 2017, 10:11 p.m. UTC | #1
Hi Alex,

On 02/27/2017 11:30 AM, Alex Bennée wrote:
> This adds an s390 cross build target to our library of docker setups.

> There is an issue with the xfslibs-dev:s390x package having a clash so

> we do a || apt-get -f install to fixup the rest of the dependencies.

>

> This doesn't build on the debian.docker file as we are using the

> multilib compiler which is only available in stretch (the current

> testing repo).

>

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

> CC: Christian Borntraeger <borntraeger@de.ibm.com>

> ---

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

>  1 file changed, 22 insertions(+)

>  create mode 100644 tests/docker/dockerfiles/debian-s390x-cross.docker

>

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

> new file mode 100644

> index 0000000000..bbb21ed088

> --- /dev/null

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

> @@ -0,0 +1,22 @@

> +#

> +# Docker s390 cross-compiler target

> +#

> +# This docker target is based on stretch (testing) as the stable build

> +# doesn't have the cross compiler available.

> +#

> +FROM debian:testing-slim

> +

> +# Duplicate deb line as deb-src

> +RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list

> +

> +# Add the s390x architecture

> +RUN dpkg --add-architecture s390x

> +

> +# Grab the updated list of packages

> +RUN apt update

> +RUN apt dist-upgrade -yy


put both in same line since they are related (intermediate layer unuseful):

+RUN apt update && \
+    apt dist-upgrade -yy

> +RUN apt-get build-dep -yy -a s390x qemu || apt-get -f install

> +RUN apt install -yy gcc-multilib-s390x-linux-gnu binutils-multiarch

> +

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

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

>


Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff mbox series

Patch

diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/docker/dockerfiles/debian-s390x-cross.docker
new file mode 100644
index 0000000000..bbb21ed088
--- /dev/null
+++ b/tests/docker/dockerfiles/debian-s390x-cross.docker
@@ -0,0 +1,22 @@ 
+#
+# Docker s390 cross-compiler target
+#
+# This docker target is based on stretch (testing) as the stable build
+# doesn't have the cross compiler available.
+#
+FROM debian:testing-slim
+
+# Duplicate deb line as deb-src
+RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list
+
+# Add the s390x architecture
+RUN dpkg --add-architecture s390x
+
+# Grab the updated list of packages
+RUN apt update
+RUN apt dist-upgrade -yy
+RUN apt-get build-dep -yy -a s390x qemu || apt-get -f install
+RUN apt install -yy gcc-multilib-s390x-linux-gnu binutils-multiarch
+
+# Specify the cross prefix for this image (see tests/docker/common.rc)
+ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-