[Gutsy] Proxy not working with ltsp-build-client

Bug #132397 reported by Stéphane Graber
4
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Fix Released
Undecided
Scott Balneaves

Bug Description

When building a new chroot with Gutsy's ltsp-build-client, fakeroot correctly uses the host /etc/apt/apt.conf to get the proxy settings.
But when doing the "apt-get update" inside the chroot, it doesn't work as the apt.conf file hasn't been copied during the chroot creation.

A simple fix would be to add : "cp /etc/apt/apt.conf $ROOT/etc/apt/apt.conf" before doing the apt-get update (one of the 020 scripts IIRC)

The above makes the creation of a LTSP chroot impossible on a network using PROXY without direct internet access (most school networks)

Revision history for this message
Scott Balneaves (sbalneav) wrote :

I'm wondering if this should be a default action, or if we should have a switch to enable this.

Scott

Changed in ltsp:
assignee: nobody → sbalneav
status: New → Confirmed
Revision history for this message
Oliver Grawert (ogra) wrote :

vagrant will want a switch :)

from my POV it could be a default.

Revision history for this message
Szilard Novaki (novaki) wrote :

Solution using gutsy's proxy-guess:

Add the following lines to section after-install into /usr/share/ltsp/plugins/ltsp-build-client/Debian/020-apt-get-update:

if [ -f /etc/apt/apt.conf.d/proxy-guess ] ; then
  cp /etc/apt/apt.conf.d/proxy-guess $ROOT/etc/apt/apt.conf.d/proxy-guess
fi

Revision history for this message
steckelfisch (braas-steckelfisch) wrote :

In addition to the above item, I changed two things:

My change in 020-apt-get-update was:
        if [ -f /etc/apt/apt.conf.d/proxy-guess ] ; then
          cp /etc/apt/apt.conf $ROOT/etc/apt/apt.conf
          cp /etc/apt/apt.conf.d/proxy-guess $ROOT/etc/apt/apt.conf.d/proxy-guess
        fi

and the environment aviable http_proxy proxy had to be set:
        export http_proxy=http://172.20.1.10/

Revision history for this message
steckelfisch (braas-steckelfisch) wrote :

and third:

 in /usr/share/ltsp/plugins/ltsp-build-client/Ubuntu/000-basic-configuration
 I had to change human-cursors-theme into human-theme

Revision history for this message
Oliver Grawert (ogra) wrote :

neither human-themes nor human-cursor-themes should be in there ...
whats the version of ltsp-server you have installed (seems your plugin set is very outdated)

Revision history for this message
Vagrant Cascadian (vagrantc) wrote :

i think it would be risky to copy all apt configuration files into the chroot environment. some programs drop files into /etc/apt/apt.conf.d that may behave undesireably if not installed in the chroot.

there are so many possible settings in /etc/apt/apt.conf and /etc/apt/apt.conf.d/* ... there's a moderate possibility you might pull something undesired into the chroot environment.

for grabbing the proxy setting, we could do something like:

  http_proxy=$(apt-config dump | egrep Acquire::http::Proxy | sed -e 's,^Acquire::http::Proxy ",,g' | tr '";' ' ')

and if http_proxy is set, dump it into the chroot's /etc/apt/apt.conf.d/proxy-guess-ltsp near the end of the install.

something like that, more or less...

live well,
  vagrant

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ltsp - 5.0.40~bzr20080212-0ubuntu1

---------------
ltsp (5.0.40~bzr20080212-0ubuntu1) hardy; urgency=low

  * new upstream version with fixes for the following bugs:
   LP: #149006 (default to 24bit colordepth)
   LP: #190419 (move .nbi image out of the way before regeneration)
   LP: #113709 (security server sources.list entry handling)
   LP: #135419 (chroot upgrade issues)
   LP: #177926 (documentation fix)
   LP: #184316 (client locale handling (default to en_GB if none is set)
   LP: #189237 (fix path handling, remove trailing slashes from arguments)
   LP: #132397 (handle proxies with apt)
   LP: #148109 (only use getltscfg if lts.conf is valid)
   LP: #172459 (only use free nbd devices to do network swapping)
  * install our own dhcpd.conf
  * add rdesktop to ltsp-client deps (LP: #153589)
  * fix xorg deps of ltsp-client (LP: #158735)
  * add plugin for mythbuntu kiosk setup (LP: #188413), thanks to Michael Haas

 -- Oliver Grawert <email address hidden> Mon, 12 Feb 2008 17:48:48 +0100

Changed in ltsp:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.