[Bug 568704] Re: debian-installer preseed "d-i mirror/http/proxy" sets env http_proxy
ladiko
568704 at bugs.launchpad.net
Thu May 18 12:51:56 UTC 2017
It's offtopic but might help some people having issues with preseed:
I went over to use mksquashfs to get an image of one machine which is up
to date and mount it on another system and use rsync to update the other
machine to the exact same state. I use rsync --exclude /etc/hostname
--exclude /etc/hosts --exclude /mount and more exclusions and get the
same system with specific files unchanged. on new systems I use a
minimal linux from minimal.linux-bg.org on a memory drive and partion
the hard disk, rsync the files to the disk and chroot update-grub etc.
5 minutes installation / update and no need to preseed or download
everthing on each system.
--
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