Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'CVS Server from scratch, step-by-step ...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
CVS Server from scratch, step-by-step ...
Authored by: blakers on Dec 02, '03 10:00:56PM
hi all,

i've been wanting to setup a a remote/central cvs server for Web Development
versioning for awhile.

the previous comments here on MacOSXHints were, as usual, helpful (thanks!) for
using OSX's bundled cvs.

wanting to get all my cvs clients & servers to a single, recent version with a
reproducible proces, I set out to build/configure cvs server from scratch ... and
spent some time collecting the info i'd found

given some of the questions/comments i've read, i hope some'll find this step-by-step
helpful!

cheers,

richard



cvs-1.11.9(CVS Home Page)
(login as root ...)

% cd /usr/ports
DOWNLOAD:  cvs-1.11.9.tar.bz2

% bunzip2 cvs-1.11.9.tar.bz2
% cd /usr/ports/cvs-1.11.9

% unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND

Change these configure options as required; in particular note: your
approrpiate choice of:
--with-cvs-admin-group=wheel



% ./configure \
--prefix=/usr \
--enable-client \
--enable-password-authenticated-client \
--enable-server \
--enable-server-flow-control \
--enable-encryption \
--enable-rootcommit \
--with-krb4=/usr \
--with-cvs-admin-group=wheel

% make
% make install

% rehash
CREATE/INITIALIZE the repository
I assume here a root directory for the cvs repository of "/usr/local/cvsrep"
This can, of course, be any directory you wwant -- just make sure you have enough
free drive space !

% mkdir /usr/local/cvsrep
% cvs -d /usr/local/cvsrep init
Checkout the CVSROOT configuration/info files to, e.g., your Desktop:

% cd /Users/your_user_name/Desktop
% cvs checkout CVSROOT
You should see the following output:

cvs checkout: Updating CVSROOT
   U CVSROOT/checkoutlist
   U CVSROOT/commitinfo
   U CVSROOT/config
   U CVSROOT/cvswrappers
   U CVSROOT/editinfo
   U CVSROOT/loginfo
   U CVSROOT/modules
   U CVSROOT/notify
   U CVSROOT/rcsinfo
   U CVSROOT/taginfo
   U CVSROOT/verifymsg
   U CVSROOT/writers
We're going to make some changes to the checked-out files.
note: don't edit files IN the repository!

cd CVSROOT
Restrict cvs access to just yourself ...
CREATE a new file:

% vi writers
and ADD a line(s) for your authorized user(s):

================================
+++	'your_user_name'
================================

% cvs add writers
% cvs edit checkoutlist
ADD "writers" to your CVSROOT check-out list

% vi checkoutlist
================================
+++	writers
================================
Commit both changed files, adding a first comment

cvs commit -m "Added writers file, restricting access to developers" checkoutlist writers
Setup network access to CVS's pserver in NetINfo

% niutil -create . /services/cvspserver
% niutil -createprop . /services/cvspserver port 2401
% niutil -createprop . /services/cvspserver protocol tcp
Setup pserver for control by inetd

% vi /etc/inetd.conf
ADDing the following line ...

================================
+++	cvspserver	stream	tcp	nowait	root	/usr/bin/env env -i /usr/bin/cvs -f --allow-root=/usr/local/cvsrep pserver
================================
Note:
I suppose you can make like changes in xinetd as well ... I'm not certain of
the value of choosing inetd vs. xinetd, since both are called by
/System/Library/StartupItems/IPServices/IPServices Reload inetd's settings
(comments anyone?)

% kill -HUP `ps cax | grep inetd | awk '{ print $1 }'`
Now you're ready to IMPORT & use your production directory
assuming your "target"" directory is "/Library/WebServer/Documents" on the
same machine, and your source module name will be "web_production" ...

% cd /Library/WebServer/Documents
% setenv CVSROOT /usr/local/cvsrep
% cvs import web_production comment_text START
you should now see your newly created "web_production" project as a folder
in your cvs root, i.e.: "/usr/local/cvsrep/web_production"

for sanity's sake, move your EXISTING files temporarily out of the way

% mv /Library/WebServer/Documents/ /Library/WebServer/DocumentsORIG
and CHECKOUT/push your repository's tree for your production files

% cd /Library/WebServer
% cvs co -d Documents web_production
or, from any other machine via, e.g., ssh, to any location with an installed cvs client

% cvs -d :pserver:your_user_name@your_server.your_domain.com:/usr/local/cvsrep login
password: <-- (your user's password)
% cvs -d :pserver:your_user_name@your_server.your_domain.com:/usr/local/cvsrep co -d Documents web_production
Now Checkout, Commit, Fold, Spindle & Mutilate to your hearts' content ...

[ Reply to This | # ]
CVS Server from scratch, step-by-step ...
Authored by: ktappe on Sep 21, '04 11:59:26AM

> % kill -HUP `ps cax | grep inetd | awk '{ print $1 }'`

The above line doesn't work in Panther:
1. "-HUP' is not a supported option in Panther's "kill'. You must use "1".
2. Once you do substitute "1", the line succeeds...in rebooting the Mac.

-Kurt



[ Reply to This | # ]