[uClibc] SubVerison question

Buttchereit, Axel (XL) XL at XLsigned.net
Fri Feb 11 07:25:00 UTC 2005


Joakim Tjernlund wrote:
>>On Thu Feb 10, 2005 at 10:48:46PM +0100, Joakim Tjernlund wrote:
>>
>>>>On Thu Feb 10, 2005 at 04:33:39PM +0100, Joakim Tjernlund wrote:
>>>>
>>>>>I have checked out a readonly subversion buildroot system.
>>>>>Now I want to checkin some changes i have made in uClibc and I can't
>>>>>find a way to make SubVersion use svn+ssh:... instead of just svn:...
>>>>>In cvs you could use the -d switch to gain commit access, but I can't
>>>>>find such a switch in svn.
>>>>>
>>>>>Anyone got a solution, other than to do a new checkout of uClibc using svn+ssh:.. ?
>>>>
>>>>Something along the lines of the following should work...
>>>>
>>>>perl -p -i -e "s/url=\"file:\/\/\//url=\"svn+ssh:\/\/svn.uclibc.org\//g;" \
>>>>    `find -name entries`
>>>
>>>Thanks, but I can't make it work. I stink at perl/regexp. This is
>>>how far I got:
>>>  perl -p -i -e "s/url=\"svn:uclibc.org\/\/\//url=\"svn+ssh:\/\/svn.uclibc.org\//g;" \ `find . -name entries`
>>
>>I think svn:uclibc.org in your regex should be svn:\/\/\uclibc.org
>>
>> -Erik
> 
> 
> After some research I got "svn switch" to work like this:
> svn switch --relocate svn://uclibc.org svn+ssh://username@svn.uclibc.org/svn .
> 
> That will relocate from the current dir and down. Maybe you could add that to the
> www pages?
>
Actually one shouldn't uses perl/regexp to do it "manually", if there's a bultin command
that provides exactly what's needed. 
Although I appreciate that svn's "internals" (.svn/ contents) are accessible (ASCII)
to scripts I wouldn't recommend to rely on the "internals" to not be changed
in a future version...
     
> Possibly you could also loose the trailing /svn part in svn+ssh://username@svn.uclibc.org/svn
> to make write access more similar to readonly access?

The URL for checking out (and switching) an SVN project is even longer under "normal conditions".
Assuming that there is only one repository (uclibc) and only one project hosted on "uclibc.org",
but a "trunk", some "tagged releases" and maybe "development branches" the URLs _should_ look
like this:

* svn co svn+ssh://username@uclibc.org/svn/uclibc/trunk/ uclibc
  For checking out a "Working Copy" of trunk's HEAD revision

* svn co svn+ssh://username@uclibc.org/svn/uclibc/tags/x.y-release uclibc
  For checking out a "Working Copy" of the x.y-release (HEAD revision)

* svn co svn+ssh://username@uclibc.org/svn/uclibc/branches/x.y-special uclibc
  For checking out a "Working Copy" of the "x.y-special" branch (HEAD revision)

And if I may suggest...

...using an apache2 server (WebDAV + SSL) backend, the URL for checking out
read-only and read/write copies would be the same, i. e.

* https://uclibc.org/svn/uclibc/trunk/ uclibc

for checking out the trunk. Access control would be implemented in
"/svn"'s <Location>-directive and may use "AuthType Basic" or "LDAP"
for authentication, e. g.
        <Location /svn>
                DAV svn
                SVNParentPath /home/svn/repos
                Satisfy Any
                Require valid-user
                AuthType Basic
                AuthName "Subversion Repository Access"
                AuthUserFile /home/svn/conf/svnusers.all-repositories
                AuthzSVNAccessFile /home/svn/conf/svnaccess.all-repositories
	</Location>
for "Basic" authentication and more than one repository filed below
"/home/svn/repos" (uclibc, busybox,  ...)

Example-URL-Syntax: https://uclibc.org/svn/<repository>/<project>/trunk|branches/...|tags/...
  
"Satisfy Any" + "Require valid-user" and a default permission of "* = r" would
allow everyone to check out (readonly) "Working Copy" and would restrict write-access
to "authenticated developers" (@developers = rw), i. e. you would be prompted for username
and password (by the apache2 web server) when committing changes.

--Axel





More information about the uClibc mailing list