Bug 11783

Summary: Should be able to define Target Proxy settings and have them appear in images
Product: [Build System, Metadata & Runtime] OE-Core Reporter: brian avery <brian.avery>
Component: configurationAssignee: Unassigned <unassigned>
Status: RESOLVED OBSOLETE QA Contact:
Severity: enhancement    
Priority: Medium+ CC: bruce.ashfield, joshuagloe, randy.macleod, richard.purdie, ross.burton, stephano
Version: 2.4   
Target Milestone: 5.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description brian avery 2017-07-12 18:12:32 UTC
First, to be clear, this has NOTHING to do with build time proxies. This is about having a proxy available on the image for the case where the target board or qemu is deployed behind a proxy.


1) The proxy settings for the build system must remain independent of the target proxies as we can not assume that the build and deployment environments will match.

2) We need a standard way to define them.  Here's my strawman which will/should be shot down by a better suggestion:
TARGET_PROXIES=”http_proxy=http://my.proxy.com:1234 \
http_proxy=http://my.proxy.com:1234 \
https_proxy=https://my.proxy.com:1235 \
ftp_proxy=ftp://my.proxy.com:1238 \
no_proxy=http://mycompinside.com”

PROXY_LIST_ADDCAPS=”True”

to auto add the upcased versions. 

3) The proxy settings should go into /etc/environment and would probably be defined in local.conf.

4) Certain software packages (docker for sure) need to set up special (non system) ways to deal with proxies. I'm fairly certain npm and maven also fall into this group and there could easily be others that do as well.  These recipes could check for these target proxy settings to do their "special" thing.
Comment 1 brian avery 2017-07-12 18:14:11 UTC
Adding Ross as likely to have a better strawman candidate,Bruce for docker tie in, joshua for interest/suggestions.
Comment 2 brian avery 2017-07-12 18:31:10 UTC
dnf is another example of a sw package that needs custom proxy configuration.
Comment 3 Bruce Ashfield 2017-07-13 15:14:54 UTC
Indeed, this is something that would be needed by multiple applications (docker included).

The first question that pops to mind for me, is: is there really a generic way to handle this ? i.e. isn't it fundamentally something that is both application and image specific ?

i.e. you define something as you describe below in some sort of global namespace and it is up to recipes that need proxy settings to see those values, and then interpret them to what their particular needs are ? some sort of distro setting that recipes can use to trigger the writing of their proxy config.
Comment 4 brian avery 2017-07-16 19:20:13 UTC
as far as i know, there's no generic way, but i like the idea of a distro setting as trigger, so the recipes know whether to write out the proxy files or not;  and the ability to define the various (http/ftp/socks/...) proxies in my local.conf file.
Comment 5 Ross Burton 2017-07-16 23:08:49 UTC
Long term I still believe that David Woodhouse's proposal for Fedora makes sense universally, but with s/networkmanager/connman/ for us.  That is luckily an implementation detail and already implemented in connman, the non-trivial bit is making the world use libproxy.
Comment 6 Richard Purdie 2017-11-08 17:35:33 UTC
Propose a staged approach. This bug targets adding a mechanism, the environment as a bare minimum. Individual issues with apps are then handled on a case by case, patch by patch basis beyond this bug.
Comment 7 Robin Jordan 2018-02-26 20:46:06 UTC
Please provide an update for this.  Will it make it into 2.5 M3?
Comment 8 Randy MacLeod 2023-10-24 14:24:36 UTC
Bulk move from 4.99 or 0.00 to 5.99
Comment 9 Randy MacLeod 2026-08-06 15:27:27 UTC
Scope too large.