Skip to contentSkip to conversation

docker: add installation to build tests

PATCH Superseded Paolo Bonzini 2 participants 5 messages Sep 22, 2017 – Sep 24, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docker: add installation to build tests

Basic test that "make install" works; this requires msgfmt so add gettext to the packages.

Drop ccache on Fedora, because it fails on RHEL 7.4, it is not used by any other distro and it is not particularly useful on throwaway containers.

---
 tests/docker/common.rc                       | 8 ++++++++
 tests/docker/dockerfiles/centos6.docker      | 1 +
 tests/docker/dockerfiles/centos7.docker      | 1 +
 tests/docker/dockerfiles/debian-ports.docker | 1 +
 tests/docker/dockerfiles/debian8.docker      | 1 +
 tests/docker/dockerfiles/debian9.docker      | 1 +
 tests/docker/dockerfiles/fedora.docker       | 2 +-
 tests/docker/dockerfiles/min-glib.docker     | 2 +-
 tests/docker/dockerfiles/ubuntu.docker       | 2 +-
 tests/docker/test-build                      | 1 +
 tests/docker/test-clang                      | 1 +
 tests/docker/test-full                       | 1 +
 tests/docker/test-mingw                      | 1 +
 tests/docker/test-quick                      | 1 +
 14 files changed, 21 insertions(+), 3 deletions(-)
tests/docker/common.rc +8 -0
index 6865689..1522aab 100755
@@ -36,3 +36,11 @@ build_qemu()
     $QEMU_SRC/configure $config_opts
     make $MAKEFLAGS
 }
+
+install_qemu()
+{
+    make install $MAKEFLAGS DESTDIR=$PWD/=destdir
+    ret=$?
+    rm -rf $PWD/=destdir
+    return $ret
+}
tests/docker/dockerfiles/centos6.docker +1 -0
index f6aae13..ad24319 100644
@@ -8,6 +8,7 @@ ENV PACKAGES \
     flex \
     g++ \
     gcc \
+    gettext \
     git \
     glib2-devel \
     libepoxy-devel \
tests/docker/dockerfiles/centos7.docker +1 -0
index 0b59aa2..575de29 100644
@@ -9,6 +9,7 @@ ENV PACKAGES \
     flex \
     g++ \
     gcc \
+    gettext \
     git \
     glib2-devel \
     libepoxy-devel \
tests/docker/dockerfiles/debian-ports.docker +1 -0
index fba224f..e05a9a9 100644
@@ -27,6 +27,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         clang \
         debian-ports-archive-keyring \
         flex \
+        gettext \
         git \
         pkg-config \
         psmisc \
tests/docker/dockerfiles/debian8.docker +1 -0
index 3d09b4b..1bcf2e3 100644
@@ -26,6 +26,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         clang \
         curl \
         flex \
+        gettext \
         git \
         gnupg \
         pkg-config \
tests/docker/dockerfiles/debian9.docker +1 -0
index a450995..154ae2a 100644
@@ -22,6 +22,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
         ca-certificates \
         clang \
         flex \
+        gettext \
         git \
         pkg-config \
         psmisc \
tests/docker/dockerfiles/fedora.docker +1 -1
index 4eaa8ed..dec6b1a 100644
@@ -1,6 +1,6 @@
 FROM fedora:latest
 ENV PACKAGES \
-    ccache git tar PyYAML sparse flex bison python2 bzip2 hostname \
+    gettext git tar PyYAML sparse flex bison python2 bzip2 hostname \
     glib2-devel pixman-devel zlib-devel SDL-devel libfdt-devel \
     gcc gcc-c++ clang make perl which bc findutils libaio-devel \
     mingw32-pixman mingw32-glib2 mingw32-gmp mingw32-SDL mingw32-pkg-config \
tests/docker/dockerfiles/min-glib.docker +1 -1
index 9f542d5..f2eed97 100644
@@ -1,6 +1,6 @@
 FROM centos:6
 RUN yum install -y \
-    tar git make gcc g++ \
+    tar gettext git make gcc g++ \
     zlib-devel SDL-devel pixman-devel \
     epel-release
 RUN yum install -y libfdt-devel ccache
tests/docker/dockerfiles/ubuntu.docker +1 -1
index a360a05..131668c 100644
@@ -7,7 +7,7 @@ ENV PACKAGES flex bison \
     libseccomp-dev libgnutls-dev libssh2-1-dev  libspice-server-dev \
     libspice-protocol-dev libnss3-dev libfdt-dev \
     libgtk-3-dev libvte-2.90-dev libsdl1.2-dev libpng12-dev libpixman-1-dev \
-    git make ccache python-yaml gcc clang sparse
+    gettext git make ccache python-yaml gcc clang sparse
 RUN apt-get -y install $PACKAGES
 RUN dpkg -l $PACKAGES | sort > /packages.txt
 ENV FEATURES clang pyyaml
tests/docker/test-build +1 -0
index 031a7d9..22766cf 100755
@@ -18,3 +18,4 @@ cd "$BUILD_DIR"
 DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
 TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
 build_qemu
+install_qemu
tests/docker/test-clang +1 -0
index 16485e6..1eb61a3 100755
@@ -24,3 +24,4 @@ OPTS="--enable-debug --cxx=clang++ --cc=clang --host-cc=clang"
     #--extra-cflags=-fno-sanitize=float-divide-by-zero"
 build_qemu $OPTS
 make $MAKEFLAGS check
+install_qemu
tests/docker/test-full +1 -0
index 05f0d49..a0ba90e 100755
@@ -17,3 +17,4 @@ cd "$BUILD_DIR"
 
 build_qemu
 make check $MAKEFLAGS
+install_qemu
tests/docker/test-mingw +1 -0
index 2adadcb..39a1da4 100755
@@ -31,6 +31,7 @@ for prefix in x86_64-w64-mingw32- i686-w64-mingw32-; do
         --enable-guest-agent \
         --with-sdlabi=1.2 \
         --with-gtkabi=2.0
+    install_qemu
     make clean
 
 done
tests/docker/test-quick +1 -0
index c465dc0..3b7bce6 100755
@@ -19,3 +19,4 @@ DEF_TARGET_LIST="x86_64-softmmu,aarch64-softmmu"
 TARGET_LIST=${TARGET_LIST:-$DEF_TARGET_LIST} \
 build_qemu
 make check $MAKEFLAGS
+install_qemu
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 3 lines · Paolo Bonzini

Drop ccache on Fedora, because it fails on RHEL 7.4, it is not used by any other distro and it is not particularly useful on throwaway containers.

I wonder what exactly failed with ccache? Patchew relies on it to speed up compiling every series on the list. The ccache db is not throwaway with that in mind - git grep for CCACHE_DIR.

Fam

#2 lore raw
Quoted 8 lines · Fam Zheng
Quoted 3 lines · Paolo Bonzini

Drop ccache on Fedora, because it fails on RHEL 7.4, it is not used by any other distro and it is not particularly useful on throwaway containers.

I wonder what exactly failed with ccache? Patchew relies on it to speed up compiling every series on the list. The ccache db is not throwaway with that in mind - git grep for CCACHE_DIR.

Got it. For some reason the ccache dir in ~/.cache was owned by root. I zapped it and now it works, so I've sent v2.

Paolo

#3 lore raw
Quoted 6 lines · Paolo Bonzini
Quoted 5 lines · Fam Zheng
Quoted 3 lines · Paolo Bonzini

Drop ccache on Fedora, because it fails on RHEL 7.4, it is not used by any other distro and it is not particularly useful on throwaway containers.

Quoted 6 lines
Quoted 3 lines

I wonder what exactly failed with ccache? Patchew relies on it to speed up compiling every series on the list. The ccache db is not throwaway with that in mind - git grep for CCACHE_DIR.

Got it. For some reason the ccache dir in ~/.cache was owned by root. I zapped it and now it works, so I've sent v2.

Hmm, right, root in the container can mess with it if you have NOUSER=1, we should avoid that.

Fam

#4 lore raw

----- Original Message -----

Quoted 19 lines

From: "Fam Zheng" <[email protected]>
To: "Paolo Bonzini" <[email protected]>
Cc: "alex bennee" <[email protected]>, [email protected]
Sent: Sunday, September 24, 2017 4:54:39 AM
Subject: Re: [Qemu-devel] [PATCH] docker: add installation to build tests

Quoted 12 lines · Paolo Bonzini
Quoted 10 lines · Fam Zheng
Quoted 3 lines · Paolo Bonzini

Drop ccache on Fedora, because it fails on RHEL 7.4, it is not used by any other distro and it is not particularly useful on throwaway containers.

I wonder what exactly failed with ccache? Patchew relies on it to speed up
compiling every series on the list. The ccache db is not throwaway with that in
mind - git grep for CCACHE_DIR.

Quoted 5 lines
Quoted 2 lines

Got it. For some reason the ccache dir in ~/.cache was owned by root. I zapped it and now it works, so I've sent v2.

Hmm, right, root in the container can mess with it if you have NOUSER=1, we should avoid that.

Aha, so the brokenness happened when RHEL introduced user namespaces and the container stopped running as root. Then the persistent part of the container's filesystem (the ccache dir) couldn't be accessed anymore from within the user namespace.

Paolo