summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bind/bind_9.11.19.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/bind/bind_9.11.19.bb')
-rw-r--r--meta/recipes-connectivity/bind/bind_9.11.19.bb143
1 files changed, 143 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bind/bind_9.11.19.bb b/meta/recipes-connectivity/bind/bind_9.11.19.bb
new file mode 100644
index 0000000000..d4467b0b48
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind_9.11.19.bb
@@ -0,0 +1,143 @@
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=bf39058a7f64b2a934ce14dc9ec1dd45"
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-configure.in-remove-useless-L-use_openssl-lib.patch \
19 file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \
20 file://0001-avoid-start-failure-with-bind-user.patch \
21 file://CVE-2020-8622.patch \
22 file://CVE-2020-8623.patch \
23 file://CVE-2020-8624.patch \
24 "
25
26SRC_URI[sha256sum] = "0dee554a4caa368948b32da9a0c97b516c19103bc13ff5b3762c5d8552f52329"
27
28UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
29# stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4
30UPSTREAM_CHECK_REGEX = "(?P<pver>9.(11|16|20|24|28)(\.\d+)+(-P\d+)*)/"
31
32# BIND >= 9.11.2 need dhcpd >= 4.4.0,
33# don't report it here since dhcpd is already recent enough.
34CVE_CHECK_WHITELIST += "CVE-2019-6470"
35
36inherit autotools update-rc.d systemd useradd pkgconfig multilib_script
37
38MULTILIB_SCRIPTS = "${PN}:${bindir}/bind9-config ${PN}:${bindir}/isc-config.sh"
39
40# PACKAGECONFIGs readline and libedit should NOT be set at same time
41PACKAGECONFIG ?= "readline"
42PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2"
43PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
44PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
45PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,,"
46PACKAGECONFIG[python3] = "--with-python=yes --with-python-install-dir=${PYTHON_SITEPACKAGES_DIR} , --without-python, python3-ply-native,"
47
48ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
49EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \
50 --disable-devpoll --enable-epoll --with-gost=no \
51 --with-gssapi=no --with-ecdsa=yes --with-eddsa=no \
52 --with-lmdb=no \
53 --sysconfdir=${sysconfdir}/bind \
54 --with-openssl=${STAGING_DIR_HOST}${prefix} \
55 "
56
57inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native distutils3-base', '', d)}
58
59# dhcp needs .la so keep them
60REMOVE_LIBTOOL_LA = "0"
61
62USERADD_PACKAGES = "${PN}"
63USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
64 --user-group bind"
65
66INITSCRIPT_NAME = "bind"
67INITSCRIPT_PARAMS = "defaults"
68
69SYSTEMD_SERVICE_${PN} = "named.service"
70
71do_install_prepend() {
72 # clean host path in isc-config.sh before the hardlink created
73 # by "make install":
74 # bind9-config -> isc-config.sh
75 sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
76}
77
78do_install_append() {
79
80 rmdir "${D}${localstatedir}/run"
81 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
82 install -d -o bind "${D}${localstatedir}/cache/bind"
83 install -d "${D}${sysconfdir}/bind"
84 install -d "${D}${sysconfdir}/init.d"
85 install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
86 install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
87 if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then
88 sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \
89 ${D}${sbindir}/dnssec-coverage \
90 ${D}${sbindir}/dnssec-checkds \
91 ${D}${sbindir}/dnssec-keymgr
92 fi
93
94 # Install systemd related files
95 install -d ${D}${sbindir}
96 install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
97 install -d ${D}${systemd_unitdir}/system
98 install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
99 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
100 -e 's,@SBINDIR@,${sbindir},g' \
101 ${D}${systemd_unitdir}/system/named.service
102
103 install -d ${D}${sysconfdir}/default
104 install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
105
106 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
107 install -d ${D}${sysconfdir}/tmpfiles.d
108 echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
109 fi
110}
111
112CONFFILES_${PN} = " \
113 ${sysconfdir}/bind/named.conf \
114 ${sysconfdir}/bind/named.conf.local \
115 ${sysconfdir}/bind/named.conf.options \
116 ${sysconfdir}/bind/db.0 \
117 ${sysconfdir}/bind/db.127 \
118 ${sysconfdir}/bind/db.empty \
119 ${sysconfdir}/bind/db.local \
120 ${sysconfdir}/bind/db.root \
121 "
122
123ALTERNATIVE_${PN}-utils = "nslookup"
124ALTERNATIVE_LINK_NAME[nslookup] = "${bindir}/nslookup"
125ALTERNATIVE_PRIORITY = "100"
126
127PACKAGE_BEFORE_PN += "${PN}-utils"
128FILES_${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/mdig ${bindir}/nslookup ${bindir}/nsupdate"
129FILES_${PN}-dev += "${bindir}/isc-config.h"
130FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
131
132PACKAGE_BEFORE_PN += "${PN}-libs"
133FILES_${PN}-libs = "${libdir}/*.so*"
134FILES_${PN}-staticdev += "${libdir}/*.la"
135
136PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-bind', '', d)}"
137FILES_python3-bind = "${sbindir}/dnssec-coverage ${sbindir}/dnssec-checkds \
138 ${sbindir}/dnssec-keymgr ${PYTHON_SITEPACKAGES_DIR}"
139
140RDEPENDS_${PN} = "bash"
141RDEPENDS_${PN}-utils = "bash"
142RDEPENDS_${PN}-dev = ""
143RDEPENDS_python3-bind = "python3-core python3-ply"