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