Bug 2042 - GIT proxy configuration broken
Summary: GIT proxy configuration broken
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Undecided normal
Target Milestone: ---
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-02-29 01:00 UTC by Inaky Perez-Gonzalez
Modified: 2012-03-01 16:36 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Inaky Perez-Gonzalez 2012-02-29 01:00:40 UTC
SOCKS proxy specification with git was using conflicting methods and
thus was failing when mixed SOCKS needs were in place (requiring no
proxy for some hosts and proxy for the rest)L

- GIT_PROXY_COMMAND is an environment variable GIT uses to OVERRIDE
  all proxy configuration in ~/.gitconfig or any other gitconfig. By
  using it to configure, it was breaking havoc on site git
  configuration or the one generated by bitbake in tmp/.

  Renamed to OE_GIT_PROXY_COMMAND in
  bitbake/lib/bb/fetch*/__init__.py, meta-yocto/conf/site.conf.sample
  (with a doc tidbit on the name chosen), meta/classes/base.bbclass.

- The gitconfig generated by bitbake was wrong. There was a typo error
  (gitproxy vs gitProxy), thus all lines were being ignored. Fixed in
  meta/classes/base.bbclass.

- The gitconfig generated was being placed in
  ${STAGING_DIR_NATIVE}/usr/etc/gitconfig; git was looking for it in
  ${STAGING_DIR_NATIVE}/etc/gitconfig. Fixed that in
  meta/classes/base.bbclass, at the same time creating a
  GIT_CONFIG_PATH variable, since it is also referenced in
  generate_git_config() and have all instances refer to that.


Fix at

http://otcgit.jf.intel.com/?p=inaky/ccd-yocto.git;a=patch;h=2905fdeb4ed38499b172ea3ec68eaca2a1fb049c
Comment 1 Richard Purdie 2012-02-29 10:43:09 UTC
I think the trouble there is we did two different things with the same variable name unintentionally. I suspect your patch is fine without the changes in bitbake's exportvars list.

If GIT_PROXY_COMMAND is set, we likely do really want to override all of gits proxy settings. I think the OE_GIT_PROXY_COMMAND makes sense where we want to use the command in our own .gitconfig. 

Could you test if this all works without the changes to the two bitbake files? If so I'll take that patch...
Comment 2 Inaky Perez-Gonzalez 2012-02-29 18:31:41 UTC
Just to confirm, the bitbake files are the bitbake/lib/fetch*/__init__.py files, correct?
Comment 3 Richard Purdie 2012-02-29 18:37:39 UTC
Correct, yes.