freebsd-skq/contrib/bind
Peter Wemm 11e226045a This commit was generated by cvs2svn to compensate for changes in r26971,
which included commits to RCS files with non-trunk default branches.
1997-06-27 07:25:32 +00:00
..
conf Clean (trimmed down) import of bind-4.9.6 onto vendor branch. This is 1997-06-27 07:25:32 +00:00
doc Clean (trimmed down) import of bind-4.9.6 onto vendor branch. This is 1997-06-27 07:25:32 +00:00
include Clean (trimmed down) import of bind-4.9.6 onto vendor branch. This is 1997-06-27 07:25:32 +00:00
man Clean (trimmed down) import of bind-4.9.6 onto vendor branch. This is 1997-06-27 07:25:32 +00:00
named This commit was generated by cvs2svn to compensate for changes in r26971, 1997-06-27 07:25:32 +00:00
res Clean (trimmed down) import of bind-4.9.6 onto vendor branch. This is 1997-06-27 07:25:32 +00:00
tools Clean (trimmed down) import of bind-4.9.6 onto vendor branch. This is 1997-06-27 07:25:32 +00:00
CHANGES Clean (trimmed down) import of bind-4.9.6 onto vendor branch. This is 1997-06-27 07:25:32 +00:00
INSTALL Clean (trimmed down) import of bind-4.9.6 onto vendor branch. This is 1997-06-27 07:25:32 +00:00
Makefile Clean (trimmed down) import of bind-4.9.6 onto vendor branch. This is 1997-06-27 07:25:32 +00:00
OPTIONS Take #2. Import bind-4.9.4-P1 into the intended directory! 1996-08-29 19:20:22 +00:00
README Clean (trimmed down) import of bind-4.9.6 onto vendor branch. This is 1997-06-27 07:25:32 +00:00
TODO Take #2. Import bind-4.9.4-P1 into the intended directory! 1996-08-29 19:20:22 +00:00

The official version of BIND is now 8.1.1.  This is 4.9.6, the last of 4.*
which we are releasing since it has some important security bugs fixed.

The official place to get BIND is <URL:ftp://ftp.isc.org/isc/bind/src>.

The official mailing lists are:		bind-users@vix.com	- users/admins
  (use *-request@* for admin mail)	bind-workers@vix.com	- developers

The official Usenet newsgroups are:	comp.protocols.tcp-ip.domains
					comp.protocols.dns.bind
					comp.protocols.dns.ops
					comp.protocols.dns.std
					
BIND is currently maintained by:	The Internet Software Consortium
					(see <URL:http://www.isc.org/isc>.)

Read the top of CHANGES for interesting stuff.

To build this:								QUICK

	(on SUNOS, use the BSD build environment or you will
	get the wrong definition for O_NDELAY)

	look at conf/options.h and edit to your tastes.
	The OPTIONS file here in this directory will help you
	figure out what to do.

	You should also look at the Makefile to select the proper set
	of definitions depending on whether you are using Ultrix,
	SunOS, and other 4.[23] BSD-alikes or using BSD 4.4, BSD/386,
	and other net2-alikes.

	"make links" will build a shadow source tree full
	of symbolic links.  the default name of this tree
	is "./native.b", but you can override it by setting
	the DST variable on the "make" command line, as in:
		make DST=vax.b SRC=..
	if your DST is not a subdir of "here", you will need to
	override the SRC variable's default (which is ".."),
	as in:
		make DST=/tmp/vax.b SRC=`pwd` 
	note that the DST directory must be nonexistent at
	the time that you run "make links".

	after "make links", you can cd to the new build
	directory, check the settings in the Makefile, and
	run "make depend".  if you aren't using "make links"
	(shame on you), just use "make depend" from "here".
	"make depend" may fail on your system; if so, look in
	the bin/ directory and find a mkdep that does in fact
	work for you.

	if you skip the "make depend" phase, or after you run it,
	you can do "make all" (from the build directory if you
	used "make links" or from "here" if you're just hacking
	around).  you will get the following new things out of it:
		res/libresolv.a
		compat/lib/lib44bsd.a (optional)
		include/{netdb,resolv}.h
		include/arpa/{inet,nameser}.h
		compat/include/sys/{cdefs,bitypes}.h
		tools/{nstest,nsquery,dig,host}
		tools/nslookup/nslookup
		named/named
		named/named-xfer
	if you have trouble with "make all", check conf/portability.h
	for things that your system needs, or doesn't need, or whatever.
	it is preferable to add #ifdef's to conf/portability.h than to
	add them anywhere else.
	
	from the build directory (or "here" if you didn't
	use "make links"), you can try "make -n install"
	which will tell you what will be installed.  it might
	actually be right; however, what you will probably have to
	do is copy the above files into the places you want
	run them from.  the other files you will need are:
		tools/nslookup/nslookup.help
		named/named.restart
		named/named.reload

	resolver library notes: to install it, either put the .a
	file into /usr/local/lib or /usr/lib (if you use -lresolv
	on all the links of your networking software), or use "ar"
	to put all res/*.o directly into your /lib/libc.a file.
	either way you will want to copy the include files
	(including those from compat/include/sys) over to
	/usr/include (or /usr/local/include if you're willing to
	use -I/usr/local/include on all your network-software
	compiles).  something like this:
	    cp res/libresolv.a /usr/lib; ranlib /usr/lib/libresolv.a
	    tar chf - include | (cd /usr/include; tar xvpf -)
	    cp compat/include/sys/*.h /usr/include/sys

	installing the man pages is left as an exercise for the
	reader.  there are just too many different versions of
	"man" floating around for me to be able to help you figure
	out what to do for the one you happen to be using.

	WARNING: If you were running a BIND 4.8.3 or earlier based
	named you should remove all cache files prior to starting
	named. It would generally be a good idea to remove all cache
	files regardless when installing a new version. The creadability
	code depends upon the cache files having been made with the
	latest named-xfer for correct operation.

(special compilation-related warning about SunOS systems:)

	From: Tom Limoncelli
	To: vixie (Paul A Vixie)
	Date: Mon, 11 Jan 93 11:30:39 EST

	Sun compiler v2.0.1 hates bind4.9 code.

	Sun has 3 compilers:

	/usr/ucb/cc  -- the default for SunOS 4.1.[123],
			dropped in Solaris 2.0.
	/usr/lang/cc  -- the "unbundled" cc v1.0
			(pretty good, but expensive), only
	                 generates code for SunOS 4.1.x.
	/usr/lang/cc.2.0.1 -- the latest "unbundled" cc,
			for when they stop shipping the
			bundled version altogether.  This
			generates code for SunOS 4.1.x and Solaris 2.x.

	Sun's 2.0.1 C compiler (the one with the floating licenses) for SunOS
	4.1.x outputs a HUGE number of warnings.  They can be ignored.

--------------------- (4.8.3 README -- mostly obsolete now)

This directory contains all the info and sources
for the Berkeley Internet Name Domain server.
You should read and understand these directions before starting
to install the libraries and nameserver.  Some of these steps
replace existing source and binary files; you should make backups
of all existing files before you begin this installation.
Two installation procedures are described.  The first is for 4.3BSD
and other similar systems that are already configured to use earlier
versions of the nameserver, and which have the new version of <netdb.h>
(containing a h_addr_list field in the hostent structure).  The second
procedure is for 4.2BSD and derived systems.  This procedure requires
more decisions to be made, and may have to be varied due to system
or operation constraints.

The subdirectories and their contents are:

bin       - shell scripts used by current Berkeley makefiles
man       - manual pages & documentation
doc       - copy of Bind Operations Guide, and other documents 
include   - include files to go in /usr/include
named     - name server sources
res       - source for C library resolver routines (and other libc additions)
	    (may be used as separate library, resolv.a)
conf/master - Sample data files
tools     - some test programs


Here is how to install the name server on 4.3BSD:

0) cp bin/mkdep.append /usr/ucb/mkdep
   cp bin/manroff /usr/man/manroff
1) cp include/arpa/nameser.h /usr/include/arpa  
2) cp include/*.h /usr/include 
3) cp man/*.1 /usr/man/manl
   cp man/*.3 /usr/man/man3
   cp man/*.5 /usr/man/man5
   cp man/*.7 /usr/man/man7
   cp man/*.8 /usr/man/man8
4) NOTE: Don't install the Makefiles on 4.3 Tahoe Release
   cp res/{res*.c,herror.c} /usr/src/lib/libc/net
   cp res/Makefile.libc.net /usr/src/lib/libc/net/Makefile
   cp res/strcasecmp.c /usr/src/lib/libc/gen
   cp res/strpbrk.c /usr/src/lib/libc/compat-sys5
   cp res/named/{*.c,Makefile} /usr/src/lib/libc/net/named
5) add strcasecmp.[co] to the Makefile in /usr/src/lib/libc/gen
6) add strpbrk.[co] to the Makefile in /usr/src/lib/libc/compat-sys5
7) rebuild and install /lib/libc.a.
8) edit named/pathnames.h to correpond with your system's configuration
9) cd named; make depend; make all; make install
10) cd tools/nslookup; make nslookup; make install
11) create the master files (samples in conf/master/*)
12) edit /etc/rc.local to include:

if [ -f /etc/named ]; then
        /etc/named; echo -n ' named' >/dev/console
fi

13) recompile network client and server programs that use gethostbyname, etc.


Here is how to install the name server on 4.2BSD or similar systems.
First, a few notes on the choices that must be made.

Rather than building libresolv.a, you may wish to integrate the resolver
routines into /lib/libc.a.  This is recommended to make it easy to recompile
network programs once named is running.  This procedure may require hand-
tayloring on some systems.

You will have to choose a version of mkdep from the bin directory
that will work on your system:
If you've modified make(1) to use .depend files as described
in the current sendmail distribution, use mkdep; otherwise,
if you have the 4.3BSD cc -M option, use mkdep.append; on ultrix,
use mkdep.ultrix (uses cc -Em); otherwise, use mkdep.old.compiler.
The mkdep script is used by "make depend" to regenerate Makefile dependency
lists.

You will need to chose a version of netdb.h.  First, check /usr/include/netdb.h
on your system.  If the hostent structure has a h_addr_list entry, you can
probably use your existing netdb.h or the one in include/netdb.h.
If the existing netdb.h in /usr/include does not have a h_addr_list field,
you will have to decide whether to update to the 4.3BSD format of the hostent
structure.  This is the best approach, but cannot be used unless you plan
to upgrade entirely: if you use the new structure in /usr/include/resolv.h,
you must recompile everything that uses the hostent structure, including
the rest of the C library and all networking programs, without using
any pre-existing object files.  If this isn't possible or desirable,
and /usr/include/netdb.h doesn't have an h_addr_list line, use
include/netdb.h.4.2 instead of netdb.h.  The other version of netdb.h
(include/netdb.h.4.2.compat) may be used instead of include/netdb.h.4.2.
This version along with a change in res/named/gethostnamadr.c.compat
provide for using the new format of the hostent structure while having
binary compatibility with existing libraries.

On systems with Sun RPC, you will have to merge include/netdb.h or
include/netdb.h.4.2 with /usr/include/netdb.h; copy the rpc-related lines
into the appropriate copy of netdb.h.  Alternatively, use an alternate
include path when compiling the resolver library and programs that use it.

0) cp bin/{whatever} /usr/ucb/mkdep		(see above)
   cp bin/manroff /usr/man/manroff
1) cp include/arpa/nameser.h /usr/include/arpa  
   Also, on ultrix 2.x, if you haven't fixed
   the inet_addr definition in inet.h, do
   cp include/arpa/inet.h /usr/include/arpa
2) cp include/resolv.h /usr/include
3) cp include/netdb.h /usr/include/netdb.h
OR
   cp include/netdb.h.4.2 /usr/include/netdb.h
OR
   edit /usr/include/netdb.h
4) cp man/*.1 /usr/man/manl
   cp man/*.3 /usr/man/man3
   cp man/*.5 /usr/man/man5
   cp man/*.7 /usr/man/man7
   cp man/*.8 /usr/man/man8
5) cd res; make depend;
   make libresolv.a;
   make install
OR
   update the libc sources as in the 4.3BSD instructions above
   and use res/Makefile as a guide for integration
   and omit the RES=-lresolv in the next two steps
OR
   compile the .o files in res according to Makefile,
   then use place those object files in /lib/libc.a (keeping a backup!)
   and omit the RES=-lresolv in the next two steps
6) edit named/pathnames.h to correpond with your system's configuration
7) cd named; make depend; make RES=-lresolv all; make install
   (if your system defines signal-catching routines to return int
   instead of void, use "make DEFINES=-DSIG_FN=int RES=-lresolv all")
8) edit tools/nslookup/pathnames.h to correpond with your system's
     configuration
9) cd tools/nslookup; make RES=-lresolv nslookup install
10) create the master files (samples in conf/master/*)
11) edit /etc/rc.local to include:

if [ -f /etc/named ]; then
        /etc/named; echo -n ' named' >/dev/console
fi

12) eventually, recompile network client and server programs that use
gethostbyname, etc.