Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 151575

Summary: svn+ssh can't find /usr/local/bin/svnserve
Product: Gentoo Linux Reporter: Richard Scott <gentoo.bugs>
Component: New packagesAssignee: Paul de Vrieze (RETIRED) <pauldv>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: hoffbrinkle
Priority: High    
Version: unspecified   
Hardware: All   
OS: Other   
Whiteboard:
Package list:
Runtime testing required: ---

Description Richard Scott 2006-10-16 04:27:02 UTC
I've installed Subversion 1.3.2-r3 and the install notes tell me:

- svn over ssh:
  [ edited out part one as its not part of the bug ]
  2. create an svnserve wrapper in /usr/local/bin to set the umask you
     want, for example:
        #!/bin/bash
        umask 002
        exec /usr/bin/svnserve "$@"

I've created this script:

# ls -al /usr/local/bin/svnserve
-rwxr-xr-x 1 root root  95 Oct 16 00:38 svnserve

However, when I connect via svn+ssh:// I don't have /usr/local/bin in my path, I only have the following:

/usr/bin:/bin:/usr/sbin:/sbin

I am therefore not able to make use of the wrapper and I execute the svnserve binary located in /usr/bin/svnserve

Can we add /usr/local/bin to the users path for a non-interactive shell?

However, when I connect via SSH with an interactive shell the /usr/local/bin path *is* there!
Comment 1 Richard Scott 2006-10-17 02:57:20 UTC
It seems that the /etc/bash/bashrc file exits the environment setup process before the path is modified. 

Inserting the follwing into /etc/bash/bashrc at the 7th line fixes this problem:

PATH="/usr/local/bin:/usr/local/sbin:${PATH}"
export PATH
Comment 2 Michael Hordijk 2007-04-18 18:22:18 UTC
I agree that the fix works.  I don't believe that /usr/local/bin should be added to the PATH by default.  Gentoo itself doesn't (to my knowledge) install anything there.  If the user wants to put something there, they can add it to the PATH on that machine if they don't want to call it with /usr/local/bin/<somefile>.
Comment 3 Pacho Ramos gentoo-dev 2013-05-03 08:13:01 UTC
Is this still valid with updated system?