[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 01/24] configure: add test for docker availab
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH v1 01/24] configure: add test for docker availability |
Date: |
Wed, 11 Apr 2018 20:59:08 +0800 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Wed, 04/11 11:58, Alex Bennée wrote:
>
> Fam Zheng <address@hidden> writes:
>
> > On Tue, 04/10 20:38, Alex Bennée wrote:
> >> This tests for a working docker installation without sudo and sets up
> >> config-host.mak accordingly. This will be useful from cross compiling
> >> things in the future.
> >>
> >> Signed-off-by: Alex Bennée <address@hidden>
> >> ---
> >> configure | 23 +++++++++++++++++++++++
> >> 1 file changed, 23 insertions(+)
> >>
> >> diff --git a/configure b/configure
> >> index 4d0e92c96c..b402befe94 100755
> >> --- a/configure
> >> +++ b/configure
> >> @@ -451,6 +451,7 @@ jemalloc="no"
> >> replication="yes"
> >> vxhs=""
> >> libxml2=""
> >> +docker="no"
> >>
> >> supported_cpu="no"
> >> supported_os="no"
> >> @@ -5396,6 +5397,23 @@ EOF
> >> fi
> >> fi
> >>
> >> +##########################################
> >> +# Docker and cross-compiler support
> >> +#
> >> +# This is specifically for building test
> >> +# cases for foreign architectures, not
> >> +# cross-compiling QEMU itself.
> >> +
> >> +if has "docker"; then
> >> + if docker images >/dev/null 2>&1 ; then
> >> + docker="yes"
> >> + else
> >> + # docker may be available but using sudo
> >> + # so we won't use it for cross-building
> >> + docker="maybe"
> >
> > What is the problem with using sudo for cross-building?
>
> Nothing in particular but we need someway of testing if the sudo is
> passwordless otherwise you might find the build stuck waiting for user
> interaction. This is fine for "make docker-foo" but for an eventual
> unattended "make check" this may cause problems.
>
> Is there a way we can test for this? Maybe we can push the docker probe
> into docker.py and just return to configure if it can run docker
> unattended?
We can try 'sudo -n -k docker' to test if passwordless docker works. According
to the manpage, -k ignores the credential cache, and -n ensures non-interaction.
Fam
- [Qemu-devel] [PATCH v1 00/24] fix building of tests/tcg, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 04/24] Makefile: Rename TARGET_DIRS to TARGET_LIST, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 02/24] configure: add support for --cross-cc-FOO, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 05/24] docker: Add "cc" subcommand, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 08/24] docker: Makefile.include introduce DOCKER_SCRIPT, Alex Bennée, 2018/04/10
- [Qemu-devel] [PATCH v1 03/24] configure: move i386_cc to cross_cc_i386, Alex Bennée, 2018/04/10