qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v2 02/21] docker: add --include-file argument to 'build' command
Date: Tue, 9 May 2017 12:01:15 +0800	[thread overview]
Message-ID: <20170509040115.GA18973@lemon.lan> (raw)
In-Reply-To: <20170508221759.15616-3-f4bug@amsat.org>

On Mon, 05/08 19:17, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  tests/docker/Makefile.include | 3 ++-
>  tests/docker/docker.py        | 5 +++++
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 03eda37bf4..c99ce702ea 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -51,7 +51,8 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
>  		$(SRC_PATH)/tests/docker/docker.py build qemu:$* $< \
>  		$(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \
>  		$(if $(NOUSER),,--add-current-user) \
> -		$(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)),\
> +		$(if $(EXECUTABLE),--include-executable=$(EXECUTABLE))\
> +		$(if $(EXTRA_FILE),--include-file=$(EXTRA_FILE)),\
>  		"BUILD","$*")
>  
>  # Enforce dependancies for composite images
> diff --git a/tests/docker/docker.py b/tests/docker/docker.py
> index 6ddc6e4c2a..90520e4bca 100755
> --- a/tests/docker/docker.py
> +++ b/tests/docker/docker.py
> @@ -237,6 +237,9 @@ class BuildCommand(SubCommand):
>                              help="""Specify a binary that will be copied to the
>                              container together with all its dependent
>                              libraries""")
> +        parser.add_argument("--include-file", "-f",
> +                            help="""Specify a file that will be copied to the
> +                            container""")

Is it more useful if it's '--include-files' that accepts multiple files? Or
alternatively allow this option to be use multiple times:

    -f foo -f bar -f ...

Similarly, should EXTRA_FILE be EXTRA_FILES or something?

We are already lacking this with --include-executable's documentation, but
please also document "where" is it copied to in the container's filesystem.

Fam

>          parser.add_argument("--add-current-user", "-u", dest="user",
>                              action="store_true",
>                              help="Add the current user to image's passwd")
> @@ -274,6 +277,8 @@ class BuildCommand(SubCommand):
>              if args.include_executable:
>                  _copy_binary_with_libs(args.include_executable,
>                                         docker_dir)
> +            if args.include_file:
> +                _copy_with_mkdir(args.include_file, docker_dir)
>  
>              argv += ["--build-arg=" + k.lower() + "=" + v
>                          for k, v in os.environ.iteritems()
> -- 
> 2.11.0
> 

  reply	other threads:[~2017-05-09  4:01 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 22:17 [Qemu-devel] [PATCH v2 00/21] docker/shippable: cross-build mipsel and powerpc targets Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 01/21] docker: let _copy_with_mkdir() sub_path argument be optional Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 02/21] docker: add --include-file argument to 'build' command Philippe Mathieu-Daudé
2017-05-09  4:01   ` Fam Zheng [this message]
2017-05-09 12:14     ` Philippe Mathieu-Daudé
2017-05-09 12:31       ` Fam Zheng
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 03/21] docker: add 'apt-fake' script which generate fake debian packages Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 04/21] docker: install ca-certificates package in base image Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 05/21] docker: compact debian base Philippe Mathieu-Daudé
2017-05-09  4:04   ` Fam Zheng
2017-05-09  7:46     ` Alex Bennée
2017-05-09  8:05       ` Fam Zheng
2017-05-09 12:06         ` Philippe Mathieu-Daudé
2017-05-09 12:18           ` Fam Zheng
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 06/21] docker: compact debian armhf Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 07/21] docker: compact debian arm64 Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 08/21] docker: add extra libs to armhf target to extend codebase coverage Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 09/21] docker: add extra libs to arm64 " Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 10/21] docker: add extra libs to s390x " Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 11/21] docker: add mipsel build target Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 12/21] docker: add powerpc " Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 13/21] shippable: use C locale to simplify console output Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 14/21] shippable: build using all available cpus Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 15/21] shippable: do not initialize submodules automatically Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 16/21] shippable: be verbose while building docker images Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 17/21] shippable: add armeb-linux-user target Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 18/21] shippable: add powerpc target Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 19/21] shippable: add mipsel target Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 20/21] MAINTAINERS: add Shippable automation platform URL Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 21/21] MAINTAINERS: self-appoint me as reviewer in build/test automation Philippe Mathieu-Daudé
2017-05-17 14:28 ` [Qemu-devel] [PATCH v2 00/21] docker/shippable: cross-build mipsel and powerpc targets Alex Bennée
2017-05-20 23:57   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170509040115.GA18973@lemon.lan \
    --to=famz@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).