From patchwork Mon Oct 9 16:40:45 2023 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: 731008 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1311513wrw; Mon, 9 Oct 2023 09:44:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEMYDNZgXp8o46HpbOQCULkGBC03jg4PiOHZnx/QU7/xdcN/KaN/6GUblkwwdKPk4hzUyNf X-Received: by 2002:a05:620a:2ac4:b0:774:16fc:65d8 with SMTP id bn4-20020a05620a2ac400b0077416fc65d8mr15880476qkb.32.1696869860364; Mon, 09 Oct 2023 09:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696869860; cv=none; d=google.com; s=arc-20160816; b=Ld8Vdni5lwDuDbfVrri0JXh+pEvAacdKgNHDR7xXjQqrQpTciRwc0c1kMBvz7AqJdV c0nxJ0BkqEE/aoNRBRT9XeQWZR4Dr+v4PbdhkhqKDBgG/AEQ61kYIVyGpJWWGHncfXd8 uYECVKCujbsuK4zETEX9kbUyt3Jj3IbjTpx9AW/ok2xk8QahEDDrpLpPsbMYEADSIKw4 4AsABx7YrmRqq5w2ykf3Q0zW0DelbUYxSe5l8kTtesK3kKa4Aona4IIgi66YLqHgBBWJ YMFyfoNpuGWt9HjgLgmEwbofHwC3E8hY6G1jSF4MIPMaAl8iWCQesOgeUh8h5opvcTFS ojdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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:cc:to :from:dkim-signature; bh=ZDyM/F5z2PX4t5z6swT9o+aFYE3lKyvYgeKJZjudJGU=; fh=hH+hY2AOPCtQWK44NzX0H5SWS0EYJFmL3o+I0zvKKVU=; b=FQQtLcvOL5Uhh+pkZeUVdpNZi7r3Cx1hBT5YuUpndbldrOegti5iYyWUpAjzNAt4/F Ynj8u+h1/WRZeRfUaJnWtHCkzNjw9jGaoxh+lszisssYiZGGBTwfayRVxBDp7pizUx4k n4Qox7ye2BDGcf4YikYi7wcYgcmI97rXpymfUAyG1WYdRL4rXFVHRMZmzJq3JLocYoBO 4UNBTRRVPqV41WP42XwdTRxzUN78235P3wDnwOL2DPfvHwYwPc9uC7JUu2G4llb3VbGL AsdlOZAFxCpjvOMMSqcGO5YHBqTheF0/zKg5DTd4eVtbM5LGmfeBVUreWqW0Tt53eidS jSrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KVQF/6OJ"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id az7-20020a05620a170700b0076dbb17e788si6477668qkb.721.2023.10.09.09.44.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2023 09:44:20 -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="KVQF/6OJ"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qptM7-0001W2-2p; Mon, 09 Oct 2023 12:43:43 -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 1qptK4-0005OQ-2D for qemu-devel@nongnu.org; Mon, 09 Oct 2023 12:41:37 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qptJf-0001WN-5y for qemu-devel@nongnu.org; Mon, 09 Oct 2023 12:41:30 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-32487efc319so4553146f8f.1 for ; Mon, 09 Oct 2023 09:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696869670; x=1697474470; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZDyM/F5z2PX4t5z6swT9o+aFYE3lKyvYgeKJZjudJGU=; b=KVQF/6OJtZAecL7Rj9FJcNABY7chR/mxJjK+dGdtIo0/03mTQADhHPyjiJGYdhXJgg pX+r2v2Z8GYmszKqIi44bOHSFBSjCFPe8yEk+v+gS3SRujX4TpQEnTIU6mnfJpaHicw9 U5f/ObeP+5fylPdSLGNVoHstdQNuvTdgaqw9qFm4Az7zyUgeD4Cf8Rkvi85Lg3oB/2it OEvBn/AzWmNCflgMe8bGLPxptazUF3oL8J09RZB0laaTFFkJoRajPanRSqBLembdEooJ WOdLm5wSTbxNqmctCr7AA4Y9rbOUn1nXEsJvd+3OmSnG7GPIE2xWG9BGC+VBsstTbwfn a88g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869670; x=1697474470; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZDyM/F5z2PX4t5z6swT9o+aFYE3lKyvYgeKJZjudJGU=; b=Z6O+A14KFp07G1CRRABWBOI7SFw7WKEmsuvg6LYsORFc0jrcJPGNA+OFYHUEW8Spo3 yI0bc0aPFSJd+EPxqPgfmOrqNEsvZXF5j1t9Mmhc0MwST09Yi3QagiFIV4y+WL8YSU0a EMNjASzeQd5jd2wlc2+oEINHeHb9iIYPKsinoW+CObSbt9zIKY0iFv+DgOHejsD9p9lj 1x86TO8FttOHK1pMQ4TFyd7f5ftVYJdxkij+ME9UuwLuLmovwebr7ix0H9miE2Cd+wTR Kp2OPk32HewUeFnxXHvdXmcJUtmyaMv3v3ipKuo9lu7ZmAKwNV0LWc59hOD8b41cFt5h oFeA== X-Gm-Message-State: AOJu0YwuzmQDd40v5Kb61niXhqysgA9jS7efKGWP4xzdmPvkGroMtK08 5YyKgQerlDcAfs9MvV3se1TNoQ== X-Received: by 2002:adf:f845:0:b0:31f:e74d:c82a with SMTP id d5-20020adff845000000b0031fe74dc82amr13985515wrq.31.1696869669785; Mon, 09 Oct 2023 09:41:09 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id t11-20020a5d534b000000b003232380ffd5sm10071994wrv.106.2023.10.09.09.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:41:07 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D6C7A1FFC1; Mon, 9 Oct 2023 17:41:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Xiaojuan Yang , =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Bastian Koppelmann , Brad Smith , Radoslaw Biernacki , David Hildenbrand , Cleber Rosa , Ilya Leoshkevich , qemu-riscv@nongnu.org, Daniel Henrique Barboza , Alexandre Iooss , Nicholas Piggin , Bin Meng , Leif Lindholm , Paolo Bonzini , Eduardo Habkost , Alistair Francis , qemu-ppc@nongnu.org, John Snow , Liu Zhiwei , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Palmer Dabbelt , Peter Maydell , Yanan Wang , Weiwei Li , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Marcel Apfelbaum , Beraldo Leal , Yoshinori Sato , Mahmoud Mandour , Richard Henderson , Song Gao , Marcin Juszkiewicz , qemu-s390x@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 06/25] configure: allow user to override docker engine Date: Mon, 9 Oct 2023 17:40:45 +0100 Message-Id: <20231009164104.369749-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231009164104.369749-1-alex.bennee@linaro.org> References: <20231009164104.369749-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.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 If you have both engines installed but one is broken you are stuck with the automagic. Allow the user to override the engine for this case. Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis --- configure | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 707132a3ae..ebad155d9e 100755 --- a/configure +++ b/configure @@ -180,6 +180,7 @@ fi # some defaults, based on the host environment # default parameters +container_engine="auto" cpu="" cross_compile="no" cross_prefix="" @@ -787,6 +788,8 @@ for opt do ;; --disable-containers) use_containers="no" ;; + --container-engine=*) container_engine="$optarg" + ;; --gdb=*) gdb_bin="$optarg" ;; # everything else has the same name in configure and meson @@ -921,6 +924,7 @@ Advanced options (experts only): --enable-plugins enable plugins via shared library loading --disable-containers don't use containers for cross-building + --container-engine=TYPE which container engine to use [$container_engine] --gdb=GDB-path gdb to use for gdbstub tests [$gdb_bin] EOF meson_options_help @@ -1195,14 +1199,14 @@ fi container="no" runc="" if test $use_containers = "yes" && (has "docker" || has "podman"); then - case $($python "$source_path"/tests/docker/docker.py probe) in + case $($python "$source_path"/tests/docker/docker.py --engine "$container_engine" probe) in *docker) container=docker ;; podman) container=podman ;; no) container=no ;; esac if test "$container" != "no"; then docker_py="$python $source_path/tests/docker/docker.py --engine $container" - runc=$($python "$source_path"/tests/docker/docker.py probe) + runc=$container fi fi