linaro-image-tools & proxy problem

Bug #673570 reported by fgu
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
Medium
Guilherme Salgado

Bug Description

This problem is somehow also related to the bug #670711 (linaro-media-create for headless + hwpack installs packages from net).

When using the linaro-media-create script for ux500 platform, there is some apt-get commands that can't be fullfilled due to the missing http_proxy env variable.
A possible solution proposed by asac was to use a new SUDO="sudo -E" and ${SUDO} variable in the linaro-media-create script + copying the needed apt.conf file and apt.conf.d directory to the chroot environnment.

Example of l-m-c output for ux500 used behind a proxy:

Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.34-1001-ste-ux500 /boot/vmlinuz-2.6.34-1001-ste-ux500
run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.34-1001-ste-ux500 /boot/vmlinuz-2.6.34-1001-ste-ux500
run-parts: executing /etc/kernel/postinst.d/update-notifier 2.6.34-1001-ste-ux500 /boot/vmlinuz-2.6.34-1001-ste-ux500
Setting up devio (1.2-1build1) ...
Setting up flash-kernel (2.28ubuntu10) ...
Setting up linux-firmware (1.38) ...
Setting up linux-image-ste-ux500 (2.6.34.1001.3) ...
Done
Cleaning up ...W: Failed to fetch http://ports.ubuntu.com/dists/maverick/Release.gpg Could not resolve 'ports.ubuntu.com'

W: Failed to fetch http://ports.ubuntu.com/dists/maverick/main/i18n/Translation-en.bz2 Could not resolve 'ports.ubuntu.com'

W: Failed to fetch http://ports.ubuntu.com/dists/maverick/universe/i18n/Translation-en.bz2 Could not resolve 'ports.ubuntu.com'

etc....

Revision history for this message
Guilherme Salgado (salgado) wrote :

I don't see why apt.conf file and apt.conf.d need to be copied to the chroot -- shouldn't it be enough to just use 'sudo -E'?

Revision history for this message
Martin Ohlsson (martin-ohlson) wrote :

It might be that apt.conf and apt.conf.d/ contains configuration for the proxy.

Revision history for this message
Guilherme Salgado (salgado) wrote : Re: [Bug 673570] Re: linaro-image-tools & proxy problem

But apt-get should use the proxy specified in the http_proxy environment
variable, so there's no need to use an apt-specific config for that.

Revision history for this message
Spring Zhang (qzhang) wrote :

Seems apt-get will ignore http_proxy setting and using apt.conf directly, at least on my Ubuntu Lucid 10.04.

Revision history for this message
Guilherme Salgado (salgado) wrote :

If anybody is willing to test a patch please ping me on IRC; I'd like to make sure it works for you guys before committing to trunk.

Changed in linaro-image-tools:
importance: Undecided → Medium
status: New → Triaged
Changed in linaro-image-tools:
assignee: nobody → Guilherme Salgado (salgado)
status: Triaged → In Progress
Changed in linaro-image-tools:
status: In Progress → Fix Committed
Revision history for this message
Loïc Minier (lool) wrote :

it just popped back to my mind that this only allows creation of an image in a proxy-ed environment, but the installed system will lack proxy configuration entirely!

I'm reopening this for discussion; do we want to:
a) do just enough to use the proxy during image creation
b) setup the proxy in the target system
c) add a flag to select between behavior a) and b)

Currently we did a)

Changed in linaro-image-tools:
status: Fix Committed → Confirmed
Revision history for this message
Loïc Minier (lool) wrote :

(We can just close the bug if we decide we want a) alone)

Revision history for this message
Guilherme Salgado (salgado) wrote :

I think it'd be nice to have a way to configure a proxy on the generated
image, but I think it should be something that the user specifies
explicitly (e.g. an extra arg to l-m-c) rather than us automatically
using the proxy that was used in the host system.

Revision history for this message
Loïc Minier (lool) wrote :

Fair enough

Changed in linaro-image-tools:
status: Confirmed → Fix Committed
Loïc Minier (lool)
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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