BSD 4_1c_2 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Sat, 1 Jan 1983 11:43:23 +0000 (03:43 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Sat, 1 Jan 1983 11:43:23 +0000 (03:43 -0800)
Work on file usr/src/usr.bin/uucp/syskludge/README
Work on file usr/src/usr.bin/uucp/syskludge/INSTALL

Synthesized-from: CSRG/cd1/4.1c.2

usr/src/usr.bin/uucp/syskludge/INSTALL [new file with mode: 0644]
usr/src/usr.bin/uucp/syskludge/README [new file with mode: 0644]

diff --git a/usr/src/usr.bin/uucp/syskludge/INSTALL b/usr/src/usr.bin/uucp/syskludge/INSTALL
new file mode 100644 (file)
index 0000000..dc8eacc
--- /dev/null
@@ -0,0 +1,51 @@
+--- Installing the /usr/spool/uucp subdirectory kludge on system "xyz" ---
+       (This assumes your uucp sources are in good shape,
+       and are located in /usr/src/cmd/uucp.)
+
+1.  Fixing up the syskludge files
+1a) Mkdir /usr/src/cmd/uucp/syskludge, and chdir to it.
+\151b) Extract this tar file.
+1c) Edit syskludge.c and change "D.duke" to "D.xyz".
+1d) "make syskludge.a"
+
+2.  Fixing up uucp
+2a) chdir to /usr/src/cmd/uucp.
+2b) Edit makefile and change "LIBS=" to "LIBS=syskludge/syskludge.a".
+2c) Edit uucp.h and add "extern char *subdir();" at the end.
+2d) Edit gnsys.c and append the following subroutine:
+
+       /*
+        * return possibly corrected directory for searching
+        */
+       char *
+       subdir(d, pre)
+       char *d, pre;
+       {
+               if (strcmp(d, Spool) == 0 && pre == CMDPRE)
+                       return("/usr/spool/uucp/C.");
+               return(d);
+       }
+
+2e) Edit gnsys.c and "/fopen(dir,/s//fopen(subdir(dir, pre),/"
+2f) Edit anlwrk.c and "/fopen(dir,/s//fopen(subdir(dir, pre[0]),/"
+       (NOTE "pre" in gnsys.c, "pre[0]" in anlwrk.c)
+
+3.  Finishing up.
+3a) su root
+3b) make
+3c) make backup copies of uucp, uux, uucico, and uuxqt.
+3d) WAIT UNTIL THERE IS NO UUCP TRAFFIC (single user is safest).
+3e) Copy the new uucp, uux, uucico, uuxqt to the appropriate places.
+3f) chdir to /usr/spool/uucp
+3g) mkdir C. D. D.xyz; chmod 755 C. D. D.xyz
+3h) chown uucp C. D. D.xyz; chgrp daemon C. D. D.xyz
+3i) mv D.xyz?* D.xyz; mv D.?* D.; mv C.?* C.
+
+4.  All done!  Mail a letter somewhere and see if it goes.
+At your leisure, pack /usr/spool/uucp to remove the empty slots.
+
+5.  Final notes:
+5a. uulog, uuclean, and uuname are linked with LIBS, so they get changed.
+You might want to copy them too, though there should be no functional change.
+5b) If "C." is not a mapped prefix in syskludge.c, omit the "subdir()" kludge.
+       (steps 2c-2f)
diff --git a/usr/src/usr.bin/uucp/syskludge/README b/usr/src/usr.bin/uucp/syskludge/README
new file mode 100644 (file)
index 0000000..fa00061
--- /dev/null
@@ -0,0 +1,52 @@
+.TL
+Subdirectory Performance Enhancement for UUCP
+.AU
+Tom Truscott
+.AI
+Department of Computer Science
+Duke University
+Durham, NC 27706
+
+(919) 684-3048
+.NH
+OVERVIEW
+.PP
+The uucp subdirectory enhancement
+keeps the /usr/spool/uucp directory small
+by putting spool files in various subdirectories.
+This speeds up locking (e.g. for LOGFILE).
+At Duke, "C." files are in "C./",
+"D.duke" files are in "D.duke/",
+and other "D." files are in "D./".
+Multiple subdirectories speeds up the search for a file.
+For example, "C." files are searched for in the "C." subdirectory
+so no time is wasted skipping "D." files.
+Further, since UN*X locks directories during search (namei()),
+having multiple directories permits increased concurrency
+when more than one "uu" process is running.
+.NH
+IMPLEMENTATION
+.NH 2
+CHANGES WHICH ARE EXTERNAL TO UUCP
+.PP
+Certain filenames are remapped at system-call time.
+For example, "/usr/spool/uucp/D.decvax1234" is remapped to
+"/usr/spool/uucp/D./D.decvax1234".
+Also, "D.decvax" is mapped to "D./D.decvax" provided
+that the last chdir(II) was to "/usr/spool/uucp".
+The list of filename prefixes which are mapped are given
+in the prefix table in syskludge.c.
+As distributed, files beginning "D.duke" are put in /usr/spool/uucp/D.duke,
+other "D." files are put in subdirectory "D.",
+and "C." files are put in the "C." subdirectory.
+.PP
+This change is implemented by providing a "syskludge.a"
+library which has special versions of open(II), link(II), etc.
+.SH
+CHANGES TO UUCP ITSELF
+.PP
+When searching for work ("C." files),
+uucp looks in /usr/spool/uucp/C. rather than /usr/spool/uucp.
+.PP
+This change is implemented by minor changes to uucp itself.
+If "C." files were not mapped, no changes to uucp proper would be needed.