#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
#
BUILD_BITS= 64
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= bind
COMPONENT_VERSION= 9.10.4-P4
HUMAN_VERSION= $(COMPONENT_VERSION)
IPS_COMPONENT_VERSION= 9.10.4.0.4
COMPONENT_PROJECT_URL= http://www.isc.org/software/bind/
# hash from: sha256sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha256:\1/'
COMPONENT_ARCHIVE_HASH= \
sha256:a41ce7518e1d0faa40312cc89f4ca42246906b2718099d992e87a5d3ce9a9d86
COMPONENT_ARCHIVE_URL= \
http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
COMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).sha512.asc
COMPONENT_BUGDB= service/dns-server
TPNO= 32362
include $(WS_MAKE_RULES)/common.mk
# PYVER is important for packaging and computing requisites.
PYTHON_VERSION = 3.4
PKG_MACROS += PYVER=$(PYTHON_VERSION)
# Some patches need configure script re-creation.
COMPONENT_PREP_ACTION +=(cd $(@D); autoreconf -vfi);
# Specify "configure" options and features.
# FYI, The configure options are displayed by 'named -V'.
CONFIGURE_OPTIONS += --enable-full-report
# Python: specifying version helps with packaging.
CONFIGURE_OPTIONS += --with-python=$(PYTHON.$(PYTHON_VERSION))
# - libtool: Build dynamic libraries, static libraries are not shipped.
CONFIGURE_OPTIONS += --with-libtool
# - openssl: use openssl, required for DNSSEC features.
CONFIGURE_OPTIONS += --with-openssl
# - pkcs11: Use openSSL pkcs11 engine (KMIP/KMS)
CONFIGURE_OPTIONS += --with-pkcs11
# - Use xml2-config found uder /usr without checking its version.
CONFIGURE_OPTIONS += --with-libxml2=$(USRDIR)
CONFIGURE_OPTIONS += --enable-threads
CONFIGURE_OPTIONS += --enable-devpoll
# - Enabled fixed [order] resource-record sets for backward compatibility.
# - Requires more memory to store the sets so is not the default.
CONFIGURE_OPTIONS += --enable-fixed-rrset
# Override / set specific pathnames:
# - DNS libraries are in usr/lib/dns - Override settings from configure.mk
CONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib/dns/$(MACH64)
CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
CONFIGURE_OPTIONS += --localstatedir=$(VARDIR)
CONFIGURE_OPTIONS += --with-randomdev=/dev/random
CONFIGURE_OPTIONS += --with-gssapi=krb5-config
CONFIGURE_OPTIONS += --with-docbook-xsl=/usr/share/sgml/docbook
# Compiler and compiler options:
# - configure will add "-mt" to CC which is already set in CFLAGS, so override.
CONFIGURE_OPTIONS += CC="$(CC)"
# Test configuration / helper targets:
COMPONENT_TEST_MASTER = \
$(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
# Run BIND testing without test interfaces configured (limited testing).
COMPONENT_TEST_TARGETS = force-test
# Normalise results for comparison:
# Remove Date and time from Start and End lines.
COMPONENT_TEST_TRANSFORMS += '-e "s|\(^[SE]:[^:]*:\).*|\1|"'
# Remove task Information lines as order of that output has been seen to change.
COMPONENT_TEST_TRANSFORMS += '-e "/^I:/d"'
# Uncomment to display summary of tests at completion.
# COMPONENT_POST_TEST_ACTION = $(NAWK) $(summarize) $(COMPONENT_TEST_OUTPUT)
# Enable adiheap and adistack security extensions
ADIHEAP_MODE = $(ADIHEAP_ENABLE)
ADISTACK_MODE = $(ADISTACK_ENABLE)
.PHONY: test-named-version test-summary test-clean
# summarize is a nawk script:
# consumes the output generated by ISC's make target and provides an
# abridged summary. It works by looking for key elements:
# /^T:/ = Start of a test.
# /^I:/ = Info from a test; collected for possible use later.
# /^A:/ = About: summary of the test - not used here.
# /^S:/ = Start: pathname and date time - not used here.
# /^E:/ = End: pathname and date time - not used here.
# /^R:/ = Result:
# When 'PASS' and report=1 (from command line) the result and
# test name are displayed.
# For all other results (failures) the result, test name and
# other collected info is displayed.
# Known issues may be accounted for by adding tests, for example:
# /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
# /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
# Though with USERLAND automated test comparison the known
# case is kind of obsolete now.
# @ EOF = Display count of RESULTS:
# i.e. R:PASS=124 R:UNTESTED=26 Total=150 if not 100% pass rate and
# issue is not accounted for (known) the test 'issues!' is appended to
# resulting output.
#
summarize= '\
/^T:/ {name=$$0;info="";}\
/^I:/ {info=sprintf("%s%s\n", info, $$0);}\
/^R:/ {test++; result[$$1]++;}\
/^R:PASS/ { if (report) printf("%s: %s\n", $$1, name); next}\
/^R:UNRESOLVED/ && name ~ /^T:dst:2:A/ {known++;}\
/^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\
END{for (item in result)\
printf("%s=%d ", item, result[item]);\
printf("(known=%d) Total=%d%s\n", known, test, \
((result["R:PASS"] + known) < test)? \
" issues!" : "");\
}'
#
# COMPONENT_TEST_OUTPUT is dependent on BITS which is set depending on
# the active build target and PYTHON_VERS!, so it's overridden here too for test-summary:
test-summary: BITS=64
test-summary:
@echo Summary of $(COMPONENT_TEST_OUTPUT)
@$(NAWK) $(summarize) $(COMPONENT_TEST_OUTPUT)
test-named-version: install
@if [ -e $(PROTO_DIR)$(CONFIGURE_SBINDIR.64)/named ]; then \
echo '64bit version:'; \
file $(PROTO_DIR)$(CONFIGURE_SBINDIR.64)/named; \
LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.64) \
$(PROTO_DIR)$(CONFIGURE_SBINDIR.64)/named -V; \
else \
echo '64bit version not found.'; \
fi;
test-clean:
$(RM) $(TEST_64)
# Package dependencies
# Created by 'gmake REQUIRED_PACKAGES', manually verified.
REQUIRED_PACKAGES += library/json-c
REQUIRED_PACKAGES += library/libedit
REQUIRED_PACKAGES += library/libxml2
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
REQUIRED_PACKAGES += network/dns/bind
REQUIRED_PACKAGES += runtime/python-34
REQUIRED_PACKAGES += security/kerberos-5
ifeq ($(OS_VERSION),5.11)
REQUIRED_PACKAGES += service/security/kerberos-5
endif
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/core-os
ifeq ($(OS_VERSION),5.11)
REQUIRED_PACKAGES += system/library/security/gss
endif