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()