Quellcode durchsuchen

Merge pull request #210 from nmeyerhans/bind

net/bind: Refresh package net/bind
sbyx vor 10 Jahren
Ursprung
Commit
c1fd201ee4

+ 203
- 0
net/bind/Makefile Datei anzeigen

@@ -0,0 +1,203 @@
1
+#
2
+# Copyright (C) 2006-2012 OpenWrt.org
3
+#               2014 Noah Meyerhans <frodo@morgul.net>
4
+#
5
+# This is free software, licensed under the GNU General Public License v2.
6
+# See /LICENSE for more information.
7
+#
8
+
9
+include $(TOPDIR)/rules.mk
10
+
11
+PKG_NAME:=bind
12
+PKG_VERSION:=9.9.5-P1
13
+PKG_RELEASE:=1
14
+
15
+PKG_MAINTAINER := Noah Meyerhans <frodo@morgul.net>
16
+PKG_LICENSE := BSD-3-Clause
17
+
18
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
19
+PKG_SOURCE_URL:= \
20
+	ftp://ftp.isc.org/isc/bind9/$(PKG_VERSION) \
21
+	http://www.mirrorservice.org/sites/ftp.isc.org/isc/bind9/$(PKG_VERSION)
22
+PKG_MD5SUM:=3408af8c6d27d6cb8a05287f2ee32ad0
23
+
24
+PKG_FIXUP:=autoreconf
25
+PKG_REMOVE_FILES:=aclocal.m4 libtool.m4
26
+
27
+PKG_INSTALL:=1
28
+
29
+include $(INCLUDE_DIR)/package.mk
30
+
31
+define Package/bind/Default
32
+  SECTION:=net
33
+  CATEGORY:=Network
34
+  DEPENDS:=+bind-libs
35
+  TITLE:=bind
36
+  URL:=https://www.isc.org/software/bind
37
+  SUBMENU:=IP Addresses and Names
38
+endef
39
+
40
+define Package/bind-libs
41
+  SECTION:=libs
42
+  CATEGORY:=Libraries
43
+  DEPENDS:=+libopenssl
44
+  TITLE:=bind shared libraries
45
+  URL:=https://www.isc.org/software/bind
46
+endef
47
+
48
+define Package/bind-server
49
+  $(call Package/bind/Default)
50
+  TITLE+= DNS server
51
+endef
52
+
53
+define Package/bind-client
54
+  $(call Package/bind/Default)
55
+  TITLE+= dynamic DNS client
56
+endef
57
+
58
+define Package/bind-tools
59
+  $(call Package/bind/Default)
60
+  TITLE+= administration tools (all)
61
+endef
62
+
63
+define Package/bind-rndc
64
+  $(call Package/bind/Default)
65
+  TITLE+= administration tools (rndc and rndc-confgen only)
66
+endef
67
+
68
+define Package/bind-check
69
+  $(call Package/bind/Default)
70
+  TITLE+= administration tools (named-checkconf and named-checkzone only)
71
+endef
72
+
73
+define Package/bind-dnssec
74
+  $(call Package/bind/Default)
75
+  TITLE+= administration tools (dnssec-keygen and dnssec-signzone only)
76
+endef
77
+
78
+define Package/bind-host
79
+  $(call Package/bind/Default)
80
+  TITLE+= simple DNS client
81
+endef
82
+
83
+define Package/bind-dig
84
+  $(call Package/bind/Default)
85
+  TITLE+= DNS excavation tool
86
+endef
87
+
88
+export BUILD_CC="$(TARGET_CC)"
89
+
90
+CONFIGURE_ARGS += \
91
+	--enable-shared \
92
+	--enable-static \
93
+	--with-randomdev="/dev/urandom" \
94
+	--disable-threads \
95
+	--disable-linux-caps \
96
+	--with-openssl="$(STAGING_DIR)/usr" \
97
+	--with-libtool \
98
+	--with-libxml2=no \
99
+	--enable-epoll=yes \
100
+	--with-gost=no \
101
+	--with-gssapi=no \
102
+	--with-ecdsa=no \
103
+	--with-readline=no
104
+
105
+CONFIGURE_VARS += \
106
+	BUILD_CC="$(TARGET_CC)" \
107
+
108
+define Build/Compile
109
+	$(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \
110
+		BUILD_CC="$(HOSTCC)" \
111
+		CC="$(HOSTCC)" \
112
+		CFLAGS="-O2" \
113
+		LIBS="" \
114
+		gen
115
+	$(call Build/Compile/Default)
116
+endef
117
+
118
+define Package/bind-libs/install
119
+	$(INSTALL_DIR) $(1)/usr/lib
120
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
121
+endef
122
+
123
+define Package/bind-server/install
124
+	$(INSTALL_DIR) $(1)/usr/sbin
125
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named $(1)/usr/sbin/
126
+	$(INSTALL_DIR) $(1)/etc/bind
127
+	$(CP) \
128
+		./files/bind/db.0 \
129
+		./files/bind/db.127 \
130
+		./files/bind/db.255 \
131
+		./files/bind/db.local \
132
+		./files/bind/db.root \
133
+		$(1)/etc/bind/
134
+	$(CP) ./files/bind/named.conf.example $(1)/etc/bind/named.conf
135
+	$(INSTALL_DIR) $(1)/etc/init.d
136
+	$(INSTALL_BIN) ./files/named.init $(1)/etc/init.d/named
137
+	find $(1)/etc/bind/ -name ".svn" | xargs rm -rf
138
+endef
139
+
140
+define Package/bind-server/conffiles
141
+/etc/bind/db.0
142
+/etc/bind/db.127
143
+/etc/bind/db.255
144
+/etc/bind/db.local
145
+/etc/bind/db.root
146
+/etc/bind/named.conf
147
+endef
148
+
149
+define Package/bind-client/install
150
+	$(INSTALL_DIR) $(1)/usr/bin
151
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nsupdate $(1)/usr/bin/
152
+endef
153
+
154
+define Package/bind-tools/install
155
+	$(INSTALL_DIR) $(1)/usr/bin
156
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
157
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
158
+	$(INSTALL_DIR) $(1)/usr/sbin
159
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
160
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
161
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
162
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
163
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
164
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
165
+endef
166
+
167
+define Package/bind-rndc/install
168
+	$(INSTALL_DIR) $(1)/usr/sbin
169
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc $(1)/usr/sbin/
170
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/rndc-confgen $(1)/usr/sbin/
171
+endef
172
+
173
+define Package/bind-check/install
174
+	$(INSTALL_DIR) $(1)/usr/sbin
175
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkconf $(1)/usr/sbin/
176
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/named-checkzone $(1)/usr/sbin/
177
+endef
178
+
179
+define Package/bind-dnssec/install
180
+	$(INSTALL_DIR) $(1)/usr/sbin
181
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-keygen $(1)/usr/sbin/
182
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnssec-signzone $(1)/usr/sbin/
183
+endef
184
+
185
+define Package/bind-host/install
186
+	$(INSTALL_DIR) $(1)/usr/bin
187
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/host $(1)/usr/bin/
188
+endef
189
+
190
+define Package/bind-dig/install
191
+	$(INSTALL_DIR) $(1)/usr/bin
192
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dig $(1)/usr/bin/
193
+endef
194
+
195
+$(eval $(call BuildPackage,bind-libs))
196
+$(eval $(call BuildPackage,bind-server))
197
+$(eval $(call BuildPackage,bind-client))
198
+$(eval $(call BuildPackage,bind-tools))
199
+$(eval $(call BuildPackage,bind-rndc))
200
+$(eval $(call BuildPackage,bind-check))
201
+$(eval $(call BuildPackage,bind-dnssec))
202
+$(eval $(call BuildPackage,bind-host))
203
+$(eval $(call BuildPackage,bind-dig))

+ 12
- 0
net/bind/files/bind/db.0 Datei anzeigen

@@ -0,0 +1,12 @@
1
+;
2
+; BIND reverse data file for broadcast zone
3
+;
4
+$TTL	604800
5
+@	IN	SOA	localhost. root.localhost. (
6
+			      1		; Serial
7
+			 604800		; Refresh
8
+			  86400		; Retry
9
+			2419200		; Expire
10
+			 604800 )	; Negative Cache TTL
11
+;
12
+@	IN	NS	localhost.

+ 13
- 0
net/bind/files/bind/db.127 Datei anzeigen

@@ -0,0 +1,13 @@
1
+;
2
+; BIND reverse data file for local loopback interface
3
+;
4
+$TTL	604800
5
+@	IN	SOA	localhost. root.localhost. (
6
+			      1		; Serial
7
+			 604800		; Refresh
8
+			  86400		; Retry
9
+			2419200		; Expire
10
+			 604800 )	; Negative Cache TTL
11
+;
12
+@	IN	NS	localhost.
13
+1.0.0	IN	PTR	localhost.

+ 12
- 0
net/bind/files/bind/db.255 Datei anzeigen

@@ -0,0 +1,12 @@
1
+;
2
+; BIND reverse data file for broadcast zone
3
+;
4
+$TTL	604800
5
+@	IN	SOA	localhost. root.localhost. (
6
+			      1		; Serial
7
+			 604800		; Refresh
8
+			  86400		; Retry
9
+			2419200		; Expire
10
+			 604800 )	; Negative Cache TTL
11
+;
12
+@	IN	NS	localhost.

+ 13
- 0
net/bind/files/bind/db.local Datei anzeigen

@@ -0,0 +1,13 @@
1
+;
2
+; BIND data file for local loopback interface
3
+;
4
+$TTL	604800
5
+@	IN	SOA	localhost. root.localhost. (
6
+			      1		; Serial
7
+			 604800		; Refresh
8
+			  86400		; Retry
9
+			2419200		; Expire
10
+			 604800 )	; Negative Cache TTL
11
+;
12
+@	IN	NS	localhost.
13
+@	IN	A	127.0.0.1

+ 45
- 0
net/bind/files/bind/db.root Datei anzeigen

@@ -0,0 +1,45 @@
1
+
2
+; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net.
3
+;; global options:  printcmd
4
+;; Got answer:
5
+;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944
6
+;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
7
+
8
+;; QUESTION SECTION:
9
+;.				IN	NS
10
+
11
+;; ANSWER SECTION:
12
+.			518400	IN	NS	A.ROOT-SERVERS.NET.
13
+.			518400	IN	NS	B.ROOT-SERVERS.NET.
14
+.			518400	IN	NS	C.ROOT-SERVERS.NET.
15
+.			518400	IN	NS	D.ROOT-SERVERS.NET.
16
+.			518400	IN	NS	E.ROOT-SERVERS.NET.
17
+.			518400	IN	NS	F.ROOT-SERVERS.NET.
18
+.			518400	IN	NS	G.ROOT-SERVERS.NET.
19
+.			518400	IN	NS	H.ROOT-SERVERS.NET.
20
+.			518400	IN	NS	I.ROOT-SERVERS.NET.
21
+.			518400	IN	NS	J.ROOT-SERVERS.NET.
22
+.			518400	IN	NS	K.ROOT-SERVERS.NET.
23
+.			518400	IN	NS	L.ROOT-SERVERS.NET.
24
+.			518400	IN	NS	M.ROOT-SERVERS.NET.
25
+
26
+;; ADDITIONAL SECTION:
27
+A.ROOT-SERVERS.NET.	3600000	IN	A	198.41.0.4
28
+B.ROOT-SERVERS.NET.	3600000	IN	A	192.228.79.201
29
+C.ROOT-SERVERS.NET.	3600000	IN	A	192.33.4.12
30
+D.ROOT-SERVERS.NET.	3600000	IN	A	128.8.10.90
31
+E.ROOT-SERVERS.NET.	3600000	IN	A	192.203.230.10
32
+F.ROOT-SERVERS.NET.	3600000	IN	A	192.5.5.241
33
+G.ROOT-SERVERS.NET.	3600000	IN	A	192.112.36.4
34
+H.ROOT-SERVERS.NET.	3600000	IN	A	128.63.2.53
35
+I.ROOT-SERVERS.NET.	3600000	IN	A	192.36.148.17
36
+J.ROOT-SERVERS.NET.	3600000	IN	A	192.58.128.30
37
+K.ROOT-SERVERS.NET.	3600000	IN	A	193.0.14.129
38
+L.ROOT-SERVERS.NET.	3600000	IN	A	199.7.83.42
39
+M.ROOT-SERVERS.NET.	3600000	IN	A	202.12.27.33
40
+
41
+;; Query time: 81 msec
42
+;; SERVER: 198.41.0.4#53(a.root-servers.net.)
43
+;; WHEN: Sun Feb  1 11:27:14 2004
44
+;; MSG SIZE  rcvd: 436
45
+

+ 45
- 0
net/bind/files/bind/named.conf.example Datei anzeigen

@@ -0,0 +1,45 @@
1
+// This is the primary configuration file for the BIND DNS server named.
2
+
3
+options {
4
+	directory "/tmp";
5
+
6
+	// If your ISP provided one or more IP addresses for stable 
7
+	// nameservers, you probably want to use them as forwarders.  
8
+	// Uncomment the following block, and insert the addresses replacing 
9
+	// the all-0's placeholder.
10
+
11
+	// forwarders {
12
+	// 	0.0.0.0;
13
+	// };
14
+
15
+	auth-nxdomain no;    # conform to RFC1035
16
+};
17
+
18
+// prime the server with knowledge of the root servers
19
+zone "." {
20
+	type hint;
21
+	file "/etc/bind/db.root";
22
+};
23
+
24
+// be authoritative for the localhost forward and reverse zones, and for
25
+// broadcast zones as per RFC 1912
26
+
27
+zone "localhost" {
28
+	type master;
29
+	file "/etc/bind/db.local";
30
+};
31
+
32
+zone "127.in-addr.arpa" {
33
+	type master;
34
+	file "/etc/bind/db.127";
35
+};
36
+
37
+zone "0.in-addr.arpa" {
38
+	type master;
39
+	file "/etc/bind/db.0";
40
+};
41
+
42
+zone "255.in-addr.arpa" {
43
+	type master;
44
+	file "/etc/bind/db.255";
45
+};

+ 40
- 0
net/bind/files/named.init Datei anzeigen

@@ -0,0 +1,40 @@
1
+#!/bin/sh /etc/rc.common
2
+START=50
3
+
4
+config_file=/etc/bind/named.conf
5
+pid_file=/var/run/named/named.pid
6
+
7
+start() {
8
+  if [ -e $pid_file ]
9
+  then
10
+     echo "  named already running with PID `cat $pid_file`"
11
+     return 1
12
+  fi
13
+  echo Starting isc-bind
14
+
15
+  /usr/sbin/named -c $config_file
16
+
17
+  if [ $? -ne 0 ]
18
+  then
19
+    echo "  isc-bind failed to start"
20
+  fi
21
+}
22
+
23
+stop() {
24
+  echo "Stopping isc-bind"
25
+  if [ -e $pid_file ]
26
+  then
27
+    kill `cat $pid_file`
28
+
29
+    if [ $? -ne 0 ]
30
+    then
31
+      echo "  PID " `cat $pid_file` not found
32
+      echo "  Is the named server running?"
33
+    fi
34
+
35
+    rm -f $pid_file
36
+
37
+    else
38
+    echo "  $pid_file not found"
39
+  fi
40
+}

+ 26
- 0
net/bind/patches/001-no-tests.patch Datei anzeigen

@@ -0,0 +1,26 @@
1
+Index: bind-9.9.4/bin/Makefile.in
2
+===================================================================
3
+--- bind-9.9.4.orig/bin/Makefile.in
4
++++ bind-9.9.4/bin/Makefile.in
5
+@@ -19,7 +19,7 @@ srcdir =	@srcdir@
6
+ VPATH =		@srcdir@
7
+ top_srcdir =	@top_srcdir@
8
+ 
9
+-SUBDIRS =	named rndc dig dnssec tools tests nsupdate \
10
++SUBDIRS =	named rndc dig dnssec tools nsupdate \
11
+ 		check confgen @PYTHON_TOOLS@ @PKCS11_TOOLS@
12
+ TARGETS =
13
+ 
14
+Index: bind-9.9.4/lib/Makefile.in
15
+===================================================================
16
+--- bind-9.9.4.orig/lib/Makefile.in
17
++++ bind-9.9.4/lib/Makefile.in
18
+@@ -23,7 +23,7 @@ top_srcdir =	@top_srcdir@
19
+ # Attempt to disable parallel processing.
20
+ .NOTPARALLEL:
21
+ .NO_PARALLEL:
22
+-SUBDIRS =	isc isccc dns isccfg bind9 lwres tests
23
++SUBDIRS =	isc isccc dns isccfg bind9 lwres
24
+ TARGETS =
25
+ 
26
+ @BIND9_MAKE_RULES@