some docker fixes
cover some docker fixes
Hi,
I noticed some problems while running my local builds and while trying to reproduce Travis failures. They apply on top of the currently in flight pull-req pull-ci-updates-for-softfreeze-180717-2
Alex Bennée (3):
docker: ensure NOUSER for travis images
docker: fix dirty/stash detection on some systems
docker: ignore submodules when checking diff
tests/docker/Makefile.include | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.13.0
RFC PATCH 1/3 docker: ensure NOUSER for travis images
While adding the current user is a useful default behaviour for creating new images it is not appropriate for Travis which already has a default user.
--- tests/docker/Makefile.include | 1 + 1 file changed, 1 insertion(+)
tests/docker/Makefile.include +1 -0
@@ -71,6 +71,7 @@ docker-image-debian-ppc64el-cross: docker-image-debian9 docker-image-debian-s390x-cross: docker-image-debian9 docker-image-debian-win32-cross: docker-image-debian8-mxe docker-image-debian-win64-cross: docker-image-debian8-mxe +docker-image-travis: NOUSER=1 # Expand all the pre-requistes for each docker image and test combination $(foreach i,$(DOCKER_IMAGES), \
Signature · 1 line
2.13.0
Re: [Qemu-devel] [RFC PATCH for 2.10 1/3] docker: ensure NOUSER for travis images
Quoted 14 lines · Alex Bennée
While adding the current user is a useful default behaviour for creating new images it is not appropriate for Travis which already has a default user.
Signed-off-by Alex Bennée <[email protected]>--- tests/docker/Makefile.include | 1 + 1 file changed, 1 insertion(+)tests/docker/Makefile.include +0
-0
tests/docker/Makefile.include docker-image-debian-ppc64el-cross: docker-image-debian9 · line 74
Quoted 4 lines
tests/docker/Makefile.include +1
-0@@ -71,6 +71,7 @@ docker-image-debian-ppc64el-cross: docker-image-debian9 docker-image-debian-s390x-cross: docker-image-debian9 docker-image-debian-win32-cross: docker-image-debian8-mxe docker-image-debian-win64-cross: docker-image-debian8-mxe +docker-image-travis: NOUSER=1
Cool you kept it ordered :)
I'm surprised we need to install the full LaTeX stack to be able to compile the device-tree-compiler...
Reading https://docs.travis-ci.com/user/environment-variables#default-environment-variables I think it'd be a better match if we also use those default environment variables, at least:
DEBIAN_FRONTEND=noninteractive
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
what do you think?
Quoted 4 lines
tests/docker/Makefile.include +0
-0# Expand all the pre-requistes for each docker image and test combination $(foreach i,$(DOCKER_IMAGES), \
Re: [Qemu-devel] [RFC PATCH for 2.10 1/3] docker: ensure NOUSER for travis images
Quoted 22 lines · Philippe Mathieu-Daudé
Quoted 14 lines · Alex Bennée
While adding the current user is a useful default behaviour for creating new images it is not appropriate for Travis which already has a default user.
Signed-off-by Alex Bennée <[email protected]>--- tests/docker/Makefile.include | 1 + 1 file changed, 1 insertion(+)tests/docker/Makefile.include +0
-0tests/docker/Makefile.include docker-image-debian-ppc64el-cross: docker-image-debian9 · line 74
Quoted 4 lines
tests/docker/Makefile.include +1
-0@@ -71,6 +71,7 @@ docker-image-debian-ppc64el-cross: docker-image-debian9 docker-image-debian-s390x-cross: docker-image-debian9 docker-image-debian-win32-cross: docker-image-debian8-mxe docker-image-debian-win64-cross: docker-image-debian8-mxe +docker-image-travis: NOUSER=1Cool you kept it ordered :)
Quoted 2 lines
I'm surprised we need to install the full LaTeX stack to be able to compile the device-tree-compiler...
Hmm I think installing build-deps is a little extreme as we are not re-building the device-tree-compiler but using it.
Quoted 11 lines
Reading
https://docs.travis-ci.com/user/environment-variables#default-environment-variables
I think it'd be a better match if we also use those default environment variables, at least:DEBIAN_FRONTEND=noninteractive
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8what do you think?
Sure - it does reduce the noise somewhat.
Quoted 8 lines
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Quoted 4 lines
tests/docker/Makefile.include +0
-0# Expand all the pre-requistes for each docker image and testcombination
$(foreach i,$(DOCKER_IMAGES), \
--
Alex Bennée
RFC PATCH 2/3 docker: fix dirty/stash detection on some systems
In reply to Alex BennéeI reported this a while ago but evidently forgot to push the patch upstream. Without this I wasn't seeing the dirty tree state submitted to the docker build which is very confusing.
Reference:
Subject: [PATCH 1/6] tests/docker/Makefile.include: fix diff-index call
Date: Fri, 28 Oct 2016 17:33:34 +0100
Message-Id: <[email protected]>
--- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/Makefile.include +1 -1
@@ -20,7 +20,7 @@ IMAGES ?= % # Make archive from git repo $1 to tar.gz $2 make-archive-maybe = $(if $(wildcard $1/*), \ $(call quiet-command, \ - (cd $1; if git diff-index --quiet HEAD -- &>/dev/null; then \ + (cd $1; if git diff-index --quiet HEAD -- 2>/dev/null; then \ git archive -1 HEAD --format=tar.gz; \ else \ git archive -1 $$(git stash create) --format=tar.gz; \
Signature · 1 line
2.13.0
Re: [Qemu-devel] [RFC PATCH for 2.10 2/3] docker: fix dirty/stash detection on some systems
Quoted 9 lines · Alex Bennée
I reported this a while ago but evidently forgot to push the patch upstream. Without this I wasn't seeing the dirty tree state submitted to the docker build which is very confusing.
Reference:
Subject: [PATCH 1/6] tests/docker/Makefile.include: fix diff-index call
Date: Fri, 28 Oct 2016 17:33:34 +0100
Message-Id: <[email protected]>
Quoted 4 lines
Signed-off-by Alex Bennée <[email protected]>--- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
tests/docker/Makefile.include +1
-1@@ -20,7 +20,7 @@ IMAGES ?= % # Make archive from git repo $1 to tar.gz $2 make-archive-maybe = $(if $(wildcard $1/*), \ $(call quiet-command, \ - (cd $1; if git diff-index --quiet HEAD -- &>/dev/null; then \ + (cd $1; if git diff-index --quiet HEAD -- 2>/dev/null; then \ git archive -1 HEAD --format=tar.gz; \ else \ git archive -1 $$(git stash create) --format=tar.gz; \
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Re: [Qemu-devel] [RFC PATCH for 2.10 2/3] docker: fix dirty/stash detection on some systems
In reply to Alex BennéeQuoted 10 lines · Alex Bennée
I reported this a while ago but evidently forgot to push the patch upstream. Without this I wasn't seeing the dirty tree state submitted to the docker build which is very confusing.
Reference:
Subject: [PATCH 1/6] tests/docker/Makefile.include: fix diff-index call Date: Fri, 28 Oct 2016 17:33:34 +0100 Message-Id: <[email protected]>Signed-off-by Alex Bennée <[email protected]>
Quoted 18 lines
--- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/docker/Makefile.include +1
-1@@ -20,7 +20,7 @@ IMAGES ?= % # Make archive from git repo $1 to tar.gz $2 make-archive-maybe = $(if $(wildcard $1/*), \ $(call quiet-command, \ - (cd $1; if git diff-index --quiet HEAD -- &>/dev/null; then \ + (cd $1; if git diff-index --quiet HEAD -- 2>/dev/null; then \ git archive -1 HEAD --format=tar.gz; \ else \ git archive -1 $$(git stash create) --format=tar.gz; \
RFC PATCH 3/3 docker: ignore submodules when checking diff
In reply to Alex BennéeThe QEMU tree often has dirty submodules in it but this will confuse things as git stash is not going to save their state directly. They are likely just dirty from build files anyway. Ignore them in the diff-index command.
--- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/Makefile.include +1 -1
@@ -20,7 +20,7 @@ IMAGES ?= % # Make archive from git repo $1 to tar.gz $2 make-archive-maybe = $(if $(wildcard $1/*), \ $(call quiet-command, \ - (cd $1; if git diff-index --quiet HEAD -- 2>/dev/null; then \ + (cd $1; if git diff-index --quiet --ignore-submodules HEAD -- 2>/dev/null; then \ git archive -1 HEAD --format=tar.gz; \ else \ git archive -1 $$(git stash create) --format=tar.gz; \
Signature · 1 line
2.13.0
Re: [Qemu-devel] [RFC PATCH for 2.10 3/3] docker: ignore submodules when checking diff
Quoted 4 lines · Alex Bennée
The QEMU tree often has dirty submodules in it but this will confuse things as git stash is not going to save their state directly. They are likely just dirty from build files anyway. Ignore them in the diff-index command.
It's annoying that our build dirties a submodule in the first place; it would be nice to get rid of those bugs in our build process (ideally, the build should treat submodule directories as read-only). But that is a bigger effort, so I'm okay with your hack in the meantime.
Quoted 5 lines
Signed-off-by Alex Bennée <[email protected]>--- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
tests/docker/Makefile.include +1
-1@@ -20,7 +20,7 @@ IMAGES ?= % # Make archive from git repo $1 to tar.gz $2 make-archive-maybe = $(if $(wildcard $1/*), \ $(call quiet-command, \ - (cd $1; if git diff-index --quiet HEAD -- 2>/dev/null; then \ + (cd $1; if git diff-index --quiet --ignore-submodules HEAD -- 2>/dev/null; then \ git archive -1 HEAD --format=tar.gz; \ else \ git archive -1 $$(git stash create) --format=tar.gz; \
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 6 lines · Alex Bennée
Hi,
I noticed some problems while running my local builds and while trying to reproduce Travis failures. They apply on top of the currently in flight pull-req pull-ci-updates-for-softfreeze-180717-2
Quoted 7 lines
Alex Bennée (3):
docker: ensure NOUSER for travis images
docker: fix dirty/stash detection on some systems
docker: ignore submodules when checking difftests/docker/Makefile.include | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Ping?
Any more reviews? Happy for me to roll a pull-req?
--
Alex Bennée