docker: add installation to build tests
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
@@ -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
@@ -8,6 +8,7 @@ ENV PACKAGES \ flex \ g++ \ gcc \ + gettext \ git \ glib2-devel \ libepoxy-devel \
tests/docker/dockerfiles/centos7.docker +1 -0
@@ -9,6 +9,7 @@ ENV PACKAGES \ flex \ g++ \ gcc \ + gettext \ git \ glib2-devel \ libepoxy-devel \
tests/docker/dockerfiles/debian-ports.docker +1 -0
@@ -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
@@ -26,6 +26,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \ clang \ curl \ flex \ + gettext \ git \ gnupg \ pkg-config \
tests/docker/dockerfiles/debian9.docker +1 -0
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -17,3 +17,4 @@ cd "$BUILD_DIR" build_qemu make check $MAKEFLAGS +install_qemu
tests/docker/test-mingw +1 -0
@@ -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
@@ -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
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
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
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
----- 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 testsQuoted 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 forCCACHE_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