Annotation of researchv10no/netfs/README, revision 1.1

1.1     ! root        1: This is the source to various network file system pieces.
        !             2: There are protocol-specific parts (interface libraries and support
        !             3: programs), and there are servers.
        !             4: 
        !             5: serv/* are server sources.  In principal, they may be compiled
        !             6: with any protocol library; in practice, serv/makefile uses -lnetb,
        !             7: so by default the servers speak that protocol.
        !             8: Some of the servers are
        !             9: zarf   present the local file system
        !            10: ffs    interpret a 4BSD file system
        !            11: f6     interpret a Fifth or Sixth Edition Unix file system
        !            12: f7     interpret a Seventh Edition Unix file system
        !            13: d7     interpret a Seventh Edition dump tape (present as a file system)
        !            14: f11    interpret a DEC FILES-11 ODS 1 version 2 file system
        !            15: All but zarf are read-only file systems for now.
        !            16: Only zarf is known to be portable; some of the others were written as
        !            17: quick hacks, and need some tidying up.
        !            18: 
        !            19: libnetb/* makes /usr/lib/libnetb.a, the protocol library for
        !            20: netb (the Research Unix file system protocol).  There are two
        !            21: ancillary programs: runfs starts a server by hand, mounted
        !            22: on some local file and connected through a pipe; setup is the
        !            23: daemon that maintains a handful of file systems, restarting them
        !            24: when they break.  Both runfs and setup are specific to Research
        !            25: Unix; the library is meant to run anywhere.
        !            26: 
        !            27: Some of the files in libnetb aren't really netb-specific.  Some
        !            28: day, when there are more protocols supported, there will be a
        !            29: separate directory with the protocol-independent parts, and life
        !            30: will be considerably more confusing.
        !            31: 
        !            32: Here are some hints on making things work on a new system:
        !            33: 
        !            34: Bring along libnetb/*.[ch] libnetb/makefile serv/*.[ch] serv/makefile
        !            35: (You probably don't want all the servers; to take just the ordinary
        !            36: file system server, bring zarf.c except.c *dir.c zarf.h)
        !            37: Deposit them somewhere in directories libnetb and serv.
        !            38: serv/makefile and the server programs expect to find <rf.h> in /usr/include
        !            39: and libnetb in /usr/lib.  If you aren't planning to install them there,
        !            40: add -I../libnetb to CFLAGS in serv/makefile, and change L from -lnetb
        !            41: to ../libnetb/libnetb.a (or wherever you put those files).
        !            42: You probably also want to edit serv/makefile to make only zarf,
        !            43: and libnetb/makefile to make only libnetb.a; deleting the `all'
        !            44: lines should suffice.
        !            45: 
        !            46: Whenever possible, adjust things by changing the makefile to use different
        !            47: source files, rather than by editing the sources themselves.  There are
        !            48: almost no #ifdefs in the programs, and even those shouldn't be.  Generally
        !            49: there are different source files containing routines that vary among systems:
        !            50: a couple of directory-reading routines, for example.
        !            51: 
        !            52: You should have to adjust two particular things (and no others, I hope):
        !            53: The routine that reads directories, and the routine that determines who called.
        !            54: The former is mandatory; the latter can be put off unless you grant different
        !            55: rights to different clients.
        !            56: 
        !            57: Directories:
        !            58: As shipped, zarf reads directories using a research-specific system
        !            59: call; this probably isn't what you want.  To use the standard `portable'
        !            60: directory-reading routines, change resdir.o to libdir.o in serv/makefile.
        !            61: If you're on a 4BSD system, you probably want bsdlibdir.o instead, which
        !            62: differs only in a couple of names.  If the directory routines are in a
        !            63: separate library, add the library to the line that makes zarf.
        !            64: 
        !            65: If you think (or measure) that the library routines are too slow, write
        !            66: your own, but it probably isn't worth the bother.
        !            67: 
        !            68: Who called:
        !            69: As shipped, libnetb uses a routine that cracks one of a couple of
        !            70: environment variables set up by present and historic research connection
        !            71: servers and Datakit managers.  zarf cares who called so it can print it
        !            72: in the logfile, and to compare with entries in the except file.  If you
        !            73: don't care, leave it be; at worst it will leave the caller's name empty.
        !            74: If you do care, edit libnetb/makefile as follows:
        !            75: 
        !            76: If you're on a 4BSD-socket-like system, use bsdwhocalled.o and bsdgetpeer.o
        !            77: instead of reswhocalled.o and callsource.o.
        !            78: 
        !            79: If you're on a system with 4BSD sockets for TCP/IP and the research connection
        !            80: server for Datakit, use mixwhocalled.o instead of reswhocalled.o, keep
        !            81: callsource.o, and add bsdwhocalled.o.
        !            82: 
        !            83: Certain System-V-with-Berkeley-extensions systems have sockets but put
        !            84: Berkeley headers and libraries in funny places.  If bsdgetpeer.c won't
        !            85: compile, add -I/usr/include/bsd (or whatever) to CFLAGS in the makefile;
        !            86: if zarf won't load because getpeername is missing, add -lbsd (or whatever)
        !            87: to the makefile line that makes zarf.
        !            88: 
        !            89: Miscellany:
        !            90: If the target system doesn't have makedir and rmdir system calls, add
        !            91: makedir.o to the line that makes zarf in serv/makefile.
        !            92: If the C library on the target doesn't have strchr and strrchr, it
        !            93: probably has index and rindex instead; add `-Dstrchr=index -Dstrrchr=rindex'
        !            94: to CFLAGS in both makefiles.
        !            95: 
        !            96: There is one #if hack: on 64-bit machines, the size of a file is often
        !            97: 64 bits long, but the netb protocol only allows 32-bit sizes.  There is
        !            98: a little compensating code in libnetb/funcs.c.
        !            99: 
        !           100: 
        !           101: Once you have all the makefiles right,
        !           102: cd libnetb; make
        !           103: cd ../serv; make zarf
        !           104: 
        !           105: Unlike earlier programs of the same name, zarf has no built-in filenames.
        !           106: It prints logging info on the standard error file; it expects arguments
        !           107: of the form `-e except' to point it at the except file.  Arrange for
        !           108: network calls to invoke zarf with output redirected and with the appropriate
        !           109: arguments.  If necessary, write a shell script, or perhaps a tiny C program,
        !           110: that does the setup.  On research machines there is a shell script; see
        !           111: serv/zarf.go.  Edit it to your taste.
        !           112: 
        !           113: For zarf to offer full permissions to the client, it must run as the super-
        !           114: user.  It is probably a bad idea to make it set-userid to root; use network
        !           115: services instead.  On TCP/IP server machines, the preferred way is to put
        !           116: zarf.go in a known place, and arrange for TCP port 400 to invoke zarf.go
        !           117: as the super-user, e.g. with the following line in /etc/inetd.conf:
        !           118: zarf   stream  tcp     nowait  root    /usr/netb/zarf.go       /usr/netb/zarf.go

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.