Installing CVS pserver--port opening

fmorton

Registered
I was unable to find instructions anywhere on the net describing how to install the CVS server software on MacOSX, so I figured I'd post how to do it here so it is somewhere.

First, I downloaded the source from www.cvshome.org and compiled it with:

./configure --prefix=/usr/local/cvs
make
make install

Set environment variable $CVSROOT to: /usr/local/cvs

Add to the end of /etc/inetd.conf (on one line):

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

Also, OSX comes with this entry in /etc/services:

cvspserver 2401/tcp
cvspserver 2401/udp

On most unix systems,this should be all you need. But I eventually remembered from my NeXT days NetInfo Manager, which is found in Applications/Utilities/NetInfo Manager. If you start NetInfo Manager, you need to add a cvspserver under "services."

The easiest way to create it is to single-click on "ftp" and click the copy icon at the top of the dialog, which is a button with two folders on it. Once you have done that, rename the copied ftp folder to "cvspserver" and then modify the port to be 2401 and leave the protocol to tcp in the windows on the bottom of the dialog. Save it and you should be ready to go.

I don't remember if I had to restart inetd or not.
If this still doesn't work, reboot will work for sure.

If you are unable to make the changes above because NetInfo Manager has grayed-out the required options, under Domain->Security->Authenticate, you need to logon
as the root user.

After you have done this, on a client machine (I did it from a SPARC/Solaris machine), set the environment variable $CVSROOT to point at the CVS pserver to:

:pserver:YOURUSERNAME@YOURHOST:/usr/local/cvs

where YOURUSERNAME is the username you use on the mac and YOURHOST is the full hostname of the mac.

Seems to work just fine.

To test if the server is running, from a client machine do:

telnet YOURHOST 2401

If when you next hit return, you get the message:

cvs [pserver aborted]; bad auth protocol start:

this indicates that the server is running. If the connection is rejected, something still isn't right on the mac.

Frank Morton
fmorton@base2inc.com
 
Using pserver is actually a rather bad idea. It does everything in the clear, so you're giving away all your passwords and content to anyone who cares to listen. And as you point out, it's actually more work to set up pserver than to just do it the right way.

You can get the same functionality, with good encryption, and no need to set anything beyond a couple environment variables.

Step One: on the client machine, set $CVS_RSH to ssh, and $CVSROOT to server:/path/to/cvsroot .

Step Two: make sure sshd is running on the server ("Allow Remote Logins").

Step Three: there's no step three.
 
Back
Top