Subversion
From NAS-2000.org
This HowTo will explain how to install subversion on your NAS
I used the tinky-2_3_2-mu-02.2 firmware on my NAS 2000
My Client is Eclipse 3.4M4 with installed subclipse plugin 1.2.4 on Vista
Use this manual on your own risk! There are no guaranties!
Contents |
[edit] Install subversion on NAS
ssh login as: root
# ipkg-cl update # ipkg-cl install subversion Installing subversion (1.3.2-r4) to root... [...] Successfully terminated.
create symbolic links:
# cd /bin # ln -s /system/overlay/bin/svnserver svnserve
this link has to be created after every reboot!
# cd /system/overlay/bin # ln -s dropbearmulti ssh
[edit] Create a svn repository (example)
create a new repository for the user "user" in the share "backup"
# cd /mnt/IDE1/backup # svnadmin create svnroot
set owner and permissions
# chown -R user:users svnroot # chmod 2770 -R svnroot
[edit] simple file:// access with Eclipse
In Eclipse change to "SVN Repository" view and select "New Repository Location..."
Location Url is: "file://filehost/backup/svnroot"
[edit] svn:// access with Eclipse
start "svnserve" on the NAS:
# svnserver -d -r /mnt/IDE1/backup/svnroot
In Eclipse set Location Url to "svn://filehost"
[edit] svn+ssh:// access with Eclipse (SVNKit/Java)
Edit "svnroot/conf/svnserve.conf" on the NAS:
[general] anon-access = read auth-access = write password-db = passwd realm = My First Repository
Edit "svnroot/conf/passwd" on the NAS:
[users] user = myPW
check via ssh console:
# svn list svn+ssh://user@localhost/mnt/IDE1/backup/svnroot
In Eclipse select SVNKit:
Window -> Preferences -> Team -> SVN -> SVN Interface: ( ) JavaHL (JNI) (*) SVNKit (PureJava)
With selected SVNKit it's not possible to use local repositories, for example file://localhost/c:/svnroot
Location Url is: "svn+ssh://user@filehost/mnt/IDE1/backup/svnroot"
[edit] svn+ssh:// access with Eclipse (JavaHL)
create a SSH2-RSA Key with "PUTTYGEN" and save it to "rsa-key-svn.ppk".
Copy the public key from the "PUTTYGEN" Window to a file named "authorized_keys".
Copy the "authorized_keys" to the users "/mnt/IDE1/user/.ssh" folder
check ssh login with key:
start "PAGEANT" and load your private key file "rsa-key-svn.ppk"
start "PuTTy" and connect to your NAS
login as: user Authenticating with public key "rsa-key-svn" from agent
Change the subversion "config" file on your client, for example: "C:\Users\User\AppData\Roaming\Subversion\client"
[tunnels] ssh=D:/Programme/TortoiseSVN/bin/TortoisePlink.exe -i E:/rsa-key-svn.ppk
If you use "Plink" from "PuTTY" you will see a command shell...
In Eclipse select JavaHL:
Window -> Preferences -> Team -> SVN -> SVN Interface: (*) JavaHL (JNI) ( ) SVNKit (PureJava)
Location Url is: "svn+ssh://user@filehost/mnt/IDE1/backup/svnroot"
[edit] TODO
- install package should create the symbolic links
- "svnserver" should be named to "svnserve"
- symbolic link "/bin/svnserve" should be created during boot
- it seems not to be possible to start "svnserve -t" using the
command="/bin/svnserve -t -r /mnt/IDE1/backup/svnroot/" ssh-rsa AAA...acFHU= user
inside the "authorized_keys" file