From patchwork Tue Jun 19 15:44: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: 139175 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5380177lji; Tue, 19 Jun 2018 08:58:58 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLatZs3lZb6gDJ+8+Sd+734jNhGTue8YCt+373kauUkLYf4J2U7CMTSdwfG6zEIW5pnHQ20 X-Received: by 2002:a0c:fa02:: with SMTP id q2-v6mr14892856qvn.180.1529423938547; Tue, 19 Jun 2018 08:58:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529423938; cv=none; d=google.com; s=arc-20160816; b=D+Wo/6jav6bVTd4j0K7B0ozyKIxSdC6vjU+GVTP6CiMaP84mT0FlX0fWjyQstRj0pE CFxfQ6d4a7Pt7snEPam2bAtpPyy+g1iCvqKb4Dq7F5+/VUSh7PzSfCBIXAYJ11FQxUGk XehUb5PGBmwJP43Jedu6hR0/ldcsgBgfMoEYhJNpepfIRqFNuMzc3unsVQh/MpKPHva5 /FTRNRacP+SF93YwIKfl/iTdRmcUN/1unmK8GXaz3N4tHSibFTwJacBfX3NXmT3l/xeH D0Y91W51PlJcGP7kCcmeDVHGNVkVggFpkKGlI9rRjSMhKbJeOacz6L59uV9dT2iYMwbo QGkQ== 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=p/TLenLr5ng/OG2TI1YEW8pX1dn0HpWL/zzqhS4I8zY=; b=o8ahyR6SR7+ErYT5gWBJvMRb2nG5igZaFvvCN8D/7DgPmNMxalrTExH5D+UX1AibW4 BvkAaEUM0p4f/omfwZLuqP6sWEwjUf9ecN57nXwe09KoR94GW1SM9AQy1Kf9dY7wxyhy 8qJxYkMAn1OAGywh3jynYlvzOQDG9rKbTcLgI6Ir63kavxjEYp4kyi6ZK/1mbV4RoOzn r8i2bZzcXpKlq2F3nNeelYKh1t0ZIv/4LwMQYszs6kW4+tHQAKzEzROVSdbLxt2XUatC ZbzIUjBNSe3wYiA/Y+2ZvtwSOeCsna4LPb4RtiZ3KB+5ttUG6T3yfyjJxMErh1oK+xvv rBNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MF0pIfZ3; 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 z10-v6si56203qkf.2.2018.06.19.08.58.58 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 19 Jun 2018 08:58:58 -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=MF0pIfZ3; 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]:43407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVJ22-0001UC-0l for patch@linaro.org; Tue, 19 Jun 2018 11:58:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVIvD-00042l-7t for qemu-devel@nongnu.org; Tue, 19 Jun 2018 11:52:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVIvA-0001gb-HO for qemu-devel@nongnu.org; Tue, 19 Jun 2018 11:51:55 -0400 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]:32832) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVIv6-0001cr-LJ for qemu-devel@nongnu.org; Tue, 19 Jun 2018 11:51:52 -0400 Received: by mail-wr0-x244.google.com with SMTP id k16-v6so193613wro.0 for ; Tue, 19 Jun 2018 08:51:48 -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=p/TLenLr5ng/OG2TI1YEW8pX1dn0HpWL/zzqhS4I8zY=; b=MF0pIfZ3OQXexTRhQmBO/nUMOMEYLz6lV6mDLtrY5aFtSmAYO9Nf5N8LfLZxUVB1li iCe1g4H4OMh+EYJ41p8tlEa3/171ZNIZaJMyZDxHeJIjMLGQ+W4HRpDlqbI8zvQ/Sy4R 5tVPXYqWQ8CLuQxuY4cTCet4FnZXwYFDOlnY8= 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=p/TLenLr5ng/OG2TI1YEW8pX1dn0HpWL/zzqhS4I8zY=; b=Q4Ui9kFSaEXRo7GBdN+Yk+TF2BWKU4aPo5PsuFHilCz3+9ohY8xUViV/Y1+LFmOZCw xpjxy7WtFC6MEdttVpm3XVT8hwR3/op7VF2gs1IRYuwr9Lss2xoIvC2tQIlflpbOom+4 DViuZlq34I14k3EP/GNiydGYiFE7d25Gh/PeqZlVK0vkDGKSB+tYak+uAqPFJqTfzv4i JsDkeJmGN7s0ub7Q21D7EGAiF8IXvC3dwYa3mauhloDU1pCYmoqym6l+iFWN5YOApZHG HvkDToUicvJNxSmuopjo3vDHJxqJVd1UL0TINgFn1HbyzIWd7CTX2/3lfUHwsmXxCU5/ ec6A== X-Gm-Message-State: APt69E2M7misQdUWcRFAqfZmuqRyi0fzqZwoPsszuQ65REEL0L7zSil9 oLIczPUhJCoPqHcD1tBOcF4CuQ== X-Received: by 2002:adf:8bdb:: with SMTP id w27-v6mr14837424wra.169.1529423507473; Tue, 19 Jun 2018 08:51:47 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c18-v6sm31425wrq.17.2018.06.19.08.51.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Jun 2018 08:51:45 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 0862F3E106A; Tue, 19 Jun 2018 16:44:40 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Date: Tue, 19 Jun 2018 16:44:30 +0100 Message-Id: <20180619154435.18898-52-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180619154435.18898-1-alex.bennee@linaro.org> References: <20180619154435.18898-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::244 Subject: [Qemu-devel] [PULL 51/56] 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: 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" 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 Reviewed-by: Philippe Mathieu-Daudé -- 2.17.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index e6685f6d81..0a0155c941 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -203,8 +203,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 + \ @@ -319,7 +321,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()