Disable proxy for all preseeded wget
PATCH 1/1 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.
--- Osstest/Debian.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Osstest/Debian.pm +8 -8
@@ -615,8 +615,8 @@ cd \$r umask 022 mkdir .ssh -wget -O .ssh/authorized_keys '$authkeys_url' -wget -O .ssh/known_hosts '$knownhosts_url' +wget -Y off -O .ssh/authorized_keys '$authkeys_url' +wget -Y off -O .ssh/known_hosts '$knownhosts_url' u=osstest h=/home/\$u
@@ -853,7 +853,7 @@ set -ex r=/target -wget -O \$r/tmp/dtbs.tar.gz $durl +wget -Y off -O \$r/tmp/dtbs.tar.gz $durl in-target tar -C /boot -xaf /tmp/dtbs.tar.gz END
@@ -880,8 +880,8 @@ set -ex r=/target -wget -O \$r/tmp/kern.deb $kurl -wget -O \$r/tmp/initramfs-tools.deb $iurl +wget -Y off -O \$r/tmp/kern.deb $kurl +wget -Y off -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
@@ -1010,7 +1010,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= "wget -Y off -O $file '$url' && chmod +x $file && $file"; push @{ $preseed_cmds{$di_key} }, $cmd_cmd; }
@@ -1024,7 +1024,7 @@ sub preseed_hook_installscript ($$$$$) { #!/bin/sh set -ex mkdir -p '$installer_dir' -wget -O '$installer_pathname' '$url' +wget -Y off -O '$installer_pathname' '$url' chmod +x '$installer_pathname' END }
@@ -1044,7 +1044,7 @@ cd \$r umask 022 -wget -O overlay.tar '$url' +wget -Y off -O overlay.tar '$url' cd /target tar xf \$r/overlay.tar cd \$r
Signature · 1 line
2.1.4
Ian Campbell writes ("[PATCH OSSTEST] Disable proxy for all preseeded wget"):
Quoted 8 lines
At least in some contexts scripts can be run with
http_proxypointing 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.
Maybe we could abstract this into $preseed_wget or something ? It could be a fixed global in Osstest/Debian.pm for now.
Ian.