summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bind/bind_9.9.5.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/bind/bind_9.9.5.bb')
-rw-r--r--meta/recipes-connectivity/bind/bind_9.9.5.bb99
1 files changed, 99 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bind/bind_9.9.5.bb b/meta/recipes-connectivity/bind/bind_9.9.5.bb
new file mode 100644
index 0000000..e206cc4
--- /dev/null
+++ b/meta/recipes-connectivity/bind/bind_9.9.5.bb
@@ -0,0 +1,99 @@
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=a3df5f651469919a0e6cb42f84fb6ff1"
7
8DEPENDS = "openssl libcap"
9
10SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
11 file://conf.patch \
12 file://cross-build-fix.patch \
13 file://make-etc-initd-bind-stop-work.patch \
14 file://mips1-not-support-opcode.diff \
15 file://dont-test-on-host.patch \
16 file://generate-rndc-key.sh \
17 file://named.service \
18 file://bind9 \
19 file://init.d-add-support-for-read-only-rootfs.patch \
20 file://bind9_9_5-CVE-2014-8500.patch \
21 file://bind9_9_5-CVE-2015-5477.patch \
22 "
23
24SRC_URI[md5sum] = "e676c65cad5234617ee22f48e328c24e"
25SRC_URI[sha256sum] = "d4b64c1dde442145a316679acff2df4008aa117ae52dfa3a6bc69efecc7840d1"
26
27# --enable-exportlib is necessary for building dhcp
28ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
29EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads \
30 --disable-devpoll --disable-epoll --with-gost=no \
31 --with-gssapi=no --with-ecdsa=yes \
32 --sysconfdir=${sysconfdir}/bind \
33 --with-openssl=${STAGING_LIBDIR}/.. --with-libxml2=${STAGING_LIBDIR}/.. \
34 --enable-exportlib --with-export-includedir=${includedir} --with-export-libdir=${libdir} \
35 "
36inherit autotools-brokensep update-rc.d systemd useradd
37
38USERADD_PACKAGES = "${PN}"
39USERADD_PARAM_${PN} = "--system --home /var/cache/bind --no-create-home \
40 --user-group bind"
41
42INITSCRIPT_NAME = "bind"
43INITSCRIPT_PARAMS = "defaults"
44
45SYSTEMD_SERVICE_${PN} = "named.service"
46
47PARALLEL_MAKE = ""
48
49RDEPENDS_${PN} = "python-core"
50
51PACKAGE_BEFORE_PN += "${PN}-utils"
52FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
53FILES_${PN}-dev += "${bindir}/isc-config.h"
54FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
55
56do_install_prepend() {
57 # clean host path in isc-config.sh before the hardlink created
58 # by "make install":
59 # bind9-config -> isc-config.sh
60 sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${S}/isc-config.sh
61}
62
63do_install_append() {
64 rm "${D}${bindir}/nslookup"
65 rm "${D}${mandir}/man1/nslookup.1"
66 rmdir "${D}${localstatedir}/run"
67 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
68 install -d "${D}${localstatedir}/cache/bind"
69 install -d "${D}${sysconfdir}/bind"
70 install -d "${D}${sysconfdir}/init.d"
71 install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
72 install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
73 sed -i -e '1s,#!.*python,#! /usr/bin/env python,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
74
75 # Install systemd related files
76 install -d ${D}${localstatedir}/cache/bind
77 install -d ${D}${sbindir}
78 install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
79 install -d ${D}${systemd_unitdir}/system
80 install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
81 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
82 -e 's,@SBINDIR@,${sbindir},g' \
83 ${D}${systemd_unitdir}/system/named.service
84
85 install -d ${D}${sysconfdir}/default
86 install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
87}
88
89CONFFILES_${PN} = " \
90 ${sysconfdir}/bind/named.conf \
91 ${sysconfdir}/bind/named.conf.local \
92 ${sysconfdir}/bind/named.conf.options \
93 ${sysconfdir}/bind/db.0 \
94 ${sysconfdir}/bind/db.127 \
95 ${sysconfdir}/bind/db.empty \
96 ${sysconfdir}/bind/db.local \
97 ${sysconfdir}/bind/db.root \
98 "
99