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