Skip to contentSkip to conversation

docker/shippable: rework debian images, add powerpc ppc64el and amd64

PATCH In review Philippe Mathieu-Daudé 2 participants 23 messages Jul 11, 2017 – Jul 17, 2017

lore
Share & tools
lore
#0 lore raw

v6 cover docker/shippable: rework debian images, add powerpc ppc64el and amd64

This patchset add 3 more architectures to the cross-build farm.

Altough amd64 'cross' target sounds weird, I find it useful to cover more codebase having libraries installed in image I don't need on my workstation.

There is still some issue trying to cross-build mips64el-softmmu, it seems the cross tools use the system outdated libfdt instead of the one checkouted in the dtc submodule. I disabled this target for now.

The branch https://github.com/philmd/qemu/tree/shippable-docker-shippable_v6
can be checked at Shippable:
https://app.shippable.com/github/philmd/qemu/runs/15/summary/console

The first time an image is built, the docker image is fully build in ~3min (cache miss). Then Shippable keeps this image cached. Cross building QEMU takes ~6min (2 or 3 targets).
The first time a branch is pushed, each arch build will take ~9min, up to 1h for the current 8 archs.
Subsequent pushes take less than 50min to build all archs.

v6:
- cleaning up Stretch based images
- restore powerpc image (based on debian Jessie)
- add ppc64el and amd64 images (based on debian Stretch)
- extend coverage enabling virgl/netmap/gcrypt on amd64
- extend coverage enabling nettle on arm64
- add Shippable yml filter rule to restrict branches to build

[most part of previous patchset merged in commit 469819a3e8e3]

v5:
- Addressed minor review feedback from Alex/Fam (improving a comment)
- Added Alex R-b

v4:
- Addressed review feedbacks from Fam (improving english, cleaner hashing)
- Added Alex R-b

v3:
- Addressed review feedbacks from Fam:
- Keep building images in various layers, but use DEBIAN_FRONTEND=noninteractive
- Document '--extra-files', now it supports adding various files at once
- Checksum extra files to trigger a docker image rebuild if modified
- Use better regex to generate deb-src entries
- Reordered extra libs, to ease further add/remove diffs

v2:
- Addressed review feedback from Alex, added his R-B
- Fixed the "Problem with the SSL CA cert" problem while cloning from github.com installing the ca-certificates package.
- Squashed/split some commits
- use 'apt-get clean' instead of brutal 'rm -rf'
- checked how many cores are available on Shippable and use them fully (reduced total time from 44min to 38min)
- build armeb-linux-user target

v1:
- Reorganize Dockerfiles to use less layers, resulting in smaller images. This also reduce time of image transfer, for example while using:
docker save qemu:debian | ssh remote docker load
- Install more debian packages so the configure script enable more features and more code can be compiled/covered.
- There are still some incorrect multiarch packages on debian/jessie used in the docker images, add a script to generate fake packages and avoid dependencies issues.
- Modify the docker.py script to include an extra file while building images.

Regards,

Phil.

Philippe Mathieu-Daudé (18):
docker: rename debian stable -> 9 (Stretch)
docker: add pkg-config and python-minimal packages to debian base
docker: debian/s390x no more in unstable, now available in Stretch
docker: remove packages now dependent of qemu in Stretch
docker: add debian/armel based on Stretch
docker: add debian/ppc64el based on Stretch
docker: add debian/amd64
docker: enable virgl coverage on amd64
docker: enable netmap coverage on amd64
docker: enable gcrypt coverage on amd64
docker: enable nettle coverage on arm64
shippable: add armel targets
shippable: add ppc64el targets
shippable: add x86_64 targets
docker: add 'apt-fake' script which generate fake debian packages
docker: add qemu:debian-jessie based on outdated jessie release
shippable: add powerpc target
shippable: restrict builds to master/staging and shippable* branches

 .shippable.yml                                     | 13 ++++++
 tests/docker/Makefile.include                      | 13 ++++--
 tests/docker/dockerfiles/debian-amd64-cross.docker | 38 ++++++++++++++++++
 tests/docker/dockerfiles/debian-apt-fake.sh        | 46 ++++++++++++++++++++++
 tests/docker/dockerfiles/debian-arm64-cross.docker | 10 ++---
 tests/docker/dockerfiles/debian-armel-cross.docker | 24 +++++++++++
 tests/docker/dockerfiles/debian-armhf-cross.docker |  7 +---
 .../docker/dockerfiles/debian-mipsel-cross.docker  |  7 +---
 .../docker/dockerfiles/debian-powerpc-cross.docker | 40 +++++++++++++++++++
 .../docker/dockerfiles/debian-ppc64el-cross.docker | 24 +++++++++++
 tests/docker/dockerfiles/debian-s390x-cross.docker | 23 +++++------
 tests/docker/dockerfiles/debian8.docker            | 31 +++++++++++++++
 .../dockerfiles/{debian.docker => debian9.docker}  | 15 +++++--
 13 files changed, 256 insertions(+), 35 deletions(-)
 create mode 100644 tests/docker/dockerfiles/debian-amd64-cross.docker
 create mode 100755 tests/docker/dockerfiles/debian-apt-fake.sh
 create mode 100644 tests/docker/dockerfiles/debian-armel-cross.docker
 create mode 100644 tests/docker/dockerfiles/debian-powerpc-cross.docker
 create mode 100644 tests/docker/dockerfiles/debian-ppc64el-cross.docker
 create mode 100644 tests/docker/dockerfiles/debian8.docker
 rename tests/docker/dockerfiles/{debian.docker => debian9.docker} (59%)
Signature · 1 line
2.13.2
#1 lore raw

PATCH v6 1/18 docker: rename debian stable -> 9 (Stretch)

---
 tests/docker/Makefile.include                              |  6 +++---
 tests/docker/dockerfiles/debian-arm64-cross.docker         |  4 ++--
 tests/docker/dockerfiles/debian-armhf-cross.docker         |  4 ++--
 tests/docker/dockerfiles/debian-mipsel-cross.docker        |  4 ++--
 tests/docker/dockerfiles/{debian.docker => debian9.docker} | 13 +++++++++----
 5 files changed, 18 insertions(+), 13 deletions(-)
 rename tests/docker/dockerfiles/{debian.docker => debian9.docker} (62%)
tests/docker/Makefile.include +3 -3
index 037cb9e9e7..01d7af9698 100644
@@ -56,9 +56,9 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 		"BUILD","$*")
 
 # Enforce dependancies for composite images
-docker-image-debian-armhf-cross: docker-image-debian
-docker-image-debian-arm64-cross: docker-image-debian
-docker-image-debian-mipsel-cross: docker-image-debian
+docker-image-debian-armhf-cross: docker-image-debian9
+docker-image-debian-arm64-cross: docker-image-debian9
+docker-image-debian-mipsel-cross: docker-image-debian9
 
 # Expand all the pre-requistes for each docker image and test combination
 $(foreach i,$(DOCKER_IMAGES), \
tests/docker/dockerfiles/debian-arm64-cross.docker +2 -2
index 45b891d57a..f1bfa64160 100644
@@ -1,9 +1,9 @@
 #
 # Docker arm64 cross-compiler target
 #
-# This docker target builds on the base debian image.
+# This docker target builds on the debian Stretch base image.
 #
-FROM qemu:debian
+FROM qemu:debian9
 
 # Add the foreign architecture we want and install dependencies
 RUN dpkg --add-architecture arm64
tests/docker/dockerfiles/debian-armhf-cross.docker +2 -2
index e67dfdccc5..2beacef49b 100644
@@ -1,9 +1,9 @@
 #
 # Docker armhf cross-compiler target
 #
-# This docker target builds on the base debian image.
+# This docker target builds on the debian Stretch base image.
 #
-FROM qemu:debian
+FROM qemu:debian9
 
 # Add the foreign architecture we want and install dependencies
 RUN dpkg --add-architecture armhf
tests/docker/dockerfiles/debian-mipsel-cross.docker +2 -2
index 2156bdb28d..9ee997aa54 100644
@@ -1,9 +1,9 @@
 #
 # Docker mipsel cross-compiler target
 #
-# This docker target builds on the base debian image.
+# This docker target builds on the debian Stretch base image.
 #
-FROM qemu:debian
+FROM qemu:debian9
 MAINTAINER Philippe Mathieu-Daudé <[email protected]>
 
 # Add the foreign architecture we want and install dependencies
tests/docker/dockerfiles/debian9.docker renamed from tests/docker/dockerfiles/debian.docker +9 -4
similarity index 62%
rename from tests/docker/dockerfiles/debian.docker
rename to tests/docker/dockerfiles/debian9.docker
index 10953b2425..c74f71283c 100644
@@ -1,13 +1,13 @@
 #
 # Docker multiarch cross-compiler target
 #
-# This docker target is builds on Debian and Emdebian's cross compiler targets
-# to build distro with a selection of cross compilers for building test binaries.
+# This docker target is builds on Debian cross compiler targets to build distro
+# with a selection of cross compilers for building test binaries.
 #
 # On its own you can't build much but the docker-foo-cross targets
 # build on top of the base debian image.
 #
-FROM debian:stable-slim
+FROM debian:stretch-slim
 
 # Duplicate deb line as deb-src
 RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
@@ -17,4 +17,9 @@ RUN apt update
 RUN DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt install -y --no-install-recommends \
-    ca-certificates build-essential clang git bison flex
+        bison \
+        build-essential \
+        ca-certificates \
+        clang \
+        flex \
+        git
Signature · 1 line
2.13.2
#2 lore raw

PATCH v6 2/18 docker: add pkg-config and python-minimal packages to debian base

In reply to Philippe Mathieu-Daudé
---
 tests/docker/dockerfiles/debian9.docker | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/docker/dockerfiles/debian9.docker +3 -1
index c74f71283c..51c13939ff 100644
@@ -22,4 +22,6 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         ca-certificates \
         clang \
         flex \
-        git
+        git \
+        pkg-config \
+        python-minimal
Signature · 1 line
2.13.2
#3 lore raw

PATCH v6 3/18 docker: debian/s390x no more in unstable, now available in Stretch

In reply to Philippe Mathieu-Daudé
---
 tests/docker/Makefile.include                      |  1 +
 tests/docker/dockerfiles/debian-s390x-cross.docker | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 10 deletions(-)
tests/docker/Makefile.include +1 -0
index 01d7af9698..1eb32eebfa 100644
@@ -59,6 +59,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 docker-image-debian-armhf-cross: docker-image-debian9
 docker-image-debian-arm64-cross: docker-image-debian9
 docker-image-debian-mipsel-cross: docker-image-debian9
+docker-image-debian-s390x-cross: docker-image-debian9
 
 # Expand all the pre-requistes for each docker image and test combination
 $(foreach i,$(DOCKER_IMAGES), \
tests/docker/dockerfiles/debian-s390x-cross.docker +10 -10
index cfc354ce5d..18fe813aa7 100644
@@ -1,27 +1,27 @@
 #
 # Docker s390 cross-compiler target
 #
-# This docker target is based on stretch (testing) as the stable build
-# doesn't have the cross compiler available.
+# This docker target builds on the debian Stretch base image.
 #
-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
+FROM qemu:debian9
 
 # Add the s390x architecture
 RUN dpkg --add-architecture s390x
 
 # Grab the updated list of packages
 RUN apt update && apt dist-upgrade -yy
-RUN apt install -yy build-essential clang
-RUN apt-get build-dep -yy -a s390x qemu || apt-get -f install
-RUN apt install -yy gcc-multilib-s390x-linux-gnu binutils-multiarch
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        binutils-multiarch \
+        gcc-multilib-s390x-linux-gnu
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get build-dep -yy -a s390x qemu
 
 # Specify the cross prefix for this image (see tests/docker/common.rc)
 ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-
 
-RUN DEBIAN_FRONTEND=noninteractive \
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
         glusterfs-common:s390x \
         libbz2-dev:s390x \
Signature · 1 line
2.13.2
#4 lore raw

PATCH v6 4/18 docker: remove packages now dependent of qemu in Stretch

In reply to Philippe Mathieu-Daudé
---
 tests/docker/dockerfiles/debian-arm64-cross.docker  | 3 ---
 tests/docker/dockerfiles/debian-armhf-cross.docker  | 3 ---
 tests/docker/dockerfiles/debian-mipsel-cross.docker | 3 ---
 tests/docker/dockerfiles/debian-s390x-cross.docker  | 3 ---
 4 files changed, 12 deletions(-)
tests/docker/dockerfiles/debian-arm64-cross.docker +0 -3
index f1bfa64160..6ed12a3f6e 100644
@@ -19,11 +19,8 @@ ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
 
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
-        glusterfs-common:arm64 \
         libbz2-dev:arm64 \
         liblzo2-dev:arm64 \
-        libncursesw5-dev:arm64 \
-        libnfs-dev:arm64 \
         librdmacm-dev:arm64 \
         libsnappy-dev:arm64 \
         libxen-dev:arm64
tests/docker/dockerfiles/debian-armhf-cross.docker +0 -3
index 2beacef49b..5100b0afc0 100644
@@ -19,11 +19,8 @@ ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-
 
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
-        glusterfs-common:armhf \
         libbz2-dev:armhf \
         liblzo2-dev:armhf \
-        libncursesw5-dev:armhf \
-        libnfs-dev:armhf \
         librdmacm-dev:armhf \
         libsnappy-dev:armhf \
         libxen-dev:armhf
tests/docker/dockerfiles/debian-mipsel-cross.docker +0 -3
index 9ee997aa54..eb279c5044 100644
@@ -20,10 +20,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get build-dep -yy -a mipsel qemu
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
-        glusterfs-common:mipsel \
         libbz2-dev:mipsel \
         liblzo2-dev:mipsel \
-        libncursesw5-dev:mipsel \
-        libnfs-dev:mipsel \
         librdmacm-dev:mipsel \
         libsnappy-dev:mipsel
tests/docker/dockerfiles/debian-s390x-cross.docker +0 -3
index 18fe813aa7..a085943290 100644
@@ -23,10 +23,7 @@ ENV QEMU_CONFIGURE_OPTS --cross-prefix=s390x-linux-gnu-
 
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
-        glusterfs-common:s390x \
         libbz2-dev:s390x \
         liblzo2-dev:s390x \
-        libncursesw5-dev:s390x \
-        libnfs-dev:s390x \
         librdmacm-dev:s390x \
         libsnappy-dev:s390x
Signature · 1 line
2.13.2
#5 lore raw

PATCH v6 5/18 docker: add debian/armel based on Stretch

In reply to Philippe Mathieu-Daudé
---
 tests/docker/Makefile.include                      |  1 +
 tests/docker/dockerfiles/debian-armel-cross.docker | 24 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-armel-cross.docker
tests/docker/Makefile.include +1 -0
index 1eb32eebfa..238bb7276c 100644
@@ -56,6 +56,7 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 		"BUILD","$*")
 
 # Enforce dependancies for composite images
+docker-image-debian-armel-cross: docker-image-debian9
 docker-image-debian-armhf-cross: docker-image-debian9
 docker-image-debian-arm64-cross: docker-image-debian9
 docker-image-debian-mipsel-cross: docker-image-debian9
tests/docker/dockerfiles/debian-armel-cross.docker new file +24 -0
new file mode 100644
index 0000000000..e3bd68f51e
@@ -0,0 +1,24 @@
+#
+# Docker armel cross-compiler target
+#
+# This docker target builds on the debian Stretch base image.
+#
+FROM qemu:debian9
+MAINTAINER Philippe Mathieu-Daudé <[email protected]>
+
+# Add the foreign architecture we want and install dependencies
+RUN dpkg --add-architecture armel && \
+    apt update
+RUN apt install -yy crossbuild-essential-armel
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get build-dep -yy -a armel qemu
+
+# Specify the cross prefix for this image (see tests/docker/common.rc)
+ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabi-
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        libbz2-dev:armel \
+        liblzo2-dev:armel \
+        librdmacm-dev:armel \
+        libsnappy-dev:armel
Signature · 1 line
2.13.2
#6 lore raw

PATCH v6 6/18 docker: add debian/ppc64el based on Stretch

In reply to Philippe Mathieu-Daudé
---
 tests/docker/Makefile.include                      |  1 +
 .../docker/dockerfiles/debian-ppc64el-cross.docker | 24 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-ppc64el-cross.docker
tests/docker/Makefile.include +1 -0
index 238bb7276c..59b08b4aca 100644
@@ -60,6 +60,7 @@ docker-image-debian-armel-cross: docker-image-debian9
 docker-image-debian-armhf-cross: docker-image-debian9
 docker-image-debian-arm64-cross: docker-image-debian9
 docker-image-debian-mipsel-cross: docker-image-debian9
+docker-image-debian-ppc64el-cross: docker-image-debian9
 docker-image-debian-s390x-cross: docker-image-debian9
 
 # Expand all the pre-requistes for each docker image and test combination
tests/docker/dockerfiles/debian-ppc64el-cross.docker new file +24 -0
new file mode 100644
index 0000000000..f34f09a8cd
@@ -0,0 +1,24 @@
+#
+# Docker ppc64el cross-compiler target
+#
+# This docker target builds on the debian Stretch base image.
+#
+FROM qemu:debian9
+
+# Add the foreign architecture we want and install dependencies
+RUN dpkg --add-architecture ppc64el && \
+    apt update
+RUN apt install -yy crossbuild-essential-ppc64el
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get build-dep -yy -a ppc64el qemu
+
+# Specify the cross prefix for this image (see tests/docker/common.rc)
+ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        libbz2-dev:ppc64el \
+        liblzo2-dev:ppc64el \
+        librdmacm-dev:ppc64el \
+        libsnappy-dev:ppc64el
Signature · 1 line
2.13.2
#7 lore raw

PATCH v6 7/18 docker: add debian/amd64

In reply to Philippe Mathieu-Daudé
---
 tests/docker/Makefile.include                      |  1 +
 tests/docker/dockerfiles/debian-amd64-cross.docker | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-amd64-cross.docker
tests/docker/Makefile.include +1 -0
index 59b08b4aca..d2a81b0d71 100644
@@ -62,6 +62,7 @@ docker-image-debian-arm64-cross: docker-image-debian9
 docker-image-debian-mipsel-cross: docker-image-debian9
 docker-image-debian-ppc64el-cross: docker-image-debian9
 docker-image-debian-s390x-cross: docker-image-debian9
+docker-image-debian-amd64-cross: docker-image-debian9
 
 # Expand all the pre-requistes for each docker image and test combination
 $(foreach i,$(DOCKER_IMAGES), \
tests/docker/dockerfiles/debian-amd64-cross.docker new file +18 -0
new file mode 100644
index 0000000000..9d10a886df
@@ -0,0 +1,18 @@
+#
+# Docker x86_64 cross-compiler target
+#
+# This docker target builds on the debian Stretch base image.
+#
+FROM qemu:debian9
+MAINTAINER Philippe Mathieu-Daudé <[email protected]>
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get build-dep -yy qemu
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        libbz2-dev \
+        liblzo2-dev \
+        librdmacm-dev \
+        libsnappy-dev \
+        libvte-dev
Signature · 1 line
2.13.2
#8 lore raw

Re: [Qemu-devel] [PATCH v6 07/18] docker: add debian/amd64

Quoted 6 lines · Philippe Mathieu-Daudé
---
 tests/docker/Makefile.include                      |  1 +
 tests/docker/dockerfiles/debian-amd64-cross.docker | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-amd64-cross.docker

I'm not sure I'll take this one as it is a) not really cross compiling,
b) adding to coverage much (if at all).

Quoted 27 lines
tests/docker/Makefile.include +1 -0
index 59b08b4aca..d2a81b0d71 100644
@@ -62,6 +62,7 @@ docker-image-debian-arm64-cross: docker-image-debian9
 docker-image-debian-mipsel-cross: docker-image-debian9
 docker-image-debian-ppc64el-cross: docker-image-debian9
 docker-image-debian-s390x-cross: docker-image-debian9
+docker-image-debian-amd64-cross: docker-image-debian9
 
 # Expand all the pre-requistes for each docker image and test combination
 $(foreach i,$(DOCKER_IMAGES), \
tests/docker/dockerfiles/debian-amd64-cross.docker new file +8 -0
new file mode 100644
index 0000000000..9d10a886df
@@ -0,0 +1,18 @@
+#
+# Docker x86_64 cross-compiler target
+#
+# This docker target builds on the debian Stretch base image.
+#
+FROM qemu:debian9
+MAINTAINER Philippe Mathieu-Daudé <[email protected]>
+

tests/docker/dockerfiles/debian-amd64-cross.docker line 18

Quoted 10 lines
tests/docker/dockerfiles/debian-amd64-cross.docker new file +10 -0
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get build-dep -yy qemu
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        libbz2-dev \
+        liblzo2-dev \
+        librdmacm-dev \
+        libsnappy-dev \
+        libvte-dev

--
Alex Bennée

#9 lore raw

Re: [Qemu-devel] [PATCH v6 07/18] docker: add debian/amd64

In reply to Philippe Mathieu-Daudé
Quoted 12 lines · Philippe Mathieu-Daudé
---
 tests/docker/Makefile.include                      |  1 +
 tests/docker/dockerfiles/debian-amd64-cross.docker | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-amd64-cross.docker
tests/docker/Makefile.include +0 -0
index 59b08b4aca..d2a81b0d71 100644

tests/docker/Makefile.include docker-image-debian-arm64-cross: docker-image-debian9 · line 65

Quoted 4 lines
tests/docker/Makefile.include +1 -0
@@ -62,6 +62,7 @@ docker-image-debian-arm64-cross: docker-image-debian9
 docker-image-debian-mipsel-cross: docker-image-debian9
 docker-image-debian-ppc64el-cross: docker-image-debian9
 docker-image-debian-s390x-cross: docker-image-debian9
+docker-image-debian-amd64-cross: docker-image-debian9

Seeing the later patches maybe we should call this debian-image-bleeding-deps or some such....

Quoted 17 lines
tests/docker/Makefile.include +0 -0
 # Expand all the pre-requistes for each docker image and test combination
 $(foreach i,$(DOCKER_IMAGES), \
tests/docker/dockerfiles/debian-amd64-cross.docker new file +8 -0
new file mode 100644
index 0000000000..9d10a886df
@@ -0,0 +1,18 @@
+#
+# Docker x86_64 cross-compiler target
+#
+# This docker target builds on the debian Stretch base image.
+#
+FROM qemu:debian9
+MAINTAINER Philippe Mathieu-Daudé <[email protected]>
+

tests/docker/dockerfiles/debian-amd64-cross.docker line 18

Quoted 10 lines
tests/docker/dockerfiles/debian-amd64-cross.docker new file +10 -0
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get build-dep -yy qemu
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        libbz2-dev \
+        liblzo2-dev \
+        librdmacm-dev \
+        libsnappy-dev \
+        libvte-dev

--
Alex Bennée

#10 lore raw

PATCH v6 8/18 docker: enable virgl to extend code coverage on amd64

In reply to Philippe Mathieu-Daudé
---
 tests/docker/dockerfiles/debian-amd64-cross.docker | 9 +++++++++
 1 file changed, 9 insertions(+)
tests/docker/dockerfiles/debian-amd64-cross.docker +9 -0
index 9d10a886df..88b1b3f4e3 100644
@@ -16,3 +16,12 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         librdmacm-dev \
         libsnappy-dev \
         libvte-dev
+
+# virgl
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        libegl1-mesa-dev \
+        libepoxy-dev \
+        libgbm-dev
+RUN git clone git://anongit.freedesktop.org/virglrenderer /usr/src/virglrenderer
+RUN cd /usr/src/virglrenderer && ./autogen.sh && ./configure --with-glx --disable-tests && make install
Signature · 1 line
2.13.2
#11 lore raw

PATCH v6 9/18 docker: enable netmap to extend code coverage on amd64

In reply to Philippe Mathieu-Daudé
---
 tests/docker/dockerfiles/debian-amd64-cross.docker | 8 ++++++++
 1 file changed, 8 insertions(+)
tests/docker/dockerfiles/debian-amd64-cross.docker +8 -0
index 88b1b3f4e3..8fb9f90814 100644
@@ -25,3 +25,11 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         libgbm-dev
 RUN git clone git://anongit.freedesktop.org/virglrenderer /usr/src/virglrenderer
 RUN cd /usr/src/virglrenderer && ./autogen.sh && ./configure --with-glx --disable-tests && make install
+
+# netmap
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        linux-headers-amd64
+RUN git clone https://github.com/luigirizzo/netmap.git /usr/src/netmap
+RUN cd /usr/src/netmap/LINUX && ./configure --no-drivers --no-apps --kernel-dir=$(ls -d /usr/src/linux-headers-*-amd64) && make install
+ENV QEMU_CONFIGURE_OPTS --enable-netmap
Signature · 1 line
2.13.2
#12 lore raw

PATCH v6 10/18 docker: enable gcrypt to extend code coverage on amd64

In reply to Philippe Mathieu-Daudé
---
 tests/docker/dockerfiles/debian-amd64-cross.docker | 3 +++
 1 file changed, 3 insertions(+)
tests/docker/dockerfiles/debian-amd64-cross.docker +3 -0
index 8fb9f90814..48a5e77db7 100644
@@ -33,3 +33,6 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
 RUN git clone https://github.com/luigirizzo/netmap.git /usr/src/netmap
 RUN cd /usr/src/netmap/LINUX && ./configure --no-drivers --no-apps --kernel-dir=$(ls -d /usr/src/linux-headers-*-amd64) && make install
 ENV QEMU_CONFIGURE_OPTS --enable-netmap
+
+# gcrypt
+ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS --enable-gcrypt
Signature · 1 line
2.13.2
#13 lore raw

PATCH v6 11/18 docker: enable nettle to extend code coverage on arm64

In reply to Philippe Mathieu-Daudé
---
 tests/docker/dockerfiles/debian-arm64-cross.docker | 3 +++
 1 file changed, 3 insertions(+)
tests/docker/dockerfiles/debian-arm64-cross.docker +3 -0
index 6ed12a3f6e..877d863475 100644
@@ -24,3 +24,6 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         librdmacm-dev:arm64 \
         libsnappy-dev:arm64 \
         libxen-dev:arm64
+
+# nettle
+ENV QEMU_CONFIGURE_OPTS $QEMU_CONFIGURE_OPTS --enable-nettle
Signature · 1 line
2.13.2
#14 lore raw

PATCH v6 12/18 shippable: add armel targets

In reply to Philippe Mathieu-Daudé
---
 .shippable.yml | 2 ++
 1 file changed, 2 insertions(+)
.shippable.yml +2 -0
index 5e0caa65c5..abcaf6f4d4 100644
@@ -5,6 +5,8 @@ env:
   global:
     - LC_ALL=C
   matrix:
+    - IMAGE=debian-armel-cross
+      TARGET_LIST=arm-softmmu,arm-linux-user,armeb-linux-user
     - IMAGE=debian-armhf-cross
       TARGET_LIST=arm-softmmu,arm-linux-user,armeb-linux-user
     - IMAGE=debian-arm64-cross
Signature · 1 line
2.13.2
#15 lore raw

PATCH v6 13/18 shippable: add ppc64el targets

In reply to Philippe Mathieu-Daudé
---
 .shippable.yml | 2 ++
 1 file changed, 2 insertions(+)
.shippable.yml +2 -0
index abcaf6f4d4..189d193da5 100644
@@ -16,6 +16,8 @@ env:
     # mips64el-softmmu disabled due to libfdt problem
     - IMAGE=debian-mipsel-cross
       TARGET_LIST=mipsel-softmmu,mipsel-linux-user,mips64el-linux-user
+    - IMAGE=debian-ppc64el-cross
+      TARGET_LIST=ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
 build:
   pre_ci:
     - make docker-image-${IMAGE} V=1
Signature · 1 line
2.13.2
#16 lore raw

PATCH v6 14/18 shippable: add x86_64 targets

In reply to Philippe Mathieu-Daudé
---
 .shippable.yml | 2 ++
 1 file changed, 2 insertions(+)
.shippable.yml +2 -0
index 189d193da5..7a89341cea 100644
@@ -5,6 +5,8 @@ env:
   global:
     - LC_ALL=C
   matrix:
+    - IMAGE=debian-amd64-cross
+      TARGET_LIST=x86_64-softmmu,x86_64-linux-user
     - IMAGE=debian-armel-cross
       TARGET_LIST=arm-softmmu,arm-linux-user,armeb-linux-user
     - IMAGE=debian-armhf-cross
Signature · 1 line
2.13.2
#17 lore raw

PATCH v6 15/18 docker: add 'apt-fake' script which generate fake debian packages

In reply to Philippe Mathieu-Daudé
---
 tests/docker/dockerfiles/debian-apt-fake.sh | 46 +++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100755 tests/docker/dockerfiles/debian-apt-fake.sh
tests/docker/dockerfiles/debian-apt-fake.sh new file +46 -0
new file mode 100755
index 0000000000..387522c174
@@ -0,0 +1,46 @@
+#! /bin/sh
+#
+# Generate fake debian package to resolve unimportant unmet dependencies held
+# by upstream multiarch broken packages.
+#
+# Copyright (c) 2017 Philippe Mathieu-Daudé <[email protected]>
+#
+# This work is licensed under the terms of the GNU GPL, version 2
+# or (at your option) any later version. See the COPYING file in
+# the top-level directory.
+
+test $1 = "install" && shift 1
+
+fake_install()
+{
+    echo "Generating fake $2 $1 $3 ..."
+    (cd /var/cache/apt/archives
+        (cat << 'EOF'
+Section: misc
+Priority: optional
+Standards-Version: 3.9.2
+
+Package: NAME
+Version: VERSION
+Maintainer: [email protected]
+Architecture: any
+Multi-Arch: same
+Description: fake NAME
+EOF
+        ) | sed s/NAME/$2/g | sed s/VERSION/$3/g > $2.control
+        equivs-build -a $1 $2.control 1>/dev/null 2>/dev/null
+        dpkg -i $2_$3_$1.deb
+    )
+}
+
+try_install()
+{
+    name=$(echo $1|sed "s/\(.*\):\(.*\)=\(.*\)/\1/")
+    arch=$(echo $1|sed "s/\(.*\):\(.*\)=\(.*\)/\2/")
+    vers=$(echo $1|sed "s/\(.*\):\(.*\)=\(.*\)/\3/")
+    apt-get install -q -yy $1 || fake_install $arch $name $vers
+}
+
+for package in $*; do
+    try_install $package
+done
Signature · 1 line
2.13.2
#18 lore raw

PATCH v6 16/18 docker: add qemu:debian-jessie based on outdated jessie release

In reply to Philippe Mathieu-Daudé
---
 tests/docker/dockerfiles/debian8.docker | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian8.docker
tests/docker/dockerfiles/debian8.docker new file +31 -0
new file mode 100644
index 0000000000..ea9083633a
@@ -0,0 +1,31 @@
+#
+# Docker multiarch cross-compiler target
+#
+# This docker target is builds on Debian and Emdebian's cross compiler targets
+# to build distro with a selection of cross compilers for building test binaries.
+#
+# On its own you can't build much but the docker-foo-cross targets
+# build on top of the base debian image.
+#
+FROM debian:jessie-slim
+MAINTAINER Philippe Mathieu-Daudé <[email protected]>
+
+# Setup some basic tools we need
+RUN apt update
+RUN DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt install -y --no-install-recommends \
+        bison \
+        build-essential \
+        ca-certificates \
+        clang \
+        curl \
+        flex \
+        git \
+        pkg-config \
+        python-minimal
+
+# Duplicate deb line as deb-src, setup Emdebian
+RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list && \
+    echo "deb http://emdebian.org/tools/debian/ jessie main" >> /etc/apt/sources.list && \
+    curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
Signature · 1 line
2.13.2
#19 lore raw

PATCH v6 17/18 shippable: add powerpc target

In reply to Philippe Mathieu-Daudé
---
 .shippable.yml                                     |  2 ++
 tests/docker/Makefile.include                      |  3 ++
 .../docker/dockerfiles/debian-powerpc-cross.docker | 40 ++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-powerpc-cross.docker
.shippable.yml +2 -0
index 7a89341cea..4c8a85941f 100644
@@ -18,6 +18,8 @@ env:
     # mips64el-softmmu disabled due to libfdt problem
     - IMAGE=debian-mipsel-cross
       TARGET_LIST=mipsel-softmmu,mipsel-linux-user,mips64el-linux-user
+    - IMAGE=debian-powerpc-cross
+      TARGET_LIST=ppc-softmmu,ppcemb-softmmu,ppc-linux-user
     - IMAGE=debian-ppc64el-cross
       TARGET_LIST=ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
 build:
tests/docker/Makefile.include +3 -0
index d2a81b0d71..a6babf4f1d 100644
@@ -55,11 +55,14 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
 		$(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)),\
 		"BUILD","$*")
 
+docker-image-debian-powerpc-cross: EXTRA_FILES:=tests/docker/dockerfiles/debian-apt-fake.sh
+
 # Enforce dependancies for composite images
 docker-image-debian-armel-cross: docker-image-debian9
 docker-image-debian-armhf-cross: docker-image-debian9
 docker-image-debian-arm64-cross: docker-image-debian9
 docker-image-debian-mipsel-cross: docker-image-debian9
+docker-image-debian-powerpc-cross: docker-image-debian8
 docker-image-debian-ppc64el-cross: docker-image-debian9
 docker-image-debian-s390x-cross: docker-image-debian9
 docker-image-debian-amd64-cross: docker-image-debian9
tests/docker/dockerfiles/debian-powerpc-cross.docker new file +40 -0
new file mode 100644
index 0000000000..a5dd46b4ac
@@ -0,0 +1,40 @@
+#
+# Docker powerpc cross-compiler target
+#
+# This docker target builds on the debian Jessie base image.
+#
+FROM qemu:debian8
+MAINTAINER Philippe Mathieu-Daudé <[email protected]>
+
+# Add the foreign architecture we want and install dependencies
+RUN dpkg --add-architecture powerpc
+RUN apt-get update
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        crossbuild-essential-powerpc
+
+# <kludge> to fix "following packages have unmet dependencies" ...
+ADD debian-apt-fake.sh /usr/local/bin/apt-fake
+RUN apt-get install -y --no-install-recommends \
+        equivs \
+        pkg-config
+RUN apt-fake install \
+        pkg-config:powerpc=0.28-1.1-fake && \
+    ln -s pkg-config /usr/bin/powerpc-linux-gnu-pkg-config
+ENV PKG_CONFIG_PATH /usr/lib/powerpc-linux-gnu/pkgconfig
+# </kludge>
+
+# Specify the cross prefix for this image (see tests/docker/common.rc)
+ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc-linux-gnu-
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get build-dep -yy -a powerpc qemu
+RUN DEBIAN_FRONTEND=noninteractive \
+    apt-get install -y --no-install-recommends \
+        glusterfs-common:powerpc \
+        libbz2-dev:powerpc \
+        liblzo2-dev:powerpc \
+        libncursesw5-dev:powerpc \
+        libnfs-dev:powerpc \
+        librdmacm-dev:powerpc \
+        libsnappy-dev:powerpc
Signature · 1 line
2.13.2
#20 lore raw

Re: [Qemu-devel] [PATCH v6 17/18] shippable: add powerpc target

Hmmm it seems I squashed "add debian/powerpc" (only docker + Makefile) altogether with this one (shippable entry)

Quoted 90 lines · Philippe Mathieu-Daudé
---
 .shippable.yml                                     |  2 ++
 tests/docker/Makefile.include                      |  3 ++
 .../docker/dockerfiles/debian-powerpc-cross.docker | 40 ++++++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 tests/docker/dockerfiles/debian-powerpc-cross.docker
.shippable.yml +2 -0
index 7a89341cea..4c8a85941f 100644
@@ -18,6 +18,8 @@ env:
     # mips64el-softmmu disabled due to libfdt problem
     - IMAGE=debian-mipsel-cross
       TARGET_LIST=mipsel-softmmu,mipsel-linux-user,mips64el-linux-user
+    - IMAGE=debian-powerpc-cross
+      TARGET_LIST=ppc-softmmu,ppcemb-softmmu,ppc-linux-user
     - IMAGE=debian-ppc64el-cross
       TARGET_LIST=ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
 build:
tests/docker/Makefile.include +3 -0
index d2a81b0d71..a6babf4f1d 100644
@@ -55,11 +55,14 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
                $(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)),\
                "BUILD","$*")
 
+docker-image-debian-powerpc-cross: EXTRA_FILES:=tests/docker/dockerfiles/debian-apt-fake.sh
+
 # Enforce dependancies for composite images
 docker-image-debian-armel-cross: docker-image-debian9
 docker-image-debian-armhf-cross: docker-image-debian9
 docker-image-debian-arm64-cross: docker-image-debian9
 docker-image-debian-mipsel-cross: docker-image-debian9
+docker-image-debian-powerpc-cross: docker-image-debian8
 docker-image-debian-ppc64el-cross: docker-image-debian9
 docker-image-debian-s390x-cross: docker-image-debian9
 docker-image-debian-amd64-cross: docker-image-debian9
tests/docker/dockerfiles/debian-powerpc-cross.docker new file +40 -1
new file mode 100644
index 0000000000..a5dd46b4ac
@@ -0,0 +1,40 @@
+#
+# Docker powerpc cross-compiler target
+#
+# This docker target builds on the debian Jessie base image.
+#
+FROM qemu:debian8
+MAINTAINER Philippe Mathieu-Daudé <[email protected]>
+
+# Add the foreign architecture we want and install dependencies
+RUN dpkg --add-architecture powerpc
+RUN apt-get update
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get install -y --no-install-recommends \
+        crossbuild-essential-powerpc
+
+# <kludge> to fix "following packages have unmet dependencies" ...
+ADD debian-apt-fake.sh /usr/local/bin/apt-fake
+RUN apt-get install -y --no-install-recommends \
+        equivs \
+        pkg-config
+RUN apt-fake install \
+        pkg-config:powerpc=0.28-1.1-fake && \
+    ln -s pkg-config /usr/bin/powerpc-linux-gnu-pkg-config
+ENV PKG_CONFIG_PATH /usr/lib/powerpc-linux-gnu/pkgconfig
+# </kludge>
+
+# Specify the cross prefix for this image (see tests/docker/common.rc)
+ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc-linux-gnu-
+
+RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+    apt-get build-dep -yy -a powerpc qemu
+RUN DEBIAN_FRONTEND=noninteractive \
+    apt-get install -y --no-install-recommends \
+        glusterfs-common:powerpc \
+        libbz2-dev:powerpc \
+        liblzo2-dev:powerpc \
+        libncursesw5-dev:powerpc \
+        libnfs-dev:powerpc \
+        librdmacm-dev:powerpc \
+        libsnappy-dev:powerpc
--

2.13.2

#21 lore raw

PATCH v6 18/18 shippable: restrict builds to master/staging and shippable* branches

In reply to Philippe Mathieu-Daudé
---
 .shippable.yml | 5 +++++
 1 file changed, 5 insertions(+)
.shippable.yml +5 -0
index 4c8a85941f..1f05d934e4 100644
@@ -1,6 +1,11 @@
 language: c
 git:
    submodules: false
+branches:
+  only:
+    - master
+    - staging
+    - shippable*
 env:
   global:
     - LC_ALL=C
Signature · 1 line
2.13.2
#22 lore raw

Re: [Qemu-devel] [PATCH v6 18/18] shippable: restrict builds to master/staging and shippable* branches

Philippe Mathieu-Daudé <[email protected]> writes:

Why? Don't this stop people testing their feature branches?

Quoted 11 lines
---
 .shippable.yml | 5 +++++
 1 file changed, 5 insertions(+)
.shippable.yml +0 -0
index 4c8a85941f..1f05d934e4 100644
@@ -1,6 +1,11 @@
 language: c

.shippable.yml line 11

Quoted 10 lines
.shippable.yml +5 -0
 git:
    submodules: false
+branches:
+  only:
+    - master
+    - staging
+    - shippable*
 env:
   global:
     - LC_ALL=C

--
Alex Bennée