pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/bind912



Module Name:    pkgsrc
Committed By:   taca
Date:           Sun Sep  9 13:16:02 UTC 2018

Added Files:
        pkgsrc/net/bind912: DESCR MESSAGE Makefile PLIST buildlink3.mk
            builtin.mk distinfo options.mk
        pkgsrc/net/bind912/files: named9.sh
        pkgsrc/net/bind912/files/smf: manifest.xml named.sh
        pkgsrc/net/bind912/patches: patch-bin_tests_system_metadata_tests.sh
            patch-config.threads.in patch-configure
            patch-contrib_dlz_config.dlz.in patch-lib_dns_rbt.c
            patch-lib_isc_unix_socket.c

Log Message:
net/bind912: Added BIND 9.12 package

Add bind-9.12.2pl1 (BIND 9.12.2-P1) pacakge.

Note: named(8) requires writable permission to current directory when
start up or the directory specified by "directory" in options statement.

BIND, the Berkeley Internet Name Daemon, version 9 is a major rewrite
of nearly all aspects of the underlying BIND architecture.  Some
of the important features of BIND-9 are:

        - DNS Security
        - IP version 6
        - DNS Protocol Enhancements
        - Views
        - Multiprocessor Support
        - Improved Portability Architecture
        - Full NSEC3 support
        - Automatic zone re-signing
        - New update-policy methods tcp-self and 6to4-self

This package contains the BIND 9.12 release.

        - named and related libraries have been substantially refactored for
          improved query performance.
        - Code implementing the name server query processing logic has been
          moved into a new libns library.
        - The DNS Response Policy Service API (DNSRPS) is now supported.
        - Log file timestamps can now also be formatted in ISO 8601 (local)
          or ISO 8601 (UTC) formats.
        - Added support for the EDNS Padding and Keepalive options.
        - 'new-zones-directory' option sets the location where the
          configuration data for zones added by rndc addzone is stored.
        - The default key algorithm in rndc-confgen is now hmac-sha256.
        - filter-aaaa-on-v4 and filter-aaaa-on-v6 options are now available
          by default without a configure option.
        - The obsolete isc-hmac-fixup command has been removed.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/net/bind912/DESCR pkgsrc/net/bind912/MESSAGE \
    pkgsrc/net/bind912/Makefile pkgsrc/net/bind912/PLIST \
    pkgsrc/net/bind912/buildlink3.mk pkgsrc/net/bind912/builtin.mk \
    pkgsrc/net/bind912/distinfo pkgsrc/net/bind912/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/net/bind912/files/named9.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/net/bind912/files/smf/manifest.xml \
    pkgsrc/net/bind912/files/smf/named.sh
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/net/bind912/patches/patch-bin_tests_system_metadata_tests.sh \
    pkgsrc/net/bind912/patches/patch-config.threads.in \
    pkgsrc/net/bind912/patches/patch-configure \
    pkgsrc/net/bind912/patches/patch-contrib_dlz_config.dlz.in \
    pkgsrc/net/bind912/patches/patch-lib_dns_rbt.c \
    pkgsrc/net/bind912/patches/patch-lib_isc_unix_socket.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/net/bind912/DESCR
diff -u /dev/null pkgsrc/net/bind912/DESCR:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/DESCR    Sun Sep  9 13:16:01 2018
@@ -0,0 +1,30 @@
+BIND, the Berkeley Internet Name Daemon, version 9 is a major rewrite
+of nearly all aspects of the underlying BIND architecture.  Some
+of the important features of BIND-9 are:
+
+       - DNS Security
+       - IP version 6
+       - DNS Protocol Enhancements
+       - Views
+       - Multiprocessor Support
+       - Improved Portability Architecture
+       - Full NSEC3 support
+       - Automatic zone re-signing
+       - New update-policy methods tcp-self and 6to4-self
+
+This package contains the BIND 9.12 release.
+
+       - named and related libraries have been substantially refactored for
+         improved query performance.
+       - Code implementing the name server query processing logic has been
+         moved into a new libns library.
+       - The DNS Response Policy Service API (DNSRPS) is now supported.
+       - Log file timestamps can now also be formatted in ISO 8601 (local)
+         or ISO 8601 (UTC) formats.
+       - Added support for the EDNS Padding and Keepalive options.
+       - 'new-zones-directory' option sets the location where the
+         configuration data for zones added by rndc addzone is stored.
+       - The default key algorithm in rndc-confgen is now hmac-sha256.
+       - filter-aaaa-on-v4 and filter-aaaa-on-v6 options are now available
+         by default without a configure option.
+       - The obsolete isc-hmac-fixup command has been removed.
Index: pkgsrc/net/bind912/MESSAGE
diff -u /dev/null pkgsrc/net/bind912/MESSAGE:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/MESSAGE  Sun Sep  9 13:16:01 2018
@@ -0,0 +1,13 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+Please consider running BIND under the pseudo user account "${BIND_USER}"
+in a chroot environment for security reasons.
+
+To achieve this, set the variable "named_chrootdir" in /etc/rc.conf to
+the directory with the chroot environment e.g. "${BIND_DIR}".
+
+Note: named(8) requires writable permission to current directory when
+start up or the directory specified by "directory" in options statement.
+
+===========================================================================
Index: pkgsrc/net/bind912/Makefile
diff -u /dev/null pkgsrc/net/bind912/Makefile:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/Makefile Sun Sep  9 13:16:01 2018
@@ -0,0 +1,79 @@
+# $NetBSD: Makefile,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+DISTNAME=      bind-${BIND_VERSION}
+PKGNAME=       ${DISTNAME:S/-P/pl/}
+CATEGORIES=    net
+MASTER_SITES=  ftp://ftp.isc.org/isc/bind9/${BIND_VERSION}/
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://www.isc.org/software/bind/
+COMMENT=       Berkeley Internet Name Daemon implementation of DNS, version 9.11
+LICENSE=       mpl-2.0
+
+CONFLICTS+=    host-[0-9]*
+
+MAKE_JOBS_SAFE=        no
+USE_CWRAPPERS= no
+
+BIND_VERSION=  9.12.2-P1
+
+.include "../../mk/bsd.prefs.mk"
+
+BUILD_DEFS+=   BIND_DIR VARBASE
+
+.include "options.mk"
+
+USE_TOOLS+=            pax perl pkg-config
+USE_LIBTOOL=           yes
+GNU_CONFIGURE=         yes
+#CONFIG_SHELL=         sh -x
+
+CONFIGURE_ARGS+=       --with-libtool
+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=       --localstatedir=${VARBASE}
+CONFIGURE_ARGS+=       --disable-openssl-version-check
+CONFIGURE_ARGS+=       --with-openssl=${SSLBASE:Q}
+CONFIGURE_ARGS+=       --with-python=no
+.if ${MACHINE_PLATFORM:MNetBSD-*-mipsel} != ""
+CONFIGURE_ARGS+=       --disable-atomic
+.endif
+.if ${MACHINE_PLATFORM:MNetBSD-*-powerpc} != ""
+CONFIGURE_ARGS+=       --disable-threads
+.endif
+CONFIGURE_ARGS.DragonFly+=     --disable-kqueue
+
+PKG_GROUPS_VARS+=      BIND_GROUP
+PKG_USERS_VARS=                BIND_USER
+
+PKG_GROUPS=            ${BIND_GROUP}
+PKG_USERS=             ${BIND_USER}:${BIND_GROUP}
+
+PKG_GECOS.${BIND_USER}=        Named pseudo-user
+PKG_HOME.${BIND_USER}= ${BIND_DIR}
+
+DOCS=                  CHANGES HISTORY OPTIONS README
+
+FILES_SUBST+=          BIND_GROUP=${BIND_GROUP} \
+                       BIND_USER=${BIND_USER} PAX=${PAX:Q} \
+                       SSLBASE=${SSLBASE}
+MESSAGE_SUBST+=                BIND_DIR=${BIND_DIR} BIND_USER=${BIND_USER}
+
+DOCDIR=                        share/doc/bind9
+
+RCD_SCRIPTS=           named9
+SMF_METHODS=           named
+
+INSTALL_MAKE_FLAGS+=   sysconfdir=${PREFIX}/share/examples/bind9
+CONF_FILES+=           share/examples/bind9/bind.keys \
+                       ${PKG_SYSCONFDIR}/bind.keys
+
+INSTALLATION_DIRS+=    ${DOCDIR} ${DOCDIR}/arm
+
+post-install:
+.for f in ${DOCS}
+       ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${DOCDIR}
+.endfor
+       ${INSTALL_DATA} ${WRKSRC}/doc/arm/*.html ${DESTDIR}${PREFIX}/${DOCDIR}/arm
+
+.include "../../security/openssl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/net/bind912/PLIST
diff -u /dev/null pkgsrc/net/bind912/PLIST:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/PLIST    Sun Sep  9 13:16:01 2018
@@ -0,0 +1,395 @@
+@comment $NetBSD: PLIST,v 1.1 2018/09/09 13:16:01 taca Exp $
+bin/arpaname
+bin/bind9-config
+bin/delv
+bin/dig
+bin/host
+bin/isc-config.sh
+bin/mdig
+bin/named-rrchecker
+bin/nslookup
+bin/nsupdate
+include/bind9/check.h
+include/bind9/getaddresses.h
+include/bind9/version.h
+include/dns/acl.h
+include/dns/adb.h
+include/dns/badcache.h
+include/dns/bit.h
+include/dns/byaddr.h
+include/dns/cache.h
+include/dns/callbacks.h
+include/dns/catz.h
+include/dns/cert.h
+include/dns/client.h
+include/dns/clientinfo.h
+include/dns/compress.h
+include/dns/db.h
+include/dns/dbiterator.h
+include/dns/dbtable.h
+include/dns/diff.h
+include/dns/dispatch.h
+include/dns/dlz.h
+include/dns/dlz_dlopen.h
+include/dns/dns64.h
+include/dns/dnsrps.h
+include/dns/dnssec.h
+include/dns/dnstap.h
+include/dns/ds.h
+include/dns/dsdigest.h
+include/dns/dyndb.h
+include/dns/ecdb.h
+include/dns/ecs.h
+include/dns/edns.h
+include/dns/enumclass.h
+include/dns/enumtype.h
+include/dns/events.h
+include/dns/fixedname.h
+include/dns/forward.h
+include/dns/geoip.h
+include/dns/ipkeylist.h
+include/dns/iptable.h
+include/dns/journal.h
+include/dns/keydata.h
+include/dns/keyflags.h
+include/dns/keytable.h
+include/dns/keyvalues.h
+include/dns/lib.h
+include/dns/librpz.h
+include/dns/log.h
+include/dns/lookup.h
+include/dns/master.h
+include/dns/masterdump.h
+include/dns/message.h
+include/dns/name.h
+include/dns/ncache.h
+include/dns/nsec.h
+include/dns/nsec3.h
+include/dns/nta.h
+include/dns/opcode.h
+include/dns/order.h
+include/dns/peer.h
+include/dns/portlist.h
+include/dns/private.h
+include/dns/rbt.h
+include/dns/rcode.h
+include/dns/rdata.h
+include/dns/rdataclass.h
+include/dns/rdatalist.h
+include/dns/rdataset.h
+include/dns/rdatasetiter.h
+include/dns/rdataslab.h
+include/dns/rdatastruct.h
+include/dns/rdatatype.h
+include/dns/request.h
+include/dns/resolver.h
+include/dns/result.h
+include/dns/rootns.h
+include/dns/rpz.h
+include/dns/rriterator.h
+include/dns/rrl.h
+include/dns/sdb.h
+include/dns/sdlz.h
+include/dns/secalg.h
+include/dns/secproto.h
+include/dns/soa.h
+include/dns/ssu.h
+include/dns/stats.h
+include/dns/tcpmsg.h
+include/dns/time.h
+include/dns/timer.h
+include/dns/tkey.h
+include/dns/tsec.h
+include/dns/tsig.h
+include/dns/ttl.h
+include/dns/types.h
+include/dns/update.h
+include/dns/validator.h
+include/dns/version.h
+include/dns/view.h
+include/dns/xfrin.h
+include/dns/zone.h
+include/dns/zonekey.h
+include/dns/zt.h
+include/dst/dst.h
+include/dst/gssapi.h
+include/dst/lib.h
+include/dst/result.h
+include/irs/context.h
+include/irs/dnsconf.h
+include/irs/netdb.h
+include/irs/platform.h
+include/irs/resconf.h
+include/irs/types.h
+include/irs/version.h
+include/isc/aes.h
+include/isc/app.h
+include/isc/assertions.h
+include/isc/atomic.h
+include/isc/backtrace.h
+include/isc/base32.h
+include/isc/base64.h
+include/isc/bind9.h
+include/isc/boolean.h
+include/isc/buffer.h
+include/isc/bufferlist.h
+include/isc/commandline.h
+include/isc/condition.h
+include/isc/counter.h
+include/isc/crc64.h
+include/isc/deprecated.h
+include/isc/dir.h
+include/isc/entropy.h
+include/isc/errno.h
+include/isc/error.h
+include/isc/event.h
+include/isc/eventclass.h
+include/isc/file.h
+include/isc/formatcheck.h
+include/isc/fsaccess.h
+include/isc/fuzz.h
+include/isc/hash.h
+include/isc/heap.h
+include/isc/hex.h
+include/isc/hmacmd5.h
+include/isc/hmacsha.h
+include/isc/ht.h
+include/isc/httpd.h
+include/isc/int.h
+include/isc/interfaceiter.h
+${PLIST.inet6}include/isc/ipv6.h
+include/isc/iterated_hash.h
+include/isc/json.h
+include/isc/keyboard.h
+include/isc/lang.h
+include/isc/lex.h
+include/isc/lfsr.h
+include/isc/lib.h
+include/isc/likely.h
+include/isc/list.h
+include/isc/log.h
+include/isc/magic.h
+include/isc/md5.h
+include/isc/mem.h
+include/isc/meminfo.h
+include/isc/msgcat.h
+include/isc/msgs.h
+include/isc/mutex.h
+include/isc/mutexblock.h
+include/isc/net.h
+include/isc/netaddr.h
+include/isc/netdb.h
+include/isc/netscope.h
+include/isc/offset.h
+include/isc/once.h
+include/isc/ondestroy.h
+include/isc/os.h
+include/isc/parseint.h
+include/isc/platform.h
+include/isc/pool.h
+include/isc/portset.h
+include/isc/print.h
+include/isc/queue.h
+include/isc/quota.h
+include/isc/radix.h
+include/isc/random.h
+include/isc/ratelimiter.h
+include/isc/refcount.h
+include/isc/regex.h
+include/isc/region.h
+include/isc/resource.h
+include/isc/result.h
+include/isc/resultclass.h
+include/isc/rwlock.h
+include/isc/safe.h
+include/isc/serial.h
+include/isc/sha1.h
+include/isc/sha2.h
+include/isc/sockaddr.h
+include/isc/socket.h
+include/isc/stat.h
+include/isc/stats.h
+include/isc/stdio.h
+include/isc/stdlib.h
+include/isc/stdtime.h
+include/isc/strerror.h
+include/isc/string.h
+include/isc/symtab.h
+include/isc/syslog.h
+include/isc/task.h
+include/isc/taskpool.h
+include/isc/thread.h
+include/isc/time.h
+include/isc/timer.h
+include/isc/tm.h
+include/isc/types.h
+include/isc/util.h
+include/isc/version.h
+include/isc/xml.h
+include/isccc/alist.h
+include/isccc/base64.h
+include/isccc/cc.h
+include/isccc/ccmsg.h
+include/isccc/events.h
+include/isccc/lib.h
+include/isccc/result.h
+include/isccc/sexpr.h
+include/isccc/symtab.h
+include/isccc/symtype.h
+include/isccc/types.h
+include/isccc/util.h
+include/isccc/version.h
+include/isccfg/aclconf.h
+include/isccfg/cfg.h
+include/isccfg/dnsconf.h
+include/isccfg/grammar.h
+include/isccfg/log.h
+include/isccfg/namedconf.h
+include/isccfg/version.h
+include/ns/client.h
+include/ns/interfacemgr.h
+include/ns/lib.h
+include/ns/listenlist.h
+include/ns/log.h
+include/ns/notify.h
+include/ns/query.h
+include/ns/server.h
+include/ns/sortlist.h
+include/ns/stats.h
+include/ns/types.h
+include/ns/update.h
+include/ns/version.h
+include/ns/xfrout.h
+include/pk11/constants.h
+include/pk11/internal.h
+include/pk11/pk11.h
+include/pk11/result.h
+include/pk11/site.h
+include/pkcs11/cryptoki.h
+include/pkcs11/eddsa.h
+include/pkcs11/pkcs11.h
+include/pkcs11/pkcs11f.h
+include/pkcs11/pkcs11t.h
+lib/libbind9.la
+lib/libdns.la
+lib/libirs.la
+lib/libisc.la
+lib/libisccc.la
+lib/libisccfg.la
+lib/libns.la
+man/man1/arpaname.1
+man/man1/bind9-config.1
+man/man1/delv.1
+man/man1/dig.1
+man/man1/host.1
+man/man1/isc-config.sh.1
+man/man1/mdig.1
+man/man1/named-rrchecker.1
+man/man1/nslookup.1
+man/man1/nsupdate.1
+man/man5/named.conf.5
+man/man5/rndc.conf.5
+man/man8/ddns-confgen.8
+man/man8/dnssec-cds.8
+man/man8/dnssec-dsfromkey.8
+man/man8/dnssec-importkey.8
+man/man8/dnssec-keyfromlabel.8
+man/man8/dnssec-keygen.8
+man/man8/dnssec-revoke.8
+man/man8/dnssec-settime.8
+man/man8/dnssec-signzone.8
+man/man8/dnssec-verify.8
+man/man8/genrandom.8
+man/man8/named-checkconf.8
+man/man8/named-checkzone.8
+man/man8/named-compilezone.8
+man/man8/named-journalprint.8
+man/man8/named.8
+man/man8/nsec3hash.8
+${PLIST.pkcs11}man/man8/pkcs11-destroy.8
+${PLIST.pkcs11}man/man8/pkcs11-keygen.8
+${PLIST.pkcs11}man/man8/pkcs11-list.8
+${PLIST.pkcs11}man/man8/pkcs11-tokens.8
+man/man8/rndc-confgen.8
+man/man8/rndc.8
+man/man8/tsig-keygen.8
+sbin/ddns-confgen
+sbin/dnssec-cds
+sbin/dnssec-dsfromkey
+sbin/dnssec-importkey
+sbin/dnssec-keyfromlabel
+sbin/dnssec-keygen
+sbin/dnssec-revoke
+sbin/dnssec-settime
+sbin/dnssec-signzone
+sbin/dnssec-verify
+sbin/genrandom
+sbin/named
+sbin/named-checkconf
+sbin/named-checkzone
+sbin/named-compilezone
+sbin/named-journalprint
+sbin/nsec3hash
+${PLIST.pkcs11}sbin/pkcs11-destroy
+${PLIST.pkcs11}sbin/pkcs11-keygen
+${PLIST.pkcs11}sbin/pkcs11-list
+${PLIST.pkcs11}sbin/pkcs11-tokens
+sbin/rndc
+sbin/rndc-confgen
+sbin/tsig-keygen
+share/doc/bind9/CHANGES
+share/doc/bind9/HISTORY
+share/doc/bind9/OPTIONS
+share/doc/bind9/README
+share/doc/bind9/arm/Bv9ARM.ch01.html
+share/doc/bind9/arm/Bv9ARM.ch02.html
+share/doc/bind9/arm/Bv9ARM.ch03.html
+share/doc/bind9/arm/Bv9ARM.ch04.html
+share/doc/bind9/arm/Bv9ARM.ch05.html
+share/doc/bind9/arm/Bv9ARM.ch06.html
+share/doc/bind9/arm/Bv9ARM.ch07.html
+share/doc/bind9/arm/Bv9ARM.ch08.html
+share/doc/bind9/arm/Bv9ARM.ch09.html
+share/doc/bind9/arm/Bv9ARM.ch10.html
+share/doc/bind9/arm/Bv9ARM.ch11.html
+share/doc/bind9/arm/Bv9ARM.ch12.html
+share/doc/bind9/arm/Bv9ARM.html
+share/doc/bind9/arm/man.arpaname.html
+share/doc/bind9/arm/man.ddns-confgen.html
+share/doc/bind9/arm/man.delv.html
+share/doc/bind9/arm/man.dig.html
+share/doc/bind9/arm/man.dnssec-cds.html
+share/doc/bind9/arm/man.dnssec-checkds.html
+share/doc/bind9/arm/man.dnssec-coverage.html
+share/doc/bind9/arm/man.dnssec-dsfromkey.html
+share/doc/bind9/arm/man.dnssec-importkey.html
+share/doc/bind9/arm/man.dnssec-keyfromlabel.html
+share/doc/bind9/arm/man.dnssec-keygen.html
+share/doc/bind9/arm/man.dnssec-keymgr.html
+share/doc/bind9/arm/man.dnssec-revoke.html
+share/doc/bind9/arm/man.dnssec-settime.html
+share/doc/bind9/arm/man.dnssec-signzone.html
+share/doc/bind9/arm/man.dnssec-verify.html
+share/doc/bind9/arm/man.dnstap-read.html
+share/doc/bind9/arm/man.genrandom.html
+share/doc/bind9/arm/man.host.html
+share/doc/bind9/arm/man.mdig.html
+share/doc/bind9/arm/man.named-checkconf.html
+share/doc/bind9/arm/man.named-checkzone.html
+share/doc/bind9/arm/man.named-journalprint.html
+share/doc/bind9/arm/man.named-nzd2nzf.html
+share/doc/bind9/arm/man.named-rrchecker.html
+share/doc/bind9/arm/man.named.conf.html
+share/doc/bind9/arm/man.named.html
+share/doc/bind9/arm/man.nsec3hash.html
+share/doc/bind9/arm/man.nslookup.html
+share/doc/bind9/arm/man.nsupdate.html
+share/doc/bind9/arm/man.pkcs11-destroy.html
+share/doc/bind9/arm/man.pkcs11-keygen.html
+share/doc/bind9/arm/man.pkcs11-list.html
+share/doc/bind9/arm/man.pkcs11-tokens.html
+share/doc/bind9/arm/man.rndc-confgen.html
+share/doc/bind9/arm/man.rndc.conf.html
+share/doc/bind9/arm/man.rndc.html
+share/doc/bind9/arm/notes.html
+share/examples/bind9/bind.keys
Index: pkgsrc/net/bind912/buildlink3.mk
diff -u /dev/null pkgsrc/net/bind912/buildlink3.mk:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/buildlink3.mk    Sun Sep  9 13:16:01 2018
@@ -0,0 +1,12 @@
+# $NetBSD: buildlink3.mk,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+BUILDLINK_TREE+=       bind
+
+.if !defined(BIND_BUILDLINK3_MK)
+BIND_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.bind+=   bind>=9.11.0
+BUILDLINK_PKGSRCDIR.bind?=     ../../net/bind911
+.endif # BIND_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -bind
Index: pkgsrc/net/bind912/builtin.mk
diff -u /dev/null pkgsrc/net/bind912/builtin.mk:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/builtin.mk       Sun Sep  9 13:16:01 2018
@@ -0,0 +1,92 @@
+# $NetBSD: builtin.mk,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+BUILTIN_PKG:=  bind
+
+BUILTIN_FIND_FILES_VAR:=       EXE_NAMED
+BUILTIN_FIND_FILES.EXE_NAMED=  /usr/sbin/named
+BUILTIN_FIND_LIBS:=            bind
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Figure out the version of BIND if an ISC BIND named exists on the
+### system.
+###
+.if !defined(BUILTIN_VERSION.bind) && \
+    empty(EXE_NAMED:M__nonexistent__) && \
+    empty(EXE_NAMED:M${LOCALBASE}/*)
+BUILTIN_VERSION.bind!= \
+       ${EXE_NAMED} -v 2>/dev/null | ${HEAD} -1 |                      \
+       ${AWK} 'BEGIN { v = "4.9.11"; }                                 \
+               /^BIND / { v = $$2; sub("-.*", "", v); }                \
+               /^named / { v = $$2; sub("-.*", "", v); }               \
+               END { print v; }'
+.endif
+MAKEVARS+=     BUILTIN_VERSION.bind
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
+.if !defined(IS_BUILTIN.bind)
+IS_BUILTIN.bind=       no
+.  if defined(BUILTIN_VERSION.bind)
+IS_BUILTIN.bind=       yes
+.  endif
+.endif
+MAKEVARS+=     IS_BUILTIN.bind
+
+###
+### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
+### a package name to represent the built-in package.
+###
+.if !defined(BUILTIN_PKG.bind) && \
+    !empty(IS_BUILTIN.bind:M[yY][eE][sS]) && \
+    defined(BUILTIN_VERSION.bind)
+BUILTIN_PKG.bind=      bind-${BUILTIN_VERSION.bind}
+.endif
+MAKEVARS+=     BUILTIN_PKG.bind
+
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.bind)
+.  if ${PREFER.bind} == "pkgsrc"
+USE_BUILTIN.bind=      no
+.  else
+USE_BUILTIN.bind=      ${IS_BUILTIN.bind}
+.    if defined(BUILTIN_PKG.bind) && \
+        !empty(IS_BUILTIN.bind:M[yY][eE][sS])
+USE_BUILTIN.bind=      yes
+.      for dep in ${BUILDLINK_API_DEPENDS.bind}
+.        if !empty(USE_BUILTIN.bind:M[yY][eE][sS])
+USE_BUILTIN.bind!=                                                     \
+       if ${PKG_ADMIN} pmatch ${dep:Q} ${BUILTIN_PKG.bind:Q}; then     \
+               ${ECHO} yes;                                            \
+       else                                                            \
+               ${ECHO} no;                                             \
+       fi
+.        endif
+.      endfor
+.    endif
+.  endif  # PREFER.bind
+.endif
+MAKEVARS+=     USE_BUILTIN.bind
+
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
+CHECK_BUILTIN.bind?=   no
+.if !empty(CHECK_BUILTIN.bind:M[nN][oO])
+
+.  if !empty(USE_BUILTIN.bind:M[yY][eE][sS])
+.    if !empty(BUILTIN_LIB_FOUND.bind:M[yY][eE][sS])
+BUILDLINK_LDADD.bind?= -lbind
+.    endif
+.  elif !empty(USE_BUILTIN.bind:M[nN][oO])
+BUILDLINK_LDADD.bind?= -lbind
+.  endif
+
+.endif # CHECK_BUILTIN.bind
Index: pkgsrc/net/bind912/distinfo
diff -u /dev/null pkgsrc/net/bind912/distinfo:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/distinfo Sun Sep  9 13:16:01 2018
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+SHA1 (bind-9.12.2-P1.tar.gz) = 648d3260fb7febfbc77ed1dd977ebd3a61b203de
+RMD160 (bind-9.12.2-P1.tar.gz) = caf30def7cdcf201577b2d5f085da70aab1b811a
+SHA512 (bind-9.12.2-P1.tar.gz) = 22ce084179439518f7d82f0b80544db929bb4ec71d0e7bd7edad9ae915c903300837d6ead698c9fc23741796f0ba9ed3aa384b752ff65c3b9b20c8969d351cba
+Size (bind-9.12.2-P1.tar.gz) = 9429002 bytes
+SHA1 (patch-bin_tests_system_metadata_tests.sh) = d01a492d0b7738760bdbff714248e279a78fef28
+SHA1 (patch-config.threads.in) = 8341bdb11888d3efdde5f115de91b1f46aa40bd0
+SHA1 (patch-configure) = 020f4746544f74606ccc57cb30de7f7501a47e10
+SHA1 (patch-contrib_dlz_config.dlz.in) = 6c53d61aaaf1a952a867e4c4da0194db94f511d7
+SHA1 (patch-lib_dns_rbt.c) = 8af91b6d40b591d28d15f7f98c9b7a82df234381
+SHA1 (patch-lib_isc_unix_socket.c) = d525e84924b42eb107b00aecdbc92fbb5a3df3db
Index: pkgsrc/net/bind912/options.mk
diff -u /dev/null pkgsrc/net/bind912/options.mk:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/options.mk       Sun Sep  9 13:16:01 2018
@@ -0,0 +1,140 @@
+# $NetBSD: options.mk,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.bind911
+PKG_SUPPORTED_OPTIONS= bind-dig-sigchase bind-xml-statistics-server
+PKG_SUPPORTED_OPTIONS+=        bind-json-statistics-server
+PKG_SUPPORTED_OPTIONS+=        inet6 threads readline mysql pgsql ldap dlz-filesystem
+PKG_SUPPORTED_OPTIONS+=        fetchlimit geoip pkcs11 sit tuning
+PKG_SUGGESTED_OPTIONS+=        readline
+
+PLIST_VARS+=   inet6 pkcs11
+
+PTHREAD_OPTS+=         native
+.include "../../mk/pthread.buildlink3.mk"
+
+.if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} == "none") || \
+       !empty(MACHINE_PLATFORM:MNetBSD-*-vax) || \
+       !empty(MACHINE_PLATFORM:MNetBSD-*-sparc) || \
+       !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) || \
+       !empty(MACHINE_PLATFORM:MNetBSD-*-m68k)
+# don't touch PKG_SUGGESTED_OPTIONS
+.else
+PKG_SUGGESTED_OPTIONS+=        threads
+.endif
+
+.if empty(MISSING_FEATURES:Minet6)
+PKG_SUGGESTED_OPTIONS+=        inet6
+.else
+PLIST.inet6=   yes
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+###
+### The mysql pgsql ldap dlz-filesystem options are all for BIND
+### DLZ (Dynamically Loadable Zones) functionality
+###
+### NOTE: bdb is excluded on purpose as pkgsrc does not contain
+###       a bdb v4.1 or 4.2 package which is what BIND needs.
+###       The majority of these are compile tested only
+###
+
+.if !empty(PKG_OPTIONS:Mmysql)
+.include "../../mk/mysql.buildlink3.mk"
+CONFIGURE_ARGS+=       --with-dlz-mysql=${BUILDLINK_PREFIX.mysql-client}
+.endif
+
+.if !empty(PKG_OPTIONS:Mpgsql)
+.include "../../mk/pgsql.buildlink3.mk"
+CONFIGURE_ARGS+=       --with-dlz-postgres=${BUILDLINK_PREFIX.${PGSQL_TYPE}}
+CONFIGURE_ENV+=                ac_cv_path_PG_CONFIG=${PREFIX}/bin/pg_config
+.endif
+
+.if !empty(PKG_OPTIONS:Mldap)
+.include "../../databases/openldap-client/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-dlz-ldap=${BUILDLINK_PREFIX.openldap-client}
+.endif
+
+.if !empty(PKG_OPTIONS:Mdlz-filesystem)
+CONFIGURE_ARGS+=       --with-dlz-filesystem
+.endif
+
+.if !empty(PKG_OPTIONS:Mfetchlimit)
+CONFIGURE_ARGS+=       --enable-fetchlimit
+.endif
+
+.if !empty(PKG_OPTIONS:Mgeoip)
+CONFIGURE_ARGS+=       --with-geoip=${PREFIX}
+.include "../../net/GeoIP/buildlink3.mk"
+.endif
+
+.if !empty(PKG_OPTIONS:Mpkcs11)
+CONFIGURE_ARGS+=       --with-pkcs11=yes
+PLIST.pkcs11=          yes
+.endif
+
+.if !empty(PKG_OPTIONS:Msit)
+CONFIGURE_ARGS+=       --enable-sit
+.endif
+
+.if !empty(PKG_OPTIONS:Mtuning)
+CONFIGURE_ARGS+=       --with-tuning=large
+.endif
+
+###
+### The statistics server in bind99 and later needs libxml2
+###
+.if !empty(PKG_OPTIONS:Mbind-xml-statistics-server)
+.include "../../textproc/libxml2/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-libxml2
+.else
+CONFIGURE_ARGS+=       --without-libxml2
+.endif
+
+###
+### The statistics server in bind911 and later supports json
+###
+.if !empty(PKG_OPTIONS:Mbind-json-statistics-server)
+.include "../../textproc/json-c/buildlink3.mk"
+CONFIGURE_ARGS+=       --with-libjson
+.else
+CONFIGURE_ARGS+=       --without-libjson
+.endif
+
+###
+### IPv6 support
+###
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+=       --enable-ipv6
+.else
+CONFIGURE_ARGS+=       --disable-ipv6
+.endif
+
+###
+### pthreads support (also see magic above)
+###
+.if !empty(PKG_OPTIONS:Mthreads)
+PTHREAD_AUTO_VARS=     yes
+CONFIGURE_ARGS+=       --enable-threads
+.else
+CONFIGURE_ARGS+=       --disable-threads
+.endif
+
+###
+### readline support in dig(1) and nsupdate(1).
+###
+.if !empty(PKG_OPTIONS:Mreadline)
+.include "../../mk/readline.buildlink3.mk"
+CONFIGURE_ARGS+=       --with-readline
+.else
+CONFIGURE_ARGS+=       --without-readline
+.endif
+
+###
+### dig(1) option +sigchase for DNSSEC signature chasing
+###
+.if !empty(PKG_OPTIONS:Mbind-dig-sigchase)
+# If anything else needs to add entries to STD_CDEFINES, this will need
+# to be changed so that the two can cooperate.
+CONFIGURE_ENV+=                STD_CDEFINES=-DDIG_SIGCHASE=1
+.endif

Index: pkgsrc/net/bind912/files/named9.sh
diff -u /dev/null pkgsrc/net/bind912/files/named9.sh:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/files/named9.sh  Sun Sep  9 13:16:01 2018
@@ -0,0 +1,74 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: named9.sh,v 1.1 2018/09/09 13:16:01 taca Exp $
+#
+
+# PROVIDE: named
+# REQUIRE: NETWORKING mountcritremote syslogd
+# BEFORE:  DAEMON
+# KEYWORD: chrootdir
+
+. /etc/rc.subr
+
+name="named"
+rcvar="${name}9"
+command="@PREFIX@/sbin/${name}"
+pidfile="@VARBASE@/run/named/${name}.pid"
+start_precmd="named_precmd"
+extra_commands="reload"
+required_dirs="$named_chrootdir"       # if it is set, it must exist
+
+named_precmd()
+{
+       # Die if $named is also set (i.e. the system's named is not disabled
+       if checkyesno named ; then
+               warn \
+       "disable 'named' when setting 'named9'!"
+               return 1
+       fi
+
+               if [ ! -d @VARBASE@/run/named ]; then 
+               @MKDIR@ @VARBASE@/run/named 
+               fi      
+
+       if [ -z "$named_chrootdir" ]; then
+               return 0;
+       fi
+
+       for i in crypto null random urandom
+       do
+               if [ ! -c "${named_chrootdir}/dev/$i" ]; then
+                       @RM@ -f "${named_chrootdir}/dev/$i"
+                       (cd /dev &&
+                               @PAX@ -rw -pe "$i" "${named_chrootdir}/dev")
+               fi
+       done
+
+       if [ -f /etc/localtime ]; then
+               @CMP@ -s /etc/localtime "${named_chrootdir}/etc/localtime" || \
+                   @CP@ -p /etc/localtime "${named_chrootdir}/etc/localtime"
+       fi
+
+       if [ -f @SSLBASE@/lib/engines/libgost.so ]; then
+               if [ ! -d ${named_chrootdir}@SSLBASE@/lib/engines ]; then
+                       @MKDIR@ ${named_chrootdir}@SSLBASE@/lib/engines
+               fi
+               @CMP@ -s @SSLBASE@/lib/engines/libgost.so "${named_chrootdir}@SSLBASE@/lib/engines/libgost.so" || \
+                   @CP@ -p @SSLBASE@/lib/engines/libgost.so "${named_chrootdir}@SSLBASE@/lib/engines/libgost.so"
+       fi
+
+               if [ ! -d ${named_chrootdir}@VARBASE@/run/named ]; then 
+               @MKDIR@ ${named_chrootdir}@VARBASE@/run/named 
+               @CHOWN@ @BIND_USER@ ${named_chrootdir}@VARBASE@/run/named
+               fi      
+
+       @RM@ -f ${pidfile}
+       @LN@ -s "${named_chrootdir}${pidfile}" ${pidfile}
+
+       #       Change run_rc_commands()'s internal copy of $named_flags
+       #
+       rc_flags="-u @BIND_USER@ -t ${named_chrootdir} $rc_flags"
+}
+
+load_rc_config "$rcvar"
+run_rc_command "$1"

Index: pkgsrc/net/bind912/files/smf/manifest.xml
diff -u /dev/null pkgsrc/net/bind912/files/smf/manifest.xml:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/files/smf/manifest.xml   Sun Sep  9 13:16:01 2018
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<!--
+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
+-->
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+        Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+        Use is subject to license terms.
+
+        ident   "@(#)server.xml 1.8     07/06/19 SMI"
+-->
+<!-- Portions Copyright 2007 Vedran Bender -->
+<service_bundle type='manifest' name='export'>
+  <service name='@SMF_PREFIX@/@SMF_NAME@' type='service' version='1'>
+    <dependency name='filesystem_minimal' grouping='require_all' restart_on='none' type='service'>
+      <service_fmri value='svc:/system/filesystem/local' />
+    </dependency>
+    <dependency name='loopback' grouping='require_any' restart_on='error' type='service'>
+      <service_fmri value='svc:/network/loopback' />
+    </dependency>
+    <dependency name='network' grouping='optional_all' restart_on='error' type='service'>
+      <service_fmri value='svc:/milestone/network' />
+    </dependency>
+    <dependency name='config-files' grouping='require_any' restart_on='refresh' type='path'>
+      <service_fmri value='file://localhost@PKG_SYSCONFDIR@/named.conf' />
+    </dependency>
+    <!--
+        In order to run multiple named(1M) processes with their own
+        configuration file or properties each must have a unique
+        instance.
+    -->
+    <instance name='default' enabled='false'>
+      <exec_method type='method' name='start' exec='@PREFIX@/@SMF_METHOD_FILE.named@ %m %i' timeout_seconds='60'>
+        <method_context>
+          <method_credential user='root' group='root' />
+        </method_context>
+      </exec_method>
+      <exec_method type='method' name='stop' exec='@PREFIX@/@SMF_METHOD_FILE.named@ %m %i %{restarter/contract}' timeout_seconds='60'>
+        <method_context>
+          <method_credential user='root' group='root' />
+        </method_context>
+
+      </exec_method>
+      <!--
+              SIGHUP causes named to reread its configuration file, but not any
+              of the properties below.
+      -->
+      <exec_method type='method' name='refresh' exec=':kill -HUP' timeout_seconds='60'>
+        <method_context />
+      </exec_method>
+      <property_group name='general' type='framework'>
+        <!-- manage DNS server state -->
+        <propval name='action_authorization' type='astring' value='solaris.smf.manage.bind' />
+        <propval name='value_authorization' type='astring' value='solaris.smf.manage.bind' />
+      </property_group>
+      <!-- Default property settings for named(1M) instance. -->
+      <property_group name='options' type='application'>
+        <!--
+                server: specifies an alternative server command.  If
+                not specified the default /usr/sbin/named is used.
+        -->
+        <propval name='server' type='astring' value='' />
+        <!--
+                configuration_file: specifies an alternative
+                configuration file to be used. The property is similar
+                to named(1M) command line option '-c'
+        -->
+        <propval name='configuration_file' type='astring' value='' />
+        <!--
+                ip_interfaces: specifies which IP transport BIND will
+                transmit on. Possible values are 'IPv4' or 'IPv6'. Any
+                other setting assumes 'all', the default.
+                Equivalent command line option '-4' or '-6'.
+        -->
+        <propval name='ip_interfaces' type='astring' value='all' />
+        <!--
+                listen_on_port: Specifies the default UDP and TCP port
+                which will be used to listen for DNS requests.
+                Equivalent command line option '-p <integer>'.
+        -->
+        <propval name='listen_on_port' type='integer' value='0' />
+        <!--
+                debug_level: Specifies the default debug level.  The
+                default is 0; no debugging. The Higher the number the
+                more verbose debug information becomes.
+                Equivalent command line option '-d <integer>'.
+        -->
+        <propval name='debug_level' type='integer' value='0' />
+        <!--
+                threads: Specifies the number of cpu worker threads to
+                create.  The default of 0 causes named to try and
+                determine the number of CPUs present and create one
+                thread per CPU.
+                Equivalent command line option '-n <integer>'.
+        -->
+        <propval name='threads' type='integer' value='0' />
+        <!--
+                chroot_dir: Change the root directory using chroot(2)
+                to directory after processing the command line
+                arguments, but before reading the configuration file.
+                Equivalent command line option '-t <pathname>'.
+        -->
+        <propval name='chroot_dir' type='astring' value='' />
+       <!--
+               user: Change the user id after processing command line
+               arguments, but before reading the configuration file.
+               Equivalent command line option '-u <user>'.
+       -->
+        <propval name='user' type='astring' value='named' />
+      </property_group>
+    </instance>
+    <template>
+      <common_name>
+        <loctext xml:lang='C'>BIND DNS server</loctext>
+      </common_name>
+      <documentation>
+        <manpage title='named' section='1M' manpath='@PREFIX@/@PKGMANDIR@' />
+      </documentation>
+    </template>
+  </service>
+</service_bundle>
Index: pkgsrc/net/bind912/files/smf/named.sh
diff -u /dev/null pkgsrc/net/bind912/files/smf/named.sh:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/files/smf/named.sh       Sun Sep  9 13:16:01 2018
@@ -0,0 +1,259 @@
+#!@SMF_METHOD_SHELL@
+#
+# 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 2007 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+#pragma ident  "@(#)dns-server.sh      1.1     07/03/26 SMI"
+
+# smf_method(5) start/stop script required for server DNS
+
+. /lib/svc/share/smf_include.sh
+
+mount_chroot ()
+{
+    c=$1
+    shift
+    for f in $*; do
+        if [ -z "${f}" -o ! -f "${f}" -o \
+             -z "${c}" -o ! -d "${c}" ]; then
+             exit ${SMF_EXIT_ERR_CONFIG}
+        fi
+
+        umount ${c}/${f} >/dev/null 2>&1
+        mkdir -p `dirname ${c}/${f}`
+        touch ${c}/${f}
+        mount -Flofs ${f} ${c}/${f}
+    done
+}
+
+umount_chroot ()
+{
+    c=$1
+    shift
+    for f in $*; do
+        umount ${c}/${f} >/dev/null 2>&1
+    done
+}
+
+get_config ()
+{   
+    configuration_file=@PKG_SYSCONFDIR@/named.conf
+    rndc_config_file=@PKG_SYSCONFDIR@/rndc.conf
+    rndc_key_file=@PKG_SYSCONFDIR@/rndc.key
+    rndc_cmd_opts="-a"
+    libraries="/usr/pkg/lib/engines/libgost.so"
+    cmdopts=""
+    checkopts=""
+    properties="debug_level ip_interfaces listen_on_port
+        threads chroot_dir configuration_file server user"
+
+    for prop in $properties
+    do
+        value=`/usr/bin/svcprop -p options/${prop} ${SMF_FMRI}`
+        if [ -z "${value}" -o "${value}" = '""' ]; then
+            continue;
+        fi
+
+        case $prop in
+        'debug_level')
+            if [ ${value} -gt 0 ]; then
+                cmdopts="${cmdopts} -d ${value}"
+            fi
+            ;;
+        'ip_interfaces')
+            case ${value} in
+                'IPv4')
+                    cmdopts="${cmdopts} -4";;
+                'IPv6')
+                    cmdopts="${cmdopts} -6";;
+                'all')
+                    :   # Default is all, therefore ignore.
+                    ;;
+                *)  
+                    echo "$I: Unrecognised value in service instance property" >&2
+                    echo "$I: options/${prop} : ${value}" >&2
+                    ;;
+            esac
+            ;;
+        'listen_on_port')
+            if [ ${value} -gt 0 ]; then
+                cmdopts="${cmdopts} -p ${value}"
+            fi
+            ;;
+        'threads')
+            if [ ${value} -gt 0 ]; then
+                cmdopts="${cmdopts} -n ${value}"
+            fi
+            ;;
+        'chroot_dir')
+            cmdopts="${cmdopts} -t ${value}"
+            checkopts="${checkopts} -t ${value}"
+            chroot_dir=${value};
+            ;;
+        'configuration_file')
+            cmdopts="${cmdopts} -c ${value}"
+            checkopts="${checkopts} -t ${value}"
+            configuration_file=${value};
+            ;;
+        'server')
+            set -- `echo ${value} | /usr/bin/sed -e  's/\\\\//g'`
+            server=$@
+            ;;
+        'user')
+            cmdopts="${cmdopts} -u ${value}"
+            cmduser=${value};
+            ;;
+        esac
+    done
+
+    configuration_dir=$(sed -n -e 's,^[[:space:]]*directory.*"\(.*\)";,\1,p' \
+        ${configuration_file})
+    [ "${configuration_dir}" == "" ] && configuration_dir=@PKG_SYSCONFDIR@/namedb
+
+    configuration_files=$(sed -n -e \
+        "s,^[[:space:]]*file.*\"\(.*\)\";,${configuration_dir}/\1,p" \
+        ${configuration_file} | sort -u)
+    configuration_files="${configuration_files} ${configuration_file}"    
+}
+
+result=${SMF_EXIT_OK}
+
+# Read command line arguments
+method="$1"            # %m
+instance="$2"          # %i
+contract="$3"          # %{restarter/contract}
+
+# Set defaults; SMF_FMRI should have been set, but just in case.
+if [ -z "$SMF_FMRI" ]; then
+    SMF_FMRI="svc:/@SMF_PREFIX@/@SMF_NAME@:${instance}"
+fi
+server="@PREFIX@/sbin/named"
+checkconf="@PREFIX@/sbin/named-checkconf"
+I=`/usr/bin/basename $0`
+
+case "$method" in
+'start')
+    get_config
+
+    # If chroot option is set, note zones(5) are preferred, then
+    # configuration file lives under chroot directory.
+    if [ "${chroot_dir}" != "" ]; then
+        if [ "${chroot_dir}" = "/" ]; then
+            msg="$I: chroot_dir must not be /"
+            echo ${msg} >&2
+            /usr/bin/logger -p daemon.error ${msg}
+            # dns-server should be placed in maintenance state.
+            exit ${SMF_EXIT_ERR_CONFIG}
+        fi
+
+        server="env LD_NOLAZYLOAD=1 ${server}"
+        checkconf="env LD_NOLAZYLOAD=1 ${checkconf}"
+
+        mkdir -p ${chroot_dir}
+
+        if [ "${SMF_ZONENAME}" = "global" ]; then
+            for dev in crypto log null poll random urandom; do
+                rm -f ${chroot_dir}/dev/${dev}
+                pax -rw -H -pe /dev/${dev} ${chroot_dir}
+            done
+        fi
+
+       missing=""
+        for dev in crypto null poll random urandom; do
+           if [ ! -e "${chroot_dir}/dev/${dev}" ]; then
+               missing="${missing} ${dev}"
+           fi
+        done
+
+        if [ ! -z "${missing}" ]; then
+            msg="$I: missing device nodes in ${chroot_dir}: ${missing}"
+            echo ${msg} >&2
+            /usr/bin/logger -p daemon.err ${msg}
+            # dns-server should be placed in maintenance state.
+            exit ${SMF_EXIT_ERR_CONFIG}
+        fi
+
+        mount_chroot ${chroot_dir} ${configuration_files} ${libraries}
+
+        mkdir -p ${chroot_dir}/var/run/named
+        chown ${cmduser}:${cmduser} ${chroot_dir}/var/run/named
+
+        configuration_file=${chroot_dir}${configuration_file}
+        rndc_config_file=${chroot_dir}${rndc_config_file}
+        rndc_key_file=${chroot_dir}${rndc_key_file}
+        rndc_cmd_opts="${rndc_cmd_opts} -t ${chroot_dir}"
+    fi
+
+    # Check if the rndc config file exists.
+    if [ ! -f ${rndc_config_file} ]; then
+        # If not, check if the default rndc key file exists.
+        if [ ! -f ${rndc_key_file} ]; then
+            echo "$I: Creating default rndc key file: ${rndc_key_file}." >&2
+            @PREFIX@/sbin/rndc-confgen ${rndc_cmd_opts}
+            if [ $? -ne 0 ]; then
+                echo "$I : Warning: rndc configuration failed! Use of 'rndc' to" \
+                    "control 'named' may fail and 'named' may report further error" \
+                    "messages to the system log. This is not fatal. For more" \
+                    "information see rndc(1M) and rndc-confgen(1M)." >&2
+            fi
+        fi
+    fi
+
+    if [ ${result} = ${SMF_EXIT_OK} ]; then
+        ${checkconf} -z ${checkopts}
+        result=$?
+        if [ $result -ne 0 ]; then
+            msg="$I: named-checkconf failed to verify configuration"
+            echo ${msg} >&2
+            /usr/bin/logger -p daemon.error ${msg}
+            if [ "${chroot_dir}" != "" -a "${chroot_dir}" != "/" ]; then
+                umount_chroot ${chroot_dir} ${configuration_files} ${libraries}
+            fi
+            # dns-server should be placed in maintenance state.
+            exit ${SMF_EXIT_ERR_CONFIG}
+        fi
+    fi
+
+    if [ ${result} = ${SMF_EXIT_OK} ]; then
+       echo "$I: Executing: ${server} ${cmdopts}"
+       # Execute named(1M) with relevant command line options.
+       ppriv -s A-all -s A+basic,net_privaddr,file_dac_read,file_dac_search,sys_resource,proc_chroot,proc_setid -e ${server} ${cmdopts}
+       result=$?
+    fi
+    ;;
+'stop')
+    get_config
+
+    smf_kill_contract ${contract} TERM 1
+    [ $? -ne 0 ] && exit 1
+
+    if [ "${chroot_dir}" != "" -a "${chroot_dir}" != "/" ]; then
+        umount_chroot ${chroot_dir} ${configuration_files} ${libraries}
+    fi
+
+    ;;
+*)
+    echo "Usage: $I [stop|start] <instance>" >&2
+    exit 1
+    ;;
+esac
+exit ${result}

Index: pkgsrc/net/bind912/patches/patch-bin_tests_system_metadata_tests.sh
diff -u /dev/null pkgsrc/net/bind912/patches/patch-bin_tests_system_metadata_tests.sh:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/patches/patch-bin_tests_system_metadata_tests.sh Sun Sep  9 13:16:01 2018
@@ -0,0 +1,15 @@
+$NetBSD: patch-bin_tests_system_metadata_tests.sh,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+* Avoid using "==" for argument of test(1).
+
+--- bin/tests/system/metadata/tests.sh.orig    2018-07-03 06:56:55.000000000 +0000
++++ bin/tests/system/metadata/tests.sh
+@@ -139,7 +139,7 @@ status=`expr $status + $ret`
+ 
+ echo_i "checking warning about permissions change on key with dnssec-settime ($n)"
+ uname=`uname -o 2> /dev/null`
+-if [ Cygwin == "$uname"  ]; then
++if [ Cygwin = "$uname"  ]; then
+       echo_i "Cygwin detected, skipping"
+ else
+       ret=0
Index: pkgsrc/net/bind912/patches/patch-config.threads.in
diff -u /dev/null pkgsrc/net/bind912/patches/patch-config.threads.in:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/patches/patch-config.threads.in  Sun Sep  9 13:16:01 2018
@@ -0,0 +1,15 @@
+$NetBSD: patch-config.threads.in,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+* Add DragonFly support.
+
+--- config.threads.in.orig     2018-07-03 06:56:55.000000000 +0000
++++ config.threads.in
+@@ -50,6 +50,8 @@ case $host in
+       use_threads=false ;;
+ *-freebsd*)
+       use_threads=true ;;
++*-dragonfly*)
++      use_threads=false ;;
+ [*-bsdi[234]*])
+       # Thread signals do not work reliably on some versions of BSD/OS.
+       use_threads=false ;;
Index: pkgsrc/net/bind912/patches/patch-configure
diff -u /dev/null pkgsrc/net/bind912/patches/patch-configure:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/patches/patch-configure  Sun Sep  9 13:16:01 2018
@@ -0,0 +1,82 @@
+$NetBSD: patch-configure,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+* Add DragonFly support.
+* Use proper link options for NetBSD.
+* Link proper postgresql library.
+
+--- configure.orig     2018-07-24 17:22:12.000000000 +0000
++++ configure
+@@ -15248,6 +15248,8 @@ case $host in
+       use_threads=false ;;
+ *-freebsd*)
+       use_threads=true ;;
++*-dragonfly*)
++      use_threads=false ;;
+ *-bsdi[234]*)
+       # Thread signals do not work reliably on some versions of BSD/OS.
+       use_threads=false ;;
+@@ -17869,27 +17871,10 @@ case "$use_libjson" in
+               libjson_libs=""
+               ;;
+       auto|yes)
+-              for d in /usr /usr/local /opt/local
+-              do
+-                      if test -f "${d}/include/json/json.h"
+-                      then
+-                              if test ${d} != /usr
+-                              then
+-                                      libjson_cflags="-I ${d}/include"
+-                                      LIBS="$LIBS -L${d}/lib"
+-                              fi
+-                              have_libjson="yes"
+-                      elif test -f "${d}/include/json-c/json.h"
+-                      then
+-                              if test ${d} != /usr
+-                              then
+-                                      libjson_cflags="-I ${d}/include"
+-                                      LIBS="$LIBS -L${d}/lib"
+-                              fi
+-                              have_libjson="yes"
+-                              have_libjson_c="yes"
+-                      fi
+-              done
++              libjson_cflags="`pkg-config --cflags json-c`"
++              LIBS="`pkg-config --libs json-c`"
++              have_libjson="yes"
++              have_libjson_c="yes"
+               ;;
+       *)
+               if test -f "${use_libjson}/include/json/json.h"
+@@ -23288,7 +23273,7 @@ if test "yes" = "$dlopen"; then
+                               SO_LD="ld"
+                       fi
+                       ;;
+-              *-freebsd*|*-openbsd*)
++              *-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
+                       LDFLAGS="${LDFLAGS} -Wl,-E"
+                       SO_CFLAGS="-fpic"
+                       if test "yes" = "$use_libtool"; then
+@@ -23299,12 +23284,6 @@ if test "yes" = "$dlopen"; then
+                               SO_LD="${CC}"
+                       fi
+                       ;;
+-              *-netbsd*)
+-                      SO_CFLAGS="-fpic"
+-                      SO_LDFLAGS="-Bshareable -x"
+-                      SO_LD="ld"
+-                      SO_STRIP="sed -e s/-Wl,//g"
+-                      ;;
+               *-solaris*)
+                       SO_CFLAGS="-KPIC"
+                       SO_LDFLAGS="-G -z text"
+@@ -23557,8 +23536,8 @@ $as_echo "no" >&6; }
+       fi
+       if test -n "-L$use_dlz_postgres_lib -lpq"
+       then
+-              DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS -L$use_dlz_postgres_lib -lpq"
+-              DLZ_DRIVER_POSTGRES_LIBS="-L$use_dlz_postgres_lib -lpq"
++              DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS -L${PREFIX}/lib -lpq"
++              DLZ_DRIVER_POSTGRES_LIBS="-L${PREFIX}/lib -lpq"
+       fi
+ 
+ 
Index: pkgsrc/net/bind912/patches/patch-contrib_dlz_config.dlz.in
diff -u /dev/null pkgsrc/net/bind912/patches/patch-contrib_dlz_config.dlz.in:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/patches/patch-contrib_dlz_config.dlz.in  Sun Sep  9 13:16:01 2018
@@ -0,0 +1,15 @@
+$NetBSD: patch-contrib_dlz_config.dlz.in,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+* Link proper postgresql library.
+
+--- contrib/dlz/config.dlz.in.orig     2018-07-03 06:56:55.000000000 +0000
++++ contrib/dlz/config.dlz.in
+@@ -113,7 +113,7 @@ case "$use_dlz_postgres" in
+       *)
+               DLZ_ADD_DRIVER(POSTGRES, dlz_postgres_driver,
+                               [-I$use_dlz_postgres],
+-                              [-L$use_dlz_postgres_lib -lpq])
++                              [-L${PREFIX}/lib -lpq])
+ 
+               AC_MSG_RESULT(
+ [using PostgreSQL from $use_dlz_postgres_lib and $use_dlz_postgres])
Index: pkgsrc/net/bind912/patches/patch-lib_dns_rbt.c
diff -u /dev/null pkgsrc/net/bind912/patches/patch-lib_dns_rbt.c:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/patches/patch-lib_dns_rbt.c      Sun Sep  9 13:16:01 2018
@@ -0,0 +1,17 @@
+$NetBSD: patch-lib_dns_rbt.c,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+* Disable inline on powerpc.
+
+--- lib/dns/rbt.c.orig 2018-07-03 06:56:55.000000000 +0000
++++ lib/dns/rbt.c
+@@ -344,6 +344,10 @@ hexdump(const char *desc, unsigned char 
+ }
+ #endif /* DEBUG */
+ 
++#if !defined(inline) && defined(__powerpc__)
++#define        inline  /**/
++#endif
++
+ #ifdef DNS_RBT_USEHASH
+ 
+ /*
Index: pkgsrc/net/bind912/patches/patch-lib_isc_unix_socket.c
diff -u /dev/null pkgsrc/net/bind912/patches/patch-lib_isc_unix_socket.c:1.1
--- /dev/null   Sun Sep  9 13:16:02 2018
+++ pkgsrc/net/bind912/patches/patch-lib_isc_unix_socket.c      Sun Sep  9 13:16:01 2018
@@ -0,0 +1,33 @@
+$NetBSD: patch-lib_isc_unix_socket.c,v 1.1 2018/09/09 13:16:01 taca Exp $
+
+Make ENOBUFS a soft error
+https://gitlab.isc.org/isc-projects/bind9/issues/462
+
+--- lib/isc/unix/socket.c.orig 2018-07-24 17:22:12.000000000 +0000
++++ lib/isc/unix/socket.c
+@@ -256,6 +256,7 @@ typedef enum { poll_idle, poll_active, p
+ #define SOFT_ERROR(e) ((e) == EAGAIN || \
+                        (e) == EWOULDBLOCK || \
+                        (e) == EINTR || \
++                       (e) == ENOBUFS || \
+                        (e) == 0)
+ 
+ #define DLVL(x) ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(x)
+@@ -1951,7 +1952,7 @@ doio_recv(isc__socket_t *sock, isc_socke
+               SOFT_OR_HARD(EHOSTDOWN, ISC_R_HOSTDOWN);
+               /* HPUX 11.11 can return EADDRNOTAVAIL. */
+               SOFT_OR_HARD(EADDRNOTAVAIL, ISC_R_ADDRNOTAVAIL);
+-              ALWAYS_HARD(ENOBUFS, ISC_R_NORESOURCES);
++              SOFT_OR_HARD(ENOBUFS, ISC_R_NORESOURCES);
+               /* Should never get this one but it was seen. */
+ #ifdef ENOPROTOOPT
+               SOFT_OR_HARD(ENOPROTOOPT, ISC_R_HOSTUNREACH);
+@@ -2148,7 +2149,7 @@ doio_send(isc__socket_t *sock, isc_socke
+               ALWAYS_HARD(EHOSTDOWN, ISC_R_HOSTUNREACH);
+ #endif
+               ALWAYS_HARD(ENETUNREACH, ISC_R_NETUNREACH);
+-              ALWAYS_HARD(ENOBUFS, ISC_R_NORESOURCES);
++              SOFT_OR_HARD(ENOBUFS, ISC_R_NORESOURCES);
+               ALWAYS_HARD(EPERM, ISC_R_HOSTUNREACH);
+               ALWAYS_HARD(EPIPE, ISC_R_NOTCONNECTED);
+               ALWAYS_HARD(ECONNRESET, ISC_R_CONNECTIONRESET);



Home | Main Index | Thread Index | Old Index