summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/bind/bind_9.18.7.bb
blob: 4ab11486bf8451c5a222c8cd51c9a3ae4e88c378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
SUMMARY = "ISC Internet Domain Name Server"
HOMEPAGE = "https://www.isc.org/bind/"
DESCRIPTION = "BIND 9 provides a full-featured Domain Name Server system"
SECTION = "console/network"

LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=9a4a897f202c0710e07f2f2836bc2b62"

DEPENDS = "openssl libcap zlib libuv"

SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \
           file://conf.patch \
           file://named.service \
           file://bind9 \
           file://generate-rndc-key.sh \
           file://make-etc-initd-bind-stop-work.patch \
           file://init.d-add-support-for-read-only-rootfs.patch \
           file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
           file://0001-named-lwresd-V-and-start-log-hide-build-options.patch \
           file://0001-avoid-start-failure-with-bind-user.patch \
           "

SRC_URI[sha256sum] = "9e2acf1698f49d70ad12ffbad39ec6716a7da524e9ebd98429c7c70ba1262981"

UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/"
# follow the ESV versions divisible by 2
UPSTREAM_CHECK_REGEX = "(?P<pver>9.(\d*[02468])+(\.\d+)+(-P\d+)*)/"

# Issue only affects dhcpd with recent bind versions. We don't ship dhcpd anymore
# so the issue doesn't affect us.
CVE_CHECK_IGNORE += "CVE-2019-6470"

inherit autotools update-rc.d systemd useradd pkgconfig multilib_header update-alternatives

# PACKAGECONFIGs readline and libedit should NOT be set at same time
PACKAGECONFIG ?= "readline"
PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2"
PACKAGECONFIG[readline] = "--with-readline=readline,,readline"
PACKAGECONFIG[libedit] = "--with-readline=libedit,,libedit"
PACKAGECONFIG[dns-over-http] = "--enable-doh,--disable-doh,nghttp2"

EXTRA_OECONF = " --disable-devpoll --disable-auto-validation --enable-epoll \
                 --with-gssapi=no --with-lmdb=no --with-zlib \
                 --sysconfdir=${sysconfdir}/bind \
                 --with-openssl=${STAGING_DIR_HOST}${prefix} \
               "
LDFLAGS:append = " -lz"

# dhcp needs .la so keep them
REMOVE_LIBTOOL_LA = "0"

USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
                       --user-group bind"

INITSCRIPT_NAME = "bind"
INITSCRIPT_PARAMS = "defaults"

SYSTEMD_SERVICE:${PN} = "named.service"

do_install:append() {

	install -d -o bind "${D}${localstatedir}/cache/bind"
	install -d "${D}${sysconfdir}/bind"
	install -d "${D}${sysconfdir}/init.d"
	install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
	install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"

	# Install systemd related files
	install -d ${D}${sbindir}
	install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
	install -d ${D}${systemd_system_unitdir}
	install -m 0644 ${WORKDIR}/named.service ${D}${systemd_system_unitdir}
	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
	       -e 's,@SBINDIR@,${sbindir},g' \
	       ${D}${systemd_system_unitdir}/named.service

	install -d ${D}${sysconfdir}/default
	install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default

	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
		install -d ${D}${sysconfdir}/tmpfiles.d
		echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf
	fi
}

CONFFILES:${PN} = " \
	${sysconfdir}/bind/named.conf \
	${sysconfdir}/bind/named.conf.local \
	${sysconfdir}/bind/named.conf.options \
	${sysconfdir}/bind/db.0 \
	${sysconfdir}/bind/db.127 \
	${sysconfdir}/bind/db.empty \
	${sysconfdir}/bind/db.local \
	${sysconfdir}/bind/db.root \
	"

ALTERNATIVE:${PN}-utils = "nslookup"
ALTERNATIVE_LINK_NAME[nslookup] = "${bindir}/nslookup"
ALTERNATIVE_PRIORITY = "100"

PACKAGE_BEFORE_PN += "${PN}-utils"
FILES:${PN}-utils = "${bindir}/host ${bindir}/dig ${bindir}/mdig ${bindir}/nslookup ${bindir}/nsupdate"
FILES:${PN}-dev += "${bindir}/isc-config.h"
FILES:${PN} += "${sbindir}/generate-rndc-key.sh"

PACKAGE_BEFORE_PN += "${PN}-libs"
# special arrangement below due to
# https://github.com/isc-projects/bind9/commit/0e25af628cd776f98c04fc4cc59048f5448f6c88
FILES_SOLIBSDEV = "${libdir}/*[!0-9].so ${libdir}/libbind9.so"
FILES:${PN}-libs = "${libdir}/named/*.so* ${libdir}/*-${PV}.so"
FILES:${PN}-staticdev += "${libdir}/*.la"

DEV_PKG_DEPENDENCY = ""
where needed. Fixes --continue mode crashes. - Fix -f (force) in conjunction with -b - Fix problems with recrdeptask handling where some idepends weren't handled correctly. - Handle exit codes correctly (from pH5) - Work around refs/HEAD issues with git over http (#3410) - Add proxy support to the CVS fetcher (from Cyril Chemparathy) - Improve runfetchcmd so errors are seen and various GIT variables are exported - Add ability to fetchers to check URL validity without downloading - Improve runtime PREFERRED_PROVIDERS warning message - Add BB_STAMP_WHITELIST option which contains a list of stamps to ignore when checking stamp dependencies and using a BB_STAMP_POLICY of "whitelist" - No longer weight providers on the basis of a package being "already staged". This leads to builds being non-deterministic. - Flush stdout/stderr before forking to fix duplicate console output - Make sure recrdeps tasks include all inter-task dependencies of a given fn - Add bb.runqueue.check_stamp_fn() for use by packaged-staging - Add PERSISTENT_DIR to store the PersistData in a persistent directory != the cache dir. - Add md5 and sha256 checksum generation functions to utils.py - Correctly handle '-' characters in class names (#2958) - Make sure expandKeys has been called on the data dictionary before running tasks - Correctly add a task override in the form task-TASKNAME. - Revert the '-' character fix in class names since it breaks things - When a regexp fails to compile for PACKAGES_DYNAMIC, print a more useful error (#4444) - Allow to checkout CVS by Date and Time. Just add HHmm to the SRCDATE. - Move prunedir function to utils.py and add explode_dep_versions function - Raise an exception if SRCREV == 'INVALID' - Fix hg fetcher username/password handling and fix crash - Fix PACKAGES_DYNAMIC handling of packages with '++' in the name - Rename __depends to __base_depends after configuration parsing so we don't recheck the validity of the config files time after time - Add better environmental variable handling. By default it will now only pass certain whitelisted variables into the data store. If BB_PRESERVE_ENV is set bitbake will use all variable from the environment. If BB_ENV_WHITELIST is set, that whitelist will be used instead of the internal bitbake one. Alternatively, BB_ENV_EXTRAWHITE can be used to extend the internal whitelist. - Perforce fetcher fix to use commandline options instead of being overriden by the environment - bb.utils.prunedir can cope with symlinks to directoriees without exceptions - use @rev when doing a svn checkout - Add osc fetcher (from Joshua Lock in Poky) - When SRCREV autorevisioning for a recipe is in use, don't cache the recipe - Add tryaltconfigs option to control whether bitbake trys using alternative providers to fulfil failed dependencies. It defaults to off, changing the default since this behaviour confuses many users and isn't often useful. - Improve lock file function error handling - Add username handling to the git fetcher (Robert Bragg) - Add support for HTTP_PROXY and HTTP_PROXY_IGNORE variables to the wget fetcher - Export more variables to the fetcher commands to allow ssh checkouts and checkouts through proxies to work better. (from Poky) - Also allow user and pswd options in SRC_URIs globally (from Poky) - Improve proxy handling when using mirrors (from Poky) - Add bb.utils.prune_suffix function - Fix hg checkouts of specific revisions (from Poky) - Fix wget fetching of urls with parameters specified (from Poky) - Add username handling to git fetcher (from Poky) - Set HOME environmental variable when running fetcher commands (from Poky) - Make sure allowed variables inherited from the environment are exported again (from Poky) - When running a stage task in bbshell, run populate_staging, not the stage task (from Poky) - Fix + character escaping from PACKAGES_DYNAMIC (thanks Otavio Salvador) - Addition of BBCLASSEXTEND support for allowing one recipe to provide multiple targets (from Poky) Changes in Bitbake 1.8.0: - Release 1.7.x as a stable series Changes in BitBake 1.7.x: - Major updates of the dependency handling and execution of tasks. Code from bin/bitbake replaced with runqueue.py and taskdata.py - New task execution code supports multithreading with a simplistic threading algorithm controlled by BB_NUMBER_THREADS - Change of the SVN Fetcher to keep the checkout around courtsey of Paul Sokolovsky (#1367) - PATH fix to bbimage (#1108) - Allow debug domains to be specified on the commandline (-l) - Allow 'interactive' tasks - Logging message improvements - Drop now uneeded BUILD_ALL_DEPS variable - Add support for wildcards to -b option - Major overhaul of the fetchers making a large amount of code common including mirroring code - Fetchers now touch md5 stamps upon access (to show activity) - Fix -f force option when used without -b (long standing bug) - Add expand_cache to data_cache.py, caching expanded data (speedup) - Allow version field in DEPENDS (ignored for now) - Add abort flag support to the shell - Make inherit fail if the class doesn't exist (#1478) - Fix data.emit_env() to expand keynames as well as values - Add ssh fetcher - Add perforce fetcher - Make PREFERRED_PROVIDER_foobar defaults to foobar if available - Share the parser's mtime_cache, reducing the number of stat syscalls - Compile all anonfuncs at once! *** Anonfuncs must now use common spacing format *** - Memorise the list of handlers in __BBHANDLERS and tasks in __BBTASKS This removes 2 million function calls resulting in a 5-10% speedup - Add manpage - Update generateDotGraph to use taskData/runQueue improving accuracy and also adding a task dependency graph - Fix/standardise on GPLv2 licence - Move most functionality from bin/bitbake to cooker.py and split into separate funcitons - CVS fetcher: Added support for non-default port - Add BBINCLUDELOGS_LINES, the number of lines to read from any logfile - Drop shebangs from lib/bb scripts Changes in Bitbake 1.6.0: - Better msg handling - COW dict implementation from Tim Ansell (mithro) leading to better performance - Speed up of -s Changes in Bitbake 1.4.4: - SRCDATE now handling courtsey Justin Patrin - #1017 fix to work with rm_work Changes in BitBake 1.4.2: - Send logs to oe.pastebin.com instead of pastebin.com fixes #856 - Copy the internal bitbake data before building the dependency graph. This fixes nano not having a virtual/libc dependency - Allow multiple TARBALL_STASH entries - Cache, check if the directory exists before changing into it - git speedup cloning by not doing a checkout - allow to have spaces in filenames (.conf, .bb, .bbclass) Changes in BitBake 1.4.0: - Fix to check both RDEPENDS and RDEPENDS_${PN} - Fix a RDEPENDS parsing bug in utils:explode_deps() - Update git fetcher behaviour to match git changes - ASSUME_PROVIDED allowed to include runtime packages - git fetcher cleanup and efficency improvements - Change the format of the cache - Update usermanual to document the Fetchers - Major changes to caching with a new strategy giving a major performance increase when reparsing with few data changes Changes in BitBake 1.3.3: - Create a new Fetcher module to ease the development of new Fetchers. Issue #438 fixed by rpurdie@openedhand.com - Make the Subversion fetcher honor the SRC Date (CVSDATE). Issue #555 fixed by chris@openedhand.com - Expand PREFERRED_PROVIDER properly Issue #436 fixed by rprudie@openedhand.com - Typo fix for Issue #531 by Philipp Zabel for the BitBake Shell - Introduce a new special variable SRCDATE as a generic naming to replace CVSDATE. - Introduce a new keyword 'required'. In contrast to 'include' parsing will fail if a to be included file can not be found. - Remove hardcoding of the STAMP directory. Patch courtsey pHilipp Zabel - Track the RDEPENDS of each package (rpurdie@openedhand.com) - Introduce BUILD_ALL_DEPS to build all RDEPENDS. E.g this is used by the OpenEmbedded Meta Packages. (rpurdie@openedhand.com). Changes in BitBake 1.3.2: - reintegration of make.py into BitBake - bbread is gone, use bitbake -e - lots of shell updates and bugfixes - Introduction of the .= and =. operator - Sort variables, keys and groups in bitdoc - Fix regression in the handling of BBCOLLECTIONS - Update the bitbake usermanual Changes in BitBake 1.3.0: - add bitbake interactive shell (bitbake -i) - refactor bitbake utility in OO style - kill default arguments in methods in the bb.data module - kill default arguments in methods in the bb.fetch module - the http/https/ftp fetcher will fail if the to be downloaded file was not found in DL_DIR (this is needed to avoid unpacking the sourceforge mirror page) - Switch to a cow like data instance for persistent and non persisting mode (called data_smart.py) - Changed the callback of bb.make.collect_bbfiles to carry additional parameters - Drastically reduced the amount of needed RAM by not holding each data instance in memory when using a cache/persistent storage Changes in BitBake 1.2.1: The 1.2.1 release is meant as a intermediate release to lay the ground for more radical changes. The most notable changes are: - Do not hardcode {}, use bb.data.init() instead if you want to get a instance of a data class - bb.data.init() is a factory and the old bb.data methods are delegates - Do not use deepcopy use bb.data.createCopy() instead. - Removed default arguments in bb.fetch