Message ID | 1506080563-41084-1-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show |
Series | docker: add installation to build tests | expand |
On Fri, 09/22 13:42, Paolo Bonzini wrote: > 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
On 22/09/2017 14:47, Fam Zheng wrote: > On Fri, 09/22 13:42, Paolo Bonzini wrote: >> 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
On Fri, 09/22 17:52, Paolo Bonzini wrote: > On 22/09/2017 14:47, Fam Zheng wrote: > > On Fri, 09/22 13:42, Paolo Bonzini wrote: > >> 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. Hmm, right, root in the container can mess with it if you have NOUSER=1, we should avoid that. Fam
----- Original Message ----- > From: "Fam Zheng" <famz@redhat.com> > To: "Paolo Bonzini" <pbonzini@redhat.com> > Cc: "alex bennee" <alex.bennee@linaro.org>, qemu-devel@nongnu.org > Sent: Sunday, September 24, 2017 4:54:39 AM > Subject: Re: [Qemu-devel] [PATCH] docker: add installation to build tests > > On Fri, 09/22 17:52, Paolo Bonzini wrote: > > On 22/09/2017 14:47, Fam Zheng wrote: > > > On Fri, 09/22 13:42, Paolo Bonzini wrote: > > >> 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. > > 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
diff --git a/tests/docker/common.rc b/tests/docker/common.rc index 6865689..1522aab 100755 --- a/tests/docker/common.rc +++ b/tests/docker/common.rc @@ -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 +} diff --git a/tests/docker/dockerfiles/centos6.docker b/tests/docker/dockerfiles/centos6.docker index f6aae13..ad24319 100644 --- a/tests/docker/dockerfiles/centos6.docker +++ b/tests/docker/dockerfiles/centos6.docker @@ -8,6 +8,7 @@ ENV PACKAGES \ flex \ g++ \ gcc \ + gettext \ git \ glib2-devel \ libepoxy-devel \ diff --git a/tests/docker/dockerfiles/centos7.docker b/tests/docker/dockerfiles/centos7.docker index 0b59aa2..575de29 100644 --- a/tests/docker/dockerfiles/centos7.docker +++ b/tests/docker/dockerfiles/centos7.docker @@ -9,6 +9,7 @@ ENV PACKAGES \ flex \ g++ \ gcc \ + gettext \ git \ glib2-devel \ libepoxy-devel \ diff --git a/tests/docker/dockerfiles/debian-ports.docker b/tests/docker/dockerfiles/debian-ports.docker index fba224f..e05a9a9 100644 --- a/tests/docker/dockerfiles/debian-ports.docker +++ b/tests/docker/dockerfiles/debian-ports.docker @@ -27,6 +27,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \ clang \ debian-ports-archive-keyring \ flex \ + gettext \ git \ pkg-config \ psmisc \ diff --git a/tests/docker/dockerfiles/debian8.docker b/tests/docker/dockerfiles/debian8.docker index 3d09b4b..1bcf2e3 100644 --- a/tests/docker/dockerfiles/debian8.docker +++ b/tests/docker/dockerfiles/debian8.docker @@ -26,6 +26,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \ clang \ curl \ flex \ + gettext \ git \ gnupg \ pkg-config \ diff --git a/tests/docker/dockerfiles/debian9.docker b/tests/docker/dockerfiles/debian9.docker index a450995..154ae2a 100644 --- a/tests/docker/dockerfiles/debian9.docker +++ b/tests/docker/dockerfiles/debian9.docker @@ -22,6 +22,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \ ca-certificates \ clang \ flex \ + gettext \ git \ pkg-config \ psmisc \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index 4eaa8ed..dec6b1a 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -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 \ diff --git a/tests/docker/dockerfiles/min-glib.docker b/tests/docker/dockerfiles/min-glib.docker index 9f542d5..f2eed97 100644 --- a/tests/docker/dockerfiles/min-glib.docker +++ b/tests/docker/dockerfiles/min-glib.docker @@ -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 diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker index a360a05..131668c 100644 --- a/tests/docker/dockerfiles/ubuntu.docker +++ b/tests/docker/dockerfiles/ubuntu.docker @@ -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 diff --git a/tests/docker/test-build b/tests/docker/test-build index 031a7d9..22766cf 100755 --- a/tests/docker/test-build +++ b/tests/docker/test-build @@ -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 diff --git a/tests/docker/test-clang b/tests/docker/test-clang index 16485e6..1eb61a3 100755 --- a/tests/docker/test-clang +++ b/tests/docker/test-clang @@ -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 diff --git a/tests/docker/test-full b/tests/docker/test-full index 05f0d49..a0ba90e 100755 --- a/tests/docker/test-full +++ b/tests/docker/test-full @@ -17,3 +17,4 @@ cd "$BUILD_DIR" build_qemu make check $MAKEFLAGS +install_qemu diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw index 2adadcb..39a1da4 100755 --- a/tests/docker/test-mingw +++ b/tests/docker/test-mingw @@ -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 diff --git a/tests/docker/test-quick b/tests/docker/test-quick index c465dc0..3b7bce6 100755 --- a/tests/docker/test-quick +++ b/tests/docker/test-quick @@ -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
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. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- 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(-)