PDA

View Full Version : [How to] Subversion, working svn server on WL-500gp or WL-HDD


mefi
09-01-2008, 17:16
# Hey

# i assume that you followed wengi'S great tutorial and your usb hdd is mounted correctly.
# to install svn package, in my case
# http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/svn_1.4.5-3_mipsel.ipk
# just run

ipkg install svn

# prepare the repository, i've mounted my biggest partition under /opt, so here we go

mkdir /opt/share/svn
svnadmin create /opt/share/svn/repos
ls /opt/share/svn/repos

# should look like:
ls
conf/ dav/ db/ format hooks/ locks/ README.txt

# edit /opt/share/svn/repos/conf/svnserve.conf
# the following authz-db DOES finally work for me, i get NO authentication failures anymore

anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
realm = Mefis Home Repository

# the following authz-db DOES finally work for me, i get NO authentication failures anymore
# here is an example how to restrict a SVN project to a certain group
# Notice: here is this example the user mike should be able to connect to the svn project Project01 by connecting with svn://YOURDOMAINNAME/Project01
# beside of this user mefi is able to access also the root svn://YOURDOMAINNAME/


[groups]
admins = mefi
projectgroup1 = mefi, susi, mike, nina

[/Project01]
@projectgroup1 = rw
* =


# edit /opt/share/svn/repos/conf/passwd
# choose a username und password you like to use for svn
# not necessaryly the system user you are using
[users]
mefi = secret

# now follows the configuration part for starting svn daemon with xinetd! (NOTICE: this solves the hanging-connection-due-to-low-entropy-problem )
# edit /etc/services and insert following lines
svn 3690/tcp # Subversion
svn 3690/udp # Subversion

# make it persistent

echo "/etc/services" /tmp/local/.files

# create the file /opt/etc/xinet.d/svnserve with following contents, and edit it to your needs


service svn
{
disable = no
socket_type = stream
user = YOUR-SYSTEM-USERNAME
server = /opt/bin/svnserve
server_args = -i -r /opt/share/svn/repos
wait = no
nice = 10
only_from = 0.0.0.0/0
}


# and tatata, our lovely flash mem persistent save (reboot not necessary now)

flashfs save && flashfs commit && flashfs enable

# be sure you have xinet configured for starting up automatically
# you should have /opt/etc/init.d/S10xinetd or something like that.


# the svn daemon should everytime be started automatically if an connection request for the svn ports are detected by xinetd

# after the next reboot you should be able automaitcally
# to use svn in your LAN or free the port 3690 in your post-firewall and use subversion from all around the world :D

# i've tested all on wl-500gp and wl-hdd with TortoiseSVN and subclipse as
# clients from my winxp, but should also work with a different configuration.

# Thanks for this great forum.
# mefi

UPDATE (SOLVED SEE UPDATE2):
unfortunatelly there is a problem with /dev/random and the svn package. ( detail: http://rubylution.ping.de/articles/2006/08/12/weird-subversion-hangs-using-svnserve )
WORKAROUND:
if your svn client hangs then perform some commands on your wl-500gp like find / -name blah or top

Does anyone has an idea to solve this problem, permanantly?
There is a new package of svn available (1.4.6). maybe someone could compile for oleg fw

UPDATE2 (SOLVED SEE UPDATE3):
obviously dropbear uses randomly generated data while ssh session is active.
the easiest way not to get the above described "hanging" connection, just log off from your ssh console ;)
i wondered why this problem occured sporadic, now i know ;)

UPDATE3:
whole tutorial above updated.
I managed to solve the hanging-connection-due-to-low-entropy-problem by using the xinetd for fireing the svn process.
svn works now like a charm, i tested it by working on an university developing projekt concurrently with 3 other students. and with my own private reachable low cost svnserver i love the svn concept even more than before ;)
Meanwhile there is a new version of svn package available: svn_1.4.6-1_mipsel.ipk

tj_spark
17-03-2008, 11:12
works like a charme forme :)

there is only one error:

echo "/etc/services" /tmp/local/.files

should be:

echo "/etc/services" > /tmp/local/.files

or nothing will happen, right?

chers
TJ

kibenimatik
14-04-2008, 14:34
# be sure you have xinet configured for starting up automatically
# you should have /opt/etc/init.d/S10xinetd or something like that.

I'm sorry if i ask a stupid question, but what should contain this file /opt/etc/init.d/S10xinetd ?

Serpent
14-04-2008, 15:59
#!/bin/sh
OPTWARE_TARGET=wl500g
#
# Startup script for xinetd
#
# Stop myself if running
killall xinetd 2>/dev/null

# Stop other inetd processes if running
if [ ${OPTWARE_TARGET} = "nslu2" ] ; then
killall inetd 2>/dev/null
fi

/opt/sbin/xinetd

Raven
21-08-2008, 15:47
Makes all the instructions but did not connect goes
No repository found in 'svn://*.*.*.124/finans'

What is wrong?