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