aboutsummaryrefslogtreecommitdiff
path: root/FREEBSD-Upgrade
blob: 27e393852bded55f8c0f6d5b3f34c52636fa5c61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137

	    FreeBSD maintainer's guide to updating BIND 9.4.x
	    =================================================

1) Obtain the latest source distribution from the ISC's FTP server
   (ftp://ftp.isc.org/isc/bind9/)

2) Check out the head of the subversion "vendor branch"

	svn co $REPO/vendor/bind9/dist-9.4

3) Unpack the tarball in a suitable directory:

	tar zxvf bind-9.4.<x>.tar.gz -X dist-9.4/FREEBSD-Xlist

	Check to see if any files have been added or deleted using
	diff -ur dist-9.4 bind-9.4.<x> -x \.svn | grep 'Only in'

4) Copy new files over the old ones:

	cp -Rp bind-9.4.<x>/* dist-9.4/

5) Double-check for changes using 'svn status'

6) Use 'svn add' and 'svn rm' to bring dist up to date for files found above.
   Update FREEBSD-Xlist as needed.
   The files in vendor/bind9/dist-9.4 should now look exactly like those in the
      ISC sources, minus the files/directories in FREEBSD-Xlist above.
   Carefully check the output of 'svn status' and 'svn diff'
      It's not if you're paranoid, it's if you are paranoid enough

7) Commit the update to the vendor files:

	cd dist-9.4 ; svn ci -m "Vendor import of BIND 9.4.X"
	svn cp $REPO/vendor/bind9/dist-9.4 $REPO/vendor/bind9/${version}
	   (this is a server-side operation, you dont have to check it out)

8) Update the files in stable/7/contrib/bind9:

	cd stable/7/contrib/bind9

	Make sure you are up to date:
	svn update ; svn status

	svn merge $REPO/vendor/bind9/dist-9.4 .
	Resolve conflicts (if any)
	Carefully check the output of 'svn status' and 'svn diff'

	NOTE: You may need 2 copies of stable/7/contrib/bind9 at this point,
	      one to do the work in steps 9 and 10 below, and a clean
	      version to commit in step 16.

9) Remove any references to the {bin,lib}/tests and docutil
   directories from the configure and Makefile templates:

	$ sed -i.orig -e '/\/tests/d; /docutil/d; /\/xsl/d;' \
		configure.in Makefile.in */Makefile.in \
		lib/bind/configure.in lib/bind/Makefile.in

   Please do not commit this change. You only need this to generate config.h.

10) Generate and run configure:

	aclocal ; autoheader ; autoconf
	cd lib/bind && aclocal ; autoheader ; autoconf
	cd ../..
	$ ./configure --prefix=/usr \
		--infodir=/usr/share/info --mandir=/usr/share/man \
		--enable-threads --enable-libbind --disable-ipv6 \
		--enable-getifaddrs --disable-linux-caps \
		--with-openssl=/usr --with-randomdev=/dev/random

   Note that we intentionally disable IPv6 support on the configure
   command line; stable/7/lib/bind/config.mk will re-enable it at compile
   time if WITHOUT_INET6 is not defined.

11) Copy the following generated files to stable/7/lib/bind:

	Path in stable/7/contrib/bind9		Path in stable/7/lib/bind
	------------------------------------------------------------
	s=../../lib/bind
	cp config.h				${s}/config.h
	cp lib/bind/config.h			${s}/bind/config.h
	cp lib/bind/port_after.h		${s}/bind/port_after.h
	cp lib/bind/port_before.h		${s}/bind/port_before.h
	cp lib/isc/include/isc/platform.h	${s}/isc/isc/platform.h
	cp lib/lwres/include/lwres/netdb.h	${s}/lwres/lwres/netdb.h
	cp lib/lwres/include/lwres/platform.h	${s}/lwres/lwres/platform.h

   Do not commit any other file that was modified or created in
   steps 6) or 7).

12) cd stable/7/lib/bind/dns && make -DMAINTAINER_MODE generate && rm gen

13) Test build the updated files with a clean /usr/obj and empty src.conf

   The following directories contain Makefiles for bits and pieces of
   BIND 9:

	FreeBSD directory			ISC directory
	========================================================
	stable/7/lib/bind			bind9/lib
	stable/7/lib/bind/bind			bind9/lib/bind
	stable/7/lib/bind/bind9			bind9/lib/bind9
	stable/7/lib/bind/dns			bind9/lib/dns
	stable/7/lib/bind/isc			bind9/lib/isc
	stable/7/lib/bind/isccc			bind9/lib/isccc
	stable/7/lib/bind/isccfg		bind9/lib/isccfg
	stable/7/lib/bind/lwres			bind9/lib/lwres
	stable/7/share/doc/bind9		bind9/doc/{arm,misc}
	stable/7/usr.bin/dig			bind9/bin/dig
	stable/7/usr.bin/host			bind9/bin/dig
	stable/7/usr.bin/nslookup		bind9/bin/dig
	stable/7/usr.bin/nsupdate		bind9/bin/nsupdate
	stable/7/usr.sbin/dnssec-keygen		bind9/bin/dnssec
	stable/7/usr.sbin/dnssec-signzone	bind9/bin/dnssec
	stable/7/usr.sbin/named			bind9/bin/named
	stable/7/usr.sbin/named-checkconf	bind9/bin/check
	stable/7/usr.sbin/named-checkzone	bind9/bin/check
	stable/7/usr.sbin/rndc			bind9/bin/rndc
	stable/7/usr.sbin/rndc-confgen		bind9/bin/rndc

   Make sure that the lists of sources, headers and man pages in each
   FreeBSD Makefile accurately reflects those in the corresponding ISC
   Makefile.  Please strive to keep those lists in the same order and
   with line breaks in the same places to ease future comparisons.

14) Build and test.

15) Lather, rinse, repeat.

16) Commit when everything builds cleanly and works properly.

					-- des@FreeBSD.org
					-- dougb@FreeBSD.org

$FreeBSD$