From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZzxw-00035K-Pe for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:38:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZzxr-0005BF-PU for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:38:08 -0400 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:53109) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fZzxr-0005Ad-JQ for qemu-devel@nongnu.org; Mon, 02 Jul 2018 10:38:03 -0400 Received: by mail-wm0-x230.google.com with SMTP id w16-v6so8652847wmc.2 for ; Mon, 02 Jul 2018 07:38:03 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Mon, 2 Jul 2018 15:30:20 +0100 Message-Id: <20180702143021.18864-20-alex.bennee@linaro.org> In-Reply-To: <20180702143021.18864-1-alex.bennee@linaro.org> References: <20180702143021.18864-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v3 19/20] docker: add special rule for deboostrapped images List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: cota@braap.org, famz@redhat.com, berrange@redhat.com, f4bug@amsat.org, richard.henderson@linaro.org, balrogg@gmail.com, aurelien@aurel32.net, agraf@suse.de Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= We might as well have a custom rule for this. For one thing the dependencies are different. As the primary dependency for docker-image-% could never be docker-image-debian-bootstrap we can drop that test in the main rule as well. Signed-off-by: Alex Bennée --- v3: - changed rule to docker-binfmt-image-debian-%: - leave executable in the main rule - rm stray whitespace fix --- tests/docker/Makefile.include | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 8641f5da2c..fdc87b8a57 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -49,9 +49,6 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker "CHECK", "$*") else docker-image-%: $(DOCKER_FILES_DIR)/%.docker - @if test "$@" = docker-image-debian-bootstrap -a -z "$(EXECUTABLE)"; then \ - echo WARNING: EXECUTABLE is not set, debootstrap may fail. 2>&1 ; \ - fi $(call quiet-command,\ $(DOCKER_SCRIPT) build qemu:$* $< \ $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \ @@ -59,6 +56,26 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker $(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\ $(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)),\ "BUILD","$*") + +# Special rule for debootstraped binfmt linux-user images +docker-binfmt-image-debian-%: $(DOCKER_FILES_DIR)/debian-bootstrap.docker + @if test -z "$(EXECUTABLE)"; then \ + echo WARNING: EXECUTABLE is not set, debootstrap may fail. 2>&1 ; \ + fi + @if test -z "$(DEB_ARCH)"; then \ + echo WARNING: DEB_ARCH is not set, debootstrap may fail. 2>&1 ; \ + fi + @if test -z "$(DEB_TYPE)"; then \ + echo WARNING: DEB_TYPE is not set, debootstrap may fail. 2>&1 ; \ + fi + $(call quiet-command, \ + $(DOCKER_SCRIPT) build qemu:debian-$* $< \ + $(if $V,,--quiet) $(if $(NOCACHE),--no-cache) \ + $(if $(NOUSER),,--add-current-user) \ + $(if $(EXTRA_FILES),--extra-files $(EXTRA_FILES))\ + $(if $(EXECUTABLE),--include-executable=$(EXECUTABLE)), \ + "BUILD","binfmt debian-$* (debootstrapped)") + endif # Enforce dependencies for composite images -- 2.17.1