Delivery-Date: Thu, 09 Feb 1995 11:17:40 -0800
Received: by gw.home.vix.com id AA19465; Thu, 9 Feb 95 11:17:38 -0800
Received: (from ckd@localhost) by loiosh.kei.com (8.6.9/8.6.9) id OAA02629; Thu, 9 Feb 1995 14:17:36 -0500
Date: Thu, 9 Feb 1995 14:17:36 -0500
From: Christopher Davis <ckd@loiosh.kei.com>
Message-Id: <199502091917.OAA02629@loiosh.kei.com>
To: paul@vix.com
Subject: *thwack* -- the diffs are included this time
X-Attribution: ckd

Here they are, against a virgin BETA17; they subsume my earlier set as
well.  Nothing major, just documentation cleanup as usual.

diff -ur 493-b17/shres/INSTALL 493-b17.ckd/shres/INSTALL
--- 493-b17/shres/INSTALL	Thu Dec 15 01:27:03 1994
+++ 493-b17.ckd/shres/INSTALL	Thu Feb  9 14:10:36 1995
@@ -43,13 +43,16 @@
     ftp.vix.com, and it lives in /pub/bind.
 
     In the remainder of this document, $BINDSRC represents the directory
-    you unpacked the BIND distribution into.
+    you unpacked the BIND distribution into, and $BINDBUILD represents the
+    directory you actually built BIND in (they will be different if you
+    use "make links").
 
 2.  Configure it to your tastes by editing $BINDSRC/conf/options.h, using
     $BINDSRC/OPTIONS as a guide to the available choices.  SUNSECURITY
-    must be on (and will be turned on automatically on Suns).  Not all of
-    the options affect the resolver library, but you probably want the new
-    named as well (the one Sun supplies is really, really old).
+    must be on for the shared library (it should be included in the SHCC
+    entry in $BINDBUILD/Makefile).  Not all of the options affect the
+    resolver library, but you probably want the new named as well (the one
+    Sun supplies is really, really old).
 
 3.  (Optional) Use "make DST=sun4.b links" to create a shadow source tree
     for the Sun4 architecture (see $BINDSRC/README for details).  This is
@@ -57,12 +60,13 @@
     or operating system (like, say, SunOS 4.1.x and Solaris 2.x).  If you
     do this, cd into the new build directory ("cd sun4.b", for example).
 
-4.  Uncomment the appropriate lines in $BINDSRC/sun4.b/Makefile (or
+4.  Uncomment the appropriate lines in $BINDBUILD/Makefile (or
     $BINDSRC/Makefile if you didn't do step 3, shame shame) for SunOS 4.
     To build resolver code to install in the shared library, uncomment the
     SHRES line, as well as the appropriate SHCC and PIC lines.  If you
-    have gcc, use it for SHCC, as it can share the read-only data (see
-    $BINDSRC/shres/ISSUES for more details).
+    have gcc, you should use it for SHCC, as it can share the read-only
+    data (see $BINDSRC/shres/ISSUES for more details).  I also use it as
+    CC to compile named, libresolv.a, and the tools.
 
 5.  (Optional) Add $BINDSRC/bin to your path, and "make depend".
 
@@ -79,7 +83,8 @@
     the "international" versions of these patches were:
 
       4.1.3:    100891-10
-      4.1.3_U1: 101558-03
+      4.1.3_U1: 101558-04
+      4.1.4:    none as of this writing (release incorporates 101558-02)
 
     Note that "international" means "has not installed the extra-cost 'US
     Encryption Kit'", so most sites, even in the US, will need these
@@ -96,7 +101,10 @@
 will be done for you; read them anyway.
 
 The makeshlib script does minimal error checking and is mostly a quick &
-dirty convenience for people tired of typing commands.
+dirty convenience for people tired of typing commands.  If it fails on
+your system, you'll probably have to do part or all of the installation
+manually instead.  (Please also let me know; I'll try to check for that
+problem, or at least document it in shres/PROBLEMS.)
 
 Note that some or all of these steps may need to be done as root.  You
 should read the makeshlib script carefully before running it as root.
@@ -129,13 +137,18 @@
 10. Extract the shareable libresolv_pic.a into this target directory.
     This will replace Sun's inet_addr.o, which is ok; this one is better.
     It will also replace Sun's getnetent.o, which is ok, as long as you
-    have DNS entries for your networks (as in RFC 1101).  (If you want to
-    keep using NIS or /etc/networks instead, you'll need to save Sun's
-    getnetent.o, remove BIND's getnetby* files, and put Sun's getnetent.o
-    back after this step.)  Make sure that Sun's mktemp.o and strpbrk.o
-    don't get stomped; you need to use Sun's.
+    have DNS entries for your networks (as in RFC 1101).  See shres/ISSUES
+    for details on why this is a Good Thing in my opinion.
 
-      ar x $BINDSRC/shres/libresolv_pic.a
+    If you want to keep using NIS or /etc/networks instead, you'll need to
+    save Sun's getnetent.o, remove BIND's getnetby* files, and put Sun's
+    getnetent.o back after this step.  You have to remove *ALL* of BIND's
+    getnetby* objects, or your shared library will fail to link properly.
+
+    Make sure that Sun's mktemp.o and strpbrk.o don't get stomped; you
+    need to use Sun's.
+
+      ar x $BINDBUILD/shres/libresolv_pic.a
       rm __.SYMDEF
 
 11. Make sure the old host resolver is not still lying around:
@@ -144,11 +157,13 @@
 
     (ignore error "rm: gethostent.o nonexistent" if you see it.)
 
-12. Sun's shipped awk script has a small bug; if you use their recommended
-    procedure for saving old (FCS) versions of the shared libraries, it
-    can get the wrong version number for the new libc.so.  You should fix
-    this problem by applying (using the 'patch' program) the patch file
-    $BINDSRC/shres/sun-awkfile.patches.
+12. Sun's shipped awk script (/usr/lib/shlib.etc/awkfile) has a small bug;
+    if you use their recommended procedure for saving old (FCS) versions
+    of the shared libraries, it can get the wrong version number for the
+    new libc.so.
+
+    You should fix this problem by applying (using the 'patch' program)
+    the patch file $BINDSRC/shres/sun-awkfile.patches.
 
 13. Go back up to the shared library building directory and duplicate the
     list of object files to use:
@@ -230,8 +245,8 @@
 
           SOLUTION: start over; you did something wrong when you compiled
 	  libresolv_pic.a in step 4, above.  Make SURE you're using the
-	  libresolv_pic.a that was built in $BINDSRC/shres, and not the
-	  "normal" libresolv.a built in $BINDSRC/res.
+	  libresolv_pic.a that was built in $BINDBUILD/shres, and not the
+	  "normal" libresolv.a built in $BINDBUILD/res.
 
        b. It lists hundreds of error lines about offsets or addresses
 	  being wrong in all your resolver .o files.
@@ -239,10 +254,12 @@
           SOLUTION: start over; you needed to specify "-pic" or "-fpic" to
 	  the C compiler when building shres/libresolv_pic.a.  Make sure
 	  you're using libresolv_pic.a, and make sure that SHCC and PIC
-	  were properly defined in $BINDSRC/Makefile.
+	  were properly defined in $BINDBUILD/Makefile.
 
 16.  To build the System V shared libc, repeat steps 8-11, using
      'libcs5_pic.a' instead of 'libc_pic.a', then 'make libcs5.so'.
+     You'll need to delete the contents of the directory
+     '/usr/lib/shlib.etc/tmp" first.
 
 17.  If all goes well, you now have a "libc.so.x.y.z" in this directory
      (two, if you rebuilt the SysV shared library as well; the BSD one is
@@ -329,12 +346,13 @@
      machine.  Until you do, running processes will continue to use the
      old shared library.
 
-21.  "make install" in $BINDSRC to install the new resolver library,
+21.  "make install" in $BINDBUILD to install the new resolver library,
      named, and header files.  This will allow statically linked programs
      and programs that link directly to the resolver library (like
      sendmail) to be compiled against the BIND resolver (highly
      recommended).
 
-You may also want to modify the unshared system C library /usr/lib/libc.a
-to contain certain compatibility functions; see the item "Modifying the
-static libc" in shres/ISSUES for discussion of how (and why) to do this.
+You probably also want to modify the unshared system C library,
+/usr/lib/libc.a, to contain certain compatibility functions; see the item
+"Modifying the static libc" in shres/ISSUES for details of how (and why)
+to do this.
Only in 493-b17.ckd/shres: INSTALL~
diff -ur 493-b17/shres/ISSUES 493-b17.ckd/shres/ISSUES
--- 493-b17/shres/ISSUES	Tue Jul 12 12:23:49 1994
+++ 493-b17.ckd/shres/ISSUES	Thu Jan 12 22:11:29 1995
@@ -1,12 +1,16 @@
-Expanded and updated for BIND 4.9.3 by Chris Davis <ckd@kei.com>
-                                       1994: 6/6, 6/28, 7/6, 7/11
-Originally by  Dave Morrison <drmorris@mit.edu>, 2/3/94
+Issues with BIND 4.9.3 resolver code and SunOS 4.1.x shared libraries
+=====================================================================
+
+$Id$
+
+by Chris Davis <ckd@kei.com>
+
+heavily based on a document by Dave Morrison <drmorris@mit.edu>, 2/3/94
 
 Changes to the shared library setup have lots of little pitfalls and
 mines.  This is an attempt to map the minefield, for those who feel
 they've noticed something that they think should be done another way.
 
-
 * What's shared, what's static
 
 The purpose of these modifications to Sun's libc.so is to provide DNS
@@ -220,3 +224,23 @@
 library, and you use the res_ routines directly without -lresolv (uncool,
 see above) you will not be able to take it to a previous stock SunOS
 without a few problems.
+
+* RFC 1101 network names vs. /etc/networks
+
+If you install BIND's getnetby* routines in your shared library, you will
+find that programs using the shared library will no longer consult
+/etc/networks.  Instead, they will use the DNS to resolve network names as
+well as host names.
+
+I consider this to be a Good Thing.  Just as /etc/hosts has been
+deprecated and effectively replaced by the DNS, so should /etc/networks be
+replaced by a dynamic, scalable, and centrally-updatable system (the DNS).
+
+You will probably want to put DNS entries in for your networks.  RFC 1101,
+included in the BIND distribution (doc/rfc/rfc1101) has the full details;
+you basically just add forward and reverse mapping entries for "host-zero"
+addresses.  (The class C network 192.88.144 is 0.144.88.192.in-addr.arpa,
+for example.)
+
+Once you do this, netstat -r will display network names, rather than
+numbers; netstat -rn will display addresses numerically.
diff -ur 493-b17/shres/PROBLEMS 493-b17.ckd/shres/PROBLEMS
--- 493-b17/shres/PROBLEMS	Wed Jan 11 03:58:08 1995
+++ 493-b17.ckd/shres/PROBLEMS	Thu Feb  9 13:56:12 1995
@@ -157,8 +157,25 @@
 with the System V libraries in /usr/5lib.  (If LD_LIBRARY_PATH is set to
 include /usr/openwin, that's fine; BIND doesn't use the X11 libraries.)
 
-* "interrupted system call" on TCP connections (usually zone transfers)
+* _getnetbyname/_getnetbyaddr "multiply defined"
+
+You put Sun's getnetent.o back, but you didn't delete BIND's getnetby*
+object files.  BIND's getnetnamadr.o defines these.
+
+You would normally only do this if you wanted to use /etc/networks instead
+of the DNS for network names.  (See shres/ISSUES for why I recommend using
+RFC 1101 for network names instead.)
+
+Solution: Delete *ALL* of BIND's getnetby* objects before building the
+shared library.
+
+* update of libc.sa.* fails when using makeshlib
+
+Sun's awkfile can get confused if you have certain combinations of libc.so
+versions around.  For example, if you have libc.so.1.8.1 and libc.so.1.9,
+it will incorrectly calculate the next version as libc.so.1.9.2.  This
+will result in makeshlib being unable to copy the (nonexistant)
+libc.sa.1.9.1 into place.
+
+Solution: do it by hand.  makeshlib can't solve *every* problem.
 
-You probably didn't uncomment the part of the top-level Makefile that
-sets CC to "/usr/bin/cc -DSUNOS4".  You have to make sure the SUNOS4
-symbol is defined when building BIND.
Only in 493-b17.ckd/shres: PROBLEMS~

