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