top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to configure CVS on linux machine.

+4 votes
554 views

I want to configure CVS on linux machine to maintain history and revision of files.

posted Oct 13, 2013 by Anuj Yadav

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+3 votes

http://fedoranews.org/contributors/thomas_andersen/cvs/

Installation (as root)
Use yum to install rpm:
    # yum install cvs
Create a user called cvs:
    # useradd -M -s /sbin/nologin cvs 
Next, create an anonymous user:
    # useradd -M -s /sbin/nologin anonymous
Edit the /etc/group file to add other users to the cvs group (including the anonymous user).

    cvs:x:501:tma,anonymous

Configure xinetd (as root)

Create a file called /etc/xinetd.d/cvspserver:

service cvspserver
{
  port = 2401
  socket_type = stream
  protocol = tcp
  wait = no
  user = root
  passenv = PATH
  server = /usr/bin/cvs
  server_args = -f --allow-root=/cvs pserver
}

Restart the xinet daemon:
    # service xinetd restart

Configuration (as root)

Choose a directory for the CVS files (fx. /usr/local/cvsroot/) and set CVSROOT:
    # export CVSROOT=/usr/local/cvsroot/

Create directory and set permissions:
    # mkdir $CVSROOT
    # chown -R cvs:cvs $CVSROOT
    # chmod ug+rwx $CVSROOT
    # chmod o-rwx $CVSROOT
    # chmod g+s $CVSROOT

Create a symbolic link. Link matches the "allow-root" in /etc/xinetd.d/cvspserver
    # ln -s $CVSROOT /cvs

Initialize Repository

Login as one of the users in the CVS group and run the following commands:
    $ export CVSROOT=/usr/local/cvsroot/
    $ cvs init
Check that a directory called CVSROOT inside your CVS root directory is created.
CVS can use the system /etc/passwd file to authenticate users, but this is not recommended.

Create a file $CVSROOT/CVSROOT/passwd with the format:
    username:crypt_password:run_as_user

Here is a sample $CVSROOT/CVSROOT/passwd file:

tma:qAju16i7iX2Dc:cvs
anonymous::cvs

Tip: Use htpasswd to create encrypted passwords. (Example: htpasswd -n tma)

To limit the anonymous user to read-only access, create a file called $CVSROOT/CVSROOT/readers with the following line:

    anonymous

Test connection from a remote host

Set the CVSROOT for the current user:
    $ export CVSROOT=':pserver:tma@<hostname>:/cvs'

Login to the CVS server:
    $ cvs login

You can install CVS on cygwin too using step above.

answer Oct 13, 2013 by Vikas Upadhyay
+2 votes

Server configuration

yum install cvs  or  similar command 

Create a CVS user

# useradd cvs
# passwd cvs

Above command will create a user cvs and group cvs with /home/cvs home directory.

Configure CVS

Open /etc/profile and append following line:

# vi /etc/profile

Append following line:

export CVSROOT=/home/cvs

Save the file and exit to shell promot.

Make sure your /etc/xinetd.d/cvs looks as follows:

# less /etc/xinetd.d/cvs

Output:
service cvspserver

{
       disable            = no
       socket_type    = stream
       wait                = no
       user                = cvs
       group              = cvs
       log_type          = FILE /var/log/cvspserver
       protocol          = tcp
       env                 = '$HOME=/home/cvsroot'
       bind                = 192.168.1.100
       log_on_failure  += USERID
       port                = 2401
       server             = /usr/bin/cvs
       server_args     = -f --allow-root=/home/cvsroot pserver
}

Note: Replace 192.168.1.100 with your actual server IP address.

Restart xinetd:

# service xinetd restart

Add users to this group (see this howto for more info)

# adduser username -g cvs
# passwd username

Client configuration

Finally user can connect to this CVS server using following syntax:

$ export CVSROOT=:pserver:mjoshi@192.168.1.100:/home/cvs
$ cvs loginWhere,
mjoshi - username
192.168.1.100 - CVS server IP
answer Oct 13, 2013 by Majula Joshi
Similar Questions
0 votes

We installed CVS server on some of our HP UX machines. Recently all these servers have been integrated with Active Directory for LDAP authentication.

Could someone please let me know how I can reconfigure the existing CVS on these servers to support PAM authentication without affecting any of the existing data?

0 votes

We have a build system (created by other CMs before I arrived), that create a CVS tag of the head for each build before checking out and compiling etc. Needed to say after years there are many/hundreds of tags such as PROD-VER-YYYYMMDD. When we go to look for a certain version in eclipse there are so many I often get memory errors when trying to search.

Also - there are special tags created for the needed versions like general availability release versions, and the integration testing versions that are delivered to the testing team.

So i want to remove a lot of the old tags using "cvs rtag -d module". Is this OK? I have deleted a few and it seems ok.. If I keep cleaning so that many are removed will it be harmful to the history or the CVS repository. Does it take up more space via recording these changes or anything like that either?

+1 vote

Let's say that I have created a sandbox containing code from a branch

 cvs co -r  project

I then spend a few weeks implementing changes in that sandbox (on the branch). In the meantime, other developers have committed changes to the trunk.

I then want to pull the latest changes to the trunk into my sandbox (on the branch). Will this command work in my sandbox to accomplish this?

cvs update -j HEAD
+3 votes

When I configure my google test framework for a 32 bit machine, I can run all my test cases successfully with no unpredictable behavior. But when I configure it for a 64 bit machine & run my test cases, it gives severe & abrupt crashes. It crashes in places where it is not supposed to. I tried debugging the issue but was out of my depths. I am not sure if there is a problem while configuring the google test framework for 64 bit or maybe it does not support 64 bit. Any help would be appreciated. Please feel free to get in touch if any clarity is required regarding the query I have shared.
Note : The same code base works perfect on a 32 bit machine.

+1 vote

We have stuck in integrating CVS with Bugzilla. We tried some online documents i.e. CVS Zilla, which we are unable to download it.

Is there any step by step document which we can follow?

...