I'm trying to use d-i to netboot a system and run a preseeded install,
with the preseed config being loaded via http. The configuration of
my network is such that I have to use an http proxy to reach Debian
mirrors, so I have a mirror/http/proxy setting; however, that proxy is
configured so that it should only be used to reach URLs outside of my
network -- for locations inside the network, it returns a 502 error.
I am also using a preseed/run setting to ask d-i to fetch a script to
run during installation; however, /lib/preseed/fetch-methods/http
has the code:
# use the proxy for wgets (should speed things up)
if db_get mirror/http/proxy; then
export http_proxy="$RET"
fi
which means that d-i tries to use the proxy to fetch the preseed/run
script as well, which fails (with a http 502 error).
It seems that the mirror/http/proxy setting should really only be used
to get things from mirrors, or at least some way should be provided to
say when to use the proxy and when not to.
This is happening with a daily d-i build from 2007-02-13.
Op 13-02-2007 om 22:27 schreef Roland Dreier: I don't understand the problem. My gut feeling is that the mirror/http/proxy setting is misconfigured, so I suggest to modify the preseed file that it sets. Next I will CC a posting the custom debian mailing where the proxy is also covered. Cheers Geert Stappers
Op 16-02-2007 om 00:43 schreef Vincent Bernat: That line should be "apt-setup-udeb apt-setup/security_host string " So after 'string' a space and then nothing. The space is space is needed to seperate 'string' and nothing. In this example is it more clear what the space does "apt-setup-udeb apt-setup/security_host string madeup.host.name" HtH GSt
Op 18-02-2007 om 17:03 schreef Geert Stappers: I was wrong about it was also about about proxy settings. Meanwhile I do understand the problem. Cheers Geert Stappers
Op 18-02-2007 om 18:02 schreef Geert Stappers: This BR is allready re-assign to preseed.
I'm confused -- what is the current status? Do you understand why mirror/http/proxy should not apply when fetching preseed/include and preseed/run files, or do you need more clarification?
The bug Roland reported is real, and occurs in 2013 with Debian 6 installer. There should indeed be a distinction between an APT proxy and a general-purpose HTTP proxy. Our APT proxy knows how to serve up files related to Debian mirrors, but can't do general-purpose HTTP retrievals such as preseed/run files from our PXE server. Currently mirror/http/proxy affects http_proxy globally, for all subsequent calls to wget. Might be better to not do that; instead, on each APT-related call to wget, if mirror/http/proxy has a value, then temporarily store it in http_proxy, call wget, and then restore http_proxy to its prior value.
This just bit me on Debian 10, although it seems to affect only scripts run via in-target (i.e. `wget ...` works as expected, `in-target wget ...` doesn't). Over the years the relevant lines have been changed slightly and moved to /lib/chroot-setup.sh: https://salsa.debian.org/installer-team/debian-installer-utils/-/blob/master/chroot-setup.sh#L136 RET=$(debconf-get mirror/protocol || true) if [ "$RET" = "http" ]; then RET=$(debconf-get mirror/http/proxy || true) if [ "$RET" ]; then http_proxy="$RET" export http_proxy fi fi As far as I can tell this is unnecessary for "in-target" APT to work, as proxy settings are written to /target/etc/apt/apt.conf already. And as others have pointed out, HTTP requests issued by any other program should not be affected by "mirror/http/proxy".