From 95f7aabf49a1223f23b0b1f66201ce22ff3695ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Mon, 25 Jun 2018 10:06:35 +0100 Subject: docker: add gcovr to travis image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Useful for debugging if nothing else as the gcovr on the Travis images are a little old. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- tests/docker/dockerfiles/travis.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/docker/dockerfiles') diff --git a/tests/docker/dockerfiles/travis.docker b/tests/docker/dockerfiles/travis.docker index c5ad39b533..03ebfb0ef2 100644 --- a/tests/docker/dockerfiles/travis.docker +++ b/tests/docker/dockerfiles/travis.docker @@ -5,7 +5,7 @@ ENV LC_ALL en_US.UTF-8 RUN cat /etc/apt/sources.list | sed "s/# deb-src/deb-src/" >> /etc/apt/sources.list RUN apt-get update RUN apt-get -y build-dep qemu -RUN apt-get -y install device-tree-compiler python2.7 python-yaml dh-autoreconf gdb strace lsof net-tools +RUN apt-get -y install device-tree-compiler python2.7 python-yaml dh-autoreconf gdb strace lsof net-tools gcovr # Travis tools require PhantomJS / Neo4j / Maven accessible # in their PATH (QEMU build won't access them). ENV PATH /usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -- cgit v1.2.3 From beac6a98f6eb271f2520a329ca051313afd70a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 28 Jun 2018 13:46:36 -0300 Subject: docker: ubuntu: Update the package list before installing new ones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since docker caches the different layers, updating the package list does not invalidate the previous "apt-get update" layer, and it is likely "apt-get install" hits an outdated repository. See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get This fixes: $ make docker-image-ubuntu V=1 ./tests/docker/docker.py build qemu:ubuntu tests/docker/dockerfiles/ubuntu.docker --add-current-user Sending build context to Docker daemon 3.072kB [...] E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgles2-mesa_17.0.7-0ubuntu0.16.04.2_amd64.deb 404 Not Found E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgles2-mesa-dev_17.0.7-0ubuntu0.16.04.2_amd64.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? The command '/bin/sh -c apt-get -y install $PACKAGES' returned a non-zero code: 100 tests/docker/Makefile.include:40: recipe for target 'docker-image-ubuntu' failed make: *** [docker-image-ubuntu] Error 1 Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/ubuntu.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/docker/dockerfiles') diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker index dabbf2a8a4..c03520ce3f 100644 --- a/tests/docker/dockerfiles/ubuntu.docker +++ b/tests/docker/dockerfiles/ubuntu.docker @@ -1,7 +1,6 @@ FROM ubuntu:16.04 RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty universe multiverse" >> \ /etc/apt/sources.list -RUN apt-get update ENV PACKAGES flex bison \ libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev libncursesw5-dev \ libseccomp-dev libgnutls-dev libssh2-1-dev libspice-server-dev \ @@ -13,6 +12,7 @@ ENV PACKAGES flex bison \ libjemalloc-dev libcacard-dev libusbredirhost-dev libnfs-dev libcap-dev libattr1-dev \ texinfo \ gettext git make ccache python-yaml gcc clang sparse -RUN apt-get -y install $PACKAGES +RUN apt-get update && \ + apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt ENV FEATURES clang pyyaml -- cgit v1.2.3 From daf999f77acfbe3ae09b5b8b58c140d9fdf38409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 28 Jun 2018 13:46:37 -0300 Subject: docker: ubuntu: Use SDL2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not test the deprecated API versions (see cabd35840749d). Debian MXE MinGW cross images are already using SDL2. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/ubuntu.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/docker/dockerfiles') diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker index c03520ce3f..7d724e7f53 100644 --- a/tests/docker/dockerfiles/ubuntu.docker +++ b/tests/docker/dockerfiles/ubuntu.docker @@ -5,7 +5,7 @@ ENV PACKAGES flex bison \ libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev libncursesw5-dev \ libseccomp-dev libgnutls-dev libssh2-1-dev libspice-server-dev \ libspice-protocol-dev libnss3-dev libfdt-dev \ - libgtk-3-dev libvte-2.91-dev libsdl1.2-dev libpng12-dev libpixman-1-dev \ + libgtk-3-dev libvte-2.91-dev libsdl2-dev libpng12-dev libpixman-1-dev \ libvdeplug-dev liblzo2-dev libsnappy-dev libbz2-dev libxen-dev librdmacm-dev libibverbs-dev \ libsasl2-dev libjpeg-turbo8-dev xfslibs-dev libcap-ng-dev libbrlapi-dev libcurl4-gnutls-dev \ libbluetooth-dev librbd-dev libaio-dev glusterfs-common libnuma-dev libepoxy-dev libdrm-dev libgbm-dev \ @@ -15,4 +15,4 @@ ENV PACKAGES flex bison \ RUN apt-get update && \ apt-get -y install $PACKAGES RUN dpkg -l $PACKAGES | sort > /packages.txt -ENV FEATURES clang pyyaml +ENV FEATURES clang pyyaml sdl2 -- cgit v1.2.3 From 48feb682db13372c5cce42156a48afabfbbb28e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 28 Jun 2018 13:46:38 -0300 Subject: docker: Clean the MXE base image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using the duplicated same package is confusing. Reported-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/debian8-mxe.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/docker/dockerfiles') diff --git a/tests/docker/dockerfiles/debian8-mxe.docker b/tests/docker/dockerfiles/debian8-mxe.docker index 9b8e577b03..2df4cc8c5c 100644 --- a/tests/docker/dockerfiles/debian8-mxe.docker +++ b/tests/docker/dockerfiles/debian8-mxe.docker @@ -14,6 +14,6 @@ RUN apt-get update RUN DEBIAN_FRONTEND=noninteractive eatmydata \ apt-get install -y --no-install-recommends \ libpython2.7-stdlib \ - $(apt-get -s install -y --no-install-recommends gw32.shared-mingw-w64 gw32.shared-mingw-w64 | egrep "^Inst mxe-x86-64-unknown-" | cut -d\ -f2) + $(apt-get -s install -y --no-install-recommends gw32.shared-mingw-w64 | egrep "^Inst mxe-x86-64-unknown-" | cut -d\ -f2) ENV PATH $PATH:/usr/lib/mxe/usr/bin/ -- cgit v1.2.3 From e6bfdeca8b688913270334fa89c39a9c1ee2662a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 29 Jun 2018 17:46:02 +0100 Subject: docker: drop QEMU build-dep from bootstrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is best done with any child images that actually need it. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/debian-bootstrap.docker | 2 -- 1 file changed, 2 deletions(-) (limited to 'tests/docker/dockerfiles') diff --git a/tests/docker/dockerfiles/debian-bootstrap.docker b/tests/docker/dockerfiles/debian-bootstrap.docker index 3a9125e497..14212b9cf4 100644 --- a/tests/docker/dockerfiles/debian-bootstrap.docker +++ b/tests/docker/dockerfiles/debian-bootstrap.docker @@ -17,5 +17,3 @@ RUN /debootstrap/debootstrap --second-stage # At this point we can install additional packages if we want # Duplicate deb line as deb-src RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list -RUN apt-get update -RUN apt-get -y build-dep qemu -- cgit v1.2.3 From 300cf467fd4f520a60d3eff7e73813337165dbcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Mon, 2 Jul 2018 14:02:44 +0100 Subject: docker: debian-bootstrap.pre allow customising of variant/url MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We default to the buildd variant as most of our images are for building. However lets give the user the ability to specify "minbase" if they want to create a simple base image for experimentation. Allowing the tweaking of DEB_URL means we can also bootstrap other Debian based OS's. For example: make docker-binfmt-image-debian-ubuntu-bionic-arm64 \ DEB_ARCH=arm64 DEB_TYPE=bionic \ DEB_VARIANT=minbase DEB_URL=http://ports.ubuntu.com/ \ EXECUTABLE=./aarch64-linux-user/qemu-aarch64 Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/debian-bootstrap.pre | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/docker/dockerfiles') diff --git a/tests/docker/dockerfiles/debian-bootstrap.pre b/tests/docker/dockerfiles/debian-bootstrap.pre index 7c76dce663..56e1aa7a21 100755 --- a/tests/docker/dockerfiles/debian-bootstrap.pre +++ b/tests/docker/dockerfiles/debian-bootstrap.pre @@ -32,6 +32,15 @@ if [ -z "${DEB_TYPE}" ]; then fi +# The following allow finer grain control over the defaults +if [ -z "${DEB_VARIANT}" ]; then + DEB_VARIANT=buildd +fi + +if [ -z "${DEB_URL}" ]; then + DEB_URL="http://httpredir.debian.org/debian" +fi + # We check in order for # # - DEBOOTSTRAP_DIR pointing at a development checkout @@ -107,5 +116,5 @@ fi echo "Building a rootfs using ${FAKEROOT} and ${DEBOOTSTRAP} ${DEB_ARCH}/${DEB_TYPE}" -${FAKEROOT} ${DEBOOTSTRAP} --variant=buildd --foreign --arch=$DEB_ARCH $DEB_TYPE . http://httpredir.debian.org/debian || exit 1 +${FAKEROOT} ${DEBOOTSTRAP} --variant=$DEB_VARIANT --foreign --arch=$DEB_ARCH $DEB_TYPE . $DEB_URL || exit 1 exit 0 -- cgit v1.2.3 From 19c9a18f45fc8d8b8e96a6b8ea6074d08b6a8612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 29 Jun 2018 20:41:26 +0100 Subject: docker: add linux-user powered cross builder for QEMU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can't use cross compilers in the current Debian stable and Debian sid is sketchy as hell. So for powerpc fall back to dog-fooding our own linux-user to do the build. As we can only build the base image with a suitably configured source tree we fall back to checking for its existence when we can't build it from scratch. However this does mean you don't have to keep a static powerpc-linux-user in your active configuration just to update the cross build image. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/debian-powerpc-user-cross.docker | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/docker/dockerfiles/debian-powerpc-user-cross.docker (limited to 'tests/docker/dockerfiles') diff --git a/tests/docker/dockerfiles/debian-powerpc-user-cross.docker b/tests/docker/dockerfiles/debian-powerpc-user-cross.docker new file mode 100644 index 0000000000..6938a845ee --- /dev/null +++ b/tests/docker/dockerfiles/debian-powerpc-user-cross.docker @@ -0,0 +1,15 @@ +# +# Docker powerpc cross-compiler target for QEMU +# +# We can't use current Debian stable cross-compilers to build powerpc +# as it has been dropped as a release architecture. Using Debian Sid +# is just far too sketchy a build environment. This leaves us the +# final option of using linux-user. This image is based of the +# debootstrapped qemu:debian-powerpc-user but doesn't need any extra +# magic once it is setup. +# +FROM qemu:debian-powerpc-user + +RUN echo man-db man-db/auto-update boolean false | debconf-set-selections +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get build-dep -yy qemu -- cgit v1.2.3