A little bit of everything answered here. : cvs

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Most recent edit on 2007-04-27 16:11:04 by JimLucas

Additions:




Edited on 2007-04-27 16:10:54 by JimLucas

Additions:
~-Setup a CVS Server on Fedora Core

Further reading about CVS usage can be found here

There seems to be a severe lack of step-by-step instructions on how to setup a CVS server using the Concurrent Versions System. The available documentation is sparse and less than complete. I have included a list of the books that are most useful for setting up a CVS server at the bottom of this page. This page does not attempt to explain how to use CVS, there is plenty of documentation already available for using CVS. This page instead is designed to give you step-by-step instructions on how to set up such a server. The instructions here assume you are using Red Hat Linux 6.1. If you are using a different distribution of Linux, then the procedure may be slightly different than the one listed here. The following procedure assumes you want to use pserver as your authentication method and not one of the other methods such as rsh, ssh, or Kerberos which are more complicated and not covered here. So in a nutshell, here are the steps to follow to get a CVS server up and running. This procedure requires many detailed and tedious steps so take your time and be sure to follow each step exactly:

Since Linux by default uses bash, all the examples presented here use that shell also. Feel free to use any text editor you like to edit the files. This setup document assumes you already know how to open files, edit them, and save them in Linux. All examples here use the emacs editor for editing files. All text shown in Courier bold should be entered exactly as shown below, with the exception of replacing items in brackets (<>) with real names or pathnames.

1) First, you need to decide which directory you want to store your CVS repository in. In all of the examples here we will store it in an empty directory we made at the root of the server named "repository". If you don't have this directory on your server, make one at the root by switching the current directory to root and then typing:

mkdir repository

(you might need to be logged in as root in order to do this).

When you perform the following steps, it is best if you are logged in as root or su (superuser). Assuming you have done that, type the following command at the root at the command prompt:

cd etc

and press return.

2) The next step is to add a variable to the profile file in the etc directory which will tell the CVS server where your repository is located. This environment variable is called CVSROOT. So type:

emacs profile

and press return to open the file. Scroll down towards the bottom of the file and insert the following three lines:

CVSROOT=/repository/
export CVSROOT
export EDITOR=emacs


The export EDITOR command is optional and can be omitted. It is mainly used to tell CVS which editor to open when it needs to get a checkin comment. If you will be using a GUI CVS client on Windows or Macintosh, you may omit this line. When finished, save the profile file (Control-x Control-s in emacs) and quit the editor (Control-X Control-c in emacs).

3) Next, you will need to add the following lines to the following files exactly as they are listed below. Where names of your users or directories are to be inserted, those names are indicated by <>. You should replace such instances with the proper names, but the edited files themselves should not have the brackets inserted into them. In other words, the brackets are only shown in this document in order to indicate that a real name is needed in those locations. Also, do not put quotes around any inserted names unless indicated by quotes here.

emacs /etc/services -add:

cvspserver 2401/tcp (if not already present)

emacs /etc/group -add:

cvs:*:105:<userName1>, <userName2>

(These names should match exactly user names on the system and in /etc/shadow)

/etc/inetd.conf - add:

cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/repository pserver

Be sure to note that this entry does *not* have a trailing slash at the end.

Some Linux systems will require an environment variable to be set thusly:

cvspserver stream tcp nowait root /usr/bin/env env -i /usr/bin/cvs -f --allow-root=/repository pserver

If for some reason on your client system you get errors like "Connection reset by peer", then you can try this alternate line in the same file (instead of the line above):

cvspserver stream tcp nowait root /usr/local/bin/cvs cvs -T/tmp -f --allow-root=/u01/repository pserver

4) Next, navigate back to root and type:

cvs -d /repository init

This will create the initial repository in /repository/CVSROOT/

5) The next part is a little tricky, but it is not too hard to accomplish. It involves setting up passwords for the pserver, CVS's own server authentication method. This step assumes that you have already set up user accounts and system passwords for each user you want to have access to the CVS server as well as having entered those users into the /etc/groups file as listed in step 6 above. So assuming that that has been done, cd to the /etc directory and type:

cp shadow /<full repository path>/CVSROOT/passwd

In the /etc directory, there is a file named shadow. This file contains all the real system passwords for the system along with a list of users associated with those passwords. CVS's pserver uses a similar password syntax to shadow except that it expects to look for these passwords in a file named passwd in the repository's CVSROOT directory. Executing the above line simply makes a copy of the shadow file from /etc into the repository's directory and renames it to passwd. However, we are not quite done with the passwd file just yet.

6) Next, cd to /repository and type:

chgrp -R cvs .
chmod ug+rwx . CVSROOT


This will set the permissions on all the files in CVSROOT to the cvs group.

7) Next, cd to /repository/CVSROOT and type:

emacs passwd

This will open the passwd file for editing. When you open it, you will see something like the following:

root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
bin:*:11060:0:99999:7:::
daemon:*:11060:0:99999:7:::
adm:*:11060:0:99999:7:::
lp:*:11060:0:99999:7:::
sync:*:11060:0:99999:7:::
shutdown:*:11060:0:99999:7:::
halt:*:11060:0:99999:7:::
mail:*:11060:0:99999:7:::
news:*:11060:0:99999:7:::
uucp:*:11060:0:99999:7:::
operator:*:11060:0:99999:7:::
games:*:11060:0:99999:7:::
gopher:*:11060:0:99999:7:::
ftp:*:11060:0:99999:7:::
nobody:*:11060:0:99999:7:::
xfs:!!:11060:0:99999:7:::
gdm:!!:11060:0:99999:7:::
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324
.
.
.


Note that the first line of this file and the last few lines have the same format, but the middle part has a different format. In the passwd file only, you want to delete the entire middle block so that you are left with only users at the bottom and root at the top. After such an edit, the file would look like this:

root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324
.
.
.


Next, you must delete part of each password since pserver does not use all the password info for each user. Edit each line so that only the text between the first and second colons remains (but leaving the second colon intact). So after the second edit, the file might look like this:

root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:
.
.
.


Save the file and exit your text editor. This concludes the editing of the passwd file. DO NOT make these same changes to the /etc/shadow file - it must remain unedited or your system may stop working correctly!

8) Next, you must add modules to the CVSROOT so that CVS knows where to put modules when you import or check them in.One very important thing to know is that for each module you want to have on your CVS server, you should have a directory with that name alongside the CVSROOT directory. Open the 'modules' file for editing by typing:

emacs modules

At the very end of the file, add a new line and then for each module that you want, type:

<Module name><TAB><Module name>

9) Finally you must create an empty directory for each of the module names you added in step 9. So cd to the /repository dir and for each module name you added in step 6 type:

cd mkdir <Module name1>
cd mkdir <Module name2>
.
.


9.5) Now, you must make each user you added to your etc/group file a member of the default group 'cvs'. To do so, be sure you are logged in as root, and then type:

usermod -g cvs <username1>
usermod -g cvs <username2>
.
.


When you are finished with each of your users, reboot your server machine.

10) If you want to set watches on all of the files in your repository, edit the CVSROOT/notify file by uncommenting the following line at the bottom of the file:

#ALL mail %s -s "CVS notification"

The "CVS notification" string can be changed to anything you want: it is the text that will be sent as the subject line of all watches email notifications. Be sure to checkout and commit these changes instead of editing them on the server machine directly. For remote users, you will also need to edit the CVSROOT/users file - adding names and emails addresses of those remote users whom you want to send email notification to. The format of the users file is:

CVS_USER:EMAIL_ADDRESS

Example:

john_smith:smith@anywhere.com

11) If after setting up the server, you get errors like this:

cvs [checkout aborted]: cannot expand modules

It is probably not a modules problem, but rather almost certainly indicates a repository permissions problem. Usually making the directory in question readable using UNIX file permissions will solve the problem.

12) You can turn on a log of all CVS client/server transactions by setting the environment variable CVS_CLIENT_LOG like this:

CVS_CLIENT_LOG=<log_file_name>: export CVS_CLIENT_LOG

13) If on a Windows client machine you get errors saying that it can't find the .cvpass file, try adding this line to your autoexec.bat file:

set HOME=C:

This completes the setup of the CVS server. You must now reboot the server machine so that the new inetd and groups settings take effect. Reboot the machine and when the machine comes up, you may now log into the machine with a CVS client using the system user names and passwords added to the cvs group and the CVSROOT/passwd file.

You can get a variety of network configuration information about your server by logging in as root or superuser and using the /bin/ifconfig or /sbin/ifconfig command at the command prompt.

Original version of this was found here




Edited on 2007-04-26 12:16:00 by JimLucas

Additions:
Further reading about CVS usage can be found here



Edited on 2007-04-26 12:14:48 by JimLucas

Additions:
Original version of this was found here



Edited on 2007-04-26 11:24:22 by JimLucas

Additions:
1) First, you need to decide which directory you want to store your CVS repository in. In all of the examples here we will store it in an empty directory we made at the root of the server named "repository". If you don't have this directory on your server, make one at the root by switching the current directory to root and then typing:
2) The next step is to add a variable to the profile file in the etc directory which will tell the CVS server where your repository is located. This environment variable is called CVSROOT. So type:
3) Next, you will need to add the following lines to the following files exactly as they are listed below. Where names of your users or directories are to be inserted, those names are indicated by <>. You should replace such instances with the proper names, but the edited files themselves should not have the brackets inserted into them. In other words, the brackets are only shown in this document in order to indicate that a real name is needed in those locations. Also, do not put quotes around any inserted names unless indicated by quotes here.
4) Next, navigate back to root and type:
5) The next part is a little tricky, but it is not too hard to accomplish. It involves setting up passwords for the pserver, CVS's own server authentication method. This step assumes that you have already set up user accounts and system passwords for each user you want to have access to the CVS server as well as having entered those users into the /etc/groups file as listed in step 6 above. So assuming that that has been done, cd to the /etc directory and type:
6) Next, cd to /repository and type:
7) Next, cd to /repository/CVSROOT and type:
8) Next, you must add modules to the CVSROOT so that CVS knows where to put modules when you import or check them in.One very important thing to know is that for each module you want to have on your CVS server, you should have a directory with that name alongside the CVSROOT directory. Open the 'modules' file for editing by typing:
9) Finally you must create an empty directory for each of the module names you added in step 9. So cd to the /repository dir and for each module name you added in step 6 type:
9.5) Now, you must make each user you added to your etc/group file a member of the default group 'cvs'. To do so, be sure you are logged in as root, and then type:
10) If you want to set watches on all of the files in your repository, edit the CVSROOT/notify file by uncommenting the following line at the bottom of the file:
11) If after setting up the server, you get errors like this:
12) You can turn on a log of all CVS client/server transactions by setting the environment variable CVS_CLIENT_LOG like this:
13) If on a Windows client machine you get errors saying that it can't find the .cvpass file, try adding this line to your autoexec.bat file:


Deletions:
4) First, you need to decide which directory you want to store your CVS repository in. In all of the examples here we will store it in an empty directory we made at the root of the server named "repository". If you don't have this directory on your server, make one at the root by switching the current directory to root and then typing:
5) The first step is to add a variable to the profile file in the etc directory which will tell the CVS server where your repository is located. This environment variable is called CVSROOT. So type:
6) Next, you will need to add the following lines to the following files exactly as they are listed below. Where names of your users or directories are to be inserted, those names are indicated by <>. You should replace such instances with the proper names, but the edited files themselves should not have the brackets inserted into them. In other words, the brackets are only shown in this document in order to indicate that a real name is needed in those locations. Also, do not put quotes around any inserted names unless indicated by quotes here.
7) Next, navigate back to root and type:
8) The next part is a little tricky, but it is not too hard to accomplish. It involves setting up passwords for the pserver, CVS's own server authentication method. This step assumes that you have already set up user accounts and system passwords for each user you want to have access to the CVS server as well as having entered those users into the /etc/groups file as listed in step 6 above. So assuming that that has been done, cd to the /etc directory and type:
9) Next, cd to /repository and type:
10) Next, cd to /repository/CVSROOT and type:
11) Next, you must add modules to the CVSROOT so that CVS knows where to put modules when you import or check them in.One very important thing to know is that for each module you want to have on your CVS server, you should have a directory with that name alongside the CVSROOT directory. Open the 'modules' file for editing by typing:
12) Finally you must create an empty directory for each of the module names you added in step 9. So cd to the /repository dir and for each module name you added in step 9 type:
12.5) Now, you must make each user you added to your etc/group file a member of the default group 'cvs'. To do so, be sure you are logged in as root, and then type:
13) If you want to set watches on all of the files in your repository, edit the CVSROOT/notify file by uncommenting the following line at the bottom of the file:
14) If after setting up the server, you get errors like this:
15) You can turn on a log of all CVS client/server transactions by setting the environment variable CVS_CLIENT_LOG like this:
16) If on a Windows client machine you get errors saying that it can't find the .cvpass file, try adding this line to your autoexec.bat file:




Edited on 2007-04-26 11:22:25 by JimLucas

Additions:

HOW TO CREATE A CVS SERVER USING Fedora Core



Deletions:

HOW TO CREATE A CVS SERVER USING Fedora Core





Edited on 2007-04-26 11:22:14 by JimLucas

Additions:

HOW TO CREATE A CVS SERVER USING Fedora Core



Deletions:
HOW TO CREATE A CVS SERVER USING Fedora Core




Edited on 2007-04-26 11:21:09 by JimLucas

Additions:
chgrp -R cvs . chmod ug+rwx . CVSROOT
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
.

root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
.

root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:
.

cd mkdir <Module name1>
.

usermod -g cvs <username1>
.


Deletions:
chgrp -R cvs .
chmod ug+rwx . CVSROOT

root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444


root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444


root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:


cd mkdir <Module name1>


usermod -g cvs <username1>




Edited on 2007-04-26 11:20:12 by JimLucas

Additions:
CVSROOT=/repository/
export CVSROOT
export EDITOR=emacs


Deletions:
CVSROOT=/repository/
export CVSROOT
export EDITOR=emacs




Edited on 2007-04-26 11:18:53 by JimLucas

Additions:
HOW TO CREATE A CVS SERVER USING Fedora Core


root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
bin:*:11060:0:99999:7:::
daemon:*:11060:0:99999:7:::
adm:*:11060:0:99999:7:::
lp:*:11060:0:99999:7:::
sync:*:11060:0:99999:7:::
shutdown:*:11060:0:99999:7:::
halt:*:11060:0:99999:7:::
mail:*:11060:0:99999:7:::
news:*:11060:0:99999:7:::
uucp:*:11060:0:99999:7:::
operator:*:11060:0:99999:7:::
games:*:11060:0:99999:7:::
gopher:*:11060:0:99999:7:::
ftp:*:11060:0:99999:7:::
nobody:*:11060:0:99999:7:::
xfs:!!:11060:0:99999:7:::
gdm:!!:11060:0:99999:7:::
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324


root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324


root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:


cd mkdir <Module name1>
cd mkdir <Module name2>


usermod -g cvs <username1>
usermod -g cvs <username2>


Deletions:

HOW TO CREATE A CVS SERVER USING Fedora Core

 
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
bin:*:11060:0:99999:7:::
daemon:*:11060:0:99999:7:::
adm:*:11060:0:99999:7:::
lp:*:11060:0:99999:7:::
sync:*:11060:0:99999:7:::
shutdown:*:11060:0:99999:7:::
halt:*:11060:0:99999:7:::
mail:*:11060:0:99999:7:::
news:*:11060:0:99999:7:::
uucp:*:11060:0:99999:7:::
operator:*:11060:0:99999:7:::
games:*:11060:0:99999:7:::
gopher:*:11060:0:99999:7:::
ftp:*:11060:0:99999:7:::
nobody:*:11060:0:99999:7:::
xfs:!!:11060:0:99999:7:::
gdm:!!:11060:0:99999:7:::
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324
.
.
.
 
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324
.
.
.
 
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:
.
.
.
 
 
 
 
cd mkdir <Module name1>
cd mkdir <Module name2>
 
usermod -g cvs <username1>
usermod -g cvs <username2>
.
.




Edited on 2007-04-26 11:15:15 by JimLucas

Additions:

HOW TO CREATE A CVS SERVER USING Fedora Core



Deletions:
HOW TO CREATE A CVS SERVER USING Fedora Core




Edited on 2007-04-26 11:07:06 by JimLucas

Additions:
mkdir repository cd etc
emacs profile
CVSROOT=/repository/
export CVSROOT
export EDITOR=emacs
emacs /etc/services -add:
cvspserver 2401/tcp (if not already present)
emacs /etc/group -add:
cvs:*:105:<userName1>, <userName2>
/etc/inetd.conf - add:
cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/repository pserver
cvspserver stream tcp nowait root /usr/bin/env env -i /usr/bin/cvs -f --allow-root=/repository pserver
cvspserver stream tcp nowait root /usr/local/bin/cvs cvs -T/tmp -f --allow-root=/u01/repository pserver
cvs -d /repository init
cp shadow /<full repository path>/CVSROOT/passwd
chgrp -R cvs .
chmod ug+rwx . CVSROOT
emacs passwd
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
bin:*:11060:0:99999:7:::
daemon:*:11060:0:99999:7:::
adm:*:11060:0:99999:7:::
lp:*:11060:0:99999:7:::
sync:*:11060:0:99999:7:::
shutdown:*:11060:0:99999:7:::
halt:*:11060:0:99999:7:::
mail:*:11060:0:99999:7:::
news:*:11060:0:99999:7:::
uucp:*:11060:0:99999:7:::
operator:*:11060:0:99999:7:::
games:*:11060:0:99999:7:::
gopher:*:11060:0:99999:7:::
ftp:*:11060:0:99999:7:::
nobody:*:11060:0:99999:7:::
xfs:!!:11060:0:99999:7:::
gdm:!!:11060:0:99999:7:::
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324
.
.
.
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324
.
.
.
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:
.
.
.
emacs modules
<Module name><TAB><Module name>
cd mkdir <Module name1>
cd mkdir <Module name2>
usermod -g cvs <username1>
usermod -g cvs <username2>
.
.
#ALL mail %s -s "CVS notification"
CVS_USER:EMAIL_ADDRESS
cvs [checkout aborted]: cannot expand modules
CVS_CLIENT_LOG=<log_file_name>: export CVS_CLIENT_LOG
set HOME=C:


Deletions:
mkdir repository
cd etc
emacs profile
CVSROOT=/repository/
export CVSROOT
export EDITOR=emacs
emacs /etc/services -add:
cvspserver 2401/tcp (if not already present)
emacs /etc/group -add:
cvs:*:105:<userName1>, <userName2>
/etc/inetd.conf - add:
cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/repository pserver
cvspserver stream tcp nowait root /usr/bin/env env -i /usr/bin/cvs -f --allow-root=/repository pserver
cvspserver stream tcp nowait root /usr/local/bin/cvs cvs -T/tmp -f --allow-root=/u01/repository pserver
cvs -d /repository init
cp shadow /<full repository path>/CVSROOT/passwd
chgrp -R cvs .
chmod ug+rwx . CVSROOT
emacs passwd
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
bin:*:11060:0:99999:7:::
daemon:*:11060:0:99999:7:::
adm:*:11060:0:99999:7:::
lp:*:11060:0:99999:7:::
sync:*:11060:0:99999:7:::
shutdown:*:11060:0:99999:7:::
halt:*:11060:0:99999:7:::
mail:*:11060:0:99999:7:::
news:*:11060:0:99999:7:::
uucp:*:11060:0:99999:7:::
operator:*:11060:0:99999:7:::
games:*:11060:0:99999:7:::
gopher:*:11060:0:99999:7:::
ftp:*:11060:0:99999:7:::
nobody:*:11060:0:99999:7:::
xfs:!!:11060:0:99999:7:::
gdm:!!:11060:0:99999:7:::
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324
.
.
.
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324
.
.
.
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:
.
.
.
emacs modules
<Module name><TAB><Module name>
cd mkdir <Module name1>
cd mkdir <Module name2>
usermod -g cvs <username1>
usermod -g cvs <username2>
.
.
#ALL mail %s -s "CVS notification"
CVS_USER:EMAIL_ADDRESS
cvs [checkout aborted]: cannot expand modules
CVS_CLIENT_LOG=<log_file_name>: export CVS_CLIENT_LOG
set HOME=C:




Edited on 2007-04-26 11:02:02 by JimLucas

Additions:
5) The first step is to add a variable to the profile file in the etc directory which will tell the CVS server where your repository is located. This environment variable is called CVSROOT. So type:

Deletions:
5) The first step is to add a variable to the profile file in the etc directory which will tell the CVS server where your repository is located. This environment variable is called CVSROOT. So type:



Edited on 2007-04-26 11:00:24 by JimLucas

Additions:
There seems to be a severe lack of step-by-step instructions on how to setup a CVS server using the Concurrent Versions System. The available documentation is sparse and less than complete. I have included a list of the books that are most useful for setting up a CVS server at the bottom of this page. This page does not attempt to explain how to use CVS, there is plenty of documentation already available for using CVS. This page instead is designed to give you step-by-step instructions on how to set up such a server. The instructions here assume you are using Red Hat Linux 6.1. If you are using a different distribution of Linux, then the procedure may be slightly different than the one listed here. The following procedure assumes you want to use pserver as your authentication method and not one of the other methods such as rsh, ssh, or Kerberos which are more complicated and not covered here. So in a nutshell, here are the steps to follow to get a CVS server up and running. This procedure requires many detailed and tedious steps so take your time and be sure to follow each step exactly:
Since Linux by default uses bash, all the examples presented here use that shell also. Feel free to use any text editor you like to edit the files. This setup document assumes you already know how to open files, edit them, and save them in Linux. All examples here use the emacs editor for editing files. All text shown in Courier bold should be entered exactly as shown below, with the exception of replacing items in brackets (<>) with real names or pathnames.
4) First, you need to decide which directory you want to store your CVS repository in. In all of the examples here we will store it in an empty directory we made at the root of the server named "repository". If you don't have this directory on your server, make one at the root by switching the current directory to root and then typing:
(you might need to be logged in as root in order to do this).
When you perform the following steps, it is best if you are logged in as root or su (superuser). Assuming you have done that, type the following command at the root at the command prompt:
5) The first step is to add a variable to the profile file in the etc directory which will tell the CVS server where your repository is located. This environment variable is called CVSROOT. So type:
and press return to open the file. Scroll down towards the bottom of the file and insert the following three lines:
The export EDITOR command is optional and can be omitted. It is mainly used to tell CVS which editor to open when it needs to get a checkin comment. If you will be using a GUI CVS client on Windows or Macintosh, you may omit this line. When finished, save the profile file (Control-x Control-s in emacs) and quit the editor (Control-X Control-c in emacs).
6) Next, you will need to add the following lines to the following files exactly as they are listed below. Where names of your users or directories are to be inserted, those names are indicated by <>. You should replace such instances with the proper names, but the edited files themselves should not have the brackets inserted into them. In other words, the brackets are only shown in this document in order to indicate that a real name is needed in those locations. Also, do not put quotes around any inserted names unless indicated by quotes here.
(These names should match exactly user names on the system and in /etc/shadow)
cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/repository pserver
Be sure to note that this entry does *not* have a trailing slash at the end.
Some Linux systems will require an environment variable to be set thusly:
cvspserver stream tcp nowait root /usr/bin/env env -i /usr/bin/cvs -f --allow-root=/repository pserver
If for some reason on your client system you get errors like "Connection reset by peer", then you can try this alternate line in the same file (instead of the line above):
cvspserver stream tcp nowait root /usr/local/bin/cvs cvs -T/tmp -f --allow-root=/u01/repository pserver
This will create the initial repository in /repository/CVSROOT/
8) The next part is a little tricky, but it is not too hard to accomplish. It involves setting up passwords for the pserver, CVS's own server authentication method. This step assumes that you have already set up user accounts and system passwords for each user you want to have access to the CVS server as well as having entered those users into the /etc/groups file as listed in step 6 above. So assuming that that has been done, cd to the /etc directory and type:
cp shadow /<full repository path>/CVSROOT/passwd
In the /etc directory, there is a file named shadow. This file contains all the real system passwords for the system along with a list of users associated with those passwords. CVS's pserver uses a similar password syntax to shadow except that it expects to look for these passwords in a file named passwd in the repository's CVSROOT directory. Executing the above line simply makes a copy of the shadow file from /etc into the repository's directory and renames it to passwd. However, we are not quite done with the passwd file just yet.
This will set the permissions on all the files in CVSROOT to the cvs group.
10) Next, cd to /repository/CVSROOT and type:
This will open the passwd file for editing. When you open it, you will see something like the following:
Note that the first line of this file and the last few lines have the same format, but the middle part has a different format. In the passwd file only, you want to delete the entire middle block so that you are left with only users at the bottom and root at the top. After such an edit, the file would look like this:
Next, you must delete part of each password since pserver does not use all the password info for each user. Edit each line so that only the text between the first and second colons remains (but leaving the second colon intact). So after the second edit, the file might look like this:
Save the file and exit your text editor. This concludes the editing of the passwd file. DO NOT make these same changes to the /etc/shadow file - it must remain unedited or your system may stop working correctly!
11) Next, you must add modules to the CVSROOT so that CVS knows where to put modules when you import or check them in.One very important thing to know is that for each module you want to have on your CVS server, you should have a directory with that name alongside the CVSROOT directory. Open the 'modules' file for editing by typing:
At the very end of the file, add a new line and then for each module that you want, type:
<Module name><TAB><Module name>
12) Finally you must create an empty directory for each of the module names you added in step 9. So cd to the /repository dir and for each module name you added in step 9 type:
12.5) Now, you must make each user you added to your etc/group file a member of the default group 'cvs'. To do so, be sure you are logged in as root, and then type:
When you are finished with each of your users, reboot your server machine.
13) If you want to set watches on all of the files in your repository, edit the CVSROOT/notify file by uncommenting the following line at the bottom of the file:
The "CVS notification" string can be changed to anything you want: it is the text that will be sent as the subject line of all watches email notifications. Be sure to checkout and commit these changes instead of editing them on the server machine directly. For remote users, you will also need to edit the CVSROOT/users file - adding names and emails addresses of those remote users whom you want to send email notification to. The format of the users file is:
14) If after setting up the server, you get errors like this:
cvs [checkout aborted]: cannot expand modules
It is probably not a modules problem, but rather almost certainly indicates a repository permissions problem. Usually making the directory in question readable using UNIX file permissions will solve the problem.
15) You can turn on a log of all CVS client/server transactions by setting the environment variable CVS_CLIENT_LOG like this:
CVS_CLIENT_LOG=<log_file_name>: export CVS_CLIENT_LOG
16) If on a Windows client machine you get errors saying that it can't find the .cvpass file, try adding this line to your autoexec.bat file:
This completes the setup of the CVS server. You must now reboot the server machine so that the new inetd and groups settings take effect. Reboot the machine and when the machine comes up, you may now log into the machine with a CVS client using the system user names and passwords added to the cvs group and the CVSROOT/passwd file.
You can get a variety of network configuration information about your server by logging in as root or superuser and using the /bin/ifconfig or /sbin/ifconfig command at the command prompt.


Deletions:
There seems to be a severe lack of step-by-step
instructions on how to setup a CVS
server using the Concurrent Versions System. The available documentation is sparse
and less than complete. I have included a list of the books
that are most useful for setting up a CVS server at the
bottom of this page. This page does not attempt to explain
how to use CVS, there
is plenty of documentation already available for using CVS.
This page instead is designed to give you step-by-step
instructions on how to set up such a server. The
instructions here assume you are using Red Hat Linux 6.1. If
you are using a different distribution of Linux, then the
procedure may be slightly different than the one listed
here. The following procedure assumes you want to use
pserver as your authentication method and not one of the
other methods such as rsh, ssh, or Kerberos which are more
complicated and not covered here. So in a nutshell, here are
the steps to follow to get a CVS
server up and running. This procedure requires many detailed
and tedious steps so take your time and be sure to follow
each step exactly:
Since Linux by default uses bash, all the examples
presented here use that shell also. Feel free to use any
text editor you like to edit the files. This setup document
assumes you already know how to open files, edit them, and
save them in Linux. All examples here use the emacs
editor for editing files. All text shown in Courier
bold
should be entered exactly as shown below, with the
exception of replacing items in brackets (<>) with
real names or pathnames.
4) First, you need to decide which directory you want to
store your CVS repository in. In all of the examples here we
will store it in an empty directory we made at the root of
the server named "repository". If you don't have this
directory on your server, make one at the root by switching
the current directory to root and then typing:
(you might need to be logged in as root in order
to do this).
When you perform the following steps, it is best if you
are logged in as root or su (superuser).
Assuming you have done that, type the following command at
the root at the command prompt:
5) The first step is to add a variable to the
profile file in the etc directory which will
tell the CVS server where your repository is located. This
environment variable is called CVSROOT. So type:
and press return to open the file. Scroll down towards
the bottom of the file and insert the following three
lines:
The export EDITOR command is optional and can be
omitted. It is mainly used to tell CVS which editor to open
when it needs to get a checkin comment. If you will be using
a GUI CVS client on Windows or Macintosh, you may omit this
line. When finished, save the profile file (Control-x
Control-s in emacs) and quit the editor (Control-X Control-c
in emacs).
6) Next, you will need to add the following lines to the
following files exactly as they are listed below. Where
names of your users or directories are to be inserted, those
names are indicated by <>. You should replace such
instances with the proper names, but the edited files
themselves should not have the brackets inserted into them.
In other words, the brackets are only shown in this document
in order to indicate that a real name is needed in those
locations. Also, do not put quotes around any inserted names
unless indicated by quotes here.
(These names should match exactly user names on the
system and in /etc/shadow)
cvspserver stream tcp nowait root /usr/bin/cvs cvs
--allow-root=/repository pserver

Be sure to note that this entry does *not* have a
trailing slash at the end.
Some Linux systems will require an environment variable
to be set thusly:
cvspserver stream tcp nowait root /usr/bin/env env -i
/usr/bin/cvs -f --allow-root=/repository pserver

If for some reason on your client system you get errors
like "Connection reset by peer", then you can try this
alternate line in the same file (instead of the line
above):
cvspserver stream tcp nowait root /usr/local/bin/cvs
cvs -T/tmp -f --allow-root=/u01/repository pserver

This will create the initial repository in
/repository/CVSROOT/
8) The next part is a little tricky, but it is not too
hard to accomplish. It involves setting up passwords for the
pserver, CVS's own server authentication method. This step
assumes that you have already set up user accounts and
system passwords for each user you want to have access to
the CVS server as well as having entered those users into
the /etc/groups file as listed in step 6 above. So
assuming that that has been done, cd to the
/etc directory and type:
cp shadow /<full repository
path>/CVSROOT/passwd

In the /etc directory, there is a file named
shadow. This file contains all the real system
passwords for the system along with a list of users
associated with those passwords. CVS's pserver uses a
similar password syntax to shadow except that it
expects to look for these passwords in a file named
passwd in the repository's CVSROOT directory.
Executing the above line simply makes a copy of the
shadow file from /etc into the repository's
directory and renames it to passwd. However, we are
not quite done with the passwd file just yet.
This will set the permissions on all the files in
CVSROOT to the cvs group.
10) Next, cd to /repository/CVSROOT and
type:
This will open the passwd file for editing. When
you open it, you will see something like the following:
Note that the first line of this file and the last few
lines have the same format, but the middle part has a
different format. In the passwd file only, you want
to delete the entire middle block so that you are left with
only users at the bottom and root at the top. After such an
edit, the file would look like this:
Next, you must delete part of each password since pserver
does not use all the password info for each user. Edit each
line so that only the text between the first and second
colons remains (but leaving the second colon intact). So
after the second edit, the file might look like this:
Save the file and exit your text editor. This concludes
the editing of the passwd file. DO NOT make these
same changes to the /etc/shadow file - it must remain
unedited or your system may stop working correctly!
11) Next, you must add modules to the CVSROOT so that CVS
knows where to put modules when you import or check them
in.One very important thing to know is that for each module
you want to have on your CVS server, you should have a
directory with that name alongside the CVSROOT directory.
Open the 'modules' file for editing by typing:
At the very end of the file, add a new line and then for
each module that you want, type:
<Module name><TAB><Module
name>

12) Finally you must create an empty directory for each
of the module names you added in step 9. So cd to the
/repository dir and for each module name you added in
step 9 type:
12.5) Now, you must make each user you added to your
etc/group file a member of the default group 'cvs'. To do
so, be sure you are logged in as root, and then type:
When you are finished with each of your users, reboot
your server machine.
13) If you want to set watches on all of the files in
your repository, edit the CVSROOT/notify file by
uncommenting the following line at the bottom of the
file:
The "CVS notification" string can be changed to anything
you want: it is the text that will be sent as the subject
line of all watches email notifications. Be sure to checkout
and commit these changes instead of editing them on the
server machine directly. For remote users, you will also
need to edit the CVSROOT/users file - adding names and
emails addresses of those remote users whom you want to send
email notification to. The format of the users file is:
14) If after setting up the server, you get errors like
this:
cvs [checkout aborted]: cannot expand
modules

It is probably not a modules problem, but rather almost
certainly indicates a repository permissions problem.
Usually making the directory in question readable using UNIX
file permissions will solve the problem.
15) You can turn on a log of all CVS client/server
transactions by setting the environment variable
CVS_CLIENT_LOG like this:
CVS_CLIENT_LOG=<log_file_name>: export
CVS_CLIENT_LOG

16) If on a Windows client machine you get errors saying
that it can't find the .cvpass file, try adding this line to
your autoexec.bat file:
This completes the setup of the CVS server. You must now
reboot the server machine so that the new inetd and groups
settings take effect. Reboot the machine and when the
machine comes up, you may now log into the machine with a
CVS client using the system user names and passwords added
to the cvs group and the CVSROOT/passwd file.
You can get a variety of network configuration
information about your server by logging in as root or
superuser and using the /bin/ifconfig or
/sbin/ifconfig command at the command prompt.




Edited on 2007-04-26 10:53:35 by JimLucas

Additions:
HOW TO CREATE A CVS SERVER USING Fedora Core


Deletions:
HOW TO CREATE A CVS SERVER USING Fedora Core




Edited on 2007-04-26 10:52:59 by JimLucas

Additions:
HOW TO CREATE A CVS SERVER USING Fedora Core

instructions on how to setup a CVS
server using the Concurrent Versions System. The available documentation is sparse
how to use CVS, there
the steps to follow to get a CVS


Deletions:
HOW TO CREATE A <A HREF="http://www.cvshome.org/">**CVS**</A>** SERVER USING <A HREF="http://fedoraproject.org/wiki/">**Fedora Core</A>

instructions on how to setup a <A HREF="http://www.cvshome.org/">CVS</A>
server using the <A HREF="http://www.cvshome.org/">Concurrent
Versions System</A>. The available documentation is sparse
how to use <A HREF="http://www.cvshome.org/">CVS</A>, there
the steps to follow to get a <A HREF="http://www.cvshome.org/">CVS</A>




Edited on 2007-04-26 10:48:44 by JimLucas

Additions:
HOW TO CREATE A <A HREF="http://www.cvshome.org/">**CVS**</A>** SERVER USING <A HREF="http://fedoraproject.org/wiki/">**Fedora Core</A>

There seems to be a severe lack of step-by-step
instructions on how to setup a <A HREF="http://www.cvshome.org/">CVS</A>
server using the <A HREF="http://www.cvshome.org/">Concurrent
Versions System</A>. The available documentation is sparse
and less than complete. I have included a list of the books
that are most useful for setting up a CVS server at the
bottom of this page. This page does not attempt to explain
how to use <A HREF="http://www.cvshome.org/">CVS</A>, there
is plenty of documentation already available for using CVS.
This page instead is designed to give you step-by-step
instructions on how to set up such a server. The
instructions here assume you are using Red Hat Linux 6.1. If
you are using a different distribution of Linux, then the
procedure may be slightly different than the one listed
here. The following procedure assumes you want to use
pserver as your authentication method and not one of the
other methods such as rsh, ssh, or Kerberos which are more
complicated and not covered here. So in a nutshell, here are
the steps to follow to get a <A HREF="http://www.cvshome.org/">CVS</A>
server up and running. This procedure requires many detailed
and tedious steps so take your time and be sure to follow
each step exactly:
Since Linux by default uses bash, all the examples
presented here use that shell also. Feel free to use any
text editor you like to edit the files. This setup document
assumes you already know how to open files, edit them, and
save them in Linux. All examples here use the emacs
editor for editing files. All text shown in Courier
bold
should be entered exactly as shown below, with the
exception of replacing items in brackets (<>) with
real names or pathnames.
4) First, you need to decide which directory you want to
store your CVS repository in. In all of the examples here we
will store it in an empty directory we made at the root of
the server named "repository". If you don't have this
directory on your server, make one at the root by switching
the current directory to root and then typing:
mkdir repository
(you might need to be logged in as root in order
to do this).
When you perform the following steps, it is best if you
are logged in as root or su (superuser).
Assuming you have done that, type the following command at
the root at the command prompt:
cd etc
and press return.
5) The first step is to add a variable to the
profile file in the etc directory which will
tell the CVS server where your repository is located. This
environment variable is called CVSROOT. So type:
emacs profile
and press return to open the file. Scroll down towards
the bottom of the file and insert the following three
lines:
CVSROOT=/repository/
export CVSROOT
export EDITOR=emacs
The export EDITOR command is optional and can be
omitted. It is mainly used to tell CVS which editor to open
when it needs to get a checkin comment. If you will be using
a GUI CVS client on Windows or Macintosh, you may omit this
line. When finished, save the profile file (Control-x
Control-s in emacs) and quit the editor (Control-X Control-c
in emacs).
6) Next, you will need to add the following lines to the
following files exactly as they are listed below. Where
names of your users or directories are to be inserted, those
names are indicated by <>. You should replace such
instances with the proper names, but the edited files
themselves should not have the brackets inserted into them.
In other words, the brackets are only shown in this document
in order to indicate that a real name is needed in those
locations. Also, do not put quotes around any inserted names
unless indicated by quotes here.
emacs /etc/services -add:
cvspserver 2401/tcp (if not already present)
emacs /etc/group -add:
cvs:*:105:<userName1>, <userName2>
(These names should match exactly user names on the
system and in /etc/shadow)
/etc/inetd.conf - add:
cvspserver stream tcp nowait root /usr/bin/cvs cvs
--allow-root=/repository pserver

Be sure to note that this entry does *not* have a
trailing slash at the end.
Some Linux systems will require an environment variable
to be set thusly:
cvspserver stream tcp nowait root /usr/bin/env env -i
/usr/bin/cvs -f --allow-root=/repository pserver

If for some reason on your client system you get errors
like "Connection reset by peer", then you can try this
alternate line in the same file (instead of the line
above):
cvspserver stream tcp nowait root /usr/local/bin/cvs
cvs -T/tmp -f --allow-root=/u01/repository pserver

7) Next, navigate back to root and type:
cvs -d /repository init
This will create the initial repository in
/repository/CVSROOT/
8) The next part is a little tricky, but it is not too
hard to accomplish. It involves setting up passwords for the
pserver, CVS's own server authentication method. This step
assumes that you have already set up user accounts and
system passwords for each user you want to have access to
the CVS server as well as having entered those users into
the /etc/groups file as listed in step 6 above. So
assuming that that has been done, cd to the
/etc directory and type:
cp shadow /<full repository
path>/CVSROOT/passwd

In the /etc directory, there is a file named
shadow. This file contains all the real system
passwords for the system along with a list of users
associated with those passwords. CVS's pserver uses a
similar password syntax to shadow except that it
expects to look for these passwords in a file named
passwd in the repository's CVSROOT directory.
Executing the above line simply makes a copy of the
shadow file from /etc into the repository's
directory and renames it to passwd. However, we are
not quite done with the passwd file just yet.
9) Next, cd to /repository and type:
chgrp -R cvs .
chmod ug+rwx . CVSROOT
This will set the permissions on all the files in
CVSROOT to the cvs group.
 
10) Next, cd to /repository/CVSROOT and
type:
emacs passwd
This will open the passwd file for editing. When
you open it, you will see something like the following:
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
bin:*:11060:0:99999:7:::
daemon:*:11060:0:99999:7:::
adm:*:11060:0:99999:7:::
lp:*:11060:0:99999:7:::
sync:*:11060:0:99999:7:::
shutdown:*:11060:0:99999:7:::
halt:*:11060:0:99999:7:::
mail:*:11060:0:99999:7:::
news:*:11060:0:99999:7:::
uucp:*:11060:0:99999:7:::
operator:*:11060:0:99999:7:::
games:*:11060:0:99999:7:::
gopher:*:11060:0:99999:7:::
ftp:*:11060:0:99999:7:::
nobody:*:11060:0:99999:7:::
xfs:!!:11060:0:99999:7:::
gdm:!!:11060:0:99999:7:::
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324
.
.
.
Note that the first line of this file and the last few
lines have the same format, but the middle part has a
different format. In the passwd file only, you want
to delete the entire middle block so that you are left with
only users at the bottom and root at the top. After such an
edit, the file would look like this:
 
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:11102:0:99999:7:-1:-1:134550548
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:11071:0:99999:7:-1:-1:134550500
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:11103:-1:99999:-1:-1:-1:135464324
.
.
.
Next, you must delete part of each password since pserver
does not use all the password info for each user. Edit each
line so that only the text between the first and second
colons remains (but leaving the second colon intact). So
after the second edit, the file might look like this:
 
root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:
<user1>:$1$jgwa/Nrr$IsCBi.t2.rEx/iSWhsoG5/:
<user2>:$1$Wlmt1y6J$i8lzVKk1qhm1p9huWtVvz.:
<user3>:$1$ckd3WoWI$M.q9l8h1q..E8RZbxOPDe.:
.
.
.
Save the file and exit your text editor. This concludes
the editing of the passwd file. DO NOT make these
same changes to the /etc/shadow file - it must remain
unedited or your system may stop working correctly!
 
11) Next, you must add modules to the CVSROOT so that CVS
knows where to put modules when you import or check them
in.One very important thing to know is that for each module
you want to have on your CVS server, you should have a
directory with that name alongside the CVSROOT directory.
Open the 'modules' file for editing by typing:
emacs modules
 
At the very end of the file, add a new line and then for
each module that you want, type:
<Module name><TAB><Module
name>

 
12) Finally you must create an empty directory for each
of the module names you added in step 9. So cd to the
/repository dir and for each module name you added in
step 9 type:
 
cd mkdir <Module name1>
cd mkdir <Module name2>
.
.
12.5) Now, you must make each user you added to your
etc/group file a member of the default group 'cvs'. To do
so, be sure you are logged in as root, and then type:
 
usermod -g cvs <username1>
usermod -g cvs <username2>
.
.
When you are finished with each of your users, reboot
your server machine.
13) If you want to set watches on all of the files in
your repository, edit the CVSROOT/notify file by
uncommenting the following line at the bottom of the
file:
#ALL mail %s -s "CVS notification"
The "CVS notification" string can be changed to anything
you want: it is the text that will be sent as the subject
line of all watches email notifications. Be sure to checkout
and commit these changes instead of editing them on the
server machine directly. For remote users, you will also
need to edit the CVSROOT/users file - adding names and
emails addresses of those remote users whom you want to send
email notification to. The format of the users file is:
CVS_USER:EMAIL_ADDRESS
Example:
john_smith:smith@anywhere.com
14) If after setting up the server, you get errors like
this:
cvs [checkout aborted]: cannot expand
modules

It is probably not a modules problem, but rather almost
certainly indicates a repository permissions problem.
Usually making the directory in question readable using UNIX
file permissions will solve the problem.
15) You can turn on a log of all CVS client/server
transactions by setting the environment variable
CVS_CLIENT_LOG like this:
CVS_CLIENT_LOG=<log_file_name>: export
CVS_CLIENT_LOG

16) If on a Windows client machine you get errors saying
that it can't find the .cvpass file, try adding this line to
your autoexec.bat file:
set HOME=C:
This completes the setup of the CVS server. You must now
reboot the server machine so that the new inetd and groups
settings take effect. Reboot the machine and when the
machine comes up, you may now log into the machine with a
CVS client using the system user names and passwords added
to the cvs group and the CVSROOT/passwd file.
You can get a variety of network configuration
information about your server by logging in as root or
superuser and using the /bin/ifconfig or
/sbin/ifconfig command at the command prompt.


Deletions:
<TABLE BORDER=0 CELLSPACING=20 CELLPADDING=10 WIDTH="90%">
    <TR>
        <TD>
            <CENTER>
                <B>HOW TO CREATE A </B><A HREF="http://www.cvshome.org/"><B>CVS</B></A><B>
                SERVER USING </B><A HREF="http://fedoraproject.org/wiki/"><B>Fedora Core</B></A>
            </CENTER>
           
            <P>There seems to be a severe lack of step-by-step
            instructions on how to setup a <A HREF="http://www.cvshome.org/">CVS</A>
            server using the <A HREF="http://www.cvshome.org/">Concurrent
            Versions System</A>. The available documentation is sparse
            and less than complete. I have included a list of the books
            that are most useful for setting up a CVS server at the
            bottom of this page. This page does not attempt to explain
            how to use <A HREF="http://www.cvshome.org/">CVS</A>, there
            is plenty of documentation already available for using CVS.
            This page instead is designed to give you step-by-step
            instructions on how to set up such a server. The
            instructions here assume you are using Red Hat Linux 6.1. If
            you are using a different distribution of Linux, then the
            procedure may be slightly different than the one listed
            here. The following procedure assumes you want to use
            pserver as your authentication method and not one of the
            other methods such as rsh, ssh, or Kerberos which are more
            complicated and not covered here. So in a nutshell, here are
            the steps to follow to get a <A HREF="http://www.cvshome.org/">CVS</A>
            server up and running. This procedure requires many detailed
            and tedious steps so take your time and be sure to follow
            each step exactly:</P>
           
            <P>Since Linux by default uses bash, all the examples
            presented here use that shell also.  Feel free to use any
            text editor you like to edit the files.  This setup document
            assumes you already know how to open files, edit them, and
            save them in Linux. All examples here use the <B>emacs</B>
            editor for editing files. All text shown in <B>Courier
            bold</B> should be entered exactly as shown below, with the
            exception of replacing items in brackets (&lt;&gt;) with
            real names or pathnames.</P>
           
            <P>4) First, you need to decide which directory you want to
            store your CVS repository in. In all of the examples here we
            will store it in an empty directory we made at the root of
            the server named "<B>repository</B>". If you don't have this
            directory on your server, make one at the root by switching
            the current directory to <B>root</B> and then typing:</P>
           
            <P><B>mkdir repository</B></P>
           
            <P>(you might need to be logged in as <B>root</B> in order
            to do this).</P>
           
            <P>When you perform the following steps, it is best if you
            are logged in as <B> root</B> or <B>su</B> (superuser).
            Assuming you have done that, type the following command at
            the root at the command prompt:</P>
           
            <P><B>cd etc</B></P>
           
            <P>and press return.</P>
           
            <P>5) The first step is to add a variable to the
            <B>profile</B> file in the <B>etc</B> directory which will
            tell the CVS server where your repository is located. This
            environment variable is called <B>CVSROOT</B>. So type:</P>
           
            <P><B>emacs profile</B></P>
           
            <P>and press return to open the file. Scroll down towards
            the bottom of the file and insert the following three
            lines:</P>
           
            <P><B>CVSROOT=/repository/</B></P>
           
            <P><B>export CVSROOT</B></P>
           
            <P><B>export EDITOR=emacs </B></P>
           
            <P>The <B>export EDITOR</B> command is optional and can be
            omitted. It is mainly used to tell CVS which editor to open
            when it needs to get a checkin comment. If you will be using
            a GUI CVS client on Windows or Macintosh, you may omit this
            line. When finished, save the <B>profile</B> file (Control-x
            Control-s in emacs) and quit the editor (Control-X Control-c
            in emacs).</P>
           
            <P>6) Next, you will need to add the following lines to the
            following files exactly as they are listed below. Where
            names of your users or directories are to be inserted, those
            names are indicated by &lt;&gt;. You should replace such
            instances with the proper names, but the edited files
            themselves should not have the brackets inserted into them.
            In other words, the brackets are only shown in this document
            in order to indicate that a real name is needed in those
            locations. Also, do not put quotes around any inserted names
            unless indicated by quotes here.</P>
           
            <P><B>emacs /etc/services</B> -add:</P>
           
            <P><B>cvspserver 2401/tcp</B> (if not already present)</P>
           
            <P><B>emacs /etc/group</B> -add:</P>
           
            <P><B>cvs:*:105:&lt;userName1&gt;, &lt;userName2&gt;</B></P>
           
            <P>(These names should match exactly user names on the
            system and in <B>/etc/shadow</B>)</P>
           
            <P><B>/etc/inetd.conf</B> - add:</P>
           
            <P><B>cvspserver stream tcp nowait root /usr/bin/cvs cvs
            --allow-root=/repository pserver</B></P>
           
            <P>Be sure to note that this entry does *not* have a
            trailing slash at the end.</P>
           
            <P>Some Linux systems will require an environment variable
            to be set thusly:</P>
           
            <P><B>cvspserver stream tcp nowait root /usr/bin/env env -i
            /usr/bin/cvs -f --allow-root=/repository pserver</B></P>
           
            <P>If for some reason on your client system you get errors
            like "Connection reset by peer", then you can try this
            alternate line in the same file (instead of the line
            above):</P>
           
            <P><B>cvspserver stream tcp nowait root /usr/local/bin/cvs
            cvs -T/tmp -f --allow-root=/u01/repository pserver</B></P>
           
            <P>7) Next, navigate back to root and type:</P>
           
            <P><B>cvs -d /repository init </B></P>
           
            <P>This will create the initial repository in
            <B>/repository/CVSROOT/</B></P>
           
            <P>8) The next part is a little tricky, but it is not too
            hard to accomplish. It involves setting up passwords for the
            pserver, CVS's own server authentication method. This step
            assumes that you have already set up user accounts and
            system passwords for each user you want to have access to
            the CVS server as well as having entered those users into
            the <B>/etc/groups</B> file as listed in step 6 above. So
            assuming that that has been done, <B> cd</B> to the
            <B>/etc</B> directory and type:</P>
           
            <P><B>cp shadow /&lt;full repository
            path&gt;/CVSROOT/passwd</B></P>
           
            <P>In the <B>/etc</B> directory, there is a file named
            <B>shadow</B>. This file contains all the real system
            passwords for the system along with a list of users
            associated with those passwords. CVS's pserver uses a
            similar password syntax to <B>shadow</B> except that it
            expects to look for these passwords in a file named
            <B>passwd</B> in the repository's <B>CVSROOT</B> directory.
            Executing the above line simply makes a copy of the
            <B>shadow</B> file from <B>/etc</B> into the repository's
            directory and renames it to <B>passwd</B>. However, we are
            not quite done with the <B>passwd</B> file just yet.</P>
           
            <P>9) Next, <B>cd</B> to <B>/repository </B>and type:</P>
           
            <P><B>chgrp -R cvs .</B></P>
           
            <P><B>chmod ug+rwx . CVSROOT</B></P>
           
            <P>This will set the permissions on all the files in
            <B>CVSROOT</B> to the cvs group.</P>
           
            <P>&nbsp;</P>
           
            <P>10) Next, <B>cd</B> to <B>/repository/CVSROOT </B>and
            type:</P>
           
            <P><B>emacs passwd</B></P>
           
            <P>This will open the <B> passwd</B> file for editing. When
            you open it, you will see something like the following:</P>
           
            <P><B>root:$1$KT4ZOG9O$4M1fgufImqfuj0K/XpuIg1:11061:0:99999:7:-1:-1:134549444</B></P>
           
            <P><B>bin:*:11060:0:99999:7:::</B></P>
           
            <P><B>daemon:*:11060:0:99999:7:::</B></P>
           
            <P><B>adm:*:11060:0:99999:7:::</B></P>
           
            <P><B>lp:*:11060:0:99999:7:::</B></P>
           
            <P><B>sync:*:11060:0:99999:7:::</B></P>
           
            <P><B>shutdown:*:11060:0:99999:7:::</B></P>
           
            <P><B>halt:*:11060:0:99999:7:::</B></P>
           
            <P><B>mail:*:11060:0:99999:7:::</B></P>
           
            <P><B>news:*:11060:0:99999:7:::</B></P>
           
            <P><B>uucp:*:11060:0:99999:7:::</B></P>
           
            <P><B>operator:*:11060:0:99999:7:::</B></P>
           
            <P><B>games:*:11060:0:99999:7:::</B></P>
           
            <P>