[Bug 568704] Re: debian-installer preseed "d-i mirror/http/proxy" sets env http_proxy

Javier P.L. chilicuil at ubuntu.com
Sat Dec 7 17:07:03 UTC 2013


The issue still exist in Ubuntu 14.04 (currently in development), as a
side effect if a user decides to use:

mirror/http/proxy=http://domain.tld:3142 in the APPEND line in a pxe
environment, eg.

APPEND priority=critical locale=en_US interface=auto
mirror/http/proxy=http://domain.tld:3142  url=http://another-
domain.tld/ubuntu.preseed  initrd=ubuntu/1404/i386/initrd.gz

The installer will fail to request the remote preseed file (as it'll try
to get it through the mirror url). A work around if you still want to
define the mirror in the append line (and not in the remote preseed
file) is to configure it at preseed/run or at preseed/early_command.

http://serverfault.com/questions/528582/debian-ubuntu-set-preseed-
mirror-variable-via-early-run-command

Configuring the mirror at the APPEND line is useful when you want to use
a master preseed file from every machine but want to have control when
to use cache.

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to debian-installer in Ubuntu.
https://bugs.launchpad.net/bugs/568704

Title:
  debian-installer preseed "d-i mirror/http/proxy" sets env http_proxy

Status in “debian-installer” package in Ubuntu:
  Triaged
Status in “debian-installer” package in Debian:
  New

Bug description:
  Binary package hint: debian-installer

  Description:	Ubuntu lucid (development branch)
  Release:	10.04

  In my preseed file I set "d-i mirror/http/proxy string http://apt-
  cacher:3142/", this is an apt-cacher-ng proxy. This works correctly
  for installing the system.

  I expect "d-i mirror/http/proxy" to only apply to the debian installer
  http proxy (apt proxy), and all other http applications, e.g., wget,
  curl, lynx to not use that setting.

  Instead when I run applications from the Kickstart %post section, all
  HTTP connections are proxied; curl, wget, lynx, hg (mercurial),
  everything. Once the system installs and reboots all is good, the only
  remanence of the mirror/http/proxy setting is in /etc/apt/apt.conf,
  which is fine (though I think that should be configurable too).
  mirror/http/proxy is setting the environment variable http_proxy.

  Repo:
  Set "d-i mirror/http/proxy string http://apt-cacher:3142/" in a preseed (use your local mirror).

  Use a Kickstart post section like this:
  %post --interpreter=/bin/bash
  exec < /dev/tty3 > /dev/ttyS0
  chvt 3
  (
  echo "## http_proxy = $http_proxy"
  echo "## lynx dump head"
  lynx -dump -head http://example.com
  echo "## wget"
  wget -O /root/test http://example.com
  ) 2>&1 | /usr/bin/tee /var/log/post_install.log
  chvt 1

  After install check /var/log/post_install.log and it will look like:
  ## http_proxy = http://apt-cacher:3142/
  ## lynx dump head
  HTTP/1.1 403 Forbidden file type or location
  Date: Thu Apr 22 16:29:10 2010
  Server: Debian Apt-Cacher NG/0.4.6
  ## wget
  --2010-04-22 09:29:10--  http://example.com
  Resolving apt-cacher... 10.0.0.10
  Connecting to apt-cacher|10.0.0.10|:3142... connected.
  Proxy request sent, awaiting response... 403 Forbidden file type or location
  2010-04-22 09:29:10 ERROR 403: Forbidden file type or location.

  The workaround for me it to reset $http_proxy at the top of %post:
  export http_proxy=""
  Then all the applications that use http behave normally.

  Suggestion:
  Don't set $http_proxy with "d-i mirror/http/proxy", maybe set $apt_http_proxy if d-i needs an environment variable. For users that need a general proxy a setting like "d-i http/proxy" could be created.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/568704/+subscriptions



More information about the foundations-bugs mailing list