From patchwork Thu Jul 5 16:03:28 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: 141204 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2143396ljj; Thu, 5 Jul 2018 09:30:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcHKKqKoSOrlAd6Vo2LyDhn2WFc/QsynUkSEu2AqjRaYq55YYFxpatJbfr1XXSE50YqzfYW X-Received: by 2002:a37:ab17:: with SMTP id u23-v6mr5637926qke.279.1530808214928; Thu, 05 Jul 2018 09:30:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530808214; cv=none; d=google.com; s=arc-20160816; b=PN3y0IGY5yYqdCF1byw6rUFue8iX1RwL3dRHZCIpQtU1osfFI4JF4lOBGxWkjMgW9O xfYT72tPtSIWJu+vKGCv/csO6FZsal1Nrynnyz4mTFi0VFVxtTTcM4ajd02YZ5PRLv5T lz2/N2uV7g8tROvBCdbkHYe7P7qd+zOD8+yIvIq4vtrFmmUkjSS8v0WLMQEGyJq51TZO NnaqfZ1XolSGAe5M8KUIeDAEMWvg5HNpwM6WZ8nWZm7f0jcrUWDQ4lr7qX57JdQLL5aS V0SmlUF4UO2ICam/vk4A16CUzOD8TLzZebTfSCCrqGo+e6FZl5YyLew9v8se+6tNL1u+ 0nGQ== 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=oyi/ETls3YXDgNCBiRaFk5rzM/fCkqBAQGsq7+N20gQ=; b=ShPw8F36nLfxoUF68KMfnYiJk7Tq7FiUJdW0pI8s97IzE9zrjklbOkNQzITBVkhluf d+NcaLK1z/ZlwuySZK4DEuHllpiO5b5T8jU6QcvEcxPKGCiLPm5Lzftf+Jl9T5hO0NPF kNn4tESKNhuiy1v8aAbI67eJXJJwtX5lk55oRsWTAF3DSLs2PDGE6IBjnf4PiOH1910M v7KrPknHzXJ182SlcqZFjjAvFK0OxRWedrJXkt5WxXFYdFoD73seiDS+IsWGaq7WRWyr BRo+3djbldoah0HFQeloq66KV4Q7U0aGV6RN0Qx6K8LYqI5Zg9zFGstAm08OWFDJKGXF JiSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="PL0BW/aY"; 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 o62-v6si1253983qkc.112.2018.07.05.09.30.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 05 Jul 2018 09:30:14 -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="PL0BW/aY"; 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]:53700 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb794-0004eY-EC for patch@linaro.org; Thu, 05 Jul 2018 12:30:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb6jS-0008S3-LC for qemu-devel@nongnu.org; Thu, 05 Jul 2018 12:03:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb6jR-00084n-LQ for qemu-devel@nongnu.org; Thu, 05 Jul 2018 12:03:46 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33624) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fb6jR-00084G-Eo for qemu-devel@nongnu.org; Thu, 05 Jul 2018 12:03:45 -0400 Received: by mail-wm0-x241.google.com with SMTP id z6-v6so3199379wma.0 for ; Thu, 05 Jul 2018 09:03:45 -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=oyi/ETls3YXDgNCBiRaFk5rzM/fCkqBAQGsq7+N20gQ=; b=PL0BW/aY6Owx56dTIKGh3/oNHRPMmyYD31/dQhENyuH5D3YwXy1AQWvY6jrU7JbTAB uYisA5QXv55JC6MliSzDJXXuFNYyBnQh2QxAB3nuhiL9D8ctcix9mjlRVlnZ2hDxEVvr /KVGeuoezMomHG1NMytFBFcUg98hQujPwB4pY= 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=oyi/ETls3YXDgNCBiRaFk5rzM/fCkqBAQGsq7+N20gQ=; b=NadI3wlE5kkKTyI8kVhBn0S+ApdfBark4KvmQeu6QefE5IKGhBsaV4fpOYNa16n0o8 j3E6I3oOCUjarug1lwuE+JI1zMsrdQsVTbShu6hcjoLNqexGIf+Cvzd2+3WGZUyO1c2Z 6FDzp1NPYIRxAITPY0hLoMV0tVCdFphrChC/63gfqmIcNf5HfHB7ragWwkCqQZ2m+F25 N7n4Xrc/bWx2lUqv5T53klCAwRpSkKE9BzywVYhSnLNsG4JOjj/MD/6ZQ+WsKPRUQJ/o vw/sKJPop28WBHI6ILDlSGb63S+d5kmN4poCAsYlTEDzrgxfs6Y5NWpp5OCaQS7S8CK3 qDLw== X-Gm-Message-State: APt69E1ATwg18iyTtpY8LyvSrP/KXdu0Bpz0dLB5IIdje0yxmaoQkH32 /hUSPSDtWq8Gu57YTMpvTg3rFg== X-Received: by 2002:a1c:7c13:: with SMTP id x19-v6mr4807847wmc.27.1530806624400; Thu, 05 Jul 2018 09:03:44 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h12-v6sm2529090wmb.3.2018.07.05.09.03.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jul 2018 09:03:38 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id CDE5D3E0D43; Thu, 5 Jul 2018 17:03:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Thu, 5 Jul 2018 17:03:28 +0100 Message-Id: <20180705160329.30386-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180705160329.30386-1-alex.bennee@linaro.org> References: <20180705160329.30386-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::241 Subject: [Qemu-devel] [PULL v3 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: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= 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 942d05649f..7b99df5464 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -46,9 +46,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) \ @@ -56,6 +53,27 @@ 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 $(wildcard $(EXECUTABLE)),,\ + $(error Please build $(EXECUTABLE) first)) + $(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