From patchwork Tue Jul 3 10:14:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 140944 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp984934ljj; Tue, 3 Jul 2018 03:26:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf5dIxRQ4cze14w1L09CIdJjSZX52wTYK3TGHXzr73gfns+P2GHBD3F+Yd2VazU2Q4eNRJ7 X-Received: by 2002:a37:a4d1:: with SMTP id n200-v6mr25315091qke.348.1530613604405; Tue, 03 Jul 2018 03:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530613604; cv=none; d=google.com; s=arc-20160816; b=cu03EaNYyP+9LS4YAQt3ZwAA6r4k4rh/zE1Spy6E07deX6N7W9V0CWscBsnQqks8jZ u9kdqfx/d3KxKBzBqUnGyMVwr6m0ViR3jRd36XsucvvwpAzNWDCLtctfbIWwplDnsQ+X SHhoR6q5ZpaCQ43eYuMEjNjtJQlp74l8aObbP0zpD82jjz8F0NbLDS7KgixK4VJG7vtm ox/vR8b0CQMiYtKvCbv12QAp08gfewCwkYeaMu1qEeNgU7PLpJFN/qs+xqBnIsMpQM8y 09O1oVIHF2HdLHZ+ERHLRktHB5KHlO7rtGHLOr/0y+UlrMxIHtWYSyyJmdIgWVJBlX0o LXrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=fs4oHxe4Fgnl2/Z3cr5EMe1Y/VBGTOockCco5utisi8=; b=cki8AIXLMlMBCs1OtIKSgEDAk4EvGjcw6OXYMdWIHTQECN8HBrXGyIC0sFb3+mELjR SWhsDygE14ouy1xXh3HQV5iC8iAnEXpHavXDZ4TMEEwsI3M8nPRs6wj5w0LV48xTTTZB lpOPJH4h5RyzqAahxDh4pYjAjjg8k/WyI/iXTLgnTVo4Iph8k0gKGlWj7kxRMta2zqSC k6FpHruxRm971yzuAa+K2uGCE1XHpDdaFDyKk/9GGQY8l+m8R6sHpBqkf9XLBN5nndx9 ssUT1vtTY+RpXg+wmaGToGYtMgF9Z0xIBIUXxSbcPErXbGl6UCyd8BCoB87GkTDbpMoJ ZQmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kf3Ezj1J; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id j125-v6si722245qkf.275.2018.07.03.03.26.44 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 03 Jul 2018 03:26:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kf3Ezj1J; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faIWB-0007XZ-Mp for patch@linaro.org; Tue, 03 Jul 2018 06:26:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faISo-0004Yv-Jj for qemu-devel@nongnu.org; Tue, 03 Jul 2018 06:23:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faISm-0004Xf-83 for qemu-devel@nongnu.org; Tue, 03 Jul 2018 06:23:14 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:51922) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1faISm-0004XL-1c for qemu-devel@nongnu.org; Tue, 03 Jul 2018 06:23:12 -0400 Received: by mail-wm0-x244.google.com with SMTP id s12-v6so1741026wmc.1 for ; Tue, 03 Jul 2018 03:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fs4oHxe4Fgnl2/Z3cr5EMe1Y/VBGTOockCco5utisi8=; b=kf3Ezj1Jm+BrpfUHdwpnoCriEL/C7Dk/DDekS9LJWOSD/KmMSBgUPMIsjDHWA/TYRB 5PhYpMWOmQAI+hzKUkvI/koOzD7WvphOmjnNKV8dOYttCezkuSxpiLN2PhhuPJfRMv+F KAXKrVUl3XgyFE/q6le6gY8WjTf7IZWplsfiM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fs4oHxe4Fgnl2/Z3cr5EMe1Y/VBGTOockCco5utisi8=; b=GphJKnlDrxPNY4D9YVgce2nb7SQUelIOhhKuw/1zeJVVp8z8PwH4yj0AkqCS7+8iSa eeW0OMbMiR97qEhoqCEOin+xNNMW6UVTBswEOplqAsvlRPkvLHJmCnlYw3l0sEi5tXBW iAJw8gUizYznFj8SRhRpfpO8o0qaRvSVOH9mGPav8ybNTWFVMll9ac9okkXVfKRq+IN/ c99x7TbBavZQncyQ9fh97kn0intzM9PbbVKUmaaPllX3EqIhwZ+61ALl+UE3/we6hwUm PHjl+MiKKMFeDiLe7Ct1CEtG52iPblznFYbJvupGWIAplfDHP38xIpntzLJVFACUVpmT 6G/g== X-Gm-Message-State: APt69E3Tt7IYK9zhiY8ceJklR22R0lMvV7oAFtlKwpKwv5RW76hXThhS noEL34Z8ruFEzlpjtzQDBynwFw== X-Received: by 2002:a1c:e5cd:: with SMTP id c196-v6mr10515121wmh.101.1530613391005; Tue, 03 Jul 2018 03:23:11 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u13-v6sm1424630wri.72.2018.07.03.03.23.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Jul 2018 03:23:09 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 0FB2A3E0B55; Tue, 3 Jul 2018 11:14:46 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 3 Jul 2018 11:14:43 +0100 Message-Id: <20180703101444.23778-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180703101444.23778-1-alex.bennee@linaro.org> References: <20180703101444.23778-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PULL 19/20] docker: add special rule for deboostrapped images X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: agraf@suse.de, =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, qemu-devel@nongnu.org, f4bug@amsat.org, cota@braap.org, famz@redhat.com, aurelien@aurel32.net Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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. Missing EXECUTABLE, DEB_ARCH and DEB_TYPE are treated as hard faults now. We also error out if the EXECUTABLE file isn't there. We should really do this with a dependency on any source rules but currently subdir-FOO-linux-user isn't enough on a clean build. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé -- 2.17.1 diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 8641f5da2c..d43af0db32 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,28 @@ 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 $(EXECUTABLE),,\ + $(error EXECUTABLE not set, debootstrap of debian-$* would fail)) + @if ! test -f "$(EXECUTABLE)"; \ + $(error Please build $(EXECUTABLE) first) \ + fi + $(if $(DEB_ARCH),,\ + $(error DEB_ARCH not set, debootstrap of debian-$* would fail)) + $(if $(DEB_TYPE),,\ + $(error DEB_TYPE not set, debootstrap of debian-$* would fail)) + $(call quiet-command, \ + DEB_ARCH=$(DEB_ARCH) \ + DEB_TYPE=$(DEB_TYPE) \ + $(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