You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Hudson <gh...@MIT.EDU> on 2002/12/05 13:32:11 UTC

ra_svn tunnel configuration

Okay, so the previous conversation decided that the client will use
configuration information to decide when to use a tunnel agent for an
svn:// URL.  It remains to be decided how this fits into the
configuration structure.

Right now there is a file ~/.subversion/servers (renamed from
~/.subversion/proxies?) which contains information about HTTP proxies.
There appears to be a dedicated svn_subr API for reading this file,
which seems to be a layering violation.  I can:

  * Worm my way into this file, rendering it overloaded and no longer
    specific to HTTP.  Inside a proxy group (which we'd now call a
    server group), host/port/username/password/timeout would specify
    HTTP proxies, while tunnel-agent would specify svn tunnel agents.

  * Create a new file, ~/.subversion/tunnel-agents (or whatever), with
    a similar structure to ~/.subversion/server.

  * Create a new section [tunnel-agents] (or whatever) in
    ~/.subversion/config.  It might look like:

    [tunnel-agents]
    agent1 = *.collab.net : ssh %h svnserve -r /usr/local/repos
    agent2 = myhost.mit.edu : ssh -l fred %h svnserve

    where the variable names have no meaning except when it comes to
    overriding between the system and user config files.

    (Is it best to have the hostname and "svnserve" explicit in the
    agent specification like this?  Or should the agent string just
    look like "ssh", with the hostname and "svnserve" appended
    automatically?  I'm not sure.)

    (Hm.  I was going to pass the command through /bin/sh when I was
    done creating it, but that's not very Windows-friendly.  I can't
    use system() because I need the input and output pipes.
    Suggestions?)

None of these options give me a warm feeling inside.  Which do people
find least offensive?  Or are there better options?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_svn tunnel configuration

Posted by Branko Čibej <br...@xbc.nu>.
Karl Fogel wrote:

>Greg Hudson <gh...@MIT.EDU> writes:
>  
>
>>Okay.  But I feel like the information currently there isn't tagged very
>>well.  There's nothing in "servers -> <groupname> -> host" to suggest
>>"the proxy host for HTTP connections", and similarly for
>>port/username/password/timeout.
>>    
>>
>
>Yeah, the variable names in that file made a lot more sense when the
>file was named `proxies'.  Now that the filename is more generic, the
>variable names need to get more specific.
>
>If you want to come up with a better scheme, while you're in there,
>I'm practically ready to +1 it in advance :-).  And if we're going to
>change it, let's do it now, before we have billions of users.
>  
>
I totally agree. And greg, if you happen to change underscores to dashes
while you're there -- go ahead! The less often I have to hold the shift
key, the happier I'll be. :-)

(Not to mention that dashes are aesthetically more pleasing in a
lowercasse-letter context.)

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_svn tunnel configuration

Posted by Nuutti Kotivuori <na...@iki.fi>.
Greg Hudson wrote:
> (I really think dashes would be more user-friendly than underscores
> in config variable names, but that gets into the realm of gratuitous
> tampering.)

Ooo, dashes!

/me makes puppy-dog eyes at Greg (and everybody else involved).

-- Naked

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_svn tunnel configuration

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> Okay... I'd like to:
> 
>   * Rename the existing variables:
> 
>     host -> http_proxy_host
>     port -> http_proxy_port
>     username -> http_proxy_username
>     password -> http_proxy_password
>     timeout -> http_timeout
>     no_proxy -> no_http_proxy
> 
>     (I really think dashes would be more user-friendly than underscores
>     in config variable names, but that gets into the realm of gratuitous
>     tampering.)

+1

Your call on the dashes.  I agree with Brane that it's fine to change
them, but we should be consistent across all the config files.

>   * Move most of the code for dealing with server groups out of
>     libsvn_ra_dav/session.c into libsvn_subr:
> 
>     /* Enumerate the group MASTER_GROUP in CFG.  Each variable value is
>        interpreted as a list of glob patterns (separated by comma and
>        optional whitespace).  Return the name of the first variable whose
>        value matches KEY, or NULL if no variable matches.
> 
>        If EXCEPTION_GROUP and EXCEPTION_VAR are set, always return NULL
>        if KEY matches the value of the specified variable. */
>     const char *svn_config_find_group (svn_config_t *cfg,
>                                        const char *master_group,
>                                        const char *key,
>                                        const char *exception_group,
>                                        const char *exception_var,
>                                        apr_pool_t *pool);

Makes sense now, yup.  Maybe would have made sense before, too, I'm
not saying :-).

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_svn tunnel configuration

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2002-12-05 at 12:09, Karl Fogel wrote:
> Yeah, the variable names in that file made a lot more sense when the
> file was named `proxies'.  Now that the filename is more generic, the
> variable names need to get more specific.
> 
> If you want to come up with a better scheme, while you're in there,
> I'm practically ready to +1 it in advance :-).  And if we're going to
> change it, let's do it now, before we have billions of users.

Okay... I'd like to:

  * Rename the existing variables:

    host -> http_proxy_host
    port -> http_proxy_port
    username -> http_proxy_username
    password -> http_proxy_password
    timeout -> http_timeout
    no_proxy -> no_http_proxy

    (I really think dashes would be more user-friendly than underscores
    in config variable names, but that gets into the realm of gratuitous
    tampering.)

  * Move most of the code for dealing with server groups out of
    libsvn_ra_dav/session.c into libsvn_subr:

    /* Enumerate the group MASTER_GROUP in CFG.  Each variable value is
       interpreted as a list of glob patterns (separated by comma and
       optional whitespace).  Return the name of the first variable whose
       value matches KEY, or NULL if no variable matches.

       If EXCEPTION_GROUP and EXCEPTION_VAR are set, always return NULL
       if KEY matches the value of the specified variable. */
    const char *svn_config_find_group (svn_config_t *cfg,
                                       const char *master_group,
                                       const char *key,
                                       const char *exception_group,
                                       const char *exception_var,
                                       apr_pool_t *pool);


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_svn tunnel configuration

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> Okay.  But I feel like the information currently there isn't tagged very
> well.  There's nothing in "servers -> <groupname> -> host" to suggest
> "the proxy host for HTTP connections", and similarly for
> port/username/password/timeout.

Yeah, the variable names in that file made a lot more sense when the
file was named `proxies'.  Now that the filename is more generic, the
variable names need to get more specific.

If you want to come up with a better scheme, while you're in there,
I'm practically ready to +1 it in advance :-).  And if we're going to
change it, let's do it now, before we have billions of users.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_svn tunnel configuration

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2002-12-05 at 11:51, Branko Čibej wrote:
> > which contains information about HTTP proxies.
> >There appears to be a dedicated svn_subr API for reading this file,
> >which seems to be a layering violation.
> >
> Huh? Where else should that code be?

svn_config_read could take a filename parameter.  ("servers" or
"config", currently.)

> >  I can:
> >
> >  * Worm my way into this file, rendering it overloaded and no longer
> >    specific to HTTP.  Inside a proxy group (which we'd now call a
> >    server group), host/port/username/password/timeout would specify
> >    HTTP proxies, while tunnel-agent would specify svn tunnel agents.
> >
> We renamed proxies to servers for this very reason -- so that it
> non-HTTP-specific stuff can go in. So yes, I think this is the way to go.

Okay.  But I feel like the information currently there isn't tagged very
well.  There's nothing in "servers -> <groupname> -> host" to suggest
"the proxy host for HTTP connections", and similarly for
port/username/password/timeout.

For now, I will call my variable "svn_tunnel_agent" and leave what's
there alone.  (I'd call it "svn-tunnel-agent", but an underscore-happy
person seems to have already set the standard for those files.)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_svn tunnel configuration

Posted by Branko Čibej <br...@xbc.nu>.
Greg Hudson wrote:

>Okay, so the previous conversation decided that the client will use
>configuration information to decide when to use a tunnel agent for an
>svn:// URL.  It remains to be decided how this fits into the
>configuration structure.
>
>Right now there is a file ~/.subversion/servers (renamed from
>~/.subversion/proxies?)
>
Yes.

> which contains information about HTTP proxies.
>There appears to be a dedicated svn_subr API for reading this file,
>which seems to be a layering violation.
>
Huh? Where else should that code be?

>  I can:
>
>  * Worm my way into this file, rendering it overloaded and no longer
>    specific to HTTP.  Inside a proxy group (which we'd now call a
>    server group), host/port/username/password/timeout would specify
>    HTTP proxies, while tunnel-agent would specify svn tunnel agents.
>
We renamed proxies to servers for this very reason -- so that it
non-HTTP-specific stuff can go in. So yes, I think this is the way to go.


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org