Page 1 of 2 12 LastLast
Results 1 to 15 of 20

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

  1. #1

    Lightbulb [How to] Subversion, working svn server on WL-500gp or WL-HDD

    # 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/op...5-3_mipsel.ipk
    # just run

    Code:
    ipkg install svn
    # prepare the repository, i've mounted my biggest partition under /opt, so here we go

    Code:
    mkdir /opt/share/svn 
    svnadmin create /opt/share/svn/repos
    ls /opt/share/svn/repos
    # should look like:
    Code:
    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

    Code:
    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/

    Code:
    [groups]
    admins = mefi
    projectgroup1 = mefi, susi, mike, nina
    
    [/Project01]
    @projectgroup1 = rw
    * =
    
    [/]
    @admins = 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
    Code:
    [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
    Code:
    svn             3690/tcp                        # Subversion
    svn             3690/udp                        # Subversion
    # make it persistent

    Code:
    echo "/etc/services" >> /tmp/local/.files
    # create the file /opt/etc/xinet.d/svnserve with following contents, and edit it to your needs

    Code:
    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)

    Code:
    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

    # 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/2...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
    Last edited by mefi; 18-01-2009 at 11:43. Reason: some typos corrected

  2. #2
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    10

    Great tutorial!!

    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
    WL500gP && 160Gb USB && HP 930C

  3. #3
    # 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 ?

  4. #4
    Join Date
    Nov 2007
    Location
    EU's border...
    Posts
    71
    Code:
    #!/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

  5. #5
    Makes all the instructions but did not connect goes
    No repository found in 'svn://*.*.*.124/finans'

    What is wrong?
    Last edited by Raven; 21-08-2008 at 14:56.

  6. #6
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,762
    hey, just wondering...
    did anyone get a successfull port-forward?

    as soon as I try to connect from outside, I get the message: "connection unexpectedly closed" in the tortoise svn repo-browser.

    in post-firewall I have this:
    iptables -A INPUT -p tcp --dport 3690 -j ACCEPT
    iptables -A INPUT -p udp --dport 3690 -j ACCEPT
    as far as I can see with tcp view, there are no other connections between the server and the client

  7. #7
    Hello. I have a problem:
    svn: Repository moved permanently to https://192.168.1.1/svn/ ; please relocate.

    Where is the problem? Thanks

  8. #8
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,762
    Quote Originally Posted by rapash View Post
    Hello. I have a problem:
    svn: Repository moved permanently to https://192.168.1.1/svn/ ; please relocate.

    Where is the problem? Thanks

    the url should be like this: svn://192.168.1.1/svn
    at least... if you have a folder called svn in your repository.
    you first need to create a user for main access

    like this:

    in the file auth
    [/]
    admin = rw
    in the file pass
    admin = mypassword

  9. #9
    Hey Guys.

    I just installed Olegs firmware (WL500gp-1.9.2.7-d-r655.trx) on my Asus WL500g Premium (V.1) by following wengi's HowTo on http://wl500g.info/showthread.php?t=10307.

    After that i tried installing SVN on the Router.

    But i didn't get it working.

    When I try to connect to the router by svn://192.168.1.1/ i only get the following error message:

    Checkout from svn://192.168.1.1/svn, revision HEAD, Fully recursive, Externals included
    Kann nicht mit Host »192.168.1.1« verbinden: Es konnte keine Verbindung
    hergestellt werden, da der Zielcomputer die Verbindung verweigerte.
    In English: "No conn. to Host 192.168....Host rejected connection"

    I don't know whats wrong. So please anyone help me...

    That's what i did (following the upper HowTo).

    Code:
    ipkg install svn
    Code:
    mkdir /tmp/harddisk/svn 
    svnadmin create /tmp/harddisk/svn/repos
    ls says everthing's fine till now

    edited /tmp/harddisk/svn/repos/conf/svnserve.conf like melfi told me to (see post1)
    edited /tmp/harddisk/svn/repos/conf/passwd and /tmp/harddisk/svn/repos/authz

    edited /etc/services (i suppose it's not important, where i add the 2 lines?!)

    #made it persistent
    Code:
    echo "/etc/services" >> /tmp/local/.files
    I found out that xinet.d is not part of olegs firmware. So i downloaded it with
    Code:
    ipkg xinetd
    then
    Code:
    [admin@nabuko conf]$ vi /opt/etc/xinet.d/svnserve
    
    service svn { disable = no socket_type = stream user = nabuko server = /opt/bin/svnserve server_args = -i -r /tmp/harddisk/svn/repos wait = no nice = 10 only_from = 0.0.0.0/0
    finally:
    Code:
    flashfs save && flashfs commit && flashfs enable
    btw. my S10xinetd

    Code:
    [admin@nabuko conf]$ vi /opt/etc/init.d/S10xinetd 
    
    
    #!/bin/sh #OPTWARE_TARGET=oleg 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
    As i said, i don't get an conn. to the router via TortoiseSVN.

    Code:
    [admin@nabuko conf]$ ps axf
      
    PID TTY STAT TIME COMMAND 1 ? S 0:01 /sbin/init 2 ? S 0:00 [keventd] 3 ? SN 0:00 [ksoftirqd_CPU0] 4 ? S 0:00 [kswapd] 5 ? S 0:00 [bdflush] 6 ? S 0:00 [kupdated] 7 ? S 0:00 [mtdblockd] 58 ? S 0:00 dropbear 177 ? Ss 0:00 \_ dropbear 178 pts/0 Ss 0:00 \_ -sh 186 pts/0 R+ 0:00 \_ ps axf 63 ? S 0:00 httpd vlan1 65 ? Ss 0:00 klogd 71 ? Ss 0:00 nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan 73 ? S 0:00 dnsmasq 74 ? S 0:00 [khubd] 84 ? Ss 0:00 lpd 86 ? Ss 0:00 p9100d -f /dev/usb/lp0 0 90 ? S 0:00 [usb-storage-0] 91 ? S 0:00 [scsi_eh_0] 98 ? Ss 0:00 pppd file /tmp/ppp/options.wan0 102 ? Ss 0:00 infosvr br0 103 ? Ss 0:00 watchdog 119 ? S 0:00 upnp -D -L br0 -W ppp0 135 ? S 0:00 [kjournald] 136 ? S 0:00 [kjournald] 139 ? Ss 0:00 /usr/sbin/vsftpd 141 ? Ss 0:00 /usr/sbin/nmbd -D 143 ? Ss 0:00 /usr/sbin/smbd -D 159 ? Ss 0:00 /sbin/syslogd -m 0 -O /opt/var/log/syslog.log -S -l 164 ? Ss 0:00 /opt/sbin/cron
    Please help me!
    Ihr dьrft auch in deutsch weiterhelfen

    Thanks & Danke


    P.S.: starting SVNserver by command: svnserve -d -r /tmp/harddisk/svn/repos/ works
    the error seems to be in "/opt/etc/xinet.d/svnserve"....
    Last edited by HomerJay; 14-10-2009 at 13:16.

  10. #10
    in addition to my last post (s.b.):

    I located the error in

    Code:
    [admin@nabuko conf]$ vi /opt/etc/xinet.d/svnserve
    
    service svn { disable = no socket_type = stream user = WHAT USERNAME???? server = /opt/bin/svnserve server_args = -i -r /tmp/harddisk/svn/repos wait = no nice = 10 only_from = 0.0.0.0/0
    starting it:

    [admin@nabuko conf]$ /opt/etc/xinet.d/svnserve svnserve.conf
    /opt/etc/xinet.d/svnserve: line 1: service: not found
    /opt/etc/xinet.d/svnserve: line 11: disable: not found
    /opt/etc/xinet.d/svnserve: line 11: socket_type: not found
    /opt/etc/xinet.d/svnserve: line 11: user: not found
    /opt/etc/xinet.d/svnserve: line 11: server: not found
    /opt/etc/xinet.d/svnserve: line 11: server_args: not found
    /opt/etc/xinet.d/svnserve: wait: line 11: Illegal number: =
    =: No such file or directory
    /opt/etc/xinet.d/svnserve: line 11: only_from: not found
    plz help me! thx

  11. #11
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,762
    I had some problems with svn as well...
    first create a main admin user to log into the server, the account should have access to everything (so that means the dir is "/").
    after that you should come along a whole lot further

  12. #12
    well, as i said before... i get access to the svn-repos when i startthe SVNserver by command: svnserve -d -r /tmp/harddisk/svn/repos/

    But that's not what i want....the solution by starting svnserver oly if it is necessary is the solution i prefere....if somehow it'll work someday

  13. #13
    I had the same problem, I found that svnserve should be in xinetd.d, not xinet.d
    Hope that helps!

  14. #14
    Hey Everybody

    I got it workin somehow

    @smloh: Thank's for your hint. That solved one problem

    Note: Second problem solved by command chmod 775 /etc/services


  15. #15
    Hi guys and thanks for the great tutorial!

    How do I actually access this on OS X? Xcode or something like ZigVersion?

    Thanks!

    // Ike

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 28
    Last Post: 02-06-2013, 20:58
  2. [How to] rtorrent & ntorrent
    By mancub in forum WL-500gP Tutorials
    Replies: 101
    Last Post: 18-12-2008, 07:21
  3. 500GP и LAN HDD
    By freewind in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 8
    Last Post: 18-07-2008, 08:09
  4. WL 500GP mit Oleg-Firmware erkennt USB HDD nicht !!!
    By carterb in forum German Discussion - Deutsch (DE)
    Replies: 8
    Last Post: 15-07-2007, 09:54
  5. Gameserver
    By blingbling in forum WL-500gP Q&A
    Replies: 2
    Last Post: 17-07-2006, 15:37

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •