From patchwork Fri Jun 8 16:04:30 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: 138059 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1055907lji; Fri, 8 Jun 2018 09:09:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKPCVkHzurHF96qWGM6z2NPsIKO5PJmuClSMfbEURPDqAS4fKAUaE5m/x1Riy/Sr/RuIgCr X-Received: by 2002:aed:254d:: with SMTP id w13-v6mr6452645qtc.163.1528474188763; Fri, 08 Jun 2018 09:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528474188; cv=none; d=google.com; s=arc-20160816; b=oDlWik/tYPsL6Vy69UZtRu9CGgNPRqHLsxD3j63RR1+ZmgyLrgREG9diTxxyVXRvtf 0CT5+m/5DVZghCHpFuRNibagpyu13dIW2jLTqdJqnFd21obAmuMO35hZuonKKkZliPZv 5BIaIMHsL3bXl+x4TFYPIgLZ2FF3f4XDAe/+0gYsDwHEzrZHl2BVis8zLoqG7jzVnd5r cMTfrKBhOmuKErET6Jfi1FMszCCTp0VTh8vdlFyWEzR2vN9LyArswyKdd4R4JRA1fYhI GNdMlyOPYhELIJc1vyZ8KvIqxRRBeRoaaDPiHw0juPCRN5tJJJSASrbslcw83uRAlxqi B1rw== 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=vAhz3Edy7slFZZwtrW7UOVkP4Xafk1grhNhHOs1SCok=; b=QVo7NcVDNXLMOmafolJqAP5lRuaYIwiS/L9NOmzOxPnPZ+oPRp3YAedcoTRcCiG7NR m7/gWAR8H2PHuHEOKF69R+ClpgUZvZo2veNT6AjfLE0+h9nkxJsFM8hVxAiAJKik74bN Ho8leZ6iCfLhSuAv+0596fjmaaeS5JW+3Xpdorr93c1Ls2n5JaL47hDpR10kJnpNTu15 cIpnn1GRu2B7oK2Hp8m+8d5rfBqG0w55QC252A08l3i2m2mFMkIdfOo7qWn1gc0m9m4Y gkLjSmzKS0kf8Xtof8N0Pymx/wlk3uwcHiV2rUKpESiPZWhvyIafNkW1Qx5FSwyTWFyE 70vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PTMW1ZmA; 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 k19-v6si17345495qve.251.2018.06.08.09.09.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 08 Jun 2018 09:09:48 -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=PTMW1ZmA; 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]:36885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRJxU-0004Vx-6Y for patch@linaro.org; Fri, 08 Jun 2018 12:09:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRJsV-0008FO-4I for qemu-devel@nongnu.org; Fri, 08 Jun 2018 12:04:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRJsR-0002sA-4M for qemu-devel@nongnu.org; Fri, 08 Jun 2018 12:04:39 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:46900) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRJsQ-0002rb-TZ for qemu-devel@nongnu.org; Fri, 08 Jun 2018 12:04:35 -0400 Received: by mail-wr0-x242.google.com with SMTP id v13-v6so13912838wrp.13 for ; Fri, 08 Jun 2018 09:04:34 -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=vAhz3Edy7slFZZwtrW7UOVkP4Xafk1grhNhHOs1SCok=; b=PTMW1ZmAtM3ACo9LHmlyg5KYn6kRBuiaNKChmPCENWA7nq+4OKrO6Gw858Si+CuZQ8 yQdZbrp5ecXLEhaJxocpWUvX8dFo3ZBiwEs+yFhrPVqnOr1Ym3TbL91S0P/F6pL6d4Q3 T/YWwe7109ecC6aoH1be8P6tM02o4ikUzQc5Q= 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=vAhz3Edy7slFZZwtrW7UOVkP4Xafk1grhNhHOs1SCok=; b=tYtCXDPBc7P2W2X0KCdnt5hSnHcXUA35Zgnsfnn7h+lUnfrq8vLBtsDfPZJhbciECY lshe0HRJIe+AVEbneSFUiwCf4ZxGxL1Gr6sy/nfiuTnbLwBnrduoigGLkLwHZNh5aP/U Tte11grGD+EbSwv5H/fy+20G4jc2vZPP4Sf1nfGvHyvzTi2kYxGwoaX5/Nq+RU3OxzOg 5Xnm8piHBwlbMfcXjNpCGrQN1AYBqssLju2TkuTnKaB11jWZN4tTPMqsa1pAPYdQxQiU wNzK5iv1Ix2MUDDSSHwY8LGB+Mutxs0eZnKr6zbFkef9mXfwi+tqD02F3KMMGXEyyOhG HcUA== X-Gm-Message-State: APt69E219IaNHbKz6wVXjzvxo/Ienzk8i/WQFDeN2+TlCAASUtskgn8l UIRNKLvI7pPF02rswptSXQve1Q== X-Received: by 2002:adf:91e5:: with SMTP id 92-v6mr5582598wri.124.1528473873803; Fri, 08 Jun 2018 09:04:33 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id r3-v6sm36315530wrj.78.2018.06.08.09.04.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jun 2018 09:04:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id A81F03E01A5; Fri, 8 Jun 2018 17:04:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= 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, pbonzini@redhat.com, stefanha@redhat.com, stefanb@linux.vnet.ibm.com, marcandre.lureau@redhat.com Date: Fri, 8 Jun 2018 17:04:30 +0100 Message-Id: <20180608160432.8734-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180608160432.8734-1-alex.bennee@linaro.org> References: <20180608160432.8734-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:c0c::242 Subject: [Qemu-devel] [RFC PATCH 1/3] docker: docker.py don't conflate checksums for extra_files 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This just gets confusing especially as the helper function doesn't even take into account any extra files (or the executable). Currently the actual check just ignores them and also passes the result through _dockerfile_preprocess so we fix that too. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 37bfa98005..80efa641c5 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -200,8 +200,10 @@ class Docker(object): tmp_df.write("\n") tmp_df.write("LABEL com.qemu.dockerfile-checksum=%s" % - _text_checksum("\n".join([dockerfile] + - extra_files_cksum))) + _text_checksum(_dockerfile_preprocess(dockerfile))) + for f, c in extra_files_cksum: + tmp_df.write("LABEL com.qemu.%s-checksum=%s" % (f, c)) + tmp_df.flush() self._do_check(["build", "-t", tag, "-f", tmp_df.name] + argv + \ @@ -316,7 +318,7 @@ class BuildCommand(SubCommand): _copy_binary_with_libs(args.include_executable, docker_dir) for filename in args.extra_files or []: _copy_with_mkdir(filename, docker_dir) - cksum += [_file_checksum(filename)] + cksum += [(filename, _file_checksum(filename))] argv += ["--build-arg=" + k.lower() + "=" + v for k, v in os.environ.iteritems() From patchwork Fri Jun 8 16:04:31 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: 138060 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1056307lji; Fri, 8 Jun 2018 09:10:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI4m/HH/gIE3Vt/UB6lF4yd9PC+5V0pYbmDuWUx+PlIh0IBXdYcuXwOcB/qlVQcOvqys0Hr X-Received: by 2002:ac8:33f3:: with SMTP id d48-v6mr6397048qtb.317.1528474209750; Fri, 08 Jun 2018 09:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528474209; cv=none; d=google.com; s=arc-20160816; b=BBZ8lYDMxb4OFHvAryH4abwOm8RY/uyyBa2EHpg0E6bPn5sAFQ0ICrFNFNP6AjIhqX rNE4eOs0nDT+1w+ggLvX5Nyaz5JouSeg0vWYjO3q22ZnbMrLZQa/CtBzzWabVol803e5 X0wODruZWeQkMRK9bOFAzsBG7ZskQ/oEPX2nb1ezQ2iDFPOeReCrKH4lZ5se56P6wnRD O6cY7lXwuvcyCoBJ5iy8qPCCWGyzvQN7xlcT0PRGSzFdVoje0AXl56kkF3DlBMIHCfKc XXdf2I/gLngxKgKD6vhy3DZPPCBsNd92+h6rhIHgUj4nIy7BDQ0PGAEJ3R4Cww47oBFg PQZA== 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=cKWMs3nz6qhnG+8dxg8o1VTXwohj1ZlM932WlLkaXRw=; b=fB8QkfO91NNF1TwOKUY2quoBwHpKh9xGNLOxHbMtxgEIcJjkGq0zHgf2m8yva1YeU7 5xQy4wDGpy/bcFP4M+XTuIB8WhOCm6qlqsrWQJUR4WuL8pmFMxDmPpqlla0BOwwKO4FK fOIhNnuTKBPA7OGdeVpXEJTzY28RY5knsVhWKjLlMjtPvZwCx+8Wi62IoRbFFQ9A/oAk 9soWgrQcDEVXGP87bbTy8iW05MoxPYS0Vq6LseXApzx9lX26TvAo9EBQRTKseW2j7pQj NbFagKOl0kBtr7toYIdMnQ76qQSnXQ7dCoVjrT6w8GtjnHdvo+vfqZMJPOZVCpEmvYch oBVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hG9lfuFJ; 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 f56-v6si114880qtk.355.2018.06.08.09.10.09 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 08 Jun 2018 09:10:09 -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=hG9lfuFJ; 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]:36886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRJxp-0004Yv-5H for patch@linaro.org; Fri, 08 Jun 2018 12:10:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRJsV-0008FN-3c for qemu-devel@nongnu.org; Fri, 08 Jun 2018 12:04:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRJsS-0002ui-NQ for qemu-devel@nongnu.org; Fri, 08 Jun 2018 12:04:39 -0400 Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:43056) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRJsS-0002sy-Hu for qemu-devel@nongnu.org; Fri, 08 Jun 2018 12:04:36 -0400 Received: by mail-wr0-x229.google.com with SMTP id d2-v6so13898758wrm.10 for ; Fri, 08 Jun 2018 09:04:36 -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=cKWMs3nz6qhnG+8dxg8o1VTXwohj1ZlM932WlLkaXRw=; b=hG9lfuFJnQUMugMWN2E+3KQn0z+yc6fhPZMlUb+gUtp5dC4ykj0sR9Gx8Yz6odMUbA QLEaprrnx6tsyvTxb2pKJizPOPiXcas+kB9xW3nUtnyTtkUSeD6x3Qphum9XmQHbJQyu qWW+OvljaxIWaLkWQtsLoeZDTSfXXuP08jG+U= 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=cKWMs3nz6qhnG+8dxg8o1VTXwohj1ZlM932WlLkaXRw=; b=tPsNimDpQ8YMeAoh7QOksuBd9lOJ3zMeyD9Ms1SovWlsxXQy5rBI6X9RCLtaz7UEf+ IHFjT3WfRFHviHkGFAposQohIHqtyCPR7k6EB+CeZ0whbX6CHp0s6uj6xs09Yg39Nu8R bc9s3DpZzjQ59//qHe+b4xMnMsXn9PrcN2Hi4znBPSTJEeifDN32cToLZD9ntCaxgX0p QzW9Ldwft+fHbLScnM1Id/nb3ZVk6d6hfYjyt8DIgJLmIruGaZu69bfFfo+I7xHaky4r h+qggtIZKlJYeYbZ7M0iOKaLfO+wprcXZd2W5g7zUnDl8YIZ1pG5dUm+Kuft1z4PqkF9 5p4Q== X-Gm-Message-State: APt69E31KBJGXaDbejeYGw2EW42tIfSEkOcvxkrcjWBLHNppna1lVCkc iJgKK5lPZNb/a0WoTcuPmdO9Pg== X-Received: by 2002:adf:a4cf:: with SMTP id h15-v6mr5769924wrb.130.1528473875439; Fri, 08 Jun 2018 09:04:35 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j21-v6sm1253469wme.36.2018.06.08.09.04.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jun 2018 09:04:33 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id BAD2D3E01CA; Fri, 8 Jun 2018 17:04:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= 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, pbonzini@redhat.com, stefanha@redhat.com, stefanb@linux.vnet.ibm.com, marcandre.lureau@redhat.com Date: Fri, 8 Jun 2018 17:04:31 +0100 Message-Id: <20180608160432.8734-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180608160432.8734-1-alex.bennee@linaro.org> References: <20180608160432.8734-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:c0c::229 Subject: [Qemu-devel] [RFC PATCH 2/3] dcoker: docker.py add check sub-command 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This command allows you to check if we need to re-build a docker image. If the image isn't in the repository or the checksums don't match then we return false and some text (for processing in makefiles). Signed-off-by: Alex Bennée --- tests/docker/docker.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -- 2.17.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 80efa641c5..c2763957c9 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -441,6 +441,28 @@ class CcCommand(SubCommand): return Docker().command("run", cmd, args.quiet) +class CheckCommand(SubCommand): + """Check if we need to re-build a docker image out of a dockerfile. Arguments: """ + name = "check" + def args(self, parser): + parser.add_argument("tag", + help="Image Tag") + parser.add_argument("dockerfile", + help="Dockerfile name") + + def run(self, args, argv): + dockerfile = open(args.dockerfile, "rb").read() + tag = args.tag + + dkr = Docker() + if dkr.image_matches_dockerfile(tag, dockerfile): + if not args.quiet: + print "Image is up to date." + return 0 + else: + print "Image needs updating" + return 1 + def main(): parser = argparse.ArgumentParser(description="A Docker helper", usage="%s ..." % os.path.basename(sys.argv[0])) From patchwork Fri Jun 8 16:04:32 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: 138058 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1053156lji; Fri, 8 Jun 2018 09:07:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKWLAeoDPHrZSeva3qIjwhMXVWKwL/jmF2BhfLlwk1ZcQrANJJKh1EfPbH8F8/ZcxrfWB+x X-Received: by 2002:a37:7101:: with SMTP id m1-v6mr5825324qkc.19.1528474051515; Fri, 08 Jun 2018 09:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528474051; cv=none; d=google.com; s=arc-20160816; b=0zaBPLYqTIw2NdS/u7bUDfvqnRulUOOZQUOSF7o/nG0d2mAhP1sCAH/9MoPiuOumEw exiXlY7GRlr3d1i8kzaXss71i2nFi3itNgMsZZF1w4Oir5uPVubihE54EJghImYZ6rCx afJ0uT94BK42cWZr4qbtB13lbRtiO/bSk7qxZHEOa6+DsBNVtZPLCt1scb5hm3uKDaUV sgPHWRjHUdU1Rx70CMv8Uhj8z/hjzyJicYy6O9gvU0zclHd6qYVFwB8RJL4IIBFgQ5b/ C+uNlO6Bx9hvqU4C9ttxHoTAOeXHnY6O0wsP7g3se+lMbULXi9FYAWefWBWIvKt6T2sH JzYw== 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=fRPnavj8uBJb1s75RyigzMAhfkytlJx9NZR3+CV8US4=; b=vKAyed2Y7dRQS8SdRIkXA4G1Q0q3+fCHXySn1vgjsUHVNSQgfM4LKNywo0hVkSKehG KnW45JBfYyFx+IHiw0tfx1GfHD9cXlBkEdVVJb48HFNMspSfjKZeG91yROoDDK5uCpe4 9vHyotzYxSEst/n5V6JSGLamfGn2fwMd53ovz+sydqPrs3Y4FEPA/ZZsP4WJTKw1LtaL wcKzzIFk7TVNx7eSfFr8jEbpwu4T09470z2NJpYAXb3e9lXTbGu+qstLHTm1pGHyyDzd tLhERVHL1BoZ1r9jJZiXq1ZoMpcUoCjYwdN+d9bQaZspMuS2H0a2v+lUFMQfbGP5zHAt BXUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=L57goN+R; 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 f63-v6si837309qkd.330.2018.06.08.09.07.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 08 Jun 2018 09:07:31 -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=L57goN+R; 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]:36858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRJvG-0002Ps-TQ for patch@linaro.org; Fri, 08 Jun 2018 12:07:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRJsV-0008FL-2p for qemu-devel@nongnu.org; Fri, 08 Jun 2018 12:04:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRJsT-0002va-Qx for qemu-devel@nongnu.org; Fri, 08 Jun 2018 12:04:39 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:38828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRJsT-0002uy-K4 for qemu-devel@nongnu.org; Fri, 08 Jun 2018 12:04:37 -0400 Received: by mail-wr0-x241.google.com with SMTP id e18-v6so5673557wrs.5 for ; Fri, 08 Jun 2018 09:04:37 -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=fRPnavj8uBJb1s75RyigzMAhfkytlJx9NZR3+CV8US4=; b=L57goN+RUZmUC2d6+0kSLjHtqyYyogaZdgy4vbgQ78oNQbcBSpr9IGGZZf3AF5T8Do QFhmlIzx9l/xMBGenF5tdCzIl1pypKTff82Ghq0HVfle/z6DXL1uTXDWBAussw63g+sV 5WlkiasV68LsZOJmZyIgtvfjze6jA7ual9d9Q= 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=fRPnavj8uBJb1s75RyigzMAhfkytlJx9NZR3+CV8US4=; b=b+LfUm+SDK71dlKgaWaV3Si50SKuOSrp1t8A4O8yz/f05xivm+CpdxpfR/e2nagUHG FgXqVkH5cK/0apBS8ciI1MZdr4JxzKP7WrLnvfdl534q0BSMHH3qE6i7SEZe1wLniNfC vzcbrEUvDODUlClyQ6EfoDQhthmqBIreQNYHu9rs2y03+4GFTiC75Y13RGvEbP2hCSUY hYaOOW/dtoEQZbHsPBCqawpYE9AnwsOPXzYOV2hSh6P77Q4ajpe7GdhGNMQXmCXSe7+d ybFtSCdwtLG6NqrENsYFPVCzAoruwpKflEY7zKS6mV2zf4ThM1PKZyJX05SSzi4FgO6M XoNg== X-Gm-Message-State: APt69E0MRySg1yVmt2lr4qU0KHqy7BbzQZN/y7pJ12De30PUEVxlT2MN ZWrdAeYIuxYBj3ZHGHSzs+6zSQ== X-Received: by 2002:adf:deca:: with SMTP id i10-v6mr5748893wrn.37.1528473876303; Fri, 08 Jun 2018 09:04:36 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o13-v6sm1271867wmc.33.2018.06.08.09.04.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jun 2018 09:04:33 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id CE4823E0260; Fri, 8 Jun 2018 17:04:32 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= 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, pbonzini@redhat.com, stefanha@redhat.com, stefanb@linux.vnet.ibm.com, marcandre.lureau@redhat.com Date: Fri, 8 Jun 2018 17:04:32 +0100 Message-Id: <20180608160432.8734-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180608160432.8734-1-alex.bennee@linaro.org> References: <20180608160432.8734-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:c0c::241 Subject: [Qemu-devel] [RFC PATCH 3/3] docker: remove SUBMAKE_NOCACHE_HACK for debian-sid based 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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Now we can conditionally make docker-image-debian-sid a dependency depending on if we actually need to re-build our image we can remove this hack and use that mechanism. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 25 ++++++++++++++----------- tests/tcg/Makefile.include | 1 - 2 files changed, 14 insertions(+), 12 deletions(-) -- 2.17.1 diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 3393e9f97d..2ce72de180 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -66,18 +66,21 @@ docker-image-debian-win64-cross: docker-image-debian8-mxe # its children. However when doing check-tcg we ensure everything is # built at top-level make so we can dispense with NOCACHE here to # avoid excessive re-builds. -ifneq ($(SUBMAKE_NOCACHE_HACK),y) docker-image-debian-sid: NOCACHE=1 -endif - -docker-image-debian-alpha-cross: docker-image-debian-sid -docker-image-debian-hppa-cross: docker-image-debian-sid -docker-image-debian-m68k-cross: docker-image-debian-sid -docker-image-debian-sh4-cross: docker-image-debian-sid -docker-image-debian-sparc64-cross: docker-image-debian-sid -docker-image-debian-mips64-cross: docker-image-debian-sid -docker-image-debian-riscv64-cross: docker-image-debian-sid -docker-image-debian-powerpc-cross: docker-image-debian-sid + +# $1 = dockerfile, $2 = dependancy +cond-dock-dep = $(if \ + $(call $(DOCKER_SCRIPT) check --quiet \ + -t qemu:$1 $(DOCKER_FILES_DIR)/$1.docker),$2) + +docker-image-debian-alpha-cross: $(call cond-dock-dep,debian-alpha-cross,docker-image-debian-sid) +docker-image-debian-hppa-cross: $(call cond-dock-dep,debian-hppa-cross,docker-image-debian-sid) +docker-image-debian-m68k-cross: $(call cond-dock-dep,debian-m68k-cross,docker-image-debian-sid) +docker-image-debian-sh4-cross: $(call cond-dock-dep,debian-sh4-cross,docker-image-debian-sid) +docker-image-debian-sparc64-cross: $(call cond-dock-dep,debian-sparc64-cross,docker-image-debian-sid) +docker-image-debian-mips64-cross: $(call cond-dock-dep,debian-mip64-cross,docker-image-debian-sid) +docker-image-debian-riscv64-cross: $(call cond-dock-dep,debian-riscv64-cross,docker-image-debian-sid) +docker-image-debian-powerpc-cross: $(call cond-dock-dep,debian-powerpc-cross,docker-image-debian-sid) docker-image-travis: NOUSER=1 # Specialist build images, sometimes very limited tools diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include index 951f40c28d..4851df0951 100644 --- a/tests/tcg/Makefile.include +++ b/tests/tcg/Makefile.include @@ -39,7 +39,6 @@ ifeq ($(HAVE_USER_DOCKER)$(GUEST_BUILD),y) ifneq ($(DOCKER_IMAGE),) # We also need the Docker make rules to depend on -SUBMAKE_NOCACHE_HACK=y include $(SRC_PATH)/tests/docker/Makefile.include DOCKER_COMPILE_CMD="$(DOCKER_SCRIPT) cc --user $(shell id -u) \