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#
5680N/A
5680N/A#
5296N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
224N/A#
5680N/ABUILD_BITS= 64
224N/Ainclude ../../make-rules/shared-macros.mk
224N/A
224N/ACOMPONENT_NAME= bind
7284N/ACOMPONENT_VERSION= 9.10.4-P4
6225N/AHUMAN_VERSION= $(COMPONENT_VERSION)
7284N/AIPS_COMPONENT_VERSION= 9.10.4.0.4
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= \
7284N/A sha256:a41ce7518e1d0faa40312cc89f4ca42246906b2718099d992e87a5d3ce9a9d86
224N/ACOMPONENT_ARCHIVE_URL= \
224N/A http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
6225N/ACOMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).sha512.asc
1258N/ACOMPONENT_BUGDB= service/dns-server
7284N/ATPNO= 32362
2899N/A
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
224N/A
6225N/A# PYVER is important for packaging and computing requisites.
6225N/APYTHON_VERSION = 3.4
6225N/APKG_MACROS += PYVER=$(PYTHON_VERSION)
6225N/A
6509N/A# Some patches need configure script re-creation.
6509N/ACOMPONENT_PREP_ACTION +=(cd $(@D); autoreconf -vfi);
6509N/A
5666N/A# Specify "configure" options and features.
5666N/A# FYI, The configure options are displayed by 'named -V'.
5666N/ACONFIGURE_OPTIONS += --enable-full-report
6225N/A# Python: specifying version helps with packaging.
6225N/ACONFIGURE_OPTIONS += --with-python=$(PYTHON.$(PYTHON_VERSION))
6225N/A# - libtool: Build dynamic libraries, static libraries are not shipped.
5666N/ACONFIGURE_OPTIONS += --with-libtool
6225N/A# - openssl: use openssl, required for DNSSEC features.
5666N/ACONFIGURE_OPTIONS += --with-openssl
6225N/A# - pkcs11: Use openSSL pkcs11 engine (KMIP/KMS)
5666N/ACONFIGURE_OPTIONS += --with-pkcs11
5666N/A# - Use xml2-config found uder /usr without checking its version.
5680N/ACONFIGURE_OPTIONS += --with-libxml2=$(USRDIR)
5680N/ACONFIGURE_OPTIONS += --enable-threads
5680N/ACONFIGURE_OPTIONS += --enable-devpoll
5666N/A# - Enabled fixed [order] resource-record sets for backward compatibility.
5666N/A# - Requires more memory to store the sets so is not the default.
5666N/ACONFIGURE_OPTIONS += --enable-fixed-rrset
224N/A
5666N/A# Override / set specific pathnames:
5666N/A# - DNS libraries are in usr/lib/dns - Override settings from configure.mk
5666N/ACONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib/dns/$(MACH64)
5680N/ACONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
5680N/ACONFIGURE_OPTIONS += --localstatedir=$(VARDIR)
5666N/ACONFIGURE_OPTIONS += --with-randomdev=/dev/random
6093N/ACONFIGURE_OPTIONS += --with-gssapi=krb5-config
6225N/ACONFIGURE_OPTIONS += --with-docbook-xsl=/usr/share/sgml/docbook
224N/A
5666N/A# Compiler and compiler options:
5666N/A# - configure will add "-mt" to CC which is already set in CFLAGS, so override.
5666N/ACONFIGURE_OPTIONS += CC="$(CC)"
1392N/A
5666N/A# Test configuration / helper targets:
5666N/ACOMPONENT_TEST_MASTER = \
5666N/A $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
3477N/A
5666N/A# Run BIND testing without test interfaces configured (limited testing).
5666N/ACOMPONENT_TEST_TARGETS = force-test
224N/A
5666N/A# Normalise results for comparison:
5666N/A# Remove Date and time from Start and End lines.
5666N/ACOMPONENT_TEST_TRANSFORMS += '-e "s|\(^[SE]:[^:]*:\).*|\1|"'
5666N/A# Remove task Information lines as order of that output has been seen to change.
5666N/ACOMPONENT_TEST_TRANSFORMS += '-e "/^I:/d"'
5666N/A
5666N/A# Uncomment to display summary of tests at completion.
5666N/A# COMPONENT_POST_TEST_ACTION = $(NAWK) $(summarize) $(COMPONENT_TEST_OUTPUT)
224N/A
7243N/A# Enable adiheap and adistack security extensions
7243N/AADIHEAP_MODE = $(ADIHEAP_ENABLE)
7243N/AADISTACK_MODE = $(ADISTACK_ENABLE)
7243N/A
5666N/A.PHONY: test-named-version test-summary test-clean
5666N/A# summarize is a nawk script:
5666N/A# consumes the output generated by ISC's make target and provides an
5666N/A# abridged summary. It works by looking for key elements:
224N/A# /^T:/ = Start of a test.
5666N/A# /^I:/ = Info from a test; collected for possible use later.
224N/A# /^A:/ = About: summary of the test - not used here.
5666N/A# /^S:/ = Start: pathname and date time - not used here.
5666N/A# /^E:/ = End: pathname and date time - not used here.
5666N/A# /^R:/ = Result:
5666N/A# When 'PASS' and report=1 (from command line) the result and
5666N/A# test name are displayed.
5666N/A# For all other results (failures) the result, test name and
5666N/A# other collected info is displayed.
5666N/A# Known issues may be accounted for by adding tests, for example:
5666N/A# /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
5666N/A# /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
5666N/A# Though with USERLAND automated test comparison the known
5666N/A# case is kind of obsolete now.
5666N/A# @ EOF = Display count of RESULTS:
5666N/A# i.e. R:PASS=124 R:UNTESTED=26 Total=150 if not 100% pass rate and
5666N/A# issue is not accounted for (known) the test 'issues!' is appended to
5666N/A# resulting output.
5666N/A#
224N/Asummarize= '\
224N/A /^T:/ {name=$$0;info="";}\
224N/A /^I:/ {info=sprintf("%s%s\n", info, $$0);}\
224N/A /^R:/ {test++; result[$$1]++;}\
5666N/A /^R:PASS/ { if (report) printf("%s: %s\n", $$1, name); next}\
5666N/A /^R:UNRESOLVED/ && name ~ /^T:dst:2:A/ {known++;}\
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
5666N/A#
5666N/A# COMPONENT_TEST_OUTPUT is dependent on BITS which is set depending on
5666N/A# the active build target and PYTHON_VERS!, so it's overridden here too for test-summary:
5666N/Atest-summary: BITS=64
5666N/Atest-summary:
5666N/A @echo Summary of $(COMPONENT_TEST_OUTPUT)
5666N/A @$(NAWK) $(summarize) $(COMPONENT_TEST_OUTPUT)
224N/A
5666N/Atest-named-version: install
5666N/A @if [ -e $(PROTO_DIR)$(CONFIGURE_SBINDIR.64)/named ]; then \
5666N/A echo '64bit version:'; \
5666N/A file $(PROTO_DIR)$(CONFIGURE_SBINDIR.64)/named; \
5666N/A LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.64) \
5666N/A $(PROTO_DIR)$(CONFIGURE_SBINDIR.64)/named -V; \
5666N/A else \
5666N/A echo '64bit version not found.'; \
5666N/A fi;
224N/A
5666N/Atest-clean:
6225N/A $(RM) $(TEST_64)
5666N/A
5666N/A# Package dependencies
5666N/A# Created by 'gmake REQUIRED_PACKAGES', manually verified.
6225N/AREQUIRED_PACKAGES += library/json-c
6225N/AREQUIRED_PACKAGES += library/libedit
3817N/AREQUIRED_PACKAGES += library/libxml2
3817N/AREQUIRED_PACKAGES += library/security/openssl
5666N/AREQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
3817N/AREQUIRED_PACKAGES += network/dns/bind
6225N/AREQUIRED_PACKAGES += runtime/python-34
6093N/AREQUIRED_PACKAGES += security/kerberos-5
7277N/Aifeq ($(OS_VERSION),5.11)
7277N/AREQUIRED_PACKAGES += service/security/kerberos-5
7277N/Aendif
3817N/AREQUIRED_PACKAGES += shell/ksh93
3817N/AREQUIRED_PACKAGES += system/core-os
7277N/Aifeq ($(OS_VERSION),5.11)
7277N/AREQUIRED_PACKAGES += system/library/security/gss
7277N/Aendif