Dies ist eine alte Version des Dokuments!
LoadModule dav_svn_module lib/httpd/modules/mod_dav_svn.so LoadModule authz_svn_module lib/httpd/modules/mod_authz_svn.so <Location /svn> DAV svn SVNParentPath /home/svn SVNListParentPath on AuthType Digest AuthName "Subversion Repositories" AuthUserFile /home/svn/.htpasswd AuthDigestProvider file Require valid-user </Location>
/home/svn
svnadmin create /home/svn/test
to create a repository called test
chown -R apache:apache /home/svn/*
Server OS is Slackware Linux 11.0. Infos are collected from the svnbook and this site. The easiest alternative for running a svn server is used, i.e. svnserve
as daemon. No apache, no SSH is used:
su - groupadd svn useradd -g svn -d /home/svn svn mkdir /home/svn chown svn:svn /home/svn su svn rm /home/svn/.* # delete .bash_history svnadmin create /home/svn exit chmod -R o-rwx /home/svn
Note: The svnserve process ist started as a separate user svn
as recommended. This increases security, but seems to prevent local access via file:///home/svn/...
urls.
To start svnserve at boot time, append this to /etc/rc.d/rc.local:
su svn -c "/usr/bin/svnserve -d -r /home/svn"
To give users access to the repository, edit /home/svn/conf/svnserv.conf and /home/svn/conf/passwd see Built-in authentication and authorization
This is optional. www.viewvc.org is mentioned in svnbook and used. Viewvc requieres Subversion with its SWIG Python bindings. Install swig e.g. from linuxpackages.
The Subversion which comes with Slack 11.0 is compiled witout swig/python support. Therefore download from the Slack source subversion dir, eg form here.
Now the buildscript subversion.SlackBuild
has to be patched a bit in order to include the python bindings:
53a54 > make swig-py || exit 1 55a57 > make install-swig-py DESTDIR=$PKG 88a91,93 > mkdir -p $PKG/usr/lib/python2.4/site-packages > echo "/usr/lib/svn-python" > $PKG/usr/lib/python2.4/site-packages/svn.pth >
Run the buildscript to create a the package and install the package with upgradepkg –reinstall subversion-1.4.0-i486-1.tgz
Install viewvc by running viewrc-install
(described in viewrc-1.0.4/INSTALL
)
Edit /usr/local/viewrc-1.0.4/viewrc.conf
:
80c80 < #svn_roots = svn: /home/svnrepos --- > svn_roots = svn: /home/svn 105c105 < default_root = cvs --- > default_root = svn
Copy (symlinks don't work) /usr/local/viewrc-1.0.4/bin/cgi/*.cgi
to /var/www/cgi-bin
Add user nobody
(Apache) to group svn
in /etc/group
to give Apache read permission for the svn repository. Then restart Apache and point your browser to http://server-hostname/cgi-bin/viewvc.cgi/.
If you use the provieded command line svn client no config at all is necessary. This is also true if Cygwin is used as environment. Username and password are stored automatically after first login, see client credentials caching.
Commands refere to the SVN command line client which comes with SVN
Create a project. 3 directories are recommended:
becki@client:~/test$ tree testproj/ testproj/ |-- branches |-- tags `-- trunk `-- main.c
The import command imports the testproj
project to the root dir of the repostitory also as project testproj
becki@client:~/test$ svn import testproj svn://server-hostname/testproj
svn co svn://etb-111/testproj
svn st [-u] [-v] [file or dir]
According to http://svn.haxx.se/dev/archive-2002-08/1385.shtml there is no command like the release
of CVS. Just delete the working copy locally.
svn move <from> <to>
Work just like shell mv
command See svn.ref.svn.c.move.html