You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Lukas Lipavsky <lu...@gmail.com> on 2004/11/30 20:22:47 UTC

svn+ssh: specifying which svnserve run???

Hi,

I have following problem with ssh tunnel:

On server our project is hosted is corrupted instalation of svn in
(executables) /usr/bin/. So we decided to instal out own version in
$PROJECT_PATH/local/bin. works fine, we added line:

export PATH=$PROJECT_PATH/local/bin:$PATH to out '$HOME/.profile', so
when we ssh the server, we can run svn checkout file:///..... and
correct version of svn is used

BUT:
if we use ssh tunneling svn+ssh://host/$PROJECT_PATH/svn, there is a
problem. while we use ssh in tunnel mode, '$HOME/.profile' is NOT
processed and therefore original svnserve version (/usr/bin/svnserve)
is used instead of our $PROJECT_PATH/local/bin/svnserve. And because
original version is corrupted, we are unable to access our repository
:((( (we have no other access - only through ssh tunnel)

So my question is:
is it possible, to tell svn client which svnserve to execute after
tunnel is established? If it isn't, wouldn't it be a good idea? :)

or (and I know this is not the proper mailing list for following
question) is it possible to tell ssh to process '$HOME/.profile' after
tunnel is established but BEFORE svnserve is called? Or is there any
other config file where should this be written? (I'm not an admin of
the system)

Thanks

Lukas

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

Re: svn+ssh: specifying which svnserve run???

Posted by Chris AtLee <ca...@sidefx.com>.
On Tue, 2004-30-11 at 21:22 +0100, Lukas Lipavsky wrote: 
> or (and I know this is not the proper mailing list for following
> question) is it possible to tell ssh to process '$HOME/.profile' after
> tunnel is established but BEFORE svnserve is called? Or is there any
> other config file where should this be written? (I'm not an admin of
> the system)

Hi,

I believe you can create a file called $HOME/.ssh/environment where you
can set the path.  See 'man ssh' under the ENVIRONMENT and FILES
sections.

Cheers,
Chris



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

Re: svn+ssh: specifying which svnserve run???

Posted by Lukas Lipavsky <lu...@gmail.com>.
> As you said: svn will run svnserve on the server; by passing svnserve as
> argument to ssh. But no shell startet on server, just svnserve by itself.
> The ssh compiled-in PATH is applied.
> 
> I had a hard time figuring out why my wrapper-scripts in /usr/local/bin are
> not working. Not in sshd's path, but /usr/sbin is....

But .bashrc IS working
If I use stanndard ssh login, then .profile is loaded (not .bashrs)
If I use  ssh tunnel, then .bashrc is loaded (not .profile)

At least on the server I need to access;))

Lukas

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

Re: svn+ssh: specifying which svnserve run???

Posted by Volker Poplawski <vo...@atrics.de>.
Am Dienstag, 30. November 2004 21:37 schrieb Peter Valdemar Mørch:
> Lukas Lipavsky lukas.lipavsky-at-gmail.com |Lists| wrote:
> > So my question is:
> > is it possible, to tell svn client which svnserve to execute after
> > tunnel is established? If it isn't, wouldn't it be a good idea? :)
>
> svn will run "svnserve" on the server side. Period.
>
> I believe that bash sources ~/.bashrc when it is started regardless of
> whether it is a a login shell or not. I do know for a *fact* that bash
> sources *something*, I'm just not 100% its .bashrc . I think so. I have
> exactly what you describe working myself.
As you said: svn will run svnserve on the server; by passing svnserve as 
argument to ssh. But no shell startet on server, just svnserve by itself.
The ssh compiled-in PATH is applied.

I had a hard time figuring out why my wrapper-scripts in /usr/local/bin are 
not working. Not in sshd's path, but /usr/sbin is....

HIH
.....Volker

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


Re: svn+ssh: specifying which svnserve run???

Posted by Peter Valdemar Mørch <sw...@sneakemail.com>.
Lukas Lipavsky lukas.lipavsky-at-gmail.com |Lists| wrote:
> So my question is:
> is it possible, to tell svn client which svnserve to execute after
> tunnel is established? If it isn't, wouldn't it be a good idea? :)

svn will run "svnserve" on the server side. Period.

I believe that bash sources ~/.bashrc when it is started regardless of 
whether it is a a login shell or not. I do know for a *fact* that bash 
sources *something*, I'm just not 100% its .bashrc . I think so. I have 
exactly what you describe working myself.

The easiest way to test it outside of svn is:
ssh server which svnserve

Take a look at 'man bash', then fiddle with bash and startup files until 
you get the response you're looking for.

But I *think* this will work for you:

prompt$ ssh server
server$ ln -s .profile .bashrc
server$ exit
prompt$ ssh server which svnserve

Peter

-- 
Peter Valdemar Mørch
http://www.morch.com

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

Re: svn+ssh: specifying which svnserve run???

Posted by Peter Valdemar Mørch <sw...@sneakemail.com>.
Lukas Lipavsky lukas.lipavsky-at-gmail.com |Lists| wrote:
> is it possible, to tell svn client which svnserve to execute after
> tunnel is established? If it isn't, wouldn't it be a good idea? :)

*YES* - I'd also love to be able to configure _at least_ the umask and 
-r parameter for svnserve *server-side*, but alas, we svn+ssh:// people 
are in a minority, I think....

I'm sure a patch would be very welcome! :-D

----------------oooooooooooOOOOOOOOOOOOOOOOOoooooooooo-----------

Client side configuration of what svnserve executable to run on the 
server can be configured using .bashrc like I described, or this hack:

You can set the clientside environment variable: SVN_SSH to be the ssh 
executable. And so this (also) works for me:

-------------------
client:~$ export SVN_SSH=`pwd`/pseudossh
client:~$ cat `pwd`/pseudossh
#!/bin/bash

# For testing to help you figure out what
# svn actually calls ssh with:
echo "$@" > ~/svnserve.args.txt
server=$1
ssh $server /server/path/to/svnserve -t
-------------------

.bashrc is the way to go, brother!

Peter
-- 
Peter Valdemar Mørch
http://www.morch.com

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