2 FreeBSD maintainer's guide to updating BIND 9
3 =============================================
5 1) Obtain the latest source distribution from the ISC's FTP server
6 (ftp://ftp.isc.org/isc/bind9/)
8 2) Check out the head of the subversion "vendor branch"
10 svn co $REPO/vendor/bind9/dist
12 3) Unpack the tarball in a suitable directory:
14 tar zxvf bind-9.<x.y>.tar.gz -X dist/FREEBSD-Xlist
16 Check to see if any files have been added or deleted using
17 diff -ur dist bind-9.<x.y> -x \.svn | grep 'Only in'
19 4) Copy new files over the old ones:
21 cp -Rp bind-9.<x.y>/* dist/
23 5) Double-check for changes using 'svn status'
25 6) Use 'svn add' and 'svn rm' to bring dist up to date for files found above.
26 Update FREEBSD-Xlist as needed.
27 The files in vendor/bind9/dist should now look exactly like those in the
28 ISC sources, minus the files/directories in FREEBSD-Xlist above.
29 Carefully check the output of 'svn status' and 'svn diff'
30 It's not if you're paranoid, it's if you are paranoid enough
32 7) Commit the update to the vendor files:
34 cd dist ; svn ci -m "Vendor import of BIND 9.X.Y"
35 svn cp $REPO/vendor/bind9/dist $REPO/vendor/bind9/${version}
36 (this is a server-side operation, you dont have to check it out)
38 8) Update the files in src/contrib/bind9:
42 Make sure you are up to date:
43 svn update ; svn status
45 svn merge $REPO/vendor/bind9/dist .
46 Resolve conflicts (if any)
47 Carefully check the output of 'svn status' and 'svn diff'
49 NOTE: You may need 2 copies of head/contrib/bind9 at this point,
50 one to do the work in steps 9 and 10 below, and a clean
51 version to commit in step 16.
53 9) Remove any references to the {bin,lib}/tests and docutil
54 directories from the configure and Makefile templates:
56 $ sed -i.orig -e '/\/tests/d; /docutil/d; /\/xsl/d;' \
57 configure.in Makefile.in */Makefile.in
59 Please do not commit this change. You only need this to generate config.h.
61 10) Generate and run configure:
63 aclocal ; autoheader ; autoconf
64 $ ./configure --prefix=/usr \
65 --without-libxml2 --without-idn \
66 --infodir=/usr/share/info --mandir=/usr/share/man \
67 --enable-threads --disable-ipv6 \
68 --enable-getifaddrs --disable-linux-caps \
69 --with-openssl=/usr --with-randomdev=/dev/random
71 NOTE: Disabling libxml, idn, and IPv6 is the default.
72 Knobs are provided for users to enabled the first 2, and
73 src/lib/bind/config.mk will re-enable IPv6 at compile
74 time if WITHOUT_INET6 is not defined.
76 11) Copy the following generated files to src/lib/bind:
78 Path in src/contrib/bind9 Path in src/lib/bind
79 ------------------------------------------------------------
81 cp config.h ${s}/config.h
82 cp lib/isc/include/isc/platform.h ${s}/isc/isc/platform.h
83 cp lib/lwres/include/lwres/netdb.h ${s}/lwres/lwres/netdb.h
84 cp lib/lwres/include/lwres/platform.h ${s}/lwres/lwres/platform.h
86 Do not commit any other file that was modified or created in
89 12) cd src/lib/bind/dns && make -DMAINTAINER_MODE generate && rm gen
91 13) Test build the updated files with a clean /usr/obj and empty src.conf
93 The following directories contain Makefiles for bits and pieces of
96 FreeBSD directory ISC directory
97 ========================================================
98 src/lib/bind bind9/lib
99 src/lib/bind/bind9 bind9/lib/bind9
100 src/lib/bind/dns bind9/lib/dns
101 src/lib/bind/isc bind9/lib/isc
102 src/lib/bind/isccc bind9/lib/isccc
103 src/lib/bind/isccfg bind9/lib/isccfg
104 src/lib/bind/lwres bind9/lib/lwres
105 src/share/doc/bind9 bind9/doc/{arm,misc}
106 src/usr.bin/dig bind9/bin/dig
107 src/usr.bin/host bind9/bin/dig
108 src/usr.bin/nslookup bind9/bin/dig
109 src/usr.bin/nsupdate bind9/bin/nsupdate
110 src/usr.sbin/dnssec-dsfromkey bind9/bin/dnssec
111 src/usr.sbin/dnssec-keyfromlabel bind9/bin/dnssec
112 src/usr.sbin/dnssec-keygen bind9/bin/dnssec
113 src/usr.sbin/dnssec-signzone bind9/bin/dnssec
114 src/usr.sbin/named bind9/bin/named
115 src/usr.sbin/named-checkconf bind9/bin/check
116 src/usr.sbin/named-checkzone bind9/bin/check
117 src/usr.sbin/rndc bind9/bin/rndc
118 src/usr.sbin/rndc-confgen bind9/bin/rndc
120 Make sure that the lists of sources, headers and man pages in each
121 FreeBSD Makefile accurately reflects those in the corresponding ISC
122 Makefile. Please strive to keep those lists in the same order and
123 with line breaks in the same places to ease future comparisons.
127 15) Lather, rinse, repeat.
129 16) Commit when everything builds cleanly and works properly.