NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
nexus2
Apr 05, 2009Follower
Subversion ( SVN ) Add-on
Hello,
Super-Poussin removed the SVN add-on and I was hoping someone (or Super-Poussin) could please update it and bring it back. What was outdated with the old one anyway? I ask because I really don't want to manually enable Root SSH and go through all the steps (I've got a few machines I need to do it on).
Thanks in advance,
Nexus2
Super-Poussin removed the SVN add-on and I was hoping someone (or Super-Poussin) could please update it and bring it back. What was outdated with the old one anyway? I ask because I really don't want to manually enable Root SSH and go through all the steps (I've got a few machines I need to do it on).
Thanks in advance,
Nexus2
108 Replies
Replies have been turned off for this discussion
- efalskenAspirant
moozaad wrote: I get an error backing up my svn, file not found but I've given absolute paths and it works if ran manually 0 0 * * * root /opt/rfw/bin/svnadmin dump /opt/subversion/neopeon > "/c/Neopeon/Neopeon Limited/svn backup/svnbackup.svn" 2>/var/log/cron.svn.log
Basically cron can't find /opt/rfw/bin/svnadmin but it's definitely there. Any ideas?
permissions. My bin folder (and contents) are chmod 755. - moozaadAspirantThere shouldn't be any permission issues firstly becuase the cron is run as root and also because the directory and contents are 0755
nas1:/opt/rfw/bin# ls -al
total 448
drwxr-xr-x 2 root root 16384 Sep 11 15:07 .
drwxr-sr-x 7 root 35000 16384 Sep 13 16:48 ..
-rwxr-xr-x 1 root root 1835 Sep 11 15:07 neon-config
-rwxr-xr-x 1 root root 155660 Sep 11 15:02 svn
-rwxr-xr-x 1 root root 44056 Sep 11 15:02 svnadmin
-rwxr-xr-x 1 root root 22836 Sep 11 15:02 svndumpfilter
-rwxr-xr-x 1 root root 44352 Sep 11 15:02 svnlook
-rwxr-xr-x 1 root root 53680 Sep 11 15:02 svnserve
-rwxr-xr-x 1 root root 32004 Sep 11 15:02 svnsync
-rwxr-xr-x 1 root root 9032 Sep 11 15:02 svnversion
I have no idea whos group ID 35000 is supposed to be, I presume it is a bug in the firmware or addon but it shouldn't affect svnadmin.
****************************UPDATE******************************
Resolved. There were hidden characters in the script/opt/rfw/bin/svnadmi\207\207n
I guess that's what you get for using a weird version of VI :] - jcouvretAspirantHelp! I have been trying to configure automated backup of my subversion repository for a couple weeks now. After some searching around, I decided that the svn-fast-backup script (http://svn.collab.net/repos/svn/trunk/contrib/server-side/svn-fast-backup) would work well for me with a FSFS subversion repository. However, I am just not smart enough to automate it.
I have done the following:
Put the svn-fast-backup script in /bin
chmod a+x on svn-fast-backup
chmod -R 755 /bin
I have tried the following:
add a call to svn-fast-backup to the post-commit hook of the subversion repository.
add a script calling svn-fast-backup to the cron.daily directory
add the following line to /etc/crontab
30 20 * * * root /bin/svn-fast-backup /opt/subversion/repo/ /c/share/svn-backup/repo/ >> /c/share/svn-backup/backup.log
The crontab line does result in a backup.log file, but it is empty. I can't get anything to work. I am not experienced with linux and I know that this should be a simple cron job. I am really hoping some nice, helpful person could step through what I need to do to get a python script like svn-fast-backup to work as a cron job. I'm sure I'm missing something simple, but I can't figure it out.
And yes, I have installed python via apt and the following command works just fine when run manually:/bin/svn-fast-backup /opt/subversion/repo/ /c/share/svn-backup/repo/ >> /c/share/svn-backup/backup.log
- moozaadAspirantbash resolves paths differently to python, try removing the end slashes
/bin/svn-fast-backup /opt/subversion/repo /c/share/svn-backup/repo >> /c/share/svn-backup/backup.log
also check that it allows ">> /c/share/svn-backup/backup.log" as stdout/stderr redirection is a sh/bash trick and I'm not sure its valid with python.
lastly.. rsync might not exist in the path that cron/python looks in. - jcouvretAspirantThanks for the help. What fixed it was putting the complete paths to svnlook, svnadmin, and rsync in the svn-fast-backup script.
For those that might be searching how to backup subversion repositories on a ReadyNAS, here is what I did. This probably isn't the best way to backup subversion and it only works on FSFS repositories, but it does work for me.
1. Get the svn-fast-backup script from here, http://svn.collab.net/repos/svn/trunk/contrib/server-side/svn-fast-backup
2. Modify the script to include full paths to svnlook, svnadmin, and rsyncsvnlook = "/opt/rfw/bin/svnlook" # Path to svnlook
svnadmin = "/opt/rfw/bin/svnadmin" # Path to svnadmin
rsync = "/usr/bin/rsync" # Path to rsync
3. Put the svn-fast-backup on your NAS. I put it at /c/share/svn-backup/svn-fast-backup
4. Set permissions. I am a newbie, so these permissions are most certainly overkill. All you probably need is the a+x:chmod a+x /c/share/svn-backup/svn-fast-backup
chmod 755 /c/share/svn-backup/svn-fast-backup
chmod -R 755 /bin
5. Add the following line to /etc/crontab, modifying for your repository and backup schedule30 2 * * * root /c/share/svn-backup/svn-fast-backup /opt/subversion/YourRepository /c/share/svn-backup/YourRepository >> /c/share/svn-backup/svn-fast-backup.log
- oif_vetAspirantHas anyone had a problem with svnserve not being found? I just installed the Add-on, created a repo using the command-line, and loaded my dumped copy in. I can browse the repo fine in a web browser, but anytime I use svn+ssh, I get the following:
! svn list svn+ssh://myusername@mynas.local/svn
bash: line 1: svnserve: command not found
svn: Network connection closed unexpectedly
From Googling, it appears that svnserve isn't in the path. But I have added /opt/rfw/bin to every place I could find, and still no dice. If I ssh in as root or myusername, svnserve is found w/ no problem.
Please help!
---
[edit]
I was messing around with ssh commands and came across this interesting scenario:! echo 'which svnserve' | ssh -T root@mymachine.local
/opt/rfw/bin/svnserve
! echo 'echo $PATH' | ssh -T root@mymachine.local
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/opt/rfw/bin
! ssh root@mymachine.local /opt/rfw/bin/svnserve
You must specify exactly one of -d, -i, -t, or -X
Type '/opt/rfw/bin/svnserve --help' for usage
! ssh root@mymachine.local svnserve
bash: line 1: svnserve: command not found
The directory is in the path... the program is there... why can't it be run? - stevepiercyAspirantI installed all the following addons, and I am able to create a repo using websvn. I can also use a web browser to view the repo.
subversion_1.6.6-readynas-1.0.3.bin
ToggleSSH_1.0.bin
PHP_1.2.bin
WebSVN_2.2.1-readynas-0.9.3.bin
EnableUserSSH_1.0.bin
EnableRootSSH_1.0.bin
https://192.168.0.101/websvn/
https://192.168.0.101/svn/
Now I'm stuck. I read through this and other threads, and tried several suggestions but none helped.
(1) When I try to connect to the repo with Subclipse (an SVN client), with the following credentials, I get the following error. How do I fix this?
repo: https://192.168.0.101/svn
user: <user>
pass: <pass>svn: PROPFIND request failed on '/svn'
svn: PROPFIND of '/svn': 301 Moved Permanently (https://192.168.0.101)
(2) How do I add files to the repo?
Thank you! - efalskenAspirantfollow the instructions in this thread to create a repository.
svnadmin create /opt/subversion/<name of your repository>
chown -R admin:admin /opt/subversion/*
echo "enable-rep-sharing = false" >> /opt/subversion/<name of your repository>/db/fsfs.conf
Installing the add-ons does not create a repository...only the capability to use the ReadyNAS as a server. - stevepiercyAspirant@efalsken: Were you trying to answer my questions? I was able to create the repo using websvn as I stated. Creating the repo is not my issue. To verify I looked at the last line in /opt/subversion/<myrepo>/db/fsfs.conf:
enable-rep-sharing = false
Again, my questions are (1) how to access the repo from a client and (2) how to add files to the existing repo.
Is this a basic svn 101 RTFM kind of question? Actually, yes, it is. Reference:
http://svnbook.red-bean.com/en/1.5/svn.tour.importing.html
To add files to a repo's /trunk and to get rid of PROPFIND errors cited above:- Connect to your ReadyNAS from your computer
- copy a directory of files <dir> to any location <loc> on your ReadyNAS.
- ssh to ReadyNAS
- cd <loc>
- svn import <dir> file:///opt/subversion/<myrepo>/trunk -m "Initial commit"
Subclipse and any other client now can interact with the repo.
Hopefully this helps for any other svn import newb. - efalskenAspirant
stevepiercy wrote: @efalsken: Were you trying to answer my questions? I was able to create the repo using websvn as I stated. Creating the repo is not my issue. To verify I looked at the last line in /opt/subversion/<myrepo>/db/fsfs.conf:
enable-rep-sharing = false
Again, my questions are (1) how to access the repo from a client and (2) how to add files to the existing repo.
Is this a basic svn 101 RTFM kind of question? Actually, yes, it is. Reference:
http://svnbook.red-bean.com/en/1.5/svn.tour.importing.html
To add files to a repo's /trunk and to get rid of PROPFIND errors cited above:- Connect to your ReadyNAS from your computer
- copy a directory of files <dir> to any location <loc> on your ReadyNAS.
- ssh to ReadyNAS
- cd <loc>
- svn import <dir> file:///opt/subversion/<myrepo>/trunk -m "Initial commit"
Subclipse and any other client now can interact with the repo.
Hopefully this helps for any other svn import newb.
I didn't have any problems with the initial checkin. But I did have a problem with the WebSVN when looking at an empty repository, or if I had no repositories created yet. On my ReadyNAS, I can log in as any user to gain access to the SVN repository. I added the following lines to /etc/frontview/apache/addons/subversion.conf: Inside the <location> tag.
<Location /svn>
DAV svn
SVNParentPath /opt/subversion
SVNListParentPath On
# Limit write permission to list of valid users.
<LimitExcept GET PROPFIND OPTIONS REPORT>
AuthType Basic
AuthName "ReadyNAS SVN"
Require valid-user
</LimitExcept>
</Location>
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!