qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] a9f8d0: tests/docker/docker.py: docker_dir ou


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] a9f8d0: tests/docker/docker.py: docker_dir outside build
Date: Wed, 20 Jul 2016 12:00:03 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a9f8d03891c6ab28b88b75fa3080436ab4bf1dcc
      
https://github.com/qemu/qemu/commit/a9f8d03891c6ab28b88b75fa3080436ab4bf1dcc
  Author: Alex Bennée <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    M tests/docker/docker.py

  Log Message:
  -----------
  tests/docker/docker.py: docker_dir outside build

Instead of letting the build_image create the temporary working dir we
move the creation to the build command. This is preparation for the
later patches where additional files can be added to the build context
before the build step is run.

We also ensure we remove the build context after we are done (mkdtemp
doesn't do this automatically for you).

Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 504ca3c208da7b2ea657b62db146e1e5de74df0f
      
https://github.com/qemu/qemu/commit/504ca3c208da7b2ea657b62db146e1e5de74df0f
  Author: Alex Bennée <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    M tests/docker/docker.py

  Log Message:
  -----------
  tests/docker/docker.py: support --include-executable

When passed the path to a binary we copy it and any linked libraries (if
it is dynamically linked) into the docker build context. These can then
be included by a dockerfile with the line:

  # Copy all of context into container
  ADD . /

This is mainly intended for setting up foreign architecture docker
images which use qemu-$arch to do cross-architecture linux-user
execution. It also relies on the host and guest file-system following
reasonable multi-arch layouts so the copied libraries don't clash with
the guest ones.

Signed-off-by: Alex Bennée <address@hidden>
Message-id: address@hidden
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 920776ea5ea3d9f243d266581da5345e5d7b2306
      
https://github.com/qemu/qemu/commit/920776ea5ea3d9f243d266581da5345e5d7b2306
  Author: Alex Bennée <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    M tests/docker/docker.py

  Log Message:
  -----------
  tests/docker/docker.py: check and run .pre script

The docker script will now search for an associated $dockerfile.pre
script which gets run in the same build context as the dockerfile will
be. This is to support pre-seeding the build context before running the
docker build.

Signed-off-by: Alex Bennée <address@hidden>
Message-id: address@hidden
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 95c975013a15405a5ab257deae843ecd2eea20ec
      
https://github.com/qemu/qemu/commit/95c975013a15405a5ab257deae843ecd2eea20ec
  Author: Alex Bennée <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    A tests/docker/dockerfiles/debian-bootstrap.docker
    A tests/docker/dockerfiles/debian-bootstrap.pre

  Log Message:
  -----------
  tests/docker/dockerfiles: new debian-bootstrap.docker

Together with the debian-bootstrap.pre script can now build an arbitrary
architecture of Debian using debootstrap. This allows debootstrap to set
up its first stage before the container is built.

To build a container you need a command line like:

  DEB_ARCH=armhf DEB_TYPE=testing \
    ./tests/docker/docker.py build \
    --include-executable=arm-linux-user/qemu-arm debian:armhf \
    ./tests/docker/dockerfiles/debian-bootstrap.docker

Although a number of non-debian systems package the debootstrap script
it is fairly portable in itself. Assuming we have some sort of fakeroot
implementation we can just clone the upstream repository and use the
script from there.

Signed-off-by: Alex Bennée <address@hidden>
Message-id: address@hidden
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 6e733da676a5483314d86f1bcb14950a165b0e6f
      
https://github.com/qemu/qemu/commit/6e733da676a5483314d86f1bcb14950a165b0e6f
  Author: Alex Bennée <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    M tests/docker/docker.py

  Log Message:
  -----------
  tests/docker/docker.py: add update operation

This adds a new operation to the docker script to allow updating of
binaries in an existing container. This is because it would be
inefficient to re-build the whole container just for an update to the
QEMU binary.

To update the executable run:

    ./tests/docker/docker.py update \
  debian:armhf ./arm-linux-user/qemu-arm

Signed-off-by: Alex Bennée <address@hidden>
Message-id: address@hidden
Signed-off-by: Fam Zheng <address@hidden>


  Commit: c81585130e7480a8ad9fcdbc3ff712c48260cf43
      
https://github.com/qemu/qemu/commit/c81585130e7480a8ad9fcdbc3ff712c48260cf43
  Author: Fam Zheng <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    M tests/docker/Makefile.include
    M tests/docker/run

  Log Message:
  -----------
  docker: More sensible run script

It is very easy to figure out current directory and bash option from the
execution, so do less in the Makefile invocation command line, and
figure both options in the script.

This makes the next patch easier.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden


  Commit: 1ad76b8af8b7e187cb34a685755ba60ce0ce1c40
      
https://github.com/qemu/qemu/commit/1ad76b8af8b7e187cb34a685755ba60ce0ce1c40
  Author: Fam Zheng <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    M tests/docker/run

  Log Message:
  -----------
  docker: Fix exit code if $CMD failed

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden


  Commit: 4b08af6019ab9c5cb78cb910a42d27a2d441f7fe
      
https://github.com/qemu/qemu/commit/4b08af6019ab9c5cb78cb910a42d27a2d441f7fe
  Author: Fam Zheng <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    M tests/docker/docker.py

  Log Message:
  -----------
  docker: Add "images" subcommand to docker.py

This is a wrapper for the 'docker images' command.

Signed-off-by: Fam Zheng <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden


  Commit: ff31e2256d7c984d3c4aa06f38ecd54c5138549d
      
https://github.com/qemu/qemu/commit/ff31e2256d7c984d3c4aa06f38ecd54c5138549d
  Author: Fam Zheng <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    M tests/docker/Makefile.include

  Log Message:
  -----------
  docker: Don't start a container that doesn't exist

Image building targets are dependencies of test running targets, so when
a docker image doesn't exist, it means it's skipped (due to dependency
checks in pre script). Therefore, skip the test too.

Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden


  Commit: b7c851b2b8fad740c41a827cd6a329990d4c65d9
      
https://github.com/qemu/qemu/commit/b7c851b2b8fad740c41a827cd6a329990d4c65d9
  Author: Alex Bennée <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    M tests/docker/Makefile.include

  Log Message:
  -----------
  docker: pass EXECUTABLE to build script

To build a docker image with which needs qemu linux-user emulation we
need to pass --include-executable to the build script. Using the same
mechanism as for other container controls we enable the option is
EXECUTABLE is set on the make command line e.g:

    make docker-image-debian-bootstrap V=1 J=9 DEB_ARCH=armhf \
  DEB_TYPE=stable EXECUTABLE=./arm-linux-user/qemu-arm

Signed-off-by: Alex Bennée <address@hidden>
Message-id: address@hidden
Signed-off-by: Fam Zheng <address@hidden>


  Commit: 46ca418d9f0de9bfe7180a598d57b5ab543cedf3
      
https://github.com/qemu/qemu/commit/46ca418d9f0de9bfe7180a598d57b5ab543cedf3
  Author: Peter Maydell <address@hidden>
  Date:   2016-07-20 (Wed, 20 Jul 2016)

  Changed paths:
    M tests/docker/Makefile.include
    M tests/docker/docker.py
    A tests/docker/dockerfiles/debian-bootstrap.docker
    A tests/docker/dockerfiles/debian-bootstrap.pre
    M tests/docker/run

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into 
staging

# gpg: Signature made Wed 20 Jul 2016 12:19:56 BST
# gpg:                using RSA key 0xCA35624C6A9171C6
# gpg: Good signature from "Fam Zheng <address@hidden>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 5003 7CB7 9706 0F76 F021  AD56 CA35 624C 6A91 71C6

* remotes/famz/tags/docker-pull-request:
  docker: pass EXECUTABLE to build script
  docker: Don't start a container that doesn't exist
  docker: Add "images" subcommand to docker.py
  docker: Fix exit code if $CMD failed
  docker: More sensible run script
  tests/docker/docker.py: add update operation
  tests/docker/dockerfiles: new debian-bootstrap.docker
  tests/docker/docker.py: check and run .pre script
  tests/docker/docker.py: support --include-executable
  tests/docker/docker.py: docker_dir outside build

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/e0ce97f896ac...46ca418d9f0d

reply via email to

[Prev in Thread] Current Thread [Next in Thread]