Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "ISC Internet Domain Name Server" |
| 2 | HOMEPAGE = "http://www.isc.org/sw/bind/" |
| 3 | SECTION = "console/network" |
| 4 | |
| 5 | LICENSE = "ISC & BSD" |
Brad Bishop | d89cb5f | 2019-04-10 09:02:41 -0400 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8f17f64e47e83b60cd920a1e4b54419e" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 \ |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame^] | 23 | file://0001-bind-fix-CVE-2019-6471.patch \ |
| 24 | file://0001-fix-enforcement-of-tcp-clients-v1.patch \ |
| 25 | file://0002-tcp-clients-could-still-be-exceeded-v2.patch \ |
| 26 | file://0003-use-reference-counter-for-pipeline-groups-v3.patch \ |
| 27 | file://0004-better-tcpquota-accounting-and-client-mortality-chec.patch \ |
| 28 | file://0005-refactor-tcpquota-and-pipeline-refs-allow-special-ca.patch \ |
| 29 | file://0006-restore-allowance-for-tcp-clients-interfaces.patch \ |
| 30 | file://0007-Replace-atomic-operations-in-bin-named-client.c-with.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 31 | " |
| 32 | |
Brad Bishop | d89cb5f | 2019-04-10 09:02:41 -0400 | [diff] [blame] | 33 | SRC_URI[md5sum] = "8ddab4b61fa4516fe404679c74e37960" |
| 34 | SRC_URI[sha256sum] = "7e8c08192bcbaeb6e9f2391a70e67583b027b90e8c4bc1605da6eb126edde434" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 35 | |
| 36 | UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" |
Brad Bishop | 08902b0 | 2019-08-20 09:16:51 -0400 | [diff] [blame] | 37 | # stay at 9.11 until 9.16, from 9.16 follow the ESV versions divisible by 4 |
| 38 | UPSTREAM_CHECK_REGEX = "(?P<pver>9.(11|16|20|24|28)(\.\d+)+(-P\d+)*)/" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 39 | |
| 40 | inherit autotools update-rc.d systemd useradd pkgconfig multilib_script |
| 41 | |
| 42 | MULTILIB_SCRIPTS = "${PN}:${bindir}/bind9-config ${PN}:${bindir}/isc-config.sh" |
| 43 | |
| 44 | # PACKAGECONFIGs readline and libedit should NOT be set at same time |
| 45 | PACKAGECONFIG ?= "readline" |
| 46 | PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2" |
| 47 | PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" |
| 48 | PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" |
| 49 | PACKAGECONFIG[urandom] = "--with-randomdev=/dev/urandom,--with-randomdev=/dev/random,," |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 50 | PACKAGECONFIG[python3] = "--with-python=yes --with-python-install-dir=${PYTHON_SITEPACKAGES_DIR} , --without-python, python3-ply-native," |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 51 | |
| 52 | ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}" |
| 53 | EXTRA_OECONF = " ${ENABLE_IPV6} --with-libtool --enable-threads \ |
| 54 | --disable-devpoll --enable-epoll --with-gost=no \ |
| 55 | --with-gssapi=no --with-ecdsa=yes --with-eddsa=no \ |
| 56 | --with-lmdb=no \ |
| 57 | --sysconfdir=${sysconfdir}/bind \ |
| 58 | --with-openssl=${STAGING_DIR_HOST}${prefix} \ |
| 59 | " |
| 60 | |
| 61 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native distutils3-base', '', d)} |
| 62 | |
| 63 | # dhcp needs .la so keep them |
| 64 | REMOVE_LIBTOOL_LA = "0" |
| 65 | |
| 66 | USERADD_PACKAGES = "${PN}" |
| 67 | USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \ |
| 68 | --user-group bind" |
| 69 | |
| 70 | INITSCRIPT_NAME = "bind" |
| 71 | INITSCRIPT_PARAMS = "defaults" |
| 72 | |
| 73 | SYSTEMD_SERVICE_${PN} = "named.service" |
| 74 | |
| 75 | do_install_prepend() { |
| 76 | # clean host path in isc-config.sh before the hardlink created |
| 77 | # by "make install": |
| 78 | # bind9-config -> isc-config.sh |
| 79 | sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh |
| 80 | } |
| 81 | |
| 82 | do_install_append() { |
| 83 | |
| 84 | rmdir "${D}${localstatedir}/run" |
| 85 | rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" |
| 86 | install -d -o bind "${D}${localstatedir}/cache/bind" |
| 87 | install -d "${D}${sysconfdir}/bind" |
| 88 | install -d "${D}${sysconfdir}/init.d" |
| 89 | install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" |
| 90 | install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" |
| 91 | if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then |
| 92 | sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ |
| 93 | ${D}${sbindir}/dnssec-coverage \ |
| 94 | ${D}${sbindir}/dnssec-checkds \ |
| 95 | ${D}${sbindir}/dnssec-keymgr |
| 96 | fi |
| 97 | |
| 98 | # Install systemd related files |
| 99 | install -d ${D}${sbindir} |
| 100 | install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir} |
| 101 | install -d ${D}${systemd_unitdir}/system |
| 102 | install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system |
| 103 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ |
| 104 | -e 's,@SBINDIR@,${sbindir},g' \ |
| 105 | ${D}${systemd_unitdir}/system/named.service |
| 106 | |
| 107 | install -d ${D}${sysconfdir}/default |
| 108 | install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default |
| 109 | |
| 110 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
| 111 | install -d ${D}${sysconfdir}/tmpfiles.d |
| 112 | echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf |
| 113 | fi |
| 114 | } |
| 115 | |
| 116 | CONFFILES_${PN} = " \ |
| 117 | ${sysconfdir}/bind/named.conf \ |
| 118 | ${sysconfdir}/bind/named.conf.local \ |
| 119 | ${sysconfdir}/bind/named.conf.options \ |
| 120 | ${sysconfdir}/bind/db.0 \ |
| 121 | ${sysconfdir}/bind/db.127 \ |
| 122 | ${sysconfdir}/bind/db.empty \ |
| 123 | ${sysconfdir}/bind/db.local \ |
| 124 | ${sysconfdir}/bind/db.root \ |
| 125 | " |
| 126 | |
| 127 | ALTERNATIVE_${PN}-utils = "nslookup" |
| 128 | ALTERNATIVE_LINK_NAME[nslookup] = "${bindir}/nslookup" |
| 129 | ALTERNATIVE_PRIORITY = "100" |
| 130 | |
| 131 | PACKAGE_BEFORE_PN += "${PN}-utils" |
| 132 | FILES_${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/mdig ${bindir}/nslookup ${bindir}/nsupdate" |
| 133 | FILES_${PN}-dev += "${bindir}/isc-config.h" |
| 134 | FILES_${PN} += "${sbindir}/generate-rndc-key.sh" |
| 135 | |
| 136 | PACKAGE_BEFORE_PN += "${PN}-libs" |
| 137 | FILES_${PN}-libs = "${libdir}/*.so*" |
| 138 | FILES_${PN}-staticdev += "${libdir}/*.la" |
| 139 | |
| 140 | PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-bind', '', d)}" |
| 141 | FILES_python3-bind = "${sbindir}/dnssec-coverage ${sbindir}/dnssec-checkds \ |
| 142 | ${sbindir}/dnssec-keymgr ${PYTHON_SITEPACKAGES_DIR}" |
| 143 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 144 | RDEPENDS_${PN}-dev = "" |
| 145 | RDEPENDS_python3-bind = "python3-core python3-ply" |