Monday, October 02, 2006

CVS Links

Thursday, September 28, 2006

CVS Howto with CVS Tortoise Client

CVS Documentation of the errors we faced

Create CVS Repository
To set up a CVS repository, you must define the environment variable CVSROOT to point to the repository directory.
A good choice may be (C-shell example) setenv CVSROOT /usr/local/src/cvsroot
Once $CVSROOT is defined then you can do cvs init
to initialize and set-up the CVS repository. This only needs to be done once.
CVS as a server
If you want CVS to work as a server then do the following steps. This only needs to be done if you plan to have developers access your CVS root from off the machine anonymously.
Generally, it's a good idea to set up CVS as it's own user and group:
2. groupadd -g 8000 cvsgrp3. useradd -u 8000 -g cvsgrp -d /home/abhi/cvs/CVSROOT -s /bin/sh -c "CVS Repository" -m cvs

Set the ownership of the $CVSROOT and set the setgid bit on the directory to propagate group ownership to any created files and directories.
6. chown -R cvs $CVSROOT
7. chgrp -R cvsgrp $CVSROOT
8. chmod -R g+s $CVSROOT

Made sure the cvspserver entry is in the /etc/services file
10. grep cvs /etc/services
which should yield the following lines. (If not, then add them yourself.)
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations


Add an entry into /etc/inetd.conf to invoke CVS as a server
2. # CVS server
3. cvspserver stream tcp nowait root /usr/bin/cvs cvs --allow-root=/usr/local/src/cvsroot pserver
and signal the inetd daemon to re-read the configuration file with
killall -HUP inetd
If xinetd is used instead then create a configuration file in /etc/xinetd.d named cvspserver, (where the last line tells it the names of your repositories):

5. service cvspserver {
port = 2401
socket_type = stream
protocol = tcp
wait = no
user = root
passenv = PATH
server = /usr/local/bin/cvs
server_args = -f –allow-root=/home/abhi/cvs/CVSROOT pserver
bind = localhost }
and signal the xinetd daemon to re-read the configuration file with killall -HUP xinetd
or cd /etc/rc.d/init.d ./xinetd reload
Create or edit the following files in $CVSROOT/CVSROOT
readers
contains a list of pseudo usernames that can read from the CVS repository via cvspserver.
writers
contains a list of pseudo usernames can write via cvspserver ... this is not secure since passwd is passed as clear text.
passwd
create the encrypted passwd string with (htpasswd from apache) htpasswd -c passwd pseudo_username
edit passwd to append ``:cvs'' to the pseudo_username entry. This is the user it will run as, and this will allow the pseudo user to write to the history file. Note that the cvs user was defined above.

Note :- It is important that the user are not both in readers and writes if the user is in readers he will not have write access though he is in writers.

Note:- Try to log in using username as cvs and password of cvs you created and see that you can access the $CVSROOT directory. This is important otherwise you will have problem with CVS clients.

Using CVS with CVS Tortoise Client
1. Install the latest version of CVS Totoise.
2. Right click on your desktop. You will get the following Menu


















3. Select Make New Module and give the module a name
a. Select Protocol as Password server.
b. Give the server IP Address running CVS.
c. Give the port as 2401.
d. Username as given in the readers or writers file.
e. Module name you want to make in CVS Repository.





















4. Use CVS Add Contents to add contents to the repository.












Note:- Add atleast one file could be temporary otherwise the repository will not get activated.


5. Use CVS Commit to commit the repository contents.




6. USE CVS Release to release the repository




Note:- See that there is no directory by name of CVS where the CVS checks out. CVS Tortoise creates its own CVS directory at the location where it checks out the module with configuration files. If CVS directory is already present it will not create this directory and consequently will give errors while releasing the module.
7. Select CVS Checkout to checkout the Repository and add additional directories or files. Follow the same procedure for CVS Add Content to add new file or directories, and CVS Commit to Commit the Repository. In case of new directory create at least one file inside it.