diff options
Diffstat (limited to 'meta/recipes-connectivity/bind/bind_9.11.5.bb')
-rw-r--r-- | meta/recipes-connectivity/bind/bind_9.11.5.bb | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bind/bind_9.11.5.bb b/meta/recipes-connectivity/bind/bind_9.11.5.bb new file mode 100644 index 0000000000..21e979fd9c --- /dev/null +++ b/meta/recipes-connectivity/bind/bind_9.11.5.bb | |||
@@ -0,0 +1,137 @@ | |||
1 | SUMMARY = "ISC Internet Domain Name Server" | ||
2 | HOMEPAGE = "http://www.isc.org/sw/bind/" | ||
3 | SECTION = "console/network" | ||
4 | |||
5 | LICENSE = "ISC & BSD" | ||
6 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=6ba7c9fe0c888a943c79c93e6de744fb" | ||
7 | |||
8 | DEPENDS = "openssl libcap zlib" | ||
9 | |||
10 | SRC_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-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \ | ||
19 | file://0001-lib-dns-gen.c-fix-too-long-error.patch \ | ||
20 | file://0001-configure.in-remove-useless-L-use_openssl-lib.patch \ | ||
21 | file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \ | ||
22 | file://0001-avoid-start-failure-with-bind-user.patch \ | ||
23 | " | ||
24 | |||
25 | SRC_URI[md5sum] = "17a0d02102117c9a221e857cf2cc8157" | ||
26 | SRC_URI[sha256sum] = "a4cae11dad954bdd4eb592178f875bfec09fcc7e29fe0f6b7a4e5b5c6bc61322" | ||
27 | |||
28 | UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" | ||
29 | UPSTREAM_CHECK_REGEX = "(?P<pver>9(\.\d+)+(-P\d+)*)/" | ||
30 | RECIPE_NO_UPDATE_REASON = "9.11 is LTS 2021" | ||
31 | |||
32 | inherit autotools update-rc.d systemd useradd pkgconfig multilib_script | ||
33 | |||
34 | MULTILIB_SCRIPTS = "${PN}:${bindir}/bind9-config ${PN}:${bindir}/isc-config.sh" | ||
35 | |||
36 | # PACKAGECONFIGs readline and libedit should NOT be set at same time | ||
37 | PACKAGECONFIG ?= "readline" | ||
38 | PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2" | ||
39 | PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" | ||
40 | PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" | ||
41 | PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,," | ||
42 | PACKAGECONFIG[python3] = "--with-python=${PYTHON} --with-python-install-dir=${D}/${PYTHON_SITEPACKAGES_DIR} , --without-python, python3-ply-native," | ||
43 | |||
44 | ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}" | ||
45 | EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \ | ||
46 | --disable-devpoll --enable-epoll --with-gost=no \ | ||
47 | --with-gssapi=no --with-ecdsa=yes --with-eddsa=no \ | ||
48 | --with-lmdb=no \ | ||
49 | --sysconfdir=${sysconfdir}/bind \ | ||
50 | --with-openssl=${STAGING_DIR_HOST}${prefix} \ | ||
51 | " | ||
52 | |||
53 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native distutils3-base', '', d)} | ||
54 | |||
55 | # dhcp needs .la so keep them | ||
56 | REMOVE_LIBTOOL_LA = "0" | ||
57 | |||
58 | USERADD_PACKAGES = "${PN}" | ||
59 | USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \ | ||
60 | --user-group bind" | ||
61 | |||
62 | INITSCRIPT_NAME = "bind" | ||
63 | INITSCRIPT_PARAMS = "defaults" | ||
64 | |||
65 | SYSTEMD_SERVICE_${PN} = "named.service" | ||
66 | |||
67 | do_install_prepend() { | ||
68 | # clean host path in isc-config.sh before the hardlink created | ||
69 | # by "make install": | ||
70 | # bind9-config -> isc-config.sh | ||
71 | sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh | ||
72 | } | ||
73 | |||
74 | do_install_append() { | ||
75 | |||
76 | rm "${D}${bindir}/nslookup" | ||
77 | rm "${D}${mandir}/man1/nslookup.1" | ||
78 | rmdir "${D}${localstatedir}/run" | ||
79 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" | ||
80 | install -d -o bind "${D}${localstatedir}/cache/bind" | ||
81 | install -d "${D}${sysconfdir}/bind" | ||
82 | install -d "${D}${sysconfdir}/init.d" | ||
83 | install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" | ||
84 | install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" | ||
85 | if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then | ||
86 | sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ | ||
87 | ${D}${sbindir}/dnssec-coverage \ | ||
88 | ${D}${sbindir}/dnssec-checkds \ | ||
89 | ${D}${sbindir}/dnssec-keymgr | ||
90 | fi | ||
91 | |||
92 | # Install systemd related files | ||
93 | install -d ${D}${sbindir} | ||
94 | install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir} | ||
95 | install -d ${D}${systemd_unitdir}/system | ||
96 | install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system | ||
97 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ | ||
98 | -e 's,@SBINDIR@,${sbindir},g' \ | ||
99 | ${D}${systemd_unitdir}/system/named.service | ||
100 | |||
101 | install -d ${D}${sysconfdir}/default | ||
102 | install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default | ||
103 | |||
104 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
105 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
106 | echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf | ||
107 | fi | ||
108 | } | ||
109 | |||
110 | CONFFILES_${PN} = " \ | ||
111 | ${sysconfdir}/bind/named.conf \ | ||
112 | ${sysconfdir}/bind/named.conf.local \ | ||
113 | ${sysconfdir}/bind/named.conf.options \ | ||
114 | ${sysconfdir}/bind/db.0 \ | ||
115 | ${sysconfdir}/bind/db.127 \ | ||
116 | ${sysconfdir}/bind/db.empty \ | ||
117 | ${sysconfdir}/bind/db.local \ | ||
118 | ${sysconfdir}/bind/db.root \ | ||
119 | " | ||
120 | |||
121 | PACKAGE_BEFORE_PN += "${PN}-utils" | ||
122 | FILES_${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/mdig" | ||
123 | FILES_${PN}-dev += "${bindir}/isc-config.h" | ||
124 | FILES_${PN} += "${sbindir}/generate-rndc-key.sh" | ||
125 | |||
126 | PACKAGE_BEFORE_PN += "${PN}-libs" | ||
127 | FILES_${PN}-libs = "${libdir}/*.so*" | ||
128 | FILES_${PN}-staticdev += "${libdir}/*.la" | ||
129 | |||
130 | PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-bind', '', d)}" | ||
131 | FILES_python3-bind = "${sbindir}/dnssec-coverage ${sbindir}/dnssec-checkds \ | ||
132 | ${sbindir}/dnssec-keymgr ${PYTHON_SITEPACKAGES_DIR}" | ||
133 | |||
134 | RDEPENDS_${PN} = "bash" | ||
135 | RDEPENDS_${PN}-utils = "bash" | ||
136 | RDEPENDS_${PN}-dev = "" | ||
137 | RDEPENDS_python3-bind = "python3-core python3-ply" | ||