1 CVS port to VMS 2 3DISCLAIMER: This port must be considered experimental. Although 4previous versions have been in use at one large site since about 5October, 1995, and the port is believed to be quite usable, various 6VMS-specific quirks are known and the port cannot be considered as 7mature as the ports to, say, Windows NT or unix. As always, future 8progress of this port will depend on volunteer and customer interest. 9 10This port is of the CVS client only. Or in other words, the port 11implements the full set of CVS commands, but cannot access 12repositories located on the local machine. The repository must live 13on another machine (a Unix box) which runs a complete port of CVS. 14 15Most (all?) work to date has been done on OpenVMS/AXP 6.2. Other VMS 16variants might work too. 17 18Provided that both your client and your server are recent (for 19example, CVS 1.9.27 or later), you shouldn't need GNU patch or any 20other executables other than CVS.EXE. 21 22Please send bug reports to bug-cvs@gnu.org. 23 24As of CVS 1.5.something, this port passed most of the tests in 25[.src]sanity.sh. I say "most" because some tests to not apply to the 26CVS client. The tests were run by hand because the VMS POSIX shell 27was incapable of running the script. The tests that sanity.sh 28provides are not conclusive but at least provides some assurance that 29the client is usable. 30 31To compile, you will need DEC C (CC), DEC UCX, and of course DCL 32installed on your machine. Just type "@build" in the top level 33directory. This will build the sources in each subdirectory, and link 34the executable [.src]cvs.exe 35 36Copy the executable to an appropriate directory, and define the symbol "CVS" 37in a .COM file which everyone running CVS will need to run. Here's an example 38of what needs to be done. 39 40$ CVS :== $YOUR_DEVICE:[YOUR.DIRECTORY.CVS]CVS.EXE 41 42Accessing a remote repository can happen in several ways. 43 441. pserver 452. rsh - privileged (default) 463. rsh - unprivileged (on VMS side) 47 48Here's how to do each of the above: 49 50------------------------------------------------------------------------------- 511. pserver. This is the preferred way. It works just as it is 52documented in the CVS manual (see the README file in the CVS 53distribution for more information on the manual). 54 55------------------------------------------------------------------------------- 562. Using CVS internal rsh support (privileged) 57 58VMS's RSH is unusable for CVS's purposes (that is, the one in UCX. 59Don't know about Multinet). However, there is code within CVS to 60emulate RSH for purposes of contacting a CVS server "in the usual way" 61via rshd. Unfortunately, this requires the VMS CVS client to be 62installed with OPER privilege, by your system administrator. 63 64RSH uses privileged ports and trusted software/hosts to determine 65which user on the client side is trying to connect. Part of this 66security is due to the fact that on VMS or UNIX, a non privileged 67process is not permitted to bind a socket to a privileged port. 68 69If rshd receives a connection on a non-privileged port, the connection is 70immediately aborted. Only connections arriving from a privileged port will 71be authenticated and served. The CVS client will therefore need privileges 72under VMS to produce such a connection. 73 74*** Please note that no careful examination has been done of the security 75 implications of installing CVS with the OPER privilege. If some hole 76 exists, then by doing so, you will enable users who are already on 77 your system to gain unauthorized privileges *** 78 79------------------------------------------------------------------------------- 803. Using CVS internal rsh support (non-privileged) 81 82There is a workaround, but this is one case where I think the cure is worse 83than the disease. If you patch an rshd to not care that the RSH originating 84port is "non-privileged", the CVS VMS client will allow you to define the 85logical CVS_RCMD_PORT to the port number where this patched rshd will be 86listening. I leave the talk of patching rshd to the gentle reader and his/her 87friendly system administrator. 88 89If I put an entry in my /etc/services file: 90 91cvs_rcmd 4381/tcp cvs_rcmd 92 93And add a line to /etc/inetd.conf, then restart inetd via "kill -1" 94 95cvs_rcmd stream tcp nowait root /usr/sbin/tcpd /usr/local/sbin/cvs_rcmd 96 97On the VMS side, you will have to do this: 98 99$ define CVS_RCMD_PORT 4381 100 101Then run CVS in the "usual way". 102 103Note that the patched rshd will need to be invoked via inetd as root, so it can 104authenticate and _become_ the intended user, the same as the regular rshd. 105 106***Please note that you will be installing a security hole by doing this.*** 107 108Please also note that this security hole is no larger than allowing a 109Macintosh, PC (OS/2, NT, etc.) to have it's hostname in any .rhosts file, 110as any user can create a privileged socket without authentication, under these 111environments. In fact, existing ports of CVS to these environment use this 112to their advantage. 113 114------------------------------------------------------------------------------- 115Wildcard expansion is not yet implemented (i.e. CVS COMMIT *.c won't 116work.) I think that expand_wild should be calling lib$findfile 117(util.c in gzip is said to provide an example), but noone has gotten 118around to implementing this. 119 120Log messages must be entered on the command line using -m or -F. You 121can use -e or define the logical EDITOR to cause CVS to try other 122editors (TPU.EXE or any other editor which wants DCL command parsing 123will not work) if you want to test what's available on your system. I 124haven't tested this, but if you install vi or emacs, chances are it 125will probably work. Just make sure the .EXE files are in a directory 126listed in VAXC$PATH (is this a typo for DCL$PATH? Also, will a 127logical name work?). If someone gets around to implementing it, we 128should probably be using the callable editors (e.g. TPU$TPU), although 129of course we also need interface(s) which are not locked into any 130particular editors. 131 132---------------------------------------- 133 134Notes regarding compiling on VAX/VMS 6.2 (not Alpha) (These are items 135which hopefully will have cleaner solutions in the future, but here is 136how to get around them for now): 137 138* Need to compile lib/getdate.c with vaxc instead of decc to avoid a 139compiler bugcheck. Therefore one must add SYS$LIBRARY:VAXCRTL/LIBRARY 140to the link. 141 142* In src/ignore.c, change lstat to stat. In vms/filesubr.c, change 143"#ifdef S_ISLNK" to "#if 0". 144 145* Ignore the warnings in vms/vmsmunch.c; the system include file 146declares something as an int when it should be void *. Not *our* 147fault! 148 149* Remove the #define's of mode_t in vms/vms.h and pid_t in vms/pwd.h. 150Add "#include <sys/types.h>" in vms/pwd.h. 151 152Credits: 153 154Initial VMS port by Benjamin J. Lee <benjamin@cyclic.com>, Cyclic 155Software, October 1, 1995 (Update March 1, 1996). 156