224N/A#
224N/A# CDDL HEADER START
224N/A#
224N/A# The contents of this file are subject to the terms of the
224N/A# Common Development and Distribution License (the "License").
224N/A# You may not use this file except in compliance with the License.
224N/A#
224N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
224N/A# or http://www.opensolaris.org/os/licensing.
224N/A# See the License for the specific language governing permissions
224N/A# and limitations under the License.
224N/A#
224N/A# When distributing Covered Code, include this CDDL HEADER in each
224N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
224N/A# If applicable, add the following below this CDDL HEADER, with the
224N/A# fields enclosed by brackets "[]" replaced with your own identifying
224N/A# information: Portions Copyright [yyyy] [name of copyright owner]
224N/A#
224N/A# CDDL HEADER END
224N/A#
5334N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
224N/A#
224N/Ainclude ../../make-rules/shared-macros.mk
224N/A
224N/ACOMPONENT_NAME= bind
2716N/ACOMPONENT_VERSION= 9.6-ESV-R11
7074N/AHUMAN_VERSION= $(COMPONENT_VERSION)-S8
7074N/AIPS_COMPONENT_VERSION= 9.6.3.11.8
224N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
224N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
618N/ACOMPONENT_PROJECT_URL= http://www.isc.org/software/bind/
224N/A
844N/A# hash from: sha256sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha256:\1/'
844N/ACOMPONENT_ARCHIVE_HASH= \
2716N/A sha256:4f052195a62218c05a05033774452e6a9e329b865c01e594cc20a6adf11e0d0f
224N/ACOMPONENT_ARCHIVE_URL= \
224N/A http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
1273N/ACOMPONENT_BUGDB= service/dns-server
224N/A
5204N/ATPNO= 25905
3542N/A
3996N/Ainclude $(WS_MAKE_RULES)/prep.mk
3996N/Ainclude $(WS_MAKE_RULES)/configure.mk
3996N/Ainclude $(WS_MAKE_RULES)/ips.mk
224N/A
224N/A# Build.
224N/A#
224N/A# FYI, The configure options are displayed by 'named -V'. Previously
5711N/A# that was overridden by setting CONFIGARGS to hide build server
224N/A# pathnames.
224N/A
224N/A# Traditionally all BIND executables are installed in sbin not bin.
224N/A# DNS libraries are in usr/lib/dns - Override settings from configure.mk
224N/ACONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/sbin
224N/ACONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib/dns
224N/A
224N/ACONFIGURE_OPTIONS += --with-libtool
224N/ACONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_BINDIR.$(BITS))
224N/ACONFIGURE_OPTIONS += --sysconfdir=/etc
224N/ACONFIGURE_OPTIONS += --localstatedir=/var
224N/ACONFIGURE_OPTIONS += --with-openssl
224N/ACONFIGURE_OPTIONS += --enable-threads=yes
224N/ACONFIGURE_OPTIONS += --enable-devpoll=yes
224N/ACONFIGURE_OPTIONS += --disable-openssl-version-check
224N/ACONFIGURE_OPTIONS += --enable-fixed-rrset
224N/ACONFIGURE_OPTIONS += --with-pkcs11
1316N/A# Bind configure will check for libxml2 versions 2.6.x/2.7.x/2.8.x.
1316N/A# To make it use version 2.9.x we need to skip this check by
1316N/A# specifying path where libxml2 is installed.
1316N/ACONFIGURE_OPTIONS += --with-libxml2=/usr
224N/A
224N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
224N/A# Configure will add "-mt" to CC which is already set in CFLAGS, so override.
224N/ACONFIGURE_OPTIONS += CC="$(CC)"
224N/A
2716N/A# Enable ASLR for this component
2716N/AASLR_MODE = $(ASLR_ENABLE)
2716N/A
224N/A.PHONY: build
224N/Abuild: $(BUILD_32)
224N/A
224N/A# Install.
224N/A#
224N/A# Currently manual pages are distributed from pkg:/system/manual@.
224N/A# While there are some changes in our manuals, for example section
224N/A# numbering and additions to named(1M) for SMF - that could be fixed
224N/A# by patch.
224N/A#
224N/A# In addition to BIND deliverables we also deliver SMF files and
224N/A# migration notes. There is no need to install these extras into the
224N/A# prototype directory, they are simply referenced in relevant manifest
224N/A# (p5m) file.
224N/A
224N/A.PHONY: install
224N/Ainstall: $(INSTALL_32)
224N/A
224N/A# Testing.
224N/A#
5711N/A# summarize nawk script; reads ISC output which is of the form:
224N/A# /^T:/ = Start of a test.
5711N/A# /^I:/ = Info from a test; collected for possible use later.
224N/A# /^A:/ = About: summary of the test - not used here.
224N/A# /^R:/ = Result: If 'PASS' then continue, else print line and collected info.
2716N/A# Known issues may then be accounted for by adding tests, for example:
2716N/A# /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
2716N/A# /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
224N/A# @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150
224N/A# if not 100% pass rate and issue is not known the word 'issues!' is appended
224N/A# to resulting string.
224N/Asummarize= '\
224N/A /^T:/ {name=$$0;info="";}\
224N/A /^I:/ {info=sprintf("%s%s\n", info, $$0);}\
224N/A /^R:/ {test++; result[$$1]++;}\
224N/A /^R:PASS/ {next;}\
224N/A /^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\
224N/A END{for (item in result)\
224N/A printf("%s=%d ", item, result[item]);\
224N/A printf("(known=%d) Total=%d%s\n", known, test, \
224N/A ((result["R:PASS"] + known) < test)? \
224N/A " issues!" : "");\
224N/A }'
224N/A
224N/Aisc_ifconfig= ./bin/tests/system/ifconfig.sh
224N/A
224N/A.PHONY: test
224N/Atest: build $(TEST_32)
224N/A
224N/A# fulltest requires sufficient privileges to configures IP addresses
224N/A# 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface.
2716N/A# Note PATH is being set so that isc_ifconfig can find ifconfig.
224N/AFULL_TEST_32= $(TEST_32:%=%_FULL)
224N/A
224N/A.PHONY: fulltest
224N/Afulltest: build $(FULL_TEST_32)
224N/A
224N/A$(FULL_TEST_32):
2716N/A cd $(COMPONENT_SRC) && PATH=/sbin:$(PATH) $(SHELL) $(isc_ifconfig) up
224N/A -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
2716N/A -cd $(COMPONENT_SRC) && PATH=/sbin:$(PATH) $(SHELL) $(isc_ifconfig) down
224N/A $(NAWK) $(summarize) $@
224N/A
224N/A$(TEST_32):
2716N/A -cd $(@D) && $(MAKE) force-test 2>&1 | $(TEE) $@
224N/A $(NAWK) $(summarize) $@
224N/A
224N/A# test-summary shows summary for targets test and fulltest. Use target
224N/A# test-clean to remove previous tests.
224N/A.PHONY: test-summary
224N/Atest-summary:
224N/A @for file in $(TEST_32)*; do \
224N/A if [ -f $$file ]; then \
224N/A echo 'Summary for' $$file;\
224N/A $(NAWK) $(summarize) $$file;\
224N/A fi;\
224N/A done
224N/A
224N/A.PHONY: test-version
224N/Atest-version:
224N/A @echo;echo 32 bit version
224N/A -LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.32) \
224N/A $(PROTO_DIR)$(CONFIGURE_BINDIR.32)/named -V
224N/A
224N/A.PHONY: test-clean
224N/Atest-clean:
224N/A $(RM) $(TEST_32) $(FULL_TEST_32)
224N/A
224N/A
3996N/AREQUIRED_PACKAGES += library/libxml2
3996N/AREQUIRED_PACKAGES += library/security/openssl
3996N/AREQUIRED_PACKAGES += network/dns/bind
3996N/AREQUIRED_PACKAGES += shell/ksh93
3996N/AREQUIRED_PACKAGES += system/core-os
3996N/AREQUIRED_PACKAGES += system/library