blob: 81606252828076cb037f7f7aae7700df23fba336 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001SUMMARY = "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=0a95f52a0ab6c5f52dedc9a45e7abb3f"
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://mips1-not-support-opcode.diff \
14 file://dont-test-on-host.patch \
15 file://generate-rndc-key.sh \
16 file://named.service \
17 file://bind9 \
18 file://init.d-add-support-for-read-only-rootfs.patch \
19 file://bind-confgen-build-unix.o-once.patch \
20 file://0001-build-use-pkg-config-to-find-libxml2.patch \
21 file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
22 file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
23 file://0001-lib-dns-gen.c-fix-too-long-error.patch \
24 file://CVE-2016-1285.patch \
25 file://CVE-2016-1286_1.patch \
26 file://CVE-2016-1286_2.patch \
27 file://CVE-2016-2088.patch \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060028 file://CVE-2016-2775.patch \
29 file://CVE-2016-2776.patch \
Brad Bishop37a0e4d2017-12-04 01:01:44 -050030 file://CVE-2016-8864.patch \
31 file://CVE-2016-6170.patch \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050032 "
33
34SRC_URI[md5sum] = "bcf7e772b616f7259420a3edc5df350a"
35SRC_URI[sha256sum] = "690810d1fbb72afa629e74638d19cd44e28d2b2e5eb63f55c705ad85d1a4cb83"
36
37ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
38EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads \
39 --disable-devpoll --disable-epoll --with-gost=no \
40 --with-gssapi=no --with-ecdsa=yes \
41 --sysconfdir=${sysconfdir}/bind \
42 --with-openssl=${STAGING_LIBDIR}/.. \
43 "
44inherit autotools update-rc.d systemd useradd pkgconfig
45
46# PACKAGECONFIGs readline and libedit should NOT be set at same time
47PACKAGECONFIG ?= "readline"
48PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
49PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
50PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
51
52USERADD_PACKAGES = "${PN}"
53USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
54 --user-group bind"
55
56INITSCRIPT_NAME = "bind"
57INITSCRIPT_PARAMS = "defaults"
58
59SYSTEMD_SERVICE_${PN} = "named.service"
60
61PARALLEL_MAKE = ""
62
Patrick Williamsc0f7c042017-02-23 20:41:17 -060063RDEPENDS_${PN} = "python3-core"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050064RDEPENDS_${PN}-dev = ""
65
66PACKAGE_BEFORE_PN += "${PN}-utils"
67FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
68FILES_${PN}-dev += "${bindir}/isc-config.h"
69FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
70
71do_install_prepend() {
72 # clean host path in isc-config.sh before the hardlink created
73 # by "make install":
74 # bind9-config -> isc-config.sh
75 sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
76}
77
78do_install_append() {
79 rm "${D}${bindir}/nslookup"
80 rm "${D}${mandir}/man1/nslookup.1"
81 rmdir "${D}${localstatedir}/run"
82 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
83 install -d -o bind "${D}${localstatedir}/cache/bind"
84 install -d "${D}${sysconfdir}/bind"
85 install -d "${D}${sysconfdir}/init.d"
86 install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
87 install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060088 sed -i -e '1s,#!.*python,#! /usr/bin/python3,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050089
90 # Install systemd related files
91 install -d ${D}${sbindir}
92 install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
93 install -d ${D}${systemd_unitdir}/system
94 install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
95 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
96 -e 's,@SBINDIR@,${sbindir},g' \
97 ${D}${systemd_unitdir}/system/named.service
98
99 install -d ${D}${sysconfdir}/default
100 install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
101}
102
103CONFFILES_${PN} = " \
104 ${sysconfdir}/bind/named.conf \
105 ${sysconfdir}/bind/named.conf.local \
106 ${sysconfdir}/bind/named.conf.options \
107 ${sysconfdir}/bind/db.0 \
108 ${sysconfdir}/bind/db.127 \
109 ${sysconfdir}/bind/db.empty \
110 ${sysconfdir}/bind/db.local \
111 ${sysconfdir}/bind/db.root \
112 "
113