summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bind/bind_9.11.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/bind/bind_9.11.3.bb')
-rw-r--r--meta/recipes-connectivity/bind/bind_9.11.3.bb130
1 files changed, 130 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bind/bind_9.11.3.bb b/meta/recipes-connectivity/bind/bind_9.11.3.bb
new file mode 100644
index 0000000000..32f5365e44
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind_9.11.3.bb
@@ -0,0 +1,130 @@
1SUMMARY = "ISC Internet Domain Name Server"
2HOMEPAGE = "http://www.isc.org/sw/bind/"
3SECTION = "console/network"
4
5LICENSE = "ISC & BSD"
6LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=6ba7c9fe0c888a943c79c93e6de744fb"
7
8DEPENDS = "openssl libcap zlib"
9
10SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
11 file://conf.patch \
12 file://named.service \
13 file://bind9 \
14 file://generate-rndc-key.sh \
15 file://make-etc-initd-bind-stop-work.patch \
16 file://init.d-add-support-for-read-only-rootfs.patch \
17 file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
18 file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
19 file://0001-lib-dns-gen.c-fix-too-long-error.patch \
20"
21
22SRC_URI[md5sum] = "4ed2a3f235595eadbd763b7ecb687ca0"
23SRC_URI[sha256sum] = "0d9dde14b2ec7f9cdc3b69f19540c7a2e4eee7b6c727965dfae48810965876f5"
24
25UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
26UPSTREAM_CHECK_REGEX = "(?P<pver>9(\.\d+)+(-P\d+)*)/"
27
28inherit autotools update-rc.d systemd useradd pkgconfig
29
30# PACKAGECONFIGs readline and libedit should NOT be set at same time
31PACKAGECONFIG ?= "readline"
32PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2"
33PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
34PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
35PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,,"
36PACKAGECONFIG[python3] = "--with-python=${PYTHON} --with-python-install-dir=${D}/${PYTHON_SITEPACKAGES_DIR} , --without-python, python3-ply-native,"
37
38ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
39EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \
40 --disable-devpoll --enable-epoll --with-gost=no \
41 --with-gssapi=no --with-ecdsa=yes --with-eddsa=no \
42 --sysconfdir=${sysconfdir}/bind \
43 --with-openssl=${STAGING_DIR_HOST}${prefix} \
44 "
45
46inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native distutils3-base', '', d)}
47
48# dhcp needs .la so keep them
49REMOVE_LIBTOOL_LA = "0"
50
51USERADD_PACKAGES = "${PN}"
52USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
53 --user-group bind"
54
55INITSCRIPT_NAME = "bind"
56INITSCRIPT_PARAMS = "defaults"
57
58SYSTEMD_SERVICE_${PN} = "named.service"
59
60do_install_prepend() {
61 # clean host path in isc-config.sh before the hardlink created
62 # by "make install":
63 # bind9-config -> isc-config.sh
64 sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
65}
66
67do_install_append() {
68
69 rm "${D}${bindir}/nslookup"
70 rm "${D}${mandir}/man1/nslookup.1"
71 rmdir "${D}${localstatedir}/run"
72 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
73 install -d -o bind "${D}${localstatedir}/cache/bind"
74 install -d "${D}${sysconfdir}/bind"
75 install -d "${D}${sysconfdir}/init.d"
76 install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
77 install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
78 if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then
79 sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \
80 ${D}${sbindir}/dnssec-coverage \
81 ${D}${sbindir}/dnssec-checkds \
82 ${D}${sbindir}/dnssec-keymgr
83 fi
84
85 # Install systemd related files
86 install -d ${D}${sbindir}
87 install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
88 install -d ${D}${systemd_unitdir}/system
89 install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
90 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
91 -e 's,@SBINDIR@,${sbindir},g' \
92 ${D}${systemd_unitdir}/system/named.service
93
94 install -d ${D}${sysconfdir}/default
95 install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
96
97 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
98 install -d ${D}${sysconfdir}/tmpfiles.d
99 echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
100 fi
101}
102
103CONFFILES_${PN} = " \
104 ${sysconfdir}/bind/named.conf \
105 ${sysconfdir}/bind/named.conf.local \
106 ${sysconfdir}/bind/named.conf.options \
107 ${sysconfdir}/bind/db.0 \
108 ${sysconfdir}/bind/db.127 \
109 ${sysconfdir}/bind/db.empty \
110 ${sysconfdir}/bind/db.local \
111 ${sysconfdir}/bind/db.root \
112 "
113
114PACKAGE_BEFORE_PN += "${PN}-utils"
115FILES_${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/mdig"
116FILES_${PN}-dev += "${bindir}/isc-config.h"
117FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
118
119PACKAGE_BEFORE_PN += "${PN}-libs"
120FILES_${PN}-libs = "${libdir}/*.so*"
121FILES_${PN}-staticdev += "${libdir}/*.la"
122
123PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-bind', '', d)}"
124FILES_python3-bind = "${sbindir}/dnssec-coverage ${sbindir}/dnssec-checkds \
125 ${sbindir}/dnssec-keymgr ${PYTHON_SITEPACKAGES_DIR}"
126
127RDEPENDS_${PN} = "bash"
128RDEPENDS_${PN}-utils = "bash"
129RDEPENDS_${PN}-dev = ""
130RDEPENDS_python3-bind = "python3-core python3-ply"