/[gentoo]/xml/htdocs/proj/en/glep/glep-0036.txt
Gentoo

Contents of /xml/htdocs/proj/en/glep/glep-0036.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Thu Apr 14 13:08:37 2005 UTC (9 years, 4 months ago) by ka0ttic
Branch: MAIN
Changes since 1.2: +21 -14 lines
File MIME type: text/plain
Update.

1 g2boojum 1.1 GLEP: 36
2     Title: Subversion/CVS for Gentoo Hosted Projects
3 ka0ttic 1.3 Version: $Revision: 1.2 $
4 g2boojum 1.1 Author: Aaron Walker <ka0ttic@gentoo.org>
5 ka0ttic 1.3 Last-Modified: $Date: 2005/03/23 15:27:24 $
6 g2boojum 1.1 Status: Draft
7     Type: Standards Track
8     Content-Type: text/x-rst
9     Created: 11-Nov-2004
10 ka0ttic 1.3 Post-Date: 13-Mar-2005, 21-Mar-2005, 14-Apr-2005
11 g2boojum 1.1
12     Abstract
13     ========
14    
15     Allow maintainers of Gentoo hosted projects to choose between Subversion/CVS.
16    
17     Motivation
18     ==========
19    
20     By offering a choice of version control systems, developers who want or need
21     certain features, can choose which one suits them or their project the best.
22    
23     In addition, there are quite a few projects that should be Gentoo hosted, but
24     are hosted elsewhere due to the fact that Subversion is not currently offered.
25     Examples include the app-vim/gentoo-syntax package ([1]_), and
26 g2boojum 1.2 app-shells/gentoo-bashcomp ([2]_).
27 g2boojum 1.1
28     Subversion has many advantages over CVS, including changesets, directory
29     versioning, atomic commits, versioned metadata, and more efficient branching
30     and tagging ([3]_). Despite these advantages, many developers feel that
31     Subversion is not yet ready for the main tree due to scaling issues.
32    
33     Specification
34     =============
35    
36     The following steps describe, in detail, the process of setting up the
37     Subversion svnserve daemon (over SSH) and creating new repositories.
38 ka0ttic 1.3
39     One repository should be created per project. Reasons for this include easier
40     control over who has access, performance (checking out one big repository
41     takes many times longer), ease-of-use (branching and merging are more difficult
42     with one big repository), and meaningful revision numbers (since Subversion
43     uses repository-global revision numbers, revision numbers for project A will
44     increase on every commit even if no changes are made to project A).
45    
46     For preexisting CVS repositories, instructions on converting ([4]_) are
47     already available in addition to the cvs2svn documentation itself ([5]_).
48 g2boojum 1.1
49     1. Install dev-util/subversion::
50    
51     $ emerge subversion
52    
53     2. Write wrapper script for svnserve::
54    
55 ka0ttic 1.3 $ $EDITOR /usr/local/bin/svnserve-ssh && chmod +x \
56     > /usr/local/bin/svnserve-ssh
57 g2boojum 1.1
58 ka0ttic 1.3 #!/bin/sh
59     umask 002
60     exec /usr/bin/svnserve "$@"
61 g2boojum 1.1
62     3. Modify the svnserve rc script::
63    
64 ka0ttic 1.3 $ cp /etc/init.d/svnserve /etc/init.d/svnserve-ssh
65     $ sed -i 's:/usr/bin/svnserve:/usr/local/bin/svnserve-ssh:' \
66     > /etc/init.d/svnserve-ssh
67 g2boojum 1.1
68     4. Edit svnserve rc config::
69    
70     $ ln -s /etc/init.d/svnserve /etc/init.d/svnserve-ssh
71     $ $EDITOR /etc/init.d/svnserve
72    
73     SVNSERVE_OPTS="--root=/var/svnroot"
74     SVNSERVE_USER="svn"
75     SVNSERVE_GROUP="svn"
76    
77     5. Add svn group and user::
78    
79     $ groupadd svn
80     $ useradd svn -d /var/svnroot -s /bin/false -g svn
81    
82     6. Create the directory that will hold the repositories::
83    
84     $ mkdir -p /var/svnroot/conf
85    
86     7. To create new repositories, simply run::
87    
88 g2boojum 1.2 $ svnadmin create --fs-type fsfs /var/svnroot/<repos>
89 g2boojum 1.1
90     8. Make sure newly created/converted repositories have correct permissions. Of course, Infra might want to do this differently::
91    
92     $ chown -Rf svn:users /var/svnroot/<repos>
93     $ chmod -Rf 775 /var/svnroot/<repos>
94    
95     9. Start it up::
96    
97     $ /etc/init.d/svnserve-ssh start
98     $ rc-update add svnserve-ssh default
99    
100     Backwards Compatibility
101     =======================
102    
103     Offering a choice between Subversion and CVS should in no way cause any
104     backwards compatibility issues. Those developers who prefer to use CVS can
105     continue to do so without any ill effects.
106    
107     References
108     ==========
109    
110     .. [1] app-vim/gentoo-syntax
111     http://developer.berlios.de/projects/gentoo-syntax/
112 g2boojum 1.2 .. [2] app-shells/gentoo-bashcomp
113     http://developer.berlios.de/projects/gentoo-bashcomp/
114 g2boojum 1.1 .. [3] Version Control with Subversion
115     http://svnbook.red-bean.com/en/1.0/ch01s03.html
116     .. [4] Migration of Gentoo Repositories from CVS to Subversion
117     http://dev.gentoo.org/~trapni/CVS2SVN.MIGRATION
118     .. [5] cvs2svn Documentation
119     http://cvs2svn.tigris.org/cvs2svn.html
120    
121     Copyright
122     =========
123    
124     This document has been placed in the public domain.

  ViewVC Help
Powered by ViewVC 1.1.20