On Jul 28, 2011, at 8:10 AM, Kumar Gala wrote:

> If a SOCKS5 gateway is needed for a proxy access like git it might also
> require authentication to the proxy via a password and username.  Adding
> SOCKS5_USER & SOCKS5_PASSWD to BB_ENV_EXTRAWHITE allow for automation
> of the authentication request to occur when something like a git fetch
> is going through the proxy.
> 
> Signed-off-by: Kumar Gala <ga...@kernel.crashing.org>
> ---
> * Fixes issue with a git fetch request failing to get pass a firewall
> 
> scripts/oe-buildenv-internal |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal
> index c13fc40..b223292 100755
> --- a/scripts/oe-buildenv-internal
> +++ b/scripts/oe-buildenv-internal
> @@ -55,4 +55,4 @@ unset BITBAKEDIR
> export BUILDDIR
> export PATH
> 
> -export BB_ENV_EXTRAWHITE="MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy 
> https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK 
> BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS PARALLEL_MAKE GIT_PROXY_COMMAND"
> +export BB_ENV_EXTRAWHITE="MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy 
> https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK 
> BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS PARALLEL_MAKE GIT_PROXY_COMMAND 
> SOCKS5_PASSWD SOCSK5_USER"
> -- 
> 1.7.3.4

Richard,

I'm able reproduce this, with out my patch I get prompted for a socks password, 
w/it having SOCKS5_PASSWD set in my environment the git clone is able to 
succeed.

So from our discussion a while back on IRC:

Aug 11 10:54:20 <RP__>  galak: Well, it will but it will only place it in the 
internal data store
Aug 11 10:54:42 <RP__>  galak: there isn't anything to say "also export this 
from the data store into the environment that bitbake uses"

>From the way I read  bitbake/lib/bb/utils.py:

def approved_variables():
    """
    Determine and return the list of whitelisted variables which are approved
    to remain in the environment.
    """
...

[ this will add SOCKS5_PASSWD to the 'approved' list ]

and

def filter_environment(good_vars):

[ will not skip unsetting it from the environment since its in the 'approved' 
list ]

That seems to explain how this ends up working.

So question is what else needs to be done to get this accepted ?

- k
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to