summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/bind/bind_9.10.5-P3.bb')
-rw-r--r--meta/recipes-connectivity/bind/bind_9.10.5-P3.bb119
1 files changed, 119 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb b/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb
new file mode 100644
index 0000000000..e6e1e8d068
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind_9.10.5-P3.bb
@@ -0,0 +1,119 @@
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=dba46507446198119bcde32a4feaab43"
7
8DEPENDS = "openssl libcap"
9
10SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
11 file://conf.patch \
12 file://make-etc-initd-bind-stop-work.patch \
13 file://dont-test-on-host.patch \
14 file://generate-rndc-key.sh \
15 file://named.service \
16 file://bind9 \
17 file://init.d-add-support-for-read-only-rootfs.patch \
18 file://bind-confgen-build-unix.o-once.patch \
19 file://0001-build-use-pkg-config-to-find-libxml2.patch \
20 file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
21 file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
22 file://0001-lib-dns-gen.c-fix-too-long-error.patch \
23 file://use-python3-and-fix-install-lib-path.patch \
24 "
25
26UPSTREAM_CHECK_URI = "ftp://ftp.isc.org/isc/bind9/"
27UPSTREAM_CHECK_REGEX = "(?P<pver>9(\.\d+)+(-P\d+)*)/"
28
29SRC_URI[md5sum] = "d79cafbd9ac76239ee532dd89d05cc83"
30SRC_URI[sha256sum] = "8d7e96b5b0bbac7b900d4c4bbb82e0956b4e509433c5fa392bb72a929b96606a"
31
32ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
33EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \
34 --disable-devpoll --enable-epoll --with-gost=no \
35 --with-gssapi=no --with-ecdsa=yes \
36 --sysconfdir=${sysconfdir}/bind \
37 --with-openssl=${STAGING_LIBDIR}/.. \
38 "
39
40inherit autotools update-rc.d systemd useradd pkgconfig python3-dir
41
42export PYTHON_SITEPACKAGES_DIR
43
44# PACKAGECONFIGs readline and libedit should NOT be set at same time
45PACKAGECONFIG ?= "readline"
46PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
47PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
48PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
49PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,,"
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
60PARALLEL_MAKE = ""
61
62RDEPENDS_${PN} = "python3-core"
63RDEPENDS_${PN}-dev = ""
64
65PACKAGE_BEFORE_PN += "${PN}-utils"
66FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
67FILES_${PN}-dev += "${bindir}/isc-config.h"
68FILES_${PN} += "${sbindir}/generate-rndc-key.sh ${PYTHON_SITEPACKAGES_DIR}"
69
70do_install_prepend() {
71 # clean host path in isc-config.sh before the hardlink created
72 # by "make install":
73 # bind9-config -> isc-config.sh
74 sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
75}
76
77do_install_append() {
78 rm "${D}${bindir}/nslookup"
79 rm "${D}${mandir}/man1/nslookup.1"
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 sed -i -e '1s,#!.*python,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
88
89 # Install systemd related files
90 install -d ${D}${sbindir}
91 install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
92 install -d ${D}${systemd_unitdir}/system
93 install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
94 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
95 -e 's,@SBINDIR@,${sbindir},g' \
96 ${D}${systemd_unitdir}/system/named.service
97
98 install -d ${D}${sysconfdir}/default
99 install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
100
101 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
102 install -d ${D}${sysconfdir}/tmpfiles.d
103 echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
104 fi
105
106 rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/isc/*.pyc
107}
108
109CONFFILES_${PN} = " \
110 ${sysconfdir}/bind/named.conf \
111 ${sysconfdir}/bind/named.conf.local \
112 ${sysconfdir}/bind/named.conf.options \
113 ${sysconfdir}/bind/db.0 \
114 ${sysconfdir}/bind/db.127 \
115 ${sysconfdir}/bind/db.empty \
116 ${sysconfdir}/bind/db.local \
117 ${sysconfdir}/bind/db.root \
118 "
119