GLEP 36: Subversion/CVS for Gentoo Hosted Projects
|Author||Aaron Walker <email@example.com>|
|Posting history||2005-03-13, 2005-03-21|
Marked as Moribund by decision of the Gentoo Council on 2017-11-12.
Allow maintainers of Gentoo hosted projects to choose between Subversion/CVS.
By offering a choice of version control systems, developers who want or need certain features, can choose which one suits them or their project the best.
In addition, there are quite a few projects that should be Gentoo hosted, but are hosted elsewhere due to the fact that Subversion is not currently offered. Examples include the app-vim/gentoo-syntax package (), and app-shells/gentoo-bashcomp ().
Subversion has many advantages over CVS, including changesets, directory versioning, atomic commits, versioned metadata, and more efficient branching and tagging (). Despite these advantages, many developers feel that Subversion is not yet ready for the main tree due to scaling issues.
The following steps describe, in detail, the process of setting up the Subversion svnserve daemon (over SSH) and creating new repositories.
One repository should be created per project. Reasons for this include easier control over who has access, performance (checking out one big repository takes many times longer), ease-of-use (branching and merging are more difficult with one big repository), and meaningful revision numbers (since Subversion uses repository-global revision numbers, revision numbers for project A will increase on every commit even if no changes are made to project A).
$ emerge subversion
Write wrapper script for svnserve:
$ $EDITOR /usr/local/bin/svnserve-ssh && chmod +x \ > /usr/local/bin/svnserve-ssh #!/bin/sh umask 002 exec /usr/bin/svnserve "$@"
Modify the svnserve rc script:
$ cp /etc/init.d/svnserve /etc/init.d/svnserve-ssh $ sed -i 's:/usr/bin/svnserve:/usr/local/bin/svnserve-ssh:' \ > /etc/init.d/svnserve-ssh
Edit svnserve rc config:
$ ln -s /etc/init.d/svnserve /etc/init.d/svnserve-ssh $ $EDITOR /etc/init.d/svnserve
SVNSERVE_OPTS="--root=/var/svnroot" SVNSERVE_USER="svn" SVNSERVE_GROUP="svn"
Add svn group and user:
$ groupadd svn $ useradd svn -d /var/svnroot -s /bin/false -g svn
Create the directory that will hold the repositories:
$ mkdir -p /var/svnroot/conf
To create new repositories, simply run:
$ svnadmin create --fs-type fsfs /var/svnroot/<repos>
Make sure newly created/converted repositories have correct permissions. Of course, Infra might want to do this differently:
$ chown -Rf svn:users /var/svnroot/<repos> $ chmod -Rf 775 /var/svnroot/<repos>
Start it up:
$ /etc/init.d/svnserve-ssh start $ rc-update add svnserve-ssh default
Offering a choice between Subversion and CVS should in no way cause any backwards compatibility issues. Those developers who prefer to use CVS can continue to do so without any ill effects.
|||Version Control with Subversion http://svnbook.red-bean.com/en/1.0/ch01s03.html|
|||Migration of Gentoo Repositories from CVS to Subversion http://dev.gentoo.org/~trapni/CVS2SVN.MIGRATION|
|||cvs2svn Documentation http://cvs2svn.tigris.org/cvs2svn.html|