--- a/components/bind/Makefile Tue Mar 29 09:21:13 2016 +0100
+++ b/components/bind/Makefile Tue Mar 29 09:21:13 2016 +0100
@@ -24,8 +24,8 @@
COMPONENT_NAME= bind
COMPONENT_VERSION= 9.6-ESV-R11
-HUMAN_VERSION= $(COMPONENT_VERSION)-P5
-IPS_COMPONENT_VERSION= 9.6.3.11.5
+HUMAN_VERSION= $(COMPONENT_VERSION)-P6
+IPS_COMPONENT_VERSION= 9.6.3.11.6
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
COMPONENT_PROJECT_URL= http://www.isc.org/software/bind/
@@ -43,75 +43,89 @@
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk
-# Build.
-#
-# FYI, The configure options are displayed by 'named -V'. Previously
-# that was overriden by setting CONFIGARGS to hide build server
-# pathnames.
+# Specify "configure" options and features.
+# FYI, The configure options are displayed by 'named -V'.
+CONFIGURE_OPTIONS += --enable-full-report
+# - Build dynamic libraries, static libraries are not shipped.
+CONFIGURE_OPTIONS += --with-libtool
+# - Use openssl, but don't check version as that is also delivered dynamically.
+CONFIGURE_OPTIONS += --with-openssl
+CONFIGURE_OPTIONS += --disable-openssl-version-check
+CONFIGURE_OPTIONS += --with-pkcs11
+# - Use xml2-config found uder /usr without checking its version.
+CONFIGURE_OPTIONS += --with-libxml2=/usr
+CONFIGURE_OPTIONS += --enable-threads=yes
+CONFIGURE_OPTIONS += --enable-devpoll=yes
+# - 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
-# Traditionally all BIND executables are installed in sbin not bin.
-# DNS libraries are in usr/lib/dns - Override settings from configure.mk
-CONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/sbin
+# Override / set specific pathnames:
+# - DNS libraries are in usr/lib/dns - Override settings from configure.mk
CONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib/dns
-
-CONFIGURE_OPTIONS += --with-libtool
-CONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_BINDIR.$(BITS))
+CONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib/dns/$(MACH64)
+# - Traditionally all BIND executables are installed in sbin not bin.
+CONFIGURE_BINDIR.32 = $(CONFIGURE_SBINDIR.32)
+CONFIGURE_BINDIR.64 = $(CONFIGURE_SBINDIR.32)
+CONFIGURE_SBINDIR.64 = $(CONFIGURE_SBINDIR.32)
CONFIGURE_OPTIONS += --sysconfdir=/etc
CONFIGURE_OPTIONS += --localstatedir=/var
-CONFIGURE_OPTIONS += --with-openssl
-CONFIGURE_OPTIONS += --enable-threads=yes
-CONFIGURE_OPTIONS += --enable-devpoll=yes
-CONFIGURE_OPTIONS += --disable-openssl-version-check
-CONFIGURE_OPTIONS += --enable-fixed-rrset
-CONFIGURE_OPTIONS += --with-pkcs11
-# Bind configure will check for libxml2 versions 2.6.x/2.7.x/2.8.x.
-# To make it use version 2.9.x we need to skip this check by
-# specifying path where libxml2 is installed.
-CONFIGURE_OPTIONS += --with-libxml2=/usr
+CONFIGURE_OPTIONS += --with-randomdev=/dev/random
+# Compiler and compiler options:
+# - configure will add "-mt" to CC which is already set in CFLAGS, so override.
+CONFIGURE_OPTIONS += CC="$(CC)"
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
-# Configure will add "-mt" to CC which is already set in CFLAGS, so override.
-CONFIGURE_OPTIONS += CC="$(CC)"
# Enable ASLR for this component
ASLR_MODE = $(ASLR_ENABLE)
-.PHONY: build
-configure: $(CONFIGURE_32)
+# Test configuration / helper targets:
+COMPONENT_TEST_MASTER = \
+ $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
-build: $(BUILD_32)
+# Run BIND testing without test interfaces configured (limited testing).
+COMPONENT_TEST_TARGETS = force-test
-# Install.
-#
-# While there are some changes in our manuals, for example additions
-# to named(8) for SMF - that could be fixed by patch.
-#
-# In addition to BIND deliverables we also deliver SMF files and
-# migration notes. There is no need to install these extras into the
-# prototype directory, they are simply referenced in relevant manifest
-# (p5m) file.
+# 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)
-.PHONY: install
-install: $(INSTALL_32)
-
-# Testing.
-#
-# sumarize nawk script; reads ISC output which is of the form:
+.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; colleced for possible use later.
+# /^I:/ = Info from a test; collected for possible use later.
# /^A:/ = About: summary of the test - not used here.
-# /^R:/ = Result: If 'PASS' then continue, else print line and collected info.
-# Known issues may then be accounted for by adding tests, for example:
-# /^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\
-# /^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\
-# @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150
-# if not 100% pass rate and issue is not known the word 'issues!' is appended
-# to resulting string.
+# /^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/ {next;}\
+ /^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]);\
@@ -120,55 +134,53 @@
" issues!" : "");\
}'
-isc_ifconfig= ./bin/tests/system/ifconfig.sh
-
-.PHONY: test
-test: build $(TEST_32)
-# Add the build dependency as for the test target above once the system-test
-# target is implemented.
-system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
-
-# fulltest requires sufficient privileges to configures IP addresses
-# 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface.
-# Note PATH is being set so that isc_ifconfig can find ifconfig.
-FULL_TEST_32= $(TEST_32:%=%_FULL)
-
-.PHONY: fulltest
-fulltest: build $(FULL_TEST_32)
-
-$(FULL_TEST_32):
- cd $(COMPONENT_SRC) && PATH=/sbin:$(PATH) $(SHELL) $(isc_ifconfig) up
- -cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@
- -cd $(COMPONENT_SRC) && PATH=/sbin:$(PATH) $(SHELL) $(isc_ifconfig) down
- $(NAWK) $(summarize) $@
+#
+# 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_32):
- -cd $(@D) && $(MAKE) force-test 2>&1 | $(TEE) $@
- $(NAWK) $(summarize) $@
+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;
+ @if [ -e $(PROTO_DIR)$(CONFIGURE_SBINDIR.32)/named ]; then \
+ echo '32bit version:'; \
+ file $(PROTO_DIR)$(CONFIGURE_SBINDIR.32)/named; \
+ LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.32) \
+ $(PROTO_DIR)$(CONFIGURE_SBINDIR.32)/named -V; \
+ else \
+ echo '32bit version not found.'; \
+ fi;
-# test-summary shows summary for targets test and fulltest. Use target
-# test-clean to remove previous tests.
-.PHONY: test-summary
-test-summary:
- @for file in $(TEST_32)*; do \
- if [ -f $$file ]; then \
- echo 'Summary for' $$file;\
- $(NAWK) $(summarize) $$file;\
- fi;\
- done
+test-clean:
+ $(RM) $(TEST_32_and_64)
+
+# Common Command line targets
+.PHONY: configure build install test system-test
+
+configure: $(CONFIGURE_64)
-.PHONY: test-version
-test-version:
- @echo;echo 32 bit version
- -LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.32) \
- $(PROTO_DIR)$(CONFIGURE_BINDIR.32)/named -V
+build: $(BUILD_64)
+
+install: $(INSTALL_64)
-.PHONY: test-clean
-test-clean:
- $(RM) $(TEST_32) $(FULL_TEST_32)
+test: $(TEST_64)
+system-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
+
+# Package dependencies
+# Created by 'gmake REQUIRED_PACKAGES', manually verified.
REQUIRED_PACKAGES += library/libxml2
REQUIRED_PACKAGES += library/security/openssl
+REQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
REQUIRED_PACKAGES += network/dns/bind
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/core-os