You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp> on 2005/03/28 19:24:43 UTC
[PATCH] Enable users to specify a full path of svnserve at the
tunnel mode
Hi,
This patch enable users to specify a full path of svnserve at the tunnel
mode.
I created this because I want to use that mode of svnserve in my home dir
for testing, but ssh cannot detect it.
Of course I've read "Trick #1" in notes/ssh-tricks, but I always use
public-key authentication for login and do not want to use another key
to access the repository...
If this patch seems to be helpful to others, I'd like to have it committed.
Thanks,
- nori
Log:
Enable users to specify a full path of svnserve at the tunnel mode.
Clients now read the value of 'svnserve-path' specified at the 'tunnels'
section in the .subversion/config. So, users can now use svnserve
installed in the home dir or somewhere odd.
This change is based on the patch presented by Takashi Kawachi
<ka...@r.dl.itc.u-tokyo.ac.jp>.
* subversion/include/svn_config.h: Define SVN_CONFIG_OPTION_SVNSERVE_PATH.
* subversion/libsvn_ra_svn/client.c
(find_tunnel_agent): Enable reading of 'svnserve-path' from
.subversion/config if specified.
* subversion/libsvn_subr/config_file.c
(svn_config_ensure): Add an template and description for 'svnserve-path'
to the .subversion/config template.
Index: subversion/include/svn_config.h
===================================================================
--- subversion/include/svn_config.h (revision 13721)
+++ subversion/include/svn_config.h (working copy)
@@ -83,6 +83,7 @@
#define SVN_CONFIG_OPTION_ENABLE_AUTO_PROPS "enable-auto-props"
#define SVN_CONFIG_OPTION_NO_UNLOCK "no-unlock"
#define SVN_CONFIG_SECTION_TUNNELS "tunnels"
+#define SVN_CONFIG_OPTION_SVNSERVE_PATH "svnserve-path"
#define SVN_CONFIG_SECTION_AUTO_PROPS "auto-props"
/* For repository svnserve.conf files */
Index: subversion/libsvn_ra_svn/client.c
===================================================================
--- subversion/libsvn_ra_svn/client.c (revision 13721)
+++ subversion/libsvn_ra_svn/client.c (working copy)
@@ -493,7 +493,9 @@
*argv = apr_palloc(pool, (n + 4) * sizeof(char *));
memcpy(*argv, cmd_argv, n * sizeof(char *));
(*argv)[n++] = (user) ? apr_psprintf(pool, "%s@%s", user, host) : host;
- (*argv)[n++] = "svnserve";
+ svn_config_get(cfg, &val, SVN_CONFIG_SECTION_TUNNELS,
+ SVN_CONFIG_OPTION_SVNSERVE_PATH, "svnserve");
+ (*argv)[n++] = val;
(*argv)[n++] = "-t";
(*argv)[n] = NULL;
Index: subversion/libsvn_subr/config_file.c
===================================================================
--- subversion/libsvn_subr/config_file.c (revision 13721)
+++ subversion/libsvn_subr/config_file.c (working copy)
@@ -1153,6 +1153,12 @@
APR_EOL_STR
"# rsh = /path/to/rsh -l myusername"
APR_EOL_STR
+ "### If you wanted to specify a full path to svnserve, you"
+ APR_EOL_STR
+ "### could do so:"
+ APR_EOL_STR
+ "# svnserve-path = /path/to/svnserve"
+ APR_EOL_STR
"### On Windows, if you are specifying a full path to a command,"
APR_EOL_STR
"### use a forward slash (/) or a paired backslash (\\\\) as the"
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Enable users to specify a full path of svnserve at the
tunnel mode
Posted by Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp>.
Hi,
> On Mon, 2005-03-28 at 14:24, Kobayashi Noritada wrote:
> > If this patch seems to be helpful to others, I'd like to have it committed.
>
> -1. The path to svnserve is repository-specific, but you've made a
> single global config file option to specify it.
Thank you for answering.
True. I must deal with repository-specific problem in another more
appropriate manner...
Functionality to be added was maybe useful, but the solution was wrong.
> As a simple practical measure, I suggest creating a front-end script to
> ssh, and getting svn to use it either with a tunnel definition or with
> $SVN_SSH.
So, I'd like to try your idea.
Thanks,
- nori
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Enable users to specify a full path of svnserve at the
tunnel mode
Posted by Greg Hudson <gh...@MIT.EDU>.
On Mon, 2005-03-28 at 14:24, Kobayashi Noritada wrote:
> If this patch seems to be helpful to others, I'd like to have it committed.
-1. The path to svnserve is repository-specific, but you've made a
single global config file option to specify it.
As a simple practical measure, I suggest creating a front-end script to
ssh, and getting svn to use it either with a tunnel definition or with
$SVN_SSH.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Enable users to specify a full path of svnserve at the tunnel mode
Posted by Max Bowsher <ma...@ukf.net>.
Kobayashi Noritada wrote:
> Hi,
>
> This patch enable users to specify a full path of svnserve at the tunnel
> mode.
> I created this because I want to use that mode of svnserve in my home dir
> for testing, but ssh cannot detect it.
> Of course I've read "Trick #1" in notes/ssh-tricks, but I always use
> public-key authentication for login and do not want to use another key
> to access the repository...
>
> If this patch seems to be helpful to others, I'd like to have it
> committed.
I like the concept, but agree with Greg Hudson's note that it should not be
a global setting.
Ideally, this should be specifiable individually per tunnel scheme:
So svn+ssh:// would be the usual behaviour, and you could configure (for
example) svn+mytest:// to look for your local svnserve.
If you want to go ahead with this, propose a format for the configuration
file so we can discuss it.
However, if you are just looking for a quick fix, there are two easy
workarounds:
1) Client SSH wrapper script:
Use the existing tunnels configuration to substitute a script like this for
your ssh program:
#!/bin/sh
exec /home/me/bin/svnserve -t
2) Multiple public keys:
I see you said you didn't want to do this - but are you aware that it can
all be set up without interrupting your normal logons, and using the ssh
config file, made to work almost transparently? You would just use a
different hostname for the "svnserve" personality, and use the "Host",
"HostName", and "IdentityFile" .ssh/config options.
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org