Copyright (C) Internet Systems Consortium, Inc. ("ISC")

See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.

Preparing a bind9 release

Here's a rough outline of the steps to follow in preparing a new bind9
release.

 - Update the README file

 - Send the new README file to webteam@nominum.com at least 48
   hours prior to the planned release and ask them to prepare
   the web pages for the new version.  If there have been only
   minor changes, send context diffs relative to the previous
   release instead.

 - Do a "cvs update" to check that all changes have been committed.

 - Verify that the file "version" contains the correct version
   number (it should have been incremented after the
   previous release)

 - If building from a release branch, check that any important
   bug fixes made on the mainline since the last release have
   been pulled up.  You can do this by comparing the CHANGES
   files using the util/check-pullups.pl script.  For example,
   running the script from a mainline tree:

     perl util/check-pullups.pl CHANGES ../9.2/CHANGES ../9.2/EXCLUDED

   This will list all bug fixes on the mainline that are not
   on the 9.2 release branch.

 - Before creating a new release branch, update the lib/*/api files
   as needed.  See the libtool info file for information about what
   the various numbers mean.

	cvs rdiff -r <last_release> -r <branch/HEAD> bind9/lib > diff

	e.g.

		cvs rdiff -r v9_4_0rc2 -r v9_4 bind9/lib > diff

 - Check that https://internal.isc.org/bind-build/
   shows a clean build and test status for all supported 
   systems and that the tests are actually being run on the
   version being released (the version can be found in the
   page behind the "Source tar build" link).

 - Check that running "make all_tests" in bin/tests does not
   produce compile errors.

 - Regenerate the documentation by running "make man" (mainline/9.2)
   or by running genhtml.sh in doc/arm (9.1 release branch)
   and commit it.  Note that not all machines have the
   necessary XML tools, but at least trebuchet, cuba,
   and Scanner's machine do.  Commit any files that were
   regenerated.

   Most of this has now been automated, only doc/arm/ARM.pdf will
   not be committed:
	ssh tbox@docs.lab.isc.org
	run this command from crontab.
1 1 * * * /usr/bin/lockf -s -t 0 /udir/tbox/bind9-documents/regenerate.lock /udir/tbox/bind9-documents/regenerate

   Check to see if the ARM has changed since the last release
   and if it has commit doc/arm/ARM.pdf.
   e.g.
	cvs rdiff -r v9_6_1 -r v9_6 bind9/doc/arm
	cd bind9-documents/bind9.v9_6
	cvs commit doc/arm/ARM.pdf

 - Verify that the documents in doc/misc are up-to-date.

 - Update the copyrights.

	ssh tbox@cvs.isc.org
	run these two command from the crontab
#
# Merge and Update copyrights
#
30 23 * * * /usr/bin/lockf -s -t 3600 /udir/tbox/tarballs/build-tarballs.lock /bin/sh /udir/tbox/tarballs/mergecopyrights
45 23 * * * /usr/bin/lockf -s -t 3600 /udir/tbox/updatecopyrights/updatecopyrights.lock /bin/sh /udir/tbox/updatecopyrights/updatecopyrights

     When tbox@cvs.isc.org is not available:

     Go to the root of the source tree.
     The scripts need to be run from there; they reference the util
     subdirectory internally.

     $ make distclean
     ... [I prefer to check out a fresh source tree --gson]
     $ perl util/merge_copyrights
     $ diff util/copyrights util/newcopyrights
     ... examine output, particularly any files with the "?" type, and
     ... then edit util/newcopyrights if necessary
     $ mv util/newcopyrights util/copyrights
     $ cvs ci -m'merge_copyrights' util/copyrights
     $ perl util/update_copyrights < util/copyrights
     $ cvs diff
     ... examine output, edit as necessary.  mail me about anything that
     ... the script should have been able to do itself. :-)
     $ cvs ci -m'update_copyrights'

 - Announce a CVS freeze if doing an alpha or beta release from 
   the mainline, or stop doing pullups if building from a release branch.

 - Run util/altbuild.sh.  This is to make sure that
   builds using libtool, separate source/object directories, and other 
   obscure build options work.  This script may need some hacking if run
   on anything other than NetBSD.  Save the output (it's big) and look 
   for error and warning messages.

      cd $top_of_mainline_tree
      sh util/altbuild.sh v9_0

   or

      cd $top_of_9_1_tree
      sh util/altbuild.sh v9_1

   Alteratively, you can do this after building the kit, by giving
   the kit .tar.gz file as an argument to altbuild.sh instad of
   the CVS tag.

 - If you can (= your system is similar enough to the one Tale is using),
   check the header files for cruft by running the command
   [ This step is quite imperfect and should probably be skipped
     for now -- Tale ]

      find lib -name '*.h' -print | xargs perl util/check-includes.pl

 - Add a marker line like "	--- 9.0.0rc10 released ---"
   to the CHANGES file.

 - Tag the CVS source tree with the final tag, as in
   "cvs rtag v9_0_0rc1 bind9" (mainline) or
   "cvs rtag -r v9_2 v9_2_0rc10 bind9" (release branch).

 - Build the release kit.  This procedure differs
   between the 9.0 release branch and later versions.
   On the 9.0 release branch,

        cd <temporary directory>
	cvs export -r v9_0_0rc10 bind9
	cd bind9
	sh configure
	make kit

   On the 9.[1-2] release branch or mainline, use the
   "util/kit.sh" script.

 - Build bind9 from the kit on ns-ext (phred)
   and ns-int (rc), install it, and let it run for
   a day keeping an eye on it for any problems.

     ssh phred.isc.org
     ver=9.2.0
     scp rc.isc.org:bind-$ver.tar.gz .
     gunzip <bind-$ver.tar.gz | tar xfv -
     cd bind-$ver
     sh configure
     make
     su
     make install
     ps -elf | grep named
     #  kill both the keep-running script and named itself
     /var/named/keep-running ns-ext &

     ssh rc
     ver=9.2.0
     gunzip <bind-$ver.tar.gz | tar xfv -
     cd bind-$ver
     sh configure
     make
     su
     make install
     mv /usr/local/sbin/named /usr/local/sbin/named9
     ps -elf | grep named
     # kill both keep-running scripts and both named9:s
    /var/named/keep-running9 rc-res1 & 
    /var/named/keep-running9 ns-int &

 - If you can, try resolving some IPv6 addresses and
   doing queries over IPv6.

 - If problems are found at this stage, fix them, move the
   release tag up using "rtag -F", and respin the kit.

 - Sign the distribution files with the ISC signing PGP key
   and fix the permissions on the signature file:

        ver=9.2.0
   	pgp -sba bind-$ver.tar.gz -u 0x51BAB2ED
	chmod 644 bind-$ver.tar.gz.asc

 - Verify the PGP signature:

	pgp bind-$ver.tar.gz.asc bind-$ver.tar.gz

   (Look for the words "Good signature" in the output.)

 - If there is a companion binary kit for NT, sign it and verify the
   signature:

       scp rc.isc.org:/udir/mayer/BIND$ver.zip .
       pgp -sba BIND$ver.zip -u 0x51BAB2ED
       chmod 644 BIND$ver.zip.asc
       pgp BIND$ver.zip.asc BIND$ver.zip

 - Prepare a release announcement based on the previous one.

 - Copy the distribution and PGP signature files to the FTP site:

     ssh -n isrv4.pa.vix.com "mkdir /udir/ftp/isc/bind9/$ver"
     scp bind-$ver.tar.gz bind-$ver.tar.gz.asc \
	isrv4.pa.vix.com:/udir/ftp/isc/bind9/$ver

 - If there is a companion binary kit for NT, copy it, too:

     ssh -n isrv4.pa.vix.com "mkdir /udir/ftp/isc/bind/contrib/ntbind-$ver"
     scp BIND$ver.zip BIND$ver.zip.asc \
	isrv4.pa.vix.com:/udir/ftp/isc/bind/contrib/ntbind-$ver

 - Download using FTP (or a web browser) using the URLs in the release
   announcement and verify the PGP signature again

 - Ask webteam@nominum.com to publish the updated web pages

 - When the web pages are up, announce the release on
   bind-announce@isc.org

 - Increment the version in the file "version", "configure.in" and
   "doc/arm/Bv9ARM-book.xml".

 - Resume doing pullups

