| 1 | GLEP: 36 |
1 | GLEP: 36 |
| 2 | Title: Subversion/CVS for Gentoo Hosted Projects |
2 | Title: Subversion/CVS for Gentoo Hosted Projects |
| 3 | Version: $Revision: 1.2 $ |
3 | Version: $Revision: 1.3 $ |
| 4 | Author: Aaron Walker <ka0ttic@gentoo.org> |
4 | Author: Aaron Walker <ka0ttic@gentoo.org> |
| 5 | Last-Modified: $Date: 2005/03/23 15:27:24 $ |
5 | Last-Modified: $Date: 2005/04/14 13:08:37 $ |
| 6 | Status: Draft |
6 | Status: Draft |
| 7 | Type: Standards Track |
7 | Type: Standards Track |
| 8 | Content-Type: text/x-rst |
8 | Content-Type: text/x-rst |
| 9 | Created: 11-Nov-2004 |
9 | Created: 11-Nov-2004 |
| 10 | Post-Date: 13-Mar-2005, 21-Mar-2005 |
10 | Post-Date: 13-Mar-2005, 21-Mar-2005, 14-Apr-2005 |
| 11 | |
11 | |
| 12 | Abstract |
12 | Abstract |
| 13 | ======== |
13 | ======== |
| 14 | |
14 | |
| 15 | Allow maintainers of Gentoo hosted projects to choose between Subversion/CVS. |
15 | Allow maintainers of Gentoo hosted projects to choose between Subversion/CVS. |
| … | |
… | |
| 33 | Specification |
33 | Specification |
| 34 | ============= |
34 | ============= |
| 35 | |
35 | |
| 36 | The following steps describe, in detail, the process of setting up the |
36 | The following steps describe, in detail, the process of setting up the |
| 37 | Subversion svnserve daemon (over SSH) and creating new repositories. |
37 | Subversion svnserve daemon (over SSH) and creating new repositories. |
| 38 | Information is already available for converting Gentoo CVS repositories ([4]_) |
38 | |
|
|
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 |
| 39 | in addition to the cvs2svn documentation itself ([5]_). |
47 | already available in addition to the cvs2svn documentation itself ([5]_). |
| 40 | |
48 | |
| 41 | 1. Install dev-util/subversion:: |
49 | 1. Install dev-util/subversion:: |
| 42 | |
50 | |
| 43 | $ emerge subversion |
51 | $ emerge subversion |
| 44 | |
52 | |
| 45 | 2. Write wrapper script for svnserve:: |
53 | 2. Write wrapper script for svnserve:: |
| 46 | |
54 | |
|
|
55 | $ $EDITOR /usr/local/bin/svnserve-ssh && chmod +x \ |
|
|
56 | > /usr/local/bin/svnserve-ssh |
| 47 | |
57 | |
| 48 | $ $EDITOR /usr/local/bin/svnserve-ssh && chmod +x \ |
|
|
| 49 | > /usr/local/bin/svnserve-ssh |
|
|
| 50 | |
|
|
| 51 | #!/bin/sh |
58 | #!/bin/sh |
| 52 | umask 002 |
59 | umask 002 |
| 53 | exec /usr/bin/svnserve "$@" |
60 | exec /usr/bin/svnserve "$@" |
| 54 | |
61 | |
| 55 | 3. Modify the svnserve rc script:: |
62 | 3. Modify the svnserve rc script:: |
| 56 | |
63 | |
| 57 | $ cp /etc/init.d/svnserve /etc/init.d/svnserve-ssh |
64 | $ cp /etc/init.d/svnserve /etc/init.d/svnserve-ssh |
| 58 | $ sed -i 's:/usr/bin/svnserve:/usr/local/bin/svnserve-ssh:' \ |
65 | $ sed -i 's:/usr/bin/svnserve:/usr/local/bin/svnserve-ssh:' \ |
| 59 | > /etc/init.d/svnserve-ssh |
66 | > /etc/init.d/svnserve-ssh |
| 60 | |
67 | |
| 61 | 4. Edit svnserve rc config:: |
68 | 4. Edit svnserve rc config:: |
| 62 | |
69 | |
| 63 | $ ln -s /etc/init.d/svnserve /etc/init.d/svnserve-ssh |
70 | $ ln -s /etc/init.d/svnserve /etc/init.d/svnserve-ssh |
| 64 | $ $EDITOR /etc/init.d/svnserve |
71 | $ $EDITOR /etc/init.d/svnserve |