From patchwork Tue Oct 29 15:10:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 839350 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:4593:b0:37d:45d0:187 with SMTP id gb19csp430508wrb; Tue, 29 Oct 2024 08:18:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVDdzXB6gHOgB7EOoGdOF7YnfPq87DSrTLbzK7ni7Rh+zbR3jn3FtsOLYM4twFeELGA0YeNgw==@linaro.org X-Google-Smtp-Source: AGHT+IEiey0T00GLBE/0eheWwdLoEQkW47VBsB38Es+LMjbtzwoP0tbc1mBVZ4waQ3iKFTejoWuK X-Received: by 2002:a05:6102:50a0:b0:4a4:92f7:3611 with SMTP id ada2fe7eead31-4a8f6b2a05amr1775641137.12.1730215133224; Tue, 29 Oct 2024 08:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730215133; cv=none; d=google.com; s=arc-20240605; b=H/As5NjVLP3Am9aLYKxuQFEQMT3oH5+dQzbXiOmVPakhFRe2t4infZoduij49nO8Y+ DUDsslf7Qbj4VltLqNm5t2O6lBTlrDmC8nfZr6p93sqPGC2BGTvuEGEg4mr45jQ1HiXR GN2xJSs7mOvDHp9ea/qHgd6pHYWMNMEPapoLkld5S6FnEzehSZwtjdIpBKH6sUW5NAL0 5tTGpGvVc7aQup2O/DPGTzFzyRrR4UZJ3mXrpp2BTC6t7wS+VV1wXpwYAneX8xE3TtoO ewM6fR4H/Q+om0/n7QUr+ubVPGEdMBk5BFgr+pz/FNPHtTa2JnKtuhdqJoHoT+lM1iG6 TCRQ== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=8e1aymOVILrgw7W2xEL/OiCjMGpomvllpnPzHFIUe8Q=; fh=kzTlPPqfJZgqycTLeZkWcD6RHEpgombyGAkWd5hOF94=; b=jiv/zvsMrjORyZw1/8iy4k1rOxWlMJ2BwjUs2rcwrUrosY3RpPzE6DHMtYWeAhXfCH aUcXx9SSxymdWeXaUu5AIsgVQ9fccoAVekp1IsIYFrOslneDyphB5ZIPBbkP6UODAy7u X/UArvWboyup+GEH7qWPB7Vbam4IKFJSC5bSvbxupMW0xlRyeqhotIrXCnUFEojuqSBw zwGMQGjPLZS814ptDfA6VLUiSLhhbrLPYn0T0uLgy1JwnU9k1wMEKoG8ptWCEds81/JF 399zH1s7lAwWp8I87VvWSBM24KGeaiNDCzt/NsqsuzBa0o5a773TK3p4MvLPY4rXJCHR B2XA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q+uhP822; 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 ada2fe7eead31-4a8c5399a87si2552986137.693.2024.10.29.08.18.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 Oct 2024 08:18:53 -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=Q+uhP822; 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 1t5nuK-0003xl-GE; Tue, 29 Oct 2024 11:13:21 -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 1t5ns8-0000o5-LA for qemu-devel@nongnu.org; Tue, 29 Oct 2024 11:11:07 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5ns2-0007ho-Fb for qemu-devel@nongnu.org; Tue, 29 Oct 2024 11:11:04 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-539f72c8fc1so6906034e87.1 for ; Tue, 29 Oct 2024 08:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730214654; x=1730819454; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=8e1aymOVILrgw7W2xEL/OiCjMGpomvllpnPzHFIUe8Q=; b=Q+uhP822wY6j/2OBE1UFo1lAZMKykhjOlk99R3Qhx5Cp0L6s6e9NHQHQ4YV/r9V+mF 1oMK+swtLxZUfOWzVdERvc8Wp09vchH9dBsXcSmB72gw7EVPvK7gzj/4tzAhR2rwdARd xGysPczgnYoLzYjGjeVCx2mV+h5LJdEA8yJ+RNdlRgmcGQ9VMYti4zQwp9vof6jZX2qj 4lwObM7eQcUPWuR7NlOwsvq6rnbtySLF3oJDHRyyEd1YN7Dy3FDg953hLErwuOSOYCGX hw23IlegJ1blTbOClb48Kcb0LCbuAMSVqV0EdvQeBsTq7aWQoUCurbLKbyUG9hfmjGAS FWeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730214654; x=1730819454; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8e1aymOVILrgw7W2xEL/OiCjMGpomvllpnPzHFIUe8Q=; b=DmQSFpOkF3tDltipc/EtSjP9nQqFbbrNCXzEUMGg3oxUrdMegHDRfCs6Ie0bIBLZhV mLRiZgG1i7YR2edo0cEQiNxCLBh/UsEWcdMlH3mADMLn5E53VxaDR6mXh2ZkokJeT3ID B5P14A5TUMTdwQj6m+6mvmhC+Gps9shpsvxfoHlmVcjQjYTKqj1F0OAeED9Yg6U4xaCC FekcD4DjduAOXsSEzCD/tkwfmE4O5v2aQeVLly48rvk9JQwtZxTikfrb4fxaWid6tDW8 uSUngGyB0H+QFOIKVgaV75/DrBl0gcYIKnjLeMdtda6l7d1VtWZAmuwm5P9PUYqXOZmJ el3w== X-Forwarded-Encrypted: i=1; AJvYcCWZptH/4dR92OxUSpPxh2EX1X+rDZ36je8uJcq6OwJk0z4jsxrw9Ddkb3dVkoWMu/G2FXtQDwAjZIU3@nongnu.org X-Gm-Message-State: AOJu0YyQ6erRQssKJvTHl84NI/vBov2roWIfBLqBGagI4RO537wZBSS4 q3rYppOae+z6L+NqHHFNf1cMUTkwm0KGJ8ZUpJgGpiB0KX+Y4fZsLDgAnC4oq8A= X-Received: by 2002:a05:6512:1392:b0:539:e0ee:4f5f with SMTP id 2adb3069b0e04-53b7ecdeed7mr35054e87.18.1730214654213; Tue, 29 Oct 2024 08:10: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-4319360cc2esm146835865e9.44.2024.10.29.08.10.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 08:10:53 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PULL 08/18] scripts/symlink-install-tree.py: Fix MESONINTROSPECT parsing Date: Tue, 29 Oct 2024 15:10:38 +0000 Message-Id: <20241029151048.1047247-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241029151048.1047247-1-peter.maydell@linaro.org> References: <20241029151048.1047247-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=peter.maydell@linaro.org; helo=mail-lf1-x132.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=unavailable 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 Signed-off-by: Peter Maydell Reviewed-by: Pierrick Bouvier Tested-by: Pierrick Bouvier Message-id: 20241018130852.931509-1-peter.maydell@linaro.org [PMM: Updated commit message to give all the detail about the Meson version compability requirements.] Signed-off-by: Peter Maydell --- 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)