xref: /openbsd-src/gnu/usr.bin/cvs/README.VMS (revision b2346922a76a50a89e33beab4ebbc0950de8a8df)
150bf276cStholo                             CVS port to VMS
250bf276cStholo
350bf276cStholoDISCLAIMER: This port must be considered experimental.  Although
450bf276cStholoprevious versions have been in use at one large site since about
550bf276cStholoOctober, 1995, and the port is believed to be quite usable, various
650bf276cStholoVMS-specific quirks are known and the port cannot be considered as
750bf276cStholomature as the ports to, say, Windows NT or unix.  As always, future
850bf276cStholoprogress of this port will depend on volunteer and customer interest.
950bf276cStholo
1050bf276cStholoThis port is of the CVS client only.  Or in other words, the port
1150bf276cStholoimplements the full set of CVS commands, but cannot access
1250bf276cStholorepositories located on the local machine.  The repository must live
1350bf276cStholoon another machine (a Unix box) which runs a complete port of CVS.
1450bf276cStholo
1550bf276cStholoMost (all?) work to date has been done on OpenVMS/AXP 6.2.  Other VMS
1650bf276cStholovariants might work too.
1750bf276cStholo
18*b2346922StholoProvided that both your client and your server are recent (for
19*b2346922Stholoexample, CVS 1.9.27 or later), you shouldn't need GNU patch or any
20*b2346922Stholoother executables other than CVS.EXE.
2150bf276cStholo
222286d8edStholoPlease send bug reports to bug-cvs@gnu.org.
2350bf276cStholo
2450bf276cStholoAs of CVS 1.5.something, this port passed most of the tests in
2550bf276cStholo[.src]sanity.sh.  I say "most" because some tests to not apply to the
2650bf276cStholoCVS client.  The tests were run by hand because the VMS POSIX shell
2750bf276cStholowas incapable of running the script.  The tests that sanity.sh
2850bf276cStholoprovides are not conclusive but at least provides some assurance that
2950bf276cStholothe client is usable.
3050bf276cStholo
3150bf276cStholoTo compile, you will need DEC C (CC), DEC UCX, and of course DCL
3250bf276cStholoinstalled on your machine.  Just type "@build" in the top level
3350bf276cStholodirectory.  This will build the sources in each subdirectory, and link
3450bf276cStholothe executable [.src]cvs.exe
3550bf276cStholo
3650bf276cStholoCopy the executable to an appropriate directory, and define the symbol "CVS"
3750bf276cStholoin a .COM file which everyone running CVS will need to run.  Here's an example
3850bf276cStholoof what needs to be done.
3950bf276cStholo
4050bf276cStholo$ CVS :== $YOUR_DEVICE:[YOUR.DIRECTORY.CVS]CVS.EXE
4150bf276cStholo
4250bf276cStholoAccessing a remote repository can happen in several ways.
4350bf276cStholo
442770ece5Stholo1. pserver
4550bf276cStholo2. rsh - privileged (default)
4650bf276cStholo3. rsh - unprivileged (on VMS side)
4750bf276cStholo
4850bf276cStholoHere's how to do each of the above:
4950bf276cStholo
5050bf276cStholo-------------------------------------------------------------------------------
512770ece5Stholo1.  pserver.  This is the preferred way.  It works just as it is
5250bf276cStholodocumented in the CVS manual (see the README file in the CVS
5350bf276cStholodistribution for more information on the manual).
5450bf276cStholo
5550bf276cStholo-------------------------------------------------------------------------------
5650bf276cStholo2. Using CVS internal rsh support (privileged)
5750bf276cStholo
5850bf276cStholoVMS's RSH is unusable for CVS's purposes (that is, the one in UCX.
5950bf276cStholoDon't know about Multinet).  However, there is code within CVS to
6050bf276cStholoemulate RSH for purposes of contacting a CVS server "in the usual way"
6150bf276cStholovia rshd.  Unfortunately, this requires the VMS CVS client to be
6250bf276cStholoinstalled with OPER privilege, by your system administrator.
6350bf276cStholo
6450bf276cStholoRSH uses privileged ports and trusted software/hosts to determine
6550bf276cStholowhich user on the client side is trying to connect.  Part of this
6650bf276cStholosecurity is due to the fact that on VMS or UNIX, a non privileged
6750bf276cStholoprocess is not permitted to bind a socket to a privileged port.
6850bf276cStholo
6950bf276cStholoIf rshd receives a connection on a non-privileged port, the connection is
7050bf276cStholoimmediately aborted.  Only connections arriving from a privileged port will
7150bf276cStholobe authenticated and served.  The CVS client will therefore need privileges
7250bf276cStholounder VMS to produce such a connection.
7350bf276cStholo
7450bf276cStholo*** Please note that no careful examination has been done of the security
7550bf276cStholo    implications of installing CVS with the OPER privilege.  If some hole
7650bf276cStholo    exists, then by doing so, you will enable users who are already on
7750bf276cStholo    your system to gain unauthorized privileges ***
7850bf276cStholo
7950bf276cStholo-------------------------------------------------------------------------------
8050bf276cStholo3. Using CVS internal rsh support (non-privileged)
8150bf276cStholo
8250bf276cStholoThere is a workaround, but this is one case where I think the cure is worse
8350bf276cStholothan the disease.  If you patch an rshd to not care that the RSH originating
8450bf276cStholoport is "non-privileged", the CVS VMS client will allow you to define the
8550bf276cStholological CVS_RCMD_PORT to the port number where this patched rshd will be
8650bf276cSthololistening.  I leave the talk of patching rshd to the gentle reader and his/her
8750bf276cStholofriendly system administrator.
8850bf276cStholo
8950bf276cStholoIf I put an entry in my /etc/services file:
9050bf276cStholo
9150bf276cStholocvs_rcmd            4381/tcp        cvs_rcmd
9250bf276cStholo
9350bf276cStholoAnd add a line to /etc/inetd.conf, then restart inetd via "kill -1"
9450bf276cStholo
9550bf276cStholocvs_rcmd  stream  tcp  nowait root /usr/sbin/tcpd  /usr/local/sbin/cvs_rcmd
9650bf276cStholo
9750bf276cStholoOn the VMS side, you will have to do this:
9850bf276cStholo
9950bf276cStholo$ define CVS_RCMD_PORT 4381
10050bf276cStholo
10150bf276cStholoThen run CVS in the "usual way".
10250bf276cStholo
10350bf276cStholoNote that the patched rshd will need to be invoked via inetd as root, so it can
10450bf276cStholoauthenticate and _become_ the intended user, the same as the regular rshd.
10550bf276cStholo
10650bf276cStholo***Please note that you will be installing a security hole by doing this.***
10750bf276cStholo
10850bf276cStholoPlease also note that this security hole is no larger than allowing a
10950bf276cStholoMacintosh, PC (OS/2, NT, etc.) to have it's hostname in any .rhosts file,
11050bf276cStholoas any user can create a privileged socket without authentication, under these
11150bf276cStholoenvironments.  In fact, existing ports of CVS to these environment use this
11250bf276cStholoto their advantage.
11350bf276cStholo
11450bf276cStholo-------------------------------------------------------------------------------
11550bf276cStholoWildcard expansion is not yet implemented (i.e. CVS COMMIT *.c won't
116461cc63eStholowork.)  I think that expand_wild should be calling lib$findfile
117461cc63eStholo(util.c in gzip is said to provide an example), but noone has gotten
118461cc63eStholoaround to implementing this.
11950bf276cStholo
120461cc63eStholoLog messages must be entered on the command line using -m or -F.  You
121461cc63eStholocan use -e or define the logical EDITOR to cause CVS to try other
122461cc63eStholoeditors (TPU.EXE or any other editor which wants DCL command parsing
123461cc63eStholowill not work) if you want to test what's available on your system.  I
124461cc63eStholohaven't tested this, but if you install vi or emacs, chances are it
125461cc63eStholowill probably work.  Just make sure the .EXE files are in a directory
126461cc63eSthololisted in VAXC$PATH (is this a typo for DCL$PATH?  Also, will a
127461cc63eStholological name work?).  If someone gets around to implementing it, we
128461cc63eStholoshould probably be using the callable editors (e.g. TPU$TPU), although
129461cc63eStholoof course we also need interface(s) which are not locked into any
130461cc63eStholoparticular editors.
13150bf276cStholo
132461cc63eStholo----------------------------------------
133461cc63eStholo
134461cc63eStholoNotes regarding compiling on VAX/VMS 6.2 (not Alpha) (These are items
135461cc63eStholowhich hopefully will have cleaner solutions in the future, but here is
136461cc63eStholohow to get around them for now):
137461cc63eStholo
138461cc63eStholo* Need to compile lib/getdate.c with vaxc instead of decc to avoid a
139461cc63eStholocompiler bugcheck.  Therefore one must add SYS$LIBRARY:VAXCRTL/LIBRARY
140461cc63eStholoto the link.
141461cc63eStholo
142461cc63eStholo* In src/ignore.c, change lstat to stat.  In vms/filesubr.c, change
143461cc63eStholo"#ifdef S_ISLNK" to "#if 0".
144461cc63eStholo
145461cc63eStholo* Ignore the warnings in vms/vmsmunch.c; the system include file
146461cc63eStholodeclares something as an int when it should be void *.  Not *our*
147461cc63eStholofault!
14850bf276cStholo
1492286d8edStholo* Remove the #define's of mode_t in vms/vms.h and pid_t in vms/pwd.h.
1502286d8edStholoAdd "#include <sys/types.h>" in vms/pwd.h.
1512286d8edStholo
15250bf276cStholoCredits:
15350bf276cStholo
15450bf276cStholoInitial VMS port by Benjamin J. Lee <benjamin@cyclic.com>, Cyclic
15550bf276cStholoSoftware, October 1, 1995 (Update March 1, 1996).
156