usr/src/cmd/bind/Makefile.sfw
author Cyril Plisko <cyril.plisko@grigale.com>
Sat, 21 Aug 2010 11:47:07 -0700
changeset 42 b6f829cb6d9e
parent 13 971008b98b79
child 54 c8df60226931
permissions -rw-r--r--
Import sfw build 147 Bugs Fixed ---------- 4876883 TrueTime Clock driver support in xntpd fails in year 2032 6641606 Samba 3.0.x should support StartTLS or LDAPS for LDAP access. 6647164 net ads keytab add host fails to create keytab entry 6688158 winbindd: Exceeding 200 client connections, no idle connection found (Bugzilla Bug 3204) 6706912 SWAT component of Samba should be a separate package. 6725643 SUNWsmbar seems to include unused i.services 6749477 Samba source code software should include libsunwrap.a file 6770655 Samba: Bugzilla 5655 "Mac OS X 10.5.4 clients fail to authenticate with Kerberos credententials" 6785625 samba module nss_winbind.so.1 is required as 64 bit version 6852659 Update samba to 3.3.5 or later 6891889 Write keytab to file method is missing in krb5_keytab 6892860 Samba needs Directory Server 6 C-SDK 6949937 BIND validating resolver searches very aggressively for a match for its trust anchor. 6951320 NTP Bug320: restrict default ignore not working with ipv6 6952924 dig(1M) and nslookup(1M) crash in libisc:isc_socket_detach() 6954726 Update samba to 3.5.4 6955224 BIND named dns_db_getnsec3parameters() fails to assert dns_db_iszone(db) == ISC_TRUE 6969855 If autokey is set up with two copies of the same key, ntpd segfaults. 6969858 Missing refclock causes ntpd to exit without logging a reason. 6969878 Upgrade NTP to version ntp-dev 4.2.5p200 6971713 BIND 9.6.1 Makefile.sfw issues 6975270 libtspi does not link with correct _init and _fini sections

#
# 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) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
#

#pragma ident	"@(#)Makefile.sfw	1.24	10/08/04 SMI"
#

VER =		$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)

TARBALL =	$(VER).tar.gz

# Environment settings.
CONFIGURE_ENV = 	CC='$(CC)' CXX='$(CCC)'
CONFIGURE_ENV +=	PATH='$(SFW_PATH)'
CONFIGURE_ENV +=	LD_OPTIONS='-M $(SRC)/cmd/mapfile_noexstk'
CONFIGURE_ENV +=	LDFLAGS='-L$(ROOTLIB)/dns'
CONFIGURE_ENV +=	MAKE='$(CCSMAKE)'
CONFIGURE_ENV +=	LD_LIBRARY_PATH='$(CFGLIB)/dns'

# Ideally no patches should be required, where they are needed for a
# release they should be incorporated or obsoleted in the next ISC
# release.
#
PATCHES:sh=	test -f Patches/*.patch && echo Patches/*.patch || echo ${VER}

include ../Makefile.cmd

# The ISC tarball is not /usr/bin/tar friendly.
$(VER)/.patched:= UNPACKARCHIVE=$(GTAR) xfz

# CONFIGARGS is printed by 'named -V' and logged at start-up.  It is
# overridden here to prevent the long path names appearing from CC,
# LDFLAGS and CXX.
all: $(VER)/config.status
	(cd $(VER); pwd;\
	    $(env) - PATH='$(SFW_PATH)' EXT_CFLAGS='$(CFLAGS)' $(CCSMAKE) -e \
		CONFIGARGS="$(CONFIGURE_OPTIONS)")

# The openssl version check is disabled as we rely on dynamic SSL library
# which is independent of BIND.
CONFIGURE_OPTIONS +=	--with-libtool
CONFIGURE_OPTIONS +=	--bindir=$(CFGBIN)
CONFIGURE_OPTIONS +=	--sbindir=$(CFGUSRSBIN)
CONFIGURE_OPTIONS +=	--libdir=$(CFGLIB)/dns
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 +=	--disable-getifaddrs

# Configure BIND ready for compilation.
$(VER)/config.status: $(VER)/$(SFW_STAMP_PATCHED)
	(cd $(VER); pwd; $(env) - $(CONFIGURE_ENV) \
		$(SHELL) ./configure $(CONFIGURE_OPTIONS) )

# Install deliverables into ROOT.
install: all
	$(SH) ./install-bind $(VER)

# test & fulltest.  The latter configures IP addresses 10.53.0.1
# through 10.53.0.5 as aliases on the loopback interface.
# The default task is to display summary from cache file if it exists.
# To force a new test either use clean target first or specify FRC=FRC.
#
# Nawk script reads ISC output which is of the form:
# /^T:/ = Start of a test, 
# /^I:/ = info from a test;  collect in case test did not PASS...
# /^R:/ = Result. If 'PASS' then continue, else print line and collected info.
# @ EOF = Display count of RESULTS: i.e. R:PASS=124 R:UNTESTED=26 Total=150
config_ip=$(POUND_SIGN)
fulltest := config_ip = cd $(VER); $(SHELL) ./bin/tests/system/ifconfig.sh
cache_str=I: $(VER) CACHED RESULTS from

test fulltest:  all $$@.$(MACH).results
	@$(ECHO) 'Sumary of results from $@.$(MACH).results'
	@$(nawk) '\
	     /^T:/{name=$$0;info="";}\
	     /^I:/ {info=sprintf("%s%s\n", info, $$0);}\
	     /^R:/ {test++; result[$$1]++;}\
	     /^R:PASS/{next;}\
	     /^R:/{printf("%s: %s\n%s\n", $$1, name, info);}\
	     END{for (item in result) printf("%s=%d ", item, result[item]);\
		 printf("Total=%d\n",test);\
	     }' $@.$(MACH).results
	@$(tail) -1 $@.$(MACH).results | $(GREP) '^$(cache_str)' || \
		$(ECHO) '$(cache_str)' `$(date)` >> $@.$(MACH).results

test.$(MACH).results fulltest.$(MACH).results: $(FRC)
	-$(config_ip) up
	-(cd $(VER); pwd; $(env) \
	    PATH=$(SFW_PATH) \
	    MAKE=$(CCSMAKE) \
	    $(CCSMAKE) -e test) 2>&1 | $(tee) $@
	-$(config_ip) down

clean:
	$(RM) -r ./$(VER)
	$(RM) test.$(MACH).results fulltest.$(MACH).results

prog=	dig dnssec-dsfromkey dnssec-keyfromlabel dnssec-keygen dnssec-signzone \
	host in.named named named-checkconf named-checkzone ndc nslookup \
	nsupdate rndc rndc-confgen
lib=	libisc libisccc libdns libisccfg liblwres libbind9

CLOBBERFILES=$(prog:%=$(ROOT)/usr/sbin/%) $(lib:%=$(ROOT)/usr/lib/dns/%.*)

date=/usr/bin/date
env=/usr/bin/env
nawk=/usr/bin/nawk
tail=/usr/bin/tail
tee=/usr/bin/tee

include ../Makefile.targ

FRC: