diff options
Diffstat (limited to 'meta/recipes-connectivity/bind/bind_9.16.15.bb')
-rw-r--r-- | meta/recipes-connectivity/bind/bind_9.16.15.bb | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bind/bind_9.16.15.bb b/meta/recipes-connectivity/bind/bind_9.16.15.bb new file mode 100644 index 0000000000..25c4f2524a --- /dev/null +++ b/meta/recipes-connectivity/bind/bind_9.16.15.bb | |||
@@ -0,0 +1,131 @@ | |||
1 | SUMMARY = "ISC Internet Domain Name Server" | ||
2 | HOMEPAGE = "https://www.isc.org/bind/" | ||
3 | DESCRIPTION = "BIND 9 provides a full-featured Domain Name Server system" | ||
4 | SECTION = "console/network" | ||
5 | |||
6 | LICENSE = "MPL-2.0" | ||
7 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=ef10b4de6371115dcecdc38ca2af4561" | ||
8 | |||
9 | DEPENDS = "openssl libcap zlib libuv" | ||
10 | |||
11 | SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \ | ||
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-named-lwresd-V-and-start-log-hide-build-options.patch \ | ||
20 | file://0001-avoid-start-failure-with-bind-user.patch \ | ||
21 | " | ||
22 | |||
23 | SRC_URI[sha256sum] = "98b6f432d878a7bf8f57eb7b3c28be27278cf6b9989154bfe6c81104b38e7839" | ||
24 | |||
25 | UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" | ||
26 | # stay at 9.16 follow the ESV versions divisible by 4 | ||
27 | UPSTREAM_CHECK_REGEX = "(?P<pver>9.(16|20|24|28)(\.\d+)+(-P\d+)*)/" | ||
28 | |||
29 | # Issue only affects dhcpd with recent bind versions. We don't ship dhcpd anymore | ||
30 | # so the issue doesn't affect us. | ||
31 | CVE_CHECK_WHITELIST += "CVE-2019-6470" | ||
32 | |||
33 | inherit autotools update-rc.d systemd useradd pkgconfig multilib_header update-alternatives | ||
34 | |||
35 | # PACKAGECONFIGs readline and libedit should NOT be set at same time | ||
36 | PACKAGECONFIG ?= "readline" | ||
37 | PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2" | ||
38 | PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" | ||
39 | PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" | ||
40 | PACKAGECONFIG[python3] = "--with-python=yes --with-python-install-dir=${PYTHON_SITEPACKAGES_DIR} , --without-python, python3-ply-native," | ||
41 | |||
42 | EXTRA_OECONF = " --with-libtool --disable-devpoll --disable-auto-validation --enable-epoll \ | ||
43 | --with-gssapi=no --with-lmdb=no --with-zlib \ | ||
44 | --sysconfdir=${sysconfdir}/bind \ | ||
45 | --with-openssl=${STAGING_DIR_HOST}${prefix} \ | ||
46 | " | ||
47 | LDFLAGS_append = " -lz" | ||
48 | |||
49 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native distutils3-base', '', d)} | ||
50 | |||
51 | # dhcp needs .la so keep them | ||
52 | REMOVE_LIBTOOL_LA = "0" | ||
53 | |||
54 | USERADD_PACKAGES = "${PN}" | ||
55 | USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \ | ||
56 | --user-group bind" | ||
57 | |||
58 | INITSCRIPT_NAME = "bind" | ||
59 | INITSCRIPT_PARAMS = "defaults" | ||
60 | |||
61 | SYSTEMD_SERVICE_${PN} = "named.service" | ||
62 | |||
63 | do_install_append() { | ||
64 | |||
65 | rmdir "${D}${localstatedir}/run" | ||
66 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" | ||
67 | install -d -o bind "${D}${localstatedir}/cache/bind" | ||
68 | install -d "${D}${sysconfdir}/bind" | ||
69 | install -d "${D}${sysconfdir}/init.d" | ||
70 | install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" | ||
71 | install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" | ||
72 | if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then | ||
73 | sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ | ||
74 | ${D}${sbindir}/dnssec-coverage \ | ||
75 | ${D}${sbindir}/dnssec-checkds \ | ||
76 | ${D}${sbindir}/dnssec-keymgr | ||
77 | fi | ||
78 | |||
79 | # Install systemd related files | ||
80 | install -d ${D}${sbindir} | ||
81 | install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir} | ||
82 | install -d ${D}${systemd_unitdir}/system | ||
83 | install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system | ||
84 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ | ||
85 | -e 's,@SBINDIR@,${sbindir},g' \ | ||
86 | ${D}${systemd_unitdir}/system/named.service | ||
87 | |||
88 | install -d ${D}${sysconfdir}/default | ||
89 | install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default | ||
90 | |||
91 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
92 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
93 | echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf | ||
94 | fi | ||
95 | |||
96 | oe_multilib_header isc/platform.h | ||
97 | } | ||
98 | |||
99 | CONFFILES_${PN} = " \ | ||
100 | ${sysconfdir}/bind/named.conf \ | ||
101 | ${sysconfdir}/bind/named.conf.local \ | ||
102 | ${sysconfdir}/bind/named.conf.options \ | ||
103 | ${sysconfdir}/bind/db.0 \ | ||
104 | ${sysconfdir}/bind/db.127 \ | ||
105 | ${sysconfdir}/bind/db.empty \ | ||
106 | ${sysconfdir}/bind/db.local \ | ||
107 | ${sysconfdir}/bind/db.root \ | ||
108 | " | ||
109 | |||
110 | ALTERNATIVE_${PN}-utils = "nslookup" | ||
111 | ALTERNATIVE_LINK_NAME[nslookup] = "${bindir}/nslookup" | ||
112 | ALTERNATIVE_PRIORITY = "100" | ||
113 | |||
114 | PACKAGE_BEFORE_PN += "${PN}-utils" | ||
115 | FILES_${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/mdig ${bindir}/nslookup ${bindir}/nsupdate" | ||
116 | FILES_${PN}-dev += "${bindir}/isc-config.h" | ||
117 | FILES_${PN} += "${sbindir}/generate-rndc-key.sh" | ||
118 | |||
119 | PACKAGE_BEFORE_PN += "${PN}-libs" | ||
120 | # special arrangement below due to | ||
121 | # https://github.com/isc-projects/bind9/commit/0e25af628cd776f98c04fc4cc59048f5448f6c88 | ||
122 | FILES_SOLIBSDEV = "${libdir}/*[!0-9].so ${libdir}/libbind9.so" | ||
123 | FILES_${PN}-libs = "${libdir}/named/*.so* ${libdir}/*-${PV}.so" | ||
124 | FILES_${PN}-staticdev += "${libdir}/*.la" | ||
125 | |||
126 | PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-bind', '', d)}" | ||
127 | FILES_python3-bind = "${sbindir}/dnssec-coverage ${sbindir}/dnssec-checkds \ | ||
128 | ${sbindir}/dnssec-keymgr ${PYTHON_SITEPACKAGES_DIR}" | ||
129 | |||
130 | RDEPENDS_${PN}-dev = "" | ||
131 | RDEPENDS_python3-bind = "python3-core python3-ply" | ||