This is the source for RCVS (Remote CVS) in anonnymous site ftp.slac.stanford.edu, directory pub/sources, file rcvs*.Z. Note: it is based on CVS-1.3, which is available from ftp site prep.ai.mit.edu, directory pub/gnu. make ~~~~ cd to the directory that contains CVS-1.3 source, then type 'zcat rcvs-VERSION.tar.Z | tar xfv -' which will replace and add some files in sub-directory 'src'. Edit src/config.h to define the 'DIFF'to 'diff' or 'diff -a' or 'gdiff -a', then type './configure' followed by 'make'. (configure is needed if Makefile.in has been changed). Try to use /usr/bin/make instead of /bin/make for RS6000 machine. The resulting executable 'cvs' will have the remote extension. File listing: ~~~~~~~~~~~~~ src/add.c src/admin.c src/checkout.c src/commit.c src/create_adm.c src/diff.c src/history.c src/import.c src/log.c src/lock.c src/main.c src/modules.c src/patch.c | src/rcvs_folder.c # identify legitimate folders | src/rcvs_lock.c # locking mechanism | src/rcvs_main.c # runs on clients | src/rcvs_subr.c # accessory subroutines | src/rcvs_sync.c # runs on server src/recurse.c src/release.c src/remove.c src/repos.c src/rtag.c src/status.c src/tag.c src/update.c | src/README-RCVS # installation guide | src/rcvs.1 # man page for rcvs | src/rcvs.h # rcvs header file src/Makefile.in man page ~~~~~~~~ Please see rcvs.1 in this directory for usage. Install the man page rcvs.1 into /usr/local/man/man1 or its equivalence. NOTE: 'make install' from man directory does not install this man page. Installation ~~~~~~~~~~~~ Install the executable 'cvs' on BOTH side of the connection, install to /usr/local/bin or anywhere in the search path. The cvs executable will support both CVS and RCVS commands. It's normally good idea to keep similar version of rcvs on both side of the connection. Environment Variables ~~~~~~~~~~~~~~~~~~~~~ CVSROOT default repository for local folder. CVSROOTr optional. Default repository for remote folder. CVSMODE optional. Set its value to "remote" or "local". CVSDOMAIN optional. Network domain of the local host, not including host name. This is the last resort for those who cannot get correct domain. CVSUSER optional. Set its value to the output of 'whoami'. This is the last resort for those who cannot get correct username. CVSREC optional. Specify an account to receive rdist data from server. If CVSREC is set on server account, it will be used to receive rdist for all client. If CVSREC is set on client account, it will be used to receive rdist. If both are set, the client's CVSREC will override the server's CVSREC. This variable can be used to emulate server-client model. Checking RCS: ~~~~~~~~~~~~~ You may get error message "missing access list" if you're using older version of RCS. CVS uses RCS (Revision Control System) to deal with version files. Starting from version 5.6, RCS uses GMT to resolve time zone differences. Thus it's needed for RCVS to work across time zone. If you already have a RCS version, try 'strings /usr/local/bin/ci | grep ci.c,v', you should get something like '5:$Id: ci.c,v 5.21 1991/11/20 17:58:07 eggert Exp $'. If your RCS is older, you need to port RCS-5.6 from annonymous site: prep.ai.mit.edu, directory pub/gnu. rsh: ~~~~ Most of the users can skip this section. Read it only if your rsh does not work properly like it doesn't execute .cshrc. rcvs uses rsh command to run rcvs counterpart on server. On SGI there are two rsh commands /bin/rsh and /usr/bsd/rsh. The former is a restricted Bourne shell and the later is a remote shell. /bin/rsh is picked up first in the default PATH. On HP rsh is also a restricted Bourne shell. The remote shell command is remsh. rcvs should be able to pick up the correct rsh for SGI and HP (you can see the last few lines of rcvs.h to see how rsh is selected, and turn on '-t' option to confirm that remsh is used for HP and /usr/bsd/rsh is used for SGI. Build BSD's rdist ~~~~~~~~~~~~~~~~~ Test your rdist first. Type 'rdist -c $HOME/.cshrc username@same-machine:/tmp/junk' and 'rdist -c $HOME/.cshrc username@server-machine:/tmp/junk' from your machine and 'rdist -c $HOME/.cshrc username@your-machine:/tmp/junk' from server machine to make sure rdist works between 2 machines. If you have both rdist and rdistd, you have USC's version, BSD's version does not have rdistd. The difference between these two versions will be discussed below. 'rdist' is needed by rcvs to copy files over network. It should be available on most of the platforms. If you do not have rdist on your machine or your rdist does not work properly, the BSD version of rdist can be found in ftp site ftp.slac.stanford.edu, directory is pub/sources. You must have root-privilege to install rdist. Build rdist by following these steps: cd rdist ./configure make Once rdist* is created, logon as root and install it to /usr/ucb for full compatibility with older BSD' rdist or anywhere in user's search path if it is installed on both side of the connection (due to the fact that /usr/ucb is normally considered system library, most of us probably want to install rdist to /usr/local/bin to avoid disturbing the system library). Then do 'chmod u+s rdist' to set the set-UID bit so that it can run as root. This BSD rdist is strongly recommended if you do not have BSD's rdist in /usr/ucb already. It is fully compatible with older version of BSD rdist installed in /usr/ucb on many platforms if you install it onto /usr/ucb on your machine too. It does not allow user write files to non-accessible directory, thus avoid a potential security hole. Port USC's rdist ~~~~~~~~~~~~~~~~ If you do not have rdist, and failed to build BSD's rdist in the last section. Consider porting rdist from usc.edu, directory pub/rdist on 'both' side of the connection, and add '-DUSCrdist' to 'DEFS=' in the top level Makefile. (This switch may not be necessary, since old rdist options are recognizable by USC's rdist); USC's rdist can not handle disk full condition, and it allows user write to non-accessible directories, thus presents a security hole. Note: Conversion of rcvs-0.3.9 folders!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | If you are using rcvs-0.3.9 or earlier, please beware of the changes: | (1) RCVSxxx variables are merged into CVSROOTr (or CVSROOT if one prefer | to use single CVSROOT). | (2) rcvs is merged into cvs. One does a remote checkout by setting up | the CVSROOTr. | (3) A new CVS/Remote file needs to be added to remote folders. | The best way to go is backing up any local patches, committing all | remote folders with old rcvs, port new rCVS and check out the folders | from scratch. | Alternatively, one can simply port new RCVS over, then convert all the | remote folders with the old rcvs script, the old rcvs script issues | 'cvs -Z' which will cause CVS/Remote to be added. | setenv CVSROOTr terryh@unixhub:/usr/cvs:/usr/clone | rcvs update lib | (or cvs -Z update lib) | This conversion is not perfect if you define modules with CVSROOT/modules | since the name of the module was not memorized previously. The relative path | of a module instead of its name is memorized during the conversion, which is | not good enough. Once you have commited all the remote folders, check them | out from scratch! Once all folders have been converted, one can change '-Z' to '-R' in rcvs and it will be pretty handy. BUGS ~~~~ - Rdist: Rdist will give you error message: "version numbers don't match" if the login shell (.cshrc or .profile) generates message to the screen. If the 's' bit of rdist is not set (-r-xr-xr-x instead of -r-sr-xr-x), one gets this message: "rcmd: socket: The file access permissions do not allow the specified action". Fix this with "chmod u+s /usr/ucb/rdist" to set the 's' bit. If you are using older version of BSD's rdist, it requires that rdist must reside in /usr/ucb, else one gets the following message from rdist: "rdist: connection failed: version numbers don't match". Fix this with "ln -s /usr/bsd/rdist /usr/ucb/rdist" or its equivalence so that local rdist can find /usr/ucb/rdist on the remote host. BUG REPORT ~~~~~~~~~~ Please send bug report and suggestion to terryh@unixhub.slac.stanford.edu or pfkeb@ebnextk.slac.stanford.edu for the time being. Turn on the '-t' switch to get debugging messages. Porting ~~~~~~~ This version of RCVS has been compiled on the following architectures, but it may or may not work on your machine. hp next rs6000 sgi sun4 ultrix-mips (decstation) For HP/UX, one may need to comment out the definition of 'gethostname' in cvs.h if it's already defined in unistd.h. ACKNOWLEDGEMENT ~~~~~~~~~~~~~~~ Thanks to the following users who involved extensively in the testing of the software and/or provided patches: Bernard Desruisseaux, Marc Evans, Vijay K. Gurbani, George M Irwin, Angelika Leich, Leif Lonnblad, Robert Lupton, Ian Mathieson, Torben N. Rasmussen, Irwin Sheer, Doug Wright. CHANGELOG ~~~~~~~~~ rcvs-0.3.5: fix bus error problem caused by invalid Group ID rcvs-0.3.6: unlock upon CTR-C, surround commit with '"' rcvs-0.3.7: fix minor compiler error for sun4 rcvs-0.3.8: use csh instead of sh for rsh. Chgrp only if group write access. rcvs-0.3.9: Uses user's default shell for rsh. Catch rdist error rcvs-0.3.9.1: fix gethostdomain() in main(). rcvs-0.4.0: (Major release). Support most of CVS commands. Change of format. rcvs-0.4.1: suppress RCVS messages if '-q'. Removed gethostbyname prototype. rcvs-0.4.2: fix add & remove. fix -q for rdist. remove rcvs from Makefile.in rcvs-0.4.3: require user@ in CVSROOT. fix -d for add & remove. rcvs-0.4.4: add sgi/hp support. Remove auto-commit for add & remove. rcvs-0.4.5: add checking of rsh/rdist error messages rcvs-0.4.6: allow omitting user@ in CVSROOT &CVS/Remote. Cleanup username. rcvs-0.4.7: fix bus error problem in rcvs_do_cvsroot rcvs-0.4.8: remove need_commit from rcvs.h ('remove' problem). rcvs-0.4.9: fix tmp in rcvs_gethostdomain. Cleanup ruser in rcvs_main. rcvs-0.5.0: check arg of 'index'. Allow null CVSROOT if CVSROOTr is set. rcvs-0.5.1: do rtag and rdiff on server. Fix '-d' option. rcvs-0.5.2: fix -H. Check CVSROOT. Labelling clone. Reverse stderr & stdout. rcvs-0.5.3: fix rcvs_do_cvsroot, local co problem. rcvs-0.5.4: fix rcvs_lock, initialize array rcvs-0.5.5: keep lock if error in phase3. Better -P and rdist err handling. rcvs-0.5.6: fix locking mechanism. Set variable rcvs_native_CVS. rcvs-0.5.7: fix error checking in rcvs_do_host_phase1, use popen() in rdist rcvs-0.5.8: merge all cvs output in stdout, merge all rdist output in stderr rcvs-0.5.9: remove leading "/" in module's relative path rcvs-0.6.0: keep cvs stdout/stderr intact, avoid problem on NeXT rcvs-0.6.1: back to rcvs-0.5.8 style, plus writing rcvs keywords into stderr rcvs-0.6.2: streamline everything into stdout. Add rcvs_check_rsh_output. rcvs-0.6.3: create man page rcvs.1 rcvs-0.6.4: (Major release) create rdist/ for BSD's rdist source rcvs-0.6.5: "chmod" for 'add'. Add "Unknown host" to rmsg[]. rcvs-0.6.6: revise locking mechanism rcvs-0.6.7: put commitlog into exception list of rdist to save time; use -e ver rcvs-0.6.8: do not run checkout-script in phase-1 rcvs-0.6.9: enhance rdist error & history/commitlog handling rcvs-0.7.0: fix cvs history. Line-buffered stderr/stdout. Fix cvs -n upd fn. rcvs-0.7.1: fix '-n update file' by skipping phase 3. rcvs-0.7.2: change printf("CVSROOT=...) to fprint(stderr,"CVSROOT=...) rcvs-0.7.3: add $CVSREC. Run loginfo.sh on server. Cleanup /tmp/RCVS rcvs-0.7.4: add rcvs_put_options to rcvs_add_onedir to fix 'rcvs history'. rcvs-0.7.5: rewrite subroutine 'rcvs_history' rcvs-0.7.6: add setlinebuf() for HP/UX rcvs-0.7.7: add timeout message to rdist message table in rcvs_sync.c rcvs-0.7.8: expand 'except_pat' in rcvs_sync.c for Solaris 2. copy distfile. rcvs-0.7.9: change disktfile.old to distfile.$username