How to set up a cvs server on mac os x 10.3 panther

Yesterday I set up a cvs server on my computer at home. I did so that my friend James can grab and update the source code for the pure java version of my risk game Lux (which he has promised to help me finish).

Since panther is still a pretty new OS it took some piecing together of steps from the web. Here are the full details for internet land...

The first step isn't really necessary, since cvs comes pre-installed on OS X 10.3. However since I already have fink installed it was trivial to update my cvs to a more up-to-date version. As a software developer myself I know that it is almost always a superb idea to be running as close to the bleeding edge as possible. Yeah, so I upgraded from version 1.10 to 1.11.5.

The next few steps come courtesy of this lovely webpage. They mostly pertain to OS X 10.2, so here are just the 10.3 steps:

Step 2 is to create a repository. The web told me that other people put theirs in /usr/local/CVS (or similar), so that's where I put mine. The cvs protocol will only work if everyone can read/write the repository, so the permissions must be set up as well (it's possible that this could be a security risk, depending on your setup. I had to do it for cvs to work properly though: use at your own risk)
sudo mkdir /usr/local/CVS/
sudo cvs -d /usr/local/CVS/ init
sudo chmod -R a+rw /usr/local/CVS/
Step 3 is to modify xinetd to run a cvs server. Create the file
/etc/xinetd.d/cvspserver
and paste this into it:
service cvspserver
{
disable = no
socket_type = stream
wait = no
user = root
server = /sw/bin/cvs
server_args = -f --allow-root=/usr/local/CVS pserver
groups = yes
flags = REUSE
}
If you are using the built-in cvs instead of fink's the it should be 'server = /usr/bin/cvs' instead'

Step 4 is to restart xinetd so that the cvs server vars we just created get loaded. Do it by typing
sudo kill -HUP `cat /var/run/xinetd.pid`
Step 5 is new to panther systems. Because some sort of ShadowMasking for passwords is now used. So create a file called passwd inside you CVSROOT. In our case it would be
/usr/local/CVS/CVSROOT/passwd
Inside of this file you must put the account names and encrypted passwords for your cvs users in the form of 'user:encryptedpass'. In order to get the encrypted version of the password you can run the command:
perl -e 'print crypt "password", "sa"'
Where 'password' should be replaced with the password you want to use and 'sa' can be any two letters.

Whew. That's it. Hopefully it will be useful to somebody. Many thanks to the web for having all the info (albeit scattered all over the place). After all of this people should be able to connect to your cvs server using
:pserver:username@domain:/usr/local/CVS
(As long as you change 'username' and 'domain' to be the proper values of course)

Posted by dustin on December 2, 2003 with category tags of

25 comments
I am running on a clean install of Panther (I have got this to work under 10.1/10.2 and inetd) but now get an $1: unbound variable when trying to start xinetd for the first time.

Anyone?
   comment by anonymous on December 12, 2003

Thanks so much for the Panther CVS info. I was pulling my hair out trying to configure it with Jaguar instructions...phew!
   comment by anonymous on January 2, 2004

Is it just me, or have the instructions disappeared? I'm trying to set up CVS pserver on 10.3

The instructions seem to have been dropped, ending at "here are the full details for internet land..." Doh.
   comment by D'Arcy Norman on January 8, 2004

problem fixed, the instructions are now back up
   comment by dustin (#1) on January 8, 2004

Sweet. Thanks, dustin! I'll run the install first thing tomorrow morning!
   comment by D'Arcy Norman on January 8, 2004

After hours and hours of "work" I finally landed here, but this doesn't work for me as well. The password scheme seems to be different although I use Mac OS X 10.3.2 server.
The following combination works in the passwd file: stephan:2Sqf7taLEYgp2 (password is stephan), but the one generated by the perl script won't (neither does the one produced by htpasswd). Any idea what I'm doin wrong? Or is there a way to use the already available users from NetInfo?
   comment by Stephan on January 10, 2004

I can't log in with the Perl generated password either (running 10.3.2 with Developer Tools installed).
   comment by OW on January 12, 2004

This script did the job for me:
http://www.faqs.org/docs/ldev/0130091154_201.htm

#!/usr/bin/perl
#
# Simple script to take a username and password and
# return a line suitable for pasting into the CVS
# password file.
#

($u, $p)=@ARGV;
@d=(A..Z,a..z);
$s=$d[rand(52)].$d[rand(52)];
print $u.":".crypt($p, $s).":cvs\n";
   comment by Stephan on January 13, 2004

Thank you for the 10.3 instructions ... I had almost given up
   comment by Ben Wyrosdick on January 23, 2004

Very nice work. I was able to get CVS up and running in less than 5 minutes.
   comment by David Gardner on January 27, 2004

Perfect, this is what I was looking for, worked perfect, up and running in 10 minutes. (thank you internet gods!)
   comment by Dennis Jones on March 5, 2004

Worked like a champ on 10.3.3. Thank you very much!
   comment by Matt B on March 29, 2004

Thanks for this round-up. I was having plenty of trouble before I found your site. Now it is working fine.
The other information even on the cvs site or maxosxhints is out of date!
   comment by Yves Debilloëz on April 28, 2004

This did not work right away for me because of the way I was accessing the cvs server via ssh tunnelling from my WinXP machine.

I access it using cygwin command line.

I had to change:
(1) ssh -L 2401 localhost:2401
to
(2) ssh -L 2401 127.0.0.1:2401

in order for me to gain access to my cvs server.

Line (1) worked with the cvs server on Jaguar, but
not after I upgraded to Panther.

After the upgrade, when using line (1) I got the following error messages:

channel 2: open failed: connect failed: Connection refused.

and

cvs [... aborted]: reading from server: Connection aborted
   comment by Peter C on June 3, 2004

Thanks so much for your help!
   comment by Frank Maker on July 25, 2004

I am also having trouble from Windows, I followed these instructions as well as implementing the ssh server piece. I can now see the repository from a client, but cannot do anything without connection refused or in the case of an import it can't create the remote directory.
   comment by Simon Johnston on August 11, 2004

Wish this was working for me under 10.3.6 - I can do a non-pserver login but not via pserver. Ive tried all the suggestions for the password file to no avail.
   comment by Ben on November 24, 2004

I followed the instructions, but I cannot login for some reason. I get "cvs [login aborted]: connect to :2401 failed: Connection refused"... How can I tell if xinetd is running?
   comment by Jeff S on December 17, 2004

Working on 10.3.5 All instructions are followed but no results. The client cannot access the server either using non-pserver or pserver login. The error code got is 116 using the client and using the command line cvs client I get an error: no such repository even if the repository exists.
   comment by Mahesh S Kudva on December 27, 2004

People who have had a problem with the password (like me, I'm on 10.3.9) might want to see this page http://www.hutten.org/bill/eclipse/. I used the openssl method and either that or putting a second 'execution' name at the end of my passwd file did the trick.
   comment by Jon Vaughan on May 18, 2005

Sames as Jeff S, tried this config, plus instructions at developer.apple.com, but cannot get cvs working.

Connection is always refused, xinetd is running, before you ask
   comment by Gaz Hay on June 19, 2005

i have MAC 10.3.9 here..n i am trying to setup a CVS server in it..i followed the instructions, but am not able to login...it is saying connect to 2401:failed: connection is refused all the time..can u tell me how to make the port listen to the cvspserver..
   comment by Karthik on September 1, 2005

great
   comment by soumen biswas on May 2, 2008

   

VorgTag Cloud

Written by dustin
Latest Photo
Quote of Now:
Friends
Popular Posts
Computer Games

Hey You! Subscribe to dustin's RSS feed.
Or get wider opinion in the Vorg All Author feed.

 
 

Members login here.
© Vorg Group.