From patchwork Mon Apr 19 14:54:12 2021 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: 1467955 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZH4KduCB; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FP8xt5lcLz9tkF for ; Tue, 20 Apr 2021 00:55:30 +1000 (AEST) Received: from localhost ([::1]:49118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYVJA-00031e-Rv for incoming@patchwork.ozlabs.org; Mon, 19 Apr 2021 10:55:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYVIQ-0002zp-MI for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:42 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:55041) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYVIP-0006sr-5Y for qemu-devel@nongnu.org; Mon, 19 Apr 2021 10:54:42 -0400 Received: by mail-wm1-x32e.google.com with SMTP id k128so18366916wmk.4 for ; Mon, 19 Apr 2021 07:54:40 -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=3jUznPzvzYHkJS30t4l+mHbEcaUIGUHIWC+isF9wstk=; b=ZH4KduCBUrOjWxEcg37NF6qIRyjPN05++M+GQYpBlk3zCOpuP7o735wj8C9DrLDGkr bKg7MunXx9aLcXVil2GlagEgprlgV7Z2NNFgpC1aXQZOdz9VtAbsl8KK+uKQFehRNC87 RYdYrnZeKEBqTZWUaAjA8Hk3d705xAcQNdWRbUQwilNxrJs5PYhGpMuQ105+ImOBFWEU hacwtUTTrqDVvRn7gMycLTlx8T2vGT5gYE6DjjkjgoC5WjCzU+HF8dsK1+lUwpcwTgXI errfsvdQBLILd4VsECq9t8lA2teBdprmRtcXPxcY8mJRiX9jevRNPEWuwQKEdwOgSemg +tdA== 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=3jUznPzvzYHkJS30t4l+mHbEcaUIGUHIWC+isF9wstk=; b=lQ9ei85Z314ftqlpxW1lkbAkhGnclP/tzeAGxd/Dhqa0eQrV/3oAP8LS4ECkqyIyYR k5HS5pEF8f9WfcHblygMVwyEy6OXGYdKDOz/NZ4bSyfhuRM8SQRcEEi9IXp5lM5g6PEy qb46lycd3eogJW0h4nvxqJ1c1cmWefSy72Rcae4iFDqHK2ZuDVzLEbEayr0AxTMPPyau MjYRYsuc0VVJZ51mngRmSG4BpCnIcoxkA2+cMb8PVLTUZ1JbKLQPSi6TrV8vtOf577R5 ukipzd4q13bnj3UON50OB5kNsxh9+Eq3hOfZYIq/9hAPL83XRXIb+1+ZDbBVVvH9nFtP Nkog== X-Gm-Message-State: AOAM533mkZmoT1OQ2O8/uDnNSRaQFuLbYWnWOKAvtOziGlTw+fqjR3x1 oEc0Mz9bSm33gZ/fTDT66VSmPQ== X-Google-Smtp-Source: ABdhPJyWiS/BpXIG8FnLbsAACFbP0o4/rRZWui65sHPVRjeyGKQB+5cj+Z9hn4Pk4ZVyZNOJtzJLLA== X-Received: by 2002:a1c:2857:: with SMTP id o84mr21899136wmo.181.1618844079827; Mon, 19 Apr 2021 07:54:39 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c77sm19939554wme.37.2021.04.19.07.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 07:54:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C41E21FF8C; Mon, 19 Apr 2021 15:54:35 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 02/25] tests/docker: fix copying of executable in "update" Date: Mon, 19 Apr 2021 15:54:12 +0100 Message-Id: <20210419145435.14083-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210419145435.14083-1-alex.bennee@linaro.org> References: <20210419145435.14083-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, Thomas Huth , berrange@redhat.com, f4bug@amsat.org, Wainer dos Santos Moschetta , Willian Rampazzo , stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , aurelien@aurel32.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We have the same symlink chasing problem when doing an "update" operation. Fix that. Based-on: 5e33f7fead ("tests/docker: better handle symlinked libs") Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo --- tests/docker/docker.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index d28df4c140..0435a55d10 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -548,7 +548,14 @@ def run(self, args, argv): libs = _get_so_libs(args.executable) if libs: for l in libs: - tmp_tar.add(os.path.realpath(l), arcname=l) + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass # Create a Docker buildfile df = StringIO()