From nobody Tue Nov 4 15:31:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530200428709859.8054829848525; Thu, 28 Jun 2018 08:40:28 -0700 (PDT) Received: from localhost ([::1]:37184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYZ23-0005Lj-US for importer@patchew.org; Thu, 28 Jun 2018 11:40:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYYxg-0002BX-Hu for qemu-devel@nongnu.org; Thu, 28 Jun 2018 11:35:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYYxf-0000tt-JB for qemu-devel@nongnu.org; Thu, 28 Jun 2018 11:35:56 -0400 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]:42117) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fYYxf-0000so-Ea for qemu-devel@nongnu.org; Thu, 28 Jun 2018 11:35:55 -0400 Received: by mail-qk0-x243.google.com with SMTP id u62-v6so3204480qkf.9 for ; Thu, 28 Jun 2018 08:35:55 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id f36-v6sm4746179qtb.36.2018.06.28.08.35.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 08:35:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fEZAKYQ64u0zd2w5Rm+ecKRCcn6bPgBHIJmlVNE+6Qo=; b=aMGimyoUG8PERUR0BhfkR1qTdVxFfIaB1AFQ53wMhpSRdTcB1N9JtD2+WtntJASlY4 jK6QWcWZJToQ5LstfCrWmxSvTxnEfcknrrWKLh7ltEdsCODxH6/4WOmQW94R5gv7iVyg VLZ9+h0zz/24qWjHs9LQYaOXsBprr6IyvdLnl0KaWslXpKku8wO9OFS8cSdGlMK01G0h mO9I2csjWnckk7izy2tzKZPyLgwtkpqZ2+S2iiIYTUkb+qgTDJ4SQzKg/hFXqmGJDe/i Sx9nE4B4FepBLqO/cOIxR4qWpJqZ4Ft2d+XdZUbGeUsbDqJShcuzW6ZYy70tfVxRgHOP ybDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fEZAKYQ64u0zd2w5Rm+ecKRCcn6bPgBHIJmlVNE+6Qo=; b=ehKqwi3P/T9lxLoY/j3QXaVhIgzMYPpKgbH/TyC0FOD4/2hX0XGVLD0ma0HCck9+Oc Yq9OBe+A9zwgjlh9ZEiwfWbHetkythtER21Q7HPGEvaUtr+UKaOiN/hpEEHz/l8DOzvv 2xYZ39lIUTH8eGM1EjdqDyhxYHnsiJMW5vtQ8IsOOn4JY/qcPuQEgd1VsgIRU6Z2Ib1D Qi0p00UjlzJWdU3uw8O2Jq6Grh239PUSpZf+r4LNIP+wTTIszIrr2LNHwFqdng7BkXqT DKrMXeLjddSOvjF6qZLyPWOQ0aXlcAXYn5vl4UVjwU34nMA6ouJ2GPhYVVBeoNILGdFB WkmA== X-Gm-Message-State: APt69E1AnS5GB4GE+VnRS+VMISN7ZzFjCatC0qsHYdDK4N+spWrmT5tm +pQrBJIAbda07L7nWFGSPaU= X-Google-Smtp-Source: AAOMgpfV0SHB5Yzfde/IXp8q9HX1TMpNXbScjvzbE3p95CBkanvxYLoEhoelBMPEyUpYoXcURIwx2Q== X-Received: by 2002:a37:6688:: with SMTP id a130-v6mr9493145qkc.20.1530200154905; Thu, 28 Jun 2018 08:35:54 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fam Zheng Date: Thu, 28 Jun 2018 12:35:32 -0300 Message-Id: <20180628153535.1411-2-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180628153535.1411-1-f4bug@amsat.org> References: <20180628153535.1411-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::243 Subject: [Qemu-devel] [PATCH 1/4] tests/vm: Support proxy / corporate firewall 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 If ftp_proxy/http_proxy/https_proxy standard environment variables are available, pass them to the vm images. As per 06cc3551714: This is required when building behind corporate proxy/firewall, but also help when using local cache server (ie: apt/yum). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/vm/ubuntu.i386 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index fc319e0e6e..be16ceed50 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -68,6 +68,10 @@ class UbuntuX86VM(basevm.BaseVM): self.boot(img_tmp, extra_args =3D ["-cdrom", self._gen_cloud_init_= iso()]) self.wait_ssh() self.ssh_root_check("touch /etc/cloud/cloud-init.disabled") + for k, v in os.environ.iteritems(): + kl =3D k.lower() + if kl in ['ftp_proxy', 'http_proxy', 'https_proxy']: + self.ssh_root_check("echo 'Acquire::{}::Proxy \"{}\";' >> = /etc/apt/apt.conf.d/01proxy".format(kl[:-6].upper(), v)) self.ssh_root_check("apt-get update") self.ssh_root_check("apt-get install -y cloud-initramfs-growroot") # Don't check the status in case the guest hang up too quickly --=20 2.18.0