* [PATCH OSSTEST v2] Disable proxy for all preseeded wget
@ 2015-08-13 15:43 Ian Campbell
2015-08-13 18:06 ` Ian Jackson
0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2015-08-13 15:43 UTC (permalink / raw)
To: ian.jackson, xen-devel; +Cc: Ian Campbell
At least in some contexts scripts can be run with http_proxy pointing
to the apt proxy (I noticed it in /usr/lib/base-installer.d/ hook used
for ucode installation).
Since all of these particular fetches are from a known to be local
webserver just disable proxying altogether.
With busybox wget in d-i this is done with the -Y argument.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Define and use $preseed_wget.
---
Osstest/Debian.pm | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index f0bcf06..208f3d9 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -50,6 +50,10 @@ BEGIN {
@EXPORT_OK = qw();
}
+# -Y off disables any proxy, since there is no point going through the
+# proxy when fetching stuff from the local controller or the local cache.
+our $preseed_wget = 'wget -Y off';
+
#---------- manipulation of Debian bootloader setup ----------
sub debian_boot_setup ($$$$$;$) {
@@ -716,8 +720,8 @@ cd \$r
umask 022
mkdir .ssh
-wget -O .ssh/authorized_keys '$authkeys_url'
-wget -O .ssh/known_hosts '$knownhosts_url'
+$preseed_wget -O .ssh/authorized_keys '$authkeys_url'
+$preseed_wget -O .ssh/known_hosts '$knownhosts_url'
u=osstest
h=/home/\$u
@@ -757,10 +761,10 @@ END
set -ex
mkdir -p /target/boot
-wget -Y off -O /target/boot/microcode.cpio $cpio_url
+$preseed_wget -O /target/boot/microcode.cpio $cpio_url
mkdir -p /target/usr/sbin
-wget -Y off -O /target/usr/sbin/osstest-initramfs-gzip $gzip_url
+$preseed_wget -O /target/usr/sbin/osstest-initramfs-gzip $gzip_url
chmod +x /target/usr/sbin/osstest-initramfs-gzip
mkdir -p /target/etc/initramfs-tools/conf.d/
@@ -1004,7 +1008,7 @@ set -ex
r=/target
-wget -O \$r/tmp/dtbs.tar.gz $durl
+$preseed_wget -O \$r/tmp/dtbs.tar.gz $durl
in-target tar -C /boot -xaf /tmp/dtbs.tar.gz
END
@@ -1033,8 +1037,8 @@ set -ex
r=/target
-wget -O \$r/tmp/kern.deb $kurl
-wget -O \$r/tmp/initramfs-tools.deb $iurl
+$preseed_wget -O \$r/tmp/kern.deb $kurl
+$preseed_wget -O \$r/tmp/initramfs-tools.deb $iurl
# This will fail due to dependencies...
in-target dpkg -i /tmp/kern.deb /tmp/initramfs-tools.deb || true
@@ -1202,7 +1206,7 @@ sub preseed_hook_command ($$$$) {
my $ix= $#{ $preseed_cmds{$di_key} } + 1;
my $url= create_webfile($ho, "$di_key-$ix$sfx", $text);
my $file= "/tmp/$di_key-$ix";
- my $cmd_cmd= "wget -O $file '$url' && chmod +x $file && $file";
+ my $cmd_cmd= "$preseed_wget -O $file '$url' && chmod +x $file && $file";
push @{ $preseed_cmds{$di_key} }, $cmd_cmd;
}
@@ -1216,7 +1220,7 @@ sub preseed_hook_installscript ($$$$$) {
#!/bin/sh
set -ex
mkdir -p '$installer_dir'
-wget -O '$installer_pathname' '$url'
+$preseed_wget -O '$installer_pathname' '$url'
chmod +x '$installer_pathname'
END
}
@@ -1236,7 +1240,7 @@ cd \$r
umask 022
-wget -O overlay.tar '$url'
+$preseed_wget -O overlay.tar '$url'
cd /target
tar xf \$r/overlay.tar
cd \$r
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH OSSTEST v2] Disable proxy for all preseeded wget
2015-08-13 15:43 [PATCH OSSTEST v2] Disable proxy for all preseeded wget Ian Campbell
@ 2015-08-13 18:06 ` Ian Jackson
2015-08-21 9:07 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: Ian Jackson @ 2015-08-13 18:06 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel
Ian Campbell writes ("[PATCH OSSTEST v2] Disable proxy for all preseeded wget"):
> At least in some contexts scripts can be run with http_proxy pointing
> to the apt proxy (I noticed it in /usr/lib/base-installer.d/ hook used
> for ucode installation).
>
> Since all of these particular fetches are from a known to be local
> webserver just disable proxying altogether.
>
> With busybox wget in d-i this is done with the -Y argument.
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH OSSTEST v2] Disable proxy for all preseeded wget
2015-08-13 18:06 ` Ian Jackson
@ 2015-08-21 9:07 ` Ian Campbell
0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2015-08-21 9:07 UTC (permalink / raw)
To: Ian Jackson; +Cc: xen-devel
On Thu, 2015-08-13 at 19:06 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST v2] Disable proxy for all
> preseeded wget"):
> > At least in some contexts scripts can be run with http_proxy
> > pointing
> > to the apt proxy (I noticed it in /usr/lib/base-installer.d/ hook
> > used
> > for ucode installation).
> >
> > Since all of these particular fetches are from a known to be local
> > webserver just disable proxying altogether.
> >
> > With busybox wget in d-i this is done with the -Y argument.
>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Thanks, I added this to pretest.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-21 9:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-13 15:43 [PATCH OSSTEST v2] Disable proxy for all preseeded wget Ian Campbell
2015-08-13 18:06 ` Ian Jackson
2015-08-21 9:07 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).