From patchwork Fri Oct 18 13:08:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 836704 Delivered-To: patch@linaro.org Received: by 2002:a5d:50c9:0:b0:37d:45d0:187 with SMTP id f9csp809519wrt; Fri, 18 Oct 2024 06:09:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVeew3T/2oj8YZeT6Wao/F08y+LD+LATGDGuLHX+8uWAGVo3Wy6vAMkhoTSdzkDPRtzRWyVZg==@linaro.org X-Google-Smtp-Source: AGHT+IGEZZrLKQxKyry4wY2f/8uRlvSD0tZnuptULpwuInDjdTG/vUpQEVp1cXOPz/CiFbfGkFz4 X-Received: by 2002:a05:6808:1b07:b0:3e5:e530:c416 with SMTP id 5614622812f47-3e602da0679mr2012306b6e.38.1729256975869; Fri, 18 Oct 2024 06:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1729256975; cv=none; d=google.com; s=arc-20240605; b=ChHrgTfhhcTt57Ntk8N1Utj47EvijwePHvfy0PsQOJG7UeFq54aV98G9+tyoUkLWoo kyPRnLLUh/LUuH3tF6zhoCu80OJ3EmogXuwjHC9dzsMKAUxkabQh1/5ANgWNBFlXUfmh i5ixJjwf7EDu9d+JEy0nlqWjx/rr4SoVucUJ3jLBQsvvE0hoaHik1sxLxT7OwYZVh6JE urW2hP5g74MjTTg5U5eh1Vb5mTVbiF1wcDBc9lDohisHtP//jJfPbqCtIAN0Df0TOs+v Ec2ltpZZgWo/U7W3PI8Yxk2DK+DwwTdnuJNhZMBXiHNFtTKspU6HuzZL4ovmdrviPNBZ Y3Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=UGR7iSHGk8lfXN3BI6BgTa5CAUmbS2zygpRbJKf8t5w=; fh=NGxEWT37Fa8NKrfZSO11Hcdu4/uy8aifzUux12YU1F8=; b=WoMUii3KM1ew6AXhocnZT4KO8OKFbQ2Dr4ggPo+2X6+jorGQTIJLQIuAd48qukXMsf qN6AM1NzJfeZ/R+tZnqNyVHq0A05pRLS79YeCzN/E9yoo06fKL+E6nnCriHvcLBkxhaU 3Qias8vLYf+IRbitwuD6SS8feKG2VM4UPcbX6i+UpOJPy7VkZrXSw6At5wd6m/AO4nEA kWPLasqMQBz5nRHvSIa6jPZai/VF9PENGQ7vfx1iSiDde5vdrrqAMlmzx5is9H1jaipk ZdvvMQb3SiNQg03RGjKsjzwtr73R/QA0wEuzc0+aqr41Epie9xLVjVt05xOQsXhHwLph WIBg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kKHnGHIX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a1e0cc1a2514c-851e58806aasi221298241.98.2024.10.18.06.09.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Oct 2024 06:09:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kKHnGHIX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1miy-0005Rc-21; Fri, 18 Oct 2024 09:09:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1miw-0005RP-J8 for qemu-devel@nongnu.org; Fri, 18 Oct 2024 09:08:58 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1miu-00046C-Ld for qemu-devel@nongnu.org; Fri, 18 Oct 2024 09:08:58 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43055b43604so22059405e9.3 for ; Fri, 18 Oct 2024 06:08:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729256934; x=1729861734; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UGR7iSHGk8lfXN3BI6BgTa5CAUmbS2zygpRbJKf8t5w=; b=kKHnGHIXXolvu+BprCJoStvyumqyX30npudFEIGeQK4Vx6MaCa0VfXWplxTepo55Xv 5BAFnqi1ThFa+6xCwojJBGNs4oTcOpaFF13Sc2OnvpEYPYHIG9WLmtKXoHW9/CS2y0sJ gxgFs/QAc9VFgSKRuAJHMHovrB/8pZBqbS6JvGuXC/u1jpFQKmJstFlWtjnLgKkCBJMJ I6zVP81Fs6hfY6lVglU1iFIVEP3p4HsxmIHcOtEN5oZ8IgXk1oXrie/+6HrhK2gtJFOe NFzpXI40Q/hXC8OKFZ64NLkJAKgPHRYDRHbTZg5XKjiwCetLuJY2SwdxWRCXZhc4ITI+ BU6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729256934; x=1729861734; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UGR7iSHGk8lfXN3BI6BgTa5CAUmbS2zygpRbJKf8t5w=; b=pkpmhbt5WNKlAKvQWRBM84CTzJSAcr4/yQq1muxYuyXEjOERvhCk/EpwHbpbaDnqKp Vhqm9nNUJTho9LSCSabflxHbFDMED6hgC7VuJdJMVypJkMlS0Pj00KkTimxaB8mg/dLl 8O53Yhg9wGNBdWgdaela5w38FstsfuCQLfxLIF3wdzgF1ik5eUTiwdqsMj1WvthVXZss Z5ScIxvZFZOenW7ndnM2LVM3lmhRKnUMG7udw8WPNt3gasyCPJLFsScfikOIm7NiMpEQ XoAmcsO9gl2w8z7L/I7qO10YUjAuGhuf32GXg6Oo+qCTxe8bfYfsPjiYsP0K/+Cy4XbE vMWw== X-Gm-Message-State: AOJu0YxBJSE0tlbyJw+Kwt6yFnqlLFs+p+/HO+7NqrFqmTjTcX1LnIGm y3D2hoWtvsSAJw8l/y2nBepV6v1B6Qf/eaPKKNLlIIgS0xub7F/kK0h6L8cVk0bhu8hnO1FmzkH v X-Received: by 2002:a05:600c:3112:b0:426:602d:a246 with SMTP id 5b1f17b1804b1-43161691af1mr18517555e9.32.1729256934386; Fri, 18 Oct 2024 06:08:54 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4316068ca06sm26979065e9.19.2024.10.18.06.08.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 06:08:53 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Christophe Lyon Subject: [PATCH v4] scripts/symlink-install-tree.py: Fix MESONINTROSPECT parsing Date: Fri, 18 Oct 2024 14:08:52 +0100 Message-Id: <20241018130852.931509-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Akihiko Odaki The arguments in MESONINTROSPECT are quoted with shlex.quote() so it must be parsed with shlex.split(). Otherwise the script will fail if the build directory has a character like "~" in it. Note: this fix cannot be backported directly to any stable branch that doesn't require Meson version 1.4.0 or better; otherwise it will work OK on Linux but will break on Windows hosts. (Unfortunately, Meson prior to version 1.4.0 was inconsistent between host OSes about how it quoted arguments, and used a different quoting process on Windows hosts. Our current git trunk already requires 1.5.0 as of commit 07f0d32641e ("Require meson version 1.5.0"), but the stable branches are still on older Meson.) Fixes: cf60ccc330 ("cutils: Introduce bundle mechanism") Reported-by: Michael Tokarev Signed-off-by: Akihiko Odaki [PMM: Updated commit message to give all the detail about the Meson version compability requirements.] Signed-off-by: Peter Maydell Reviewed-by: Pierrick Bouvier Tested-by: Pierrick Bouvier --- This is essentially back to version 1 of Akihiko's patch, now we have a new enough Meson; I just updated the commit message. https://patchew.org/QEMU/20230812061540.5398-1-akihiko.odaki@daynix.com/ (I have dropped the various reviewed-by and tested-by headers because I figured the passage of time was enough to make them moot.) scripts/symlink-install-tree.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/symlink-install-tree.py b/scripts/symlink-install-tree.py index 8ed97e3c943..b72563895c5 100644 --- a/scripts/symlink-install-tree.py +++ b/scripts/symlink-install-tree.py @@ -4,6 +4,7 @@ import errno import json import os +import shlex import subprocess import sys @@ -14,7 +15,7 @@ def destdir_join(d1: str, d2: str) -> str: return str(PurePath(d1, *PurePath(d2).parts[1:])) introspect = os.environ.get('MESONINTROSPECT') -out = subprocess.run([*introspect.split(' '), '--installed'], +out = subprocess.run([*shlex.split(introspect), '--installed'], stdout=subprocess.PIPE, check=True).stdout for source, dest in json.loads(out).items(): bundle_dest = destdir_join('qemu-bundle', dest)