Re: [gentoo-dev] [RFC] git.eclass / subversion.eclass support for http proxy

2009-03-23 Thread Timothy Redaelli
On Monday 23 March 2009 12:45:55 Nirbheek Chauhan wrote:
> On Mon, Mar 23, 2009 at 3:33 PM, Timothy Redaelli  wrote:
> > Hi,
> > Some repositories has the git (or svn) and http support. I saw that we
> > choose the git/svn one (it's faster i know, but it does not works under
> > proxy).
> >
> > I propose a E{GIT,SVN}_REPO_HTTP_URI (or similar) variable that uses the
> > http variant when the global use is set (or we can use the http_proxy env
> > variable).
> >
> > What do you think?
>
> Here's what I did:
>
> Install net-misc/connect
> Save the script below and do `export GIT_PROXY_COMMAND=/path/to/script`
> set http_proxy, and everything works dandy.
>
> Maybe this can be done inside the eclass if http_proxy is set? :)
>
> 
>
> proxy=${http_proxy#http://}
> host=${proxy...@}
> auth=${pro...@*}
> if test "${auth}" != "${proxy}"; then
> export HTTP_PROXY_USER=${auth%%:*}
> export HTTP_PROXY_PASSWORD=${auth##*:}
> fi
> connect -H ${host} $1 $2

Some environments has squid with CONNECT filtered only to a few known ports :(

-- 
Timothy `Drizzt` Redaelli
FreeSBIE Developer, Gentoo Developer, GUFI Staff
There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence.  -- Jeremy S. Anderson



Re: [gentoo-dev] [RFC] git.eclass / subversion.eclass support for http proxy

2009-03-23 Thread Nirbheek Chauhan
On Mon, Mar 23, 2009 at 3:33 PM, Timothy Redaelli  wrote:
> Hi,
> Some repositories has the git (or svn) and http support. I saw that we choose
> the git/svn one (it's faster i know, but it does not works under proxy).
>
> I propose a E{GIT,SVN}_REPO_HTTP_URI (or similar) variable that uses the http
> variant when the global use is set (or we can use the http_proxy env
> variable).
>
> What do you think?

Here's what I did:

Install net-misc/connect
Save the script below and do `export GIT_PROXY_COMMAND=/path/to/script`
set http_proxy, and everything works dandy.

Maybe this can be done inside the eclass if http_proxy is set? :)



proxy=${http_proxy#http://}
host=${proxy...@}
auth=${pro...@*}
if test "${auth}" != "${proxy}"; then
export HTTP_PROXY_USER=${auth%%:*}
export HTTP_PROXY_PASSWORD=${auth##*:}
fi
connect -H ${host} $1 $2




-- 
~Nirbheek Chauhan



Re: [gentoo-dev] [RFC] git.eclass / subversion.eclass support for http proxy

2009-03-23 Thread Sebastian Pipping
Timothy Redaelli wrote:
> Hi,
> Some repositories has the git (or svn) and http support. I saw that we choose 
> the git/svn one (it's faster i know, but it does not works under proxy).
> 
> I propose a E{GIT,SVN}_REPO_HTTP_URI (or similar) variable that uses the http 

Good idea.


> variant when the global use is set

Which one?


> (or we can use the http_proxy env 
> variable).

The use flag approach is
- less flexible and therefore worse for ebuild testing?
- more stable as stuff like "env -i emerge ..." gives
  the same results



Sebastian



[gentoo-dev] [RFC] git.eclass / subversion.eclass support for http proxy

2009-03-23 Thread Timothy Redaelli
Hi,
Some repositories has the git (or svn) and http support. I saw that we choose 
the git/svn one (it's faster i know, but it does not works under proxy).

I propose a E{GIT,SVN}_REPO_HTTP_URI (or similar) variable that uses the http 
variant when the global use is set (or we can use the http_proxy env 
variable).

What do you think?
-- 
Timothy `Drizzt` Redaelli
FreeSBIE Developer, Gentoo Developer, GUFI Staff
There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence.  -- Jeremy S. Anderson


signature.asc
Description: This is a digitally signed message part.