From: Fam Zheng <famz@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/4] tests/vm: Support proxy / corporate firewall
Date: Mon, 2 Jul 2018 15:12:05 +0800 [thread overview]
Message-ID: <20180702071205.GI26002@lemon.usersys.redhat.com> (raw)
In-Reply-To: <20180628153535.1411-2-f4bug@amsat.org>
On Thu, 06/28 12:35, Philippe Mathieu-Daudé wrote:
> 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é <f4bug@amsat.org>
> ---
> 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 = ["-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 = 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))
Reasonable, but do we want it for other apps and images? How about setting these
env vars to ssh commands?
Fam
> 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
> --
> 2.18.0
>
next prev parent reply other threads:[~2018-07-02 7:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 15:35 [Qemu-devel] [PATCH 0/4] tests/vm: various trivial fixes Philippe Mathieu-Daudé
2018-06-28 15:35 ` [Qemu-devel] [PATCH 1/4] tests/vm: Support proxy / corporate firewall Philippe Mathieu-Daudé
2018-07-02 7:12 ` Fam Zheng [this message]
2018-07-02 15:11 ` Philippe Mathieu-Daudé
2018-07-03 1:47 ` Fam Zheng
2018-06-28 15:35 ` [Qemu-devel] [PATCH 2/4] tests/vm: Add a dependency to qemu-img Philippe Mathieu-Daudé
2018-06-28 15:47 ` Philippe Mathieu-Daudé
2018-07-02 7:18 ` Fam Zheng
2018-07-02 15:19 ` Philippe Mathieu-Daudé
2018-07-03 15:56 ` Philippe Mathieu-Daudé
2018-07-11 2:16 ` Fam Zheng
2018-06-28 15:35 ` [Qemu-devel] [PATCH 3/4] tests/vm: Only use -cpu 'host' if KVM is available Philippe Mathieu-Daudé
2018-06-28 15:35 ` [Qemu-devel] [PATCH 4/4] tests/vm: Add flex and bison to the vm image Philippe Mathieu-Daudé
2018-07-02 7:21 ` [Qemu-devel] [PATCH 0/4] tests/vm: various trivial fixes Fam Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180702071205.GI26002@lemon.usersys.redhat.com \
--to=famz@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=f4bug@amsat.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.