summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bind
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2010-11-30 05:35:42 (GMT)
committerRichard Purdie <rpurdie@linux.intel.com>2010-12-02 13:24:59 (GMT)
commit070f173bdc2e4e6704ae40d0ce54b22b0940c5c8 (patch)
treedab8f5fd94a1a974436c5735c7d4f1b98f275069 /meta/recipes-connectivity/bind
parentd36f6f4f4050b9a7db3f5ff4b716974800dfd019 (diff)
downloadpoky-070f173bdc2e4e6704ae40d0ce54b22b0940c5c8.tar.gz
bind: add new recipe
version 9.7.2-P2 based on bind recipe from openembedded the exportlib is used by building dhcp Signed-off-by: Qing He <qing.he@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity/bind')
-rw-r--r--meta/recipes-connectivity/bind/bind-9.7.2-P2/conf.patch305
-rw-r--r--meta/recipes-connectivity/bind/bind-9.7.2-P2/cross-build-fix.patch19
-rw-r--r--meta/recipes-connectivity/bind/bind_9.7.2-P2.bb54
3 files changed, 378 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bind/bind-9.7.2-P2/conf.patch b/meta/recipes-connectivity/bind/bind-9.7.2-P2/conf.patch
new file mode 100644
index 0000000..deeb437
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind-9.7.2-P2/conf.patch
@@ -0,0 +1,305 @@
1the patch is imported from openembedded project
2
311/30/2010 - Qing He <qing.he@intel.com>
4
5diff -urN bind-9.3.1.orig/conf/db.0 bind-9.3.1/conf/db.0
6--- bind-9.3.1.orig/conf/db.0 1970-01-01 01:00:00.000000000 +0100
7+++ bind-9.3.1/conf/db.0 2005-07-10 22:14:00.000000000 +0200
8@@ -0,0 +1,12 @@
9+;
10+; BIND reverse data file for broadcast zone
11+;
12+$TTL 604800
13+@ IN SOA localhost. root.localhost. (
14+ 1 ; Serial
15+ 604800 ; Refresh
16+ 86400 ; Retry
17+ 2419200 ; Expire
18+ 604800 ) ; Negative Cache TTL
19+;
20+@ IN NS localhost.
21diff -urN bind-9.3.1.orig/conf/db.127 bind-9.3.1/conf/db.127
22--- bind-9.3.1.orig/conf/db.127 1970-01-01 01:00:00.000000000 +0100
23+++ bind-9.3.1/conf/db.127 2005-07-10 22:14:00.000000000 +0200
24@@ -0,0 +1,13 @@
25+;
26+; BIND reverse data file for local loopback interface
27+;
28+$TTL 604800
29+@ IN SOA localhost. root.localhost. (
30+ 1 ; Serial
31+ 604800 ; Refresh
32+ 86400 ; Retry
33+ 2419200 ; Expire
34+ 604800 ) ; Negative Cache TTL
35+;
36+@ IN NS localhost.
37+1.0.0 IN PTR localhost.
38diff -urN bind-9.3.1.orig/conf/db.empty bind-9.3.1/conf/db.empty
39--- bind-9.3.1.orig/conf/db.empty 1970-01-01 01:00:00.000000000 +0100
40+++ bind-9.3.1/conf/db.empty 2005-07-10 22:14:00.000000000 +0200
41@@ -0,0 +1,14 @@
42+; BIND reverse data file for empty rfc1918 zone
43+;
44+; DO NOT EDIT THIS FILE - it is used for multiple zones.
45+; Instead, copy it, edit named.conf, and use that copy.
46+;
47+$TTL 86400
48+@ IN SOA localhost. root.localhost. (
49+ 1 ; Serial
50+ 604800 ; Refresh
51+ 86400 ; Retry
52+ 2419200 ; Expire
53+ 86400 ) ; Negative Cache TTL
54+;
55+@ IN NS localhost.
56diff -urN bind-9.3.1.orig/conf/db.local bind-9.3.1/conf/db.local
57--- bind-9.3.1.orig/conf/db.local 1970-01-01 01:00:00.000000000 +0100
58+++ bind-9.3.1/conf/db.local 2005-07-10 22:14:00.000000000 +0200
59@@ -0,0 +1,13 @@
60+;
61+; BIND data file for local loopback interface
62+;
63+$TTL 604800
64+@ IN SOA localhost. root.localhost. (
65+ 1 ; Serial
66+ 604800 ; Refresh
67+ 86400 ; Retry
68+ 2419200 ; Expire
69+ 604800 ) ; Negative Cache TTL
70+;
71+@ IN NS localhost.
72+@ IN A 127.0.0.1
73diff -urN bind-9.3.1.orig/conf/db.root bind-9.3.1/conf/db.root
74--- bind-9.3.1.orig/conf/db.root 1970-01-01 01:00:00.000000000 +0100
75+++ bind-9.3.1/conf/db.root 2005-07-10 22:14:00.000000000 +0200
76@@ -0,0 +1,45 @@
77+
78+; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net.
79+;; global options: printcmd
80+;; Got answer:
81+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944
82+;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
83+
84+;; QUESTION SECTION:
85+;. IN NS
86+
87+;; ANSWER SECTION:
88+. 518400 IN NS A.ROOT-SERVERS.NET.
89+. 518400 IN NS B.ROOT-SERVERS.NET.
90+. 518400 IN NS C.ROOT-SERVERS.NET.
91+. 518400 IN NS D.ROOT-SERVERS.NET.
92+. 518400 IN NS E.ROOT-SERVERS.NET.
93+. 518400 IN NS F.ROOT-SERVERS.NET.
94+. 518400 IN NS G.ROOT-SERVERS.NET.
95+. 518400 IN NS H.ROOT-SERVERS.NET.
96+. 518400 IN NS I.ROOT-SERVERS.NET.
97+. 518400 IN NS J.ROOT-SERVERS.NET.
98+. 518400 IN NS K.ROOT-SERVERS.NET.
99+. 518400 IN NS L.ROOT-SERVERS.NET.
100+. 518400 IN NS M.ROOT-SERVERS.NET.
101+
102+;; ADDITIONAL SECTION:
103+A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4
104+B.ROOT-SERVERS.NET. 3600000 IN A 192.228.79.201
105+C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12
106+D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90
107+E.ROOT-SERVERS.NET. 3600000 IN A 192.203.230.10
108+F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241
109+G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4
110+H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53
111+I.ROOT-SERVERS.NET. 3600000 IN A 192.36.148.17
112+J.ROOT-SERVERS.NET. 3600000 IN A 192.58.128.30
113+K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129
114+L.ROOT-SERVERS.NET. 3600000 IN A 198.32.64.12
115+M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33
116+
117+;; Query time: 81 msec
118+;; SERVER: 198.41.0.4#53(a.root-servers.net.)
119+;; WHEN: Sun Feb 1 11:27:14 2004
120+;; MSG SIZE rcvd: 436
121+
122diff -urN bind-9.3.1.orig/conf/named.conf bind-9.3.1/conf/named.conf
123--- bind-9.3.1.orig/conf/named.conf 1970-01-01 01:00:00.000000000 +0100
124+++ bind-9.3.1/conf/named.conf 2005-07-10 22:33:46.000000000 +0200
125@@ -0,0 +1,49 @@
126+// This is the primary configuration file for the BIND DNS server named.
127+//
128+// If you are just adding zones, please do that in /etc/bind/named.conf.local
129+
130+include "/etc/bind/named.conf.options";
131+
132+// prime the server with knowledge of the root servers
133+zone "." {
134+ type hint;
135+ file "/etc/bind/db.root";
136+};
137+
138+// be authoritative for the localhost forward and reverse zones, and for
139+// broadcast zones as per RFC 1912
140+
141+zone "localhost" {
142+ type master;
143+ file "/etc/bind/db.local";
144+};
145+
146+zone "127.in-addr.arpa" {
147+ type master;
148+ file "/etc/bind/db.127";
149+};
150+
151+zone "0.in-addr.arpa" {
152+ type master;
153+ file "/etc/bind/db.0";
154+};
155+
156+zone "255.in-addr.arpa" {
157+ type master;
158+ file "/etc/bind/db.255";
159+};
160+
161+// zone "com" { type delegation-only; };
162+// zone "net" { type delegation-only; };
163+
164+// From the release notes:
165+// Because many of our users are uncomfortable receiving undelegated answers
166+// from root or top level domains, other than a few for whom that behaviour
167+// has been trusted and expected for quite some length of time, we have now
168+// introduced the "root-delegations-only" feature which applies delegation-only
169+// logic to all top level domains, and to the root domain. An exception list
170+// should be specified, including "MUSEUM" and "DE", and any other top level
171+// domains from whom undelegated responses are expected and trusted.
172+// root-delegation-only exclude { "DE"; "MUSEUM"; };
173+
174+include "/etc/bind/named.conf.local";
175diff -urN bind-9.3.1.orig/conf/named.conf.local bind-9.3.1/conf/named.conf.local
176--- bind-9.3.1.orig/conf/named.conf.local 1970-01-01 01:00:00.000000000 +0100
177+++ bind-9.3.1/conf/named.conf.local 2005-07-10 22:14:06.000000000 +0200
178@@ -0,0 +1,8 @@
179+//
180+// Do any local configuration here
181+//
182+
183+// Consider adding the 1918 zones here, if they are not used in your
184+// organization
185+//include "/etc/bind/zones.rfc1918";
186+
187diff -urN bind-9.3.1.orig/conf/named.conf.options bind-9.3.1/conf/named.conf.options
188--- bind-9.3.1.orig/conf/named.conf.options 1970-01-01 01:00:00.000000000 +0100
189+++ bind-9.3.1/conf/named.conf.options 2005-07-10 22:14:06.000000000 +0200
190@@ -0,0 +1,24 @@
191+options {
192+ directory "/var/cache/bind";
193+
194+ // If there is a firewall between you and nameservers you want
195+ // to talk to, you might need to uncomment the query-source
196+ // directive below. Previous versions of BIND always asked
197+ // questions using port 53, but BIND 8.1 and later use an unprivileged
198+ // port by default.
199+
200+ // query-source address * port 53;
201+
202+ // If your ISP provided one or more IP addresses for stable
203+ // nameservers, you probably want to use them as forwarders.
204+ // Uncomment the following block, and insert the addresses replacing
205+ // the all-0's placeholder.
206+
207+ // forwarders {
208+ // 0.0.0.0;
209+ // };
210+
211+ auth-nxdomain no; # conform to RFC1035
212+
213+};
214+
215diff -urN bind-9.3.1.orig/conf/zones.rfc1918 bind-9.3.1/conf/zones.rfc1918
216--- bind-9.3.1.orig/conf/zones.rfc1918 1970-01-01 01:00:00.000000000 +0100
217+++ bind-9.3.1/conf/zones.rfc1918 2005-07-10 22:14:10.000000000 +0200
218@@ -0,0 +1,20 @@
219+zone "10.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
220+
221+zone "16.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
222+zone "17.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
223+zone "18.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
224+zone "19.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
225+zone "20.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
226+zone "21.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
227+zone "22.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
228+zone "23.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
229+zone "24.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
230+zone "25.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
231+zone "26.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
232+zone "27.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
233+zone "28.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
234+zone "29.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
235+zone "30.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
236+zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
237+
238+zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
239diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
240--- bind-9.3.1.orig/init.d 1970-01-01 01:00:00.000000000 +0100
241+++ bind-9.3.1/init.d 2005-07-10 23:09:58.000000000 +0200
242@@ -0,0 +1,63 @@
243+#!/bin/sh
244+
245+PATH=/sbin:/bin:/usr/sbin:/usr/bin
246+
247+# for a chrooted server: "-u bind -t /var/lib/named"
248+# Don't modify this line, change or create /etc/default/bind9.
249+OPTIONS=""
250+
251+test -f /etc/default/bind9 && . /etc/default/bind9
252+
253+test -x /usr/sbin/rndc || exit 0
254+
255+case "$1" in
256+ start)
257+ echo -n "Starting domain name service: named"
258+
259+ modprobe capability >/dev/null 2>&1 || true
260+
261+ # dirs under /var/run can go away on reboots.
262+ mkdir -p /var/run/bind/run
263+ mkdir -p /var/cache/bind
264+ chmod 775 /var/run/bind/run
265+ chown root:bind /var/run/bind/run >/dev/null 2>&1 || true
266+
267+ if [ ! -x /usr/sbin/named ]; then
268+ echo "named binary missing - not starting"
269+ exit 1
270+ fi
271+ if start-stop-daemon --start --quiet --exec /usr/sbin/named \
272+ --pidfile /var/run/bind/run/named.pid -- $OPTIONS; then
273+ if [ -x /sbin/resolvconf ] ; then
274+ echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo
275+ fi
276+ fi
277+ echo "."
278+ ;;
279+
280+ stop)
281+ echo -n "Stopping domain name service: named"
282+ if [ -x /sbin/resolvconf ]; then
283+ /sbin/resolvconf -d lo
284+ fi
285+ /usr/sbin/rndc stop
286+ echo "."
287+ ;;
288+
289+ reload)
290+ /usr/sbin/rndc reload
291+ ;;
292+
293+ restart|force-reload)
294+ $0 stop
295+ sleep 2
296+ $0 start
297+ ;;
298+
299+ *)
300+ echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2
301+ exit 1
302+ ;;
303+esac
304+
305+exit 0
diff --git a/meta/recipes-connectivity/bind/bind-9.7.2-P2/cross-build-fix.patch b/meta/recipes-connectivity/bind/bind-9.7.2-P2/cross-build-fix.patch
new file mode 100644
index 0000000..4978379
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind-9.7.2-P2/cross-build-fix.patch
@@ -0,0 +1,19 @@
111/30/2010
2gen.c should be build by ${BUILD_CC}
3
4Signed-off-by: Qing He <qing.he@intel.com>
5
6diff --git a/lib/export/dns/Makefile.in b/lib/export/dns/Makefile.in
7index aeadf57..d3fae74 100644
8--- a/lib/export/dns/Makefile.in
9+++ b/lib/export/dns/Makefile.in
10@@ -166,7 +166,8 @@ code.h: gen
11 ./gen -s ${srcdir} > code.h
12
13 gen: ${srcdir}/gen.c
14- ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS}
15+ ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \
16+ ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS}
17
18 #We don't need rbtdb64 for this library
19 #rbtdb64.@O@: rbtdb.c
diff --git a/meta/recipes-connectivity/bind/bind_9.7.2-P2.bb b/meta/recipes-connectivity/bind/bind_9.7.2-P2.bb
new file mode 100644
index 0000000..6aaa6ff
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind_9.7.2-P2.bb
@@ -0,0 +1,54 @@
1DESCRIPTION = "ISC Internet Domain Name Server"
2HOMEPAGE = "http://www.isc.org/sw/bind/"
3SECTION = "console/network"
4
5LICENSE = "ISC"
6LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fe11ac92dcbd84134d91b6e2c2eccab5"
7
8DEPENDS = "openssl"
9PR = "r0"
10
11SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${PN}-${PV}.tar.gz \
12 file://conf.patch \
13 file://cross-build-fix.patch \
14 "
15
16# --enable-exportlib is necessary for building dhcp
17EXTRA_OECONF = " --enable-ipv6=no --with-randomdev=/dev/random --disable-threads \
18 --disable-devpoll --disable-epoll \
19 --sysconfdir=${sysconfdir}/bind \
20 --with-openssl=${STAGING_LIBDIR}/.. --with-libxml2=${STAGING_LIBDIR}/.. \
21 --enable-exportlib --with-export-includedir=${includedir} --with-export-libdir=${libdir} \
22 "
23inherit autotools update-rc.d
24
25INITSCRIPT_NAME = "bind"
26INITSCRIPT_PARAMS = "defaults"
27
28PARALLEL_MAKE = ""
29
30PACKAGES_prepend = "${PN}-utils "
31FILES_${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/nslookup"
32FILES_${PN}-dev += "${bindir}/isc-config.h"
33
34do_install_append() {
35 rm "${D}/usr/bin/nslookup"
36 install -d "${D}/etc/bind"
37 install -d "${D}/etc/init.d"
38 install -m 644 ${S}/conf/* "${D}/etc/bind"
39 install -m 755 "${S}/init.d" "${D}/etc/init.d/bind"
40}
41
42CONFFILES_${PN} = " \
43 ${sysconfdir}/bind/named.conf \
44 ${sysconfdir}/bind/named.conf.local \
45 ${sysconfdir}/bind/named.conf.options \
46 ${sysconfdir}/bind/db.0 \
47 ${sysconfdir}/bind/db.127 \
48 ${sysconfdir}/bind/db.empty \
49 ${sysconfdir}/bind/db.local \
50 ${sysconfdir}/bind/db.root \
51 "
52
53SRC_URI[md5sum] = "e74de6ec9c2cd27576794c873bd85f4a"
54SRC_URI[sha256sum] = "e6d5938184066fc793c28ff975e09e9721116aede2a2d6d93b1be5e8654a5c8a"