commit | author | age
|
e5e44e
|
1 |
# |
SM |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
5 |
# Common Development and Distribution License (the "License"). |
|
6 |
# You may not use this file except in compliance with the License. |
|
7 |
# |
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 |
# or http://www.opensolaris.org/os/licensing. |
|
10 |
# See the License for the specific language governing permissions |
|
11 |
# and limitations under the License. |
|
12 |
# |
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
0f1b63
|
21 |
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
e5e44e
|
22 |
# |
ae1cf6
|
23 |
include ../../../make-rules/shared-macros.mk |
e5e44e
|
24 |
|
SM |
25 |
COMPONENT_NAME= bind |
ae1cf6
|
26 |
COMPONENT_VERSION= 9.10.3-P4 |
AP |
27 |
IPS_COMPONENT_VERSION= 9.10.3.4 |
e5e44e
|
28 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
SM |
29 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz |
60e6e0
|
30 |
COMPONENT_PROJECT_URL= http://www.isc.org/software/bind/ |
e5e44e
|
31 |
|
35e110
|
32 |
# hash from: sha256sum $(COMPONENT_ARCHIVE) | sed 's/\(.[^ ]*\).*/sha256:\1/' |
MS |
33 |
COMPONENT_ARCHIVE_HASH= \ |
ae1cf6
|
34 |
sha256:2ac044b5fbdf45fb45107af0df961b3b7cb5262a3bf1948ed3fe7a170dd13e3e |
e5e44e
|
35 |
COMPONENT_ARCHIVE_URL= \ |
SM |
36 |
http://ftp.isc.org/isc/bind9/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE) |
3b89c9
|
37 |
COMPONENT_BUGDB= service/dns-server |
e5e44e
|
38 |
|
ae1cf6
|
39 |
include $(WS_TOP)/make-rules/prep.mk |
AP |
40 |
include $(WS_TOP)/make-rules/configure.mk |
|
41 |
include $(WS_TOP)/make-rules/ips.mk |
e5e44e
|
42 |
|
fe5d6d
|
43 |
# Missing files in build dir without this. |
AP |
44 |
COMPONENT_PRE_CONFIGURE_ACTION = ($(CLONEY) $(SOURCE_DIR) $(@D)) |
|
45 |
|
e5e44e
|
46 |
# Build. |
SM |
47 |
# |
|
48 |
# FYI, The configure options are displayed by 'named -V'. Previously |
|
49 |
# that was overriden by setting CONFIGARGS to hide build server |
|
50 |
# pathnames. |
|
51 |
|
|
52 |
# Traditionally all BIND executables are installed in sbin not bin. |
|
53 |
# DNS libraries are in usr/lib/dns - Override settings from configure.mk |
|
54 |
CONFIGURE_BINDIR.32 = $(CONFIGURE_PREFIX)/sbin |
|
55 |
CONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib/dns |
|
56 |
|
|
57 |
CONFIGURE_OPTIONS += --with-libtool |
|
58 |
CONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_BINDIR.$(BITS)) |
|
59 |
CONFIGURE_OPTIONS += --sysconfdir=/etc |
|
60 |
CONFIGURE_OPTIONS += --localstatedir=/var |
|
61 |
CONFIGURE_OPTIONS += --with-openssl |
|
62 |
CONFIGURE_OPTIONS += --enable-threads=yes |
|
63 |
CONFIGURE_OPTIONS += --enable-devpoll=yes |
|
64 |
CONFIGURE_OPTIONS += --disable-openssl-version-check |
|
65 |
CONFIGURE_OPTIONS += --enable-fixed-rrset |
|
66 |
CONFIGURE_OPTIONS += --with-pkcs11 |
b09f00
|
67 |
# Bind configure will check for libxml2 versions 2.6.x/2.7.x/2.8.x. |
PS |
68 |
# To make it use version 2.9.x we need to skip this check by |
|
69 |
# specifying path where libxml2 is installed. |
|
70 |
CONFIGURE_OPTIONS += --with-libxml2=/usr |
e5e44e
|
71 |
|
0f1b63
|
72 |
# Enable ASLR for this component |
AC |
73 |
ASLR_MODE = $(ASLR_ENABLE) |
|
74 |
|
e5e44e
|
75 |
.PHONY: build |
SM |
76 |
build: $(BUILD_32) |
|
77 |
|
ae1cf6
|
78 |
include $(WS_TOP)/make-rules/shared-targets.mk |
e5e44e
|
79 |
|
SM |
80 |
# Install. |
|
81 |
# |
|
82 |
# Currently manual pages are distributed from pkg:/system/manual@. |
|
83 |
# While there are some changes in our manuals, for example section |
|
84 |
# numbering and additions to named(1M) for SMF - that could be fixed |
|
85 |
# by patch. |
|
86 |
# |
|
87 |
# In addition to BIND deliverables we also deliver SMF files and |
|
88 |
# migration notes. There is no need to install these extras into the |
|
89 |
# prototype directory, they are simply referenced in relevant manifest |
|
90 |
# (p5m) file. |
|
91 |
|
|
92 |
.PHONY: install |
|
93 |
install: $(INSTALL_32) |
|
94 |
|
|
95 |
# Testing. |
|
96 |
# |
|
97 |
# sumarize nawk script; reads ISC output which is of the form: |
|
98 |
# /^T:/ = Start of a test. |
|
99 |
# /^I:/ = Info from a test; colleced for possible use later. |
|
100 |
# /^A:/ = About: summary of the test - not used here. |
|
101 |
# /^R:/ = Result: If 'PASS' then continue, else print line and collected info. |
|
102 |
# Known issues may then be accounted for. |
|
103 |
# @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150 |
|
104 |
# if not 100% pass rate and issue is not known the word 'issues!' is appended |
|
105 |
# to resulting string. |
|
106 |
summarize= '\ |
|
107 |
/^T:/ {name=$$0;info="";}\ |
|
108 |
/^I:/ {info=sprintf("%s%s\n", info, $$0);}\ |
|
109 |
/^R:/ {test++; result[$$1]++;}\ |
|
110 |
/^R:PASS/ {next;}\ |
|
111 |
/^R:/ {printf("%s: %s\n%s\n", $$1, name, info);}\ |
|
112 |
/^R:UNTESTED/ && name ~ /^T:dst:2:A/ {known++;}\ |
|
113 |
/^R:UNRESOLVED/ && name ~ /^T:dst:1:A/ {known++;}\ |
|
114 |
END{for (item in result)\ |
|
115 |
printf("%s=%d ", item, result[item]);\ |
|
116 |
printf("(known=%d) Total=%d%s\n", known, test, \ |
|
117 |
((result["R:PASS"] + known) < test)? \ |
|
118 |
" issues!" : "");\ |
|
119 |
}' |
|
120 |
|
|
121 |
isc_ifconfig= ./bin/tests/system/ifconfig.sh |
|
122 |
|
|
123 |
.PHONY: test |
|
124 |
test: build $(TEST_32) |
|
125 |
|
|
126 |
# fulltest requires sufficient privileges to configures IP addresses |
|
127 |
# 10.53.0.1 through 10.53.0.5 as aliases on the loopback interface. |
|
128 |
FULL_TEST_32= $(TEST_32:%=%_FULL) |
|
129 |
|
|
130 |
.PHONY: fulltest |
|
131 |
fulltest: build $(FULL_TEST_32) |
|
132 |
|
|
133 |
$(FULL_TEST_32): |
|
134 |
cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) up |
|
135 |
-cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@ |
|
136 |
cd $(COMPONENT_SRC) && $(SHELL) $(isc_ifconfig) down |
|
137 |
$(NAWK) $(summarize) $@ |
|
138 |
|
|
139 |
$(TEST_32): |
|
140 |
-cd $(@D) && $(MAKE) test 2>&1 | $(TEE) $@ |
|
141 |
$(NAWK) $(summarize) $@ |
|
142 |
|
|
143 |
# test-summary shows summary for targets test and fulltest. Use target |
|
144 |
# test-clean to remove previous tests. |
|
145 |
.PHONY: test-summary |
|
146 |
test-summary: |
|
147 |
@for file in $(TEST_32)*; do \ |
|
148 |
if [ -f $$file ]; then \ |
|
149 |
echo 'Summary for' $$file;\ |
|
150 |
$(NAWK) $(summarize) $$file;\ |
|
151 |
fi;\ |
|
152 |
done |
|
153 |
|
|
154 |
.PHONY: test-version |
|
155 |
test-version: |
|
156 |
@echo;echo 32 bit version |
|
157 |
-LD_LIBRARY_PATH=$(PROTO_DIR)$(CONFIGURE_LIBDIR.32) \ |
|
158 |
$(PROTO_DIR)$(CONFIGURE_BINDIR.32)/named -V |
|
159 |
|
|
160 |
.PHONY: test-clean |
|
161 |
test-clean: |
|
162 |
$(RM) $(TEST_32) $(FULL_TEST_32) |
|
163 |
|
|
164 |
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) |
|
165 |
|
ae1cf6
|
166 |
include $(WS_TOP)/make-rules/depend.mk |