diff options
author | dinoex <dinoex@FreeBSD.org> | 2006-05-28 14:47:52 +0000 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2006-05-28 14:47:52 +0000 |
commit | 6f13d2fbde0f7afea8aaf11679c9db6d42c28b8f (patch) | |
tree | dce19de552a6c99ad6d19e9d5551918978fcbc03 | |
parent | e5ff3412e2d5d1345e16fd8fbe0ac3e235706344 (diff) | |
download | FreeBSD-ports-6f13d2fbde0f7afea8aaf11679c9db6d42c28b8f.zip FreeBSD-ports-6f13d2fbde0f7afea8aaf11679c9db6d42c28b8f.tar.gz |
- update to USE_BDB
89023
Scot W. Hetzel
(with minor fixups)
- fix debug logging
Dirk Ye
- remove LDAP_PORT
- fix PKG_NAME prior configure
-rw-r--r-- | dns/bind9-dlz/Makefile | 43 | ||||
-rw-r--r-- | dns/bind9-dlz/files/configure.bind9-dlz | 33 | ||||
-rw-r--r-- | dns/bind9-dlz/files/db42-bind922.patch | 13 | ||||
-rw-r--r-- | dns/bind9-dlz/files/db42-bind931.patch | 14 | ||||
-rw-r--r-- | dns/bind9-dlz/files/postgres.patch | 134 |
5 files changed, 190 insertions, 47 deletions
diff --git a/dns/bind9-dlz/Makefile b/dns/bind9-dlz/Makefile index b9a282c..69d88b4 100644 --- a/dns/bind9-dlz/Makefile +++ b/dns/bind9-dlz/Makefile @@ -15,9 +15,9 @@ MASTER_SITE_SUBDIR= bind9/${ISCVERSION} bind-dlz/:dlz PKGNAMESUFFIX?= -dlz${POSTGRESQL_SUFFIX}${MYSQL_SUFFIX}${BERKLEYDB_SUFFIX}${LDAP_SUFFIX}${PKGNAMESUFFIX2} DISTFILES= bind-${ISCVERSION}.tar.gz -PATCH_SITES= ${MASTER_SITES} http://projects.navynet.it/DLZ/:it +PATCH_SITES= ${MASTER_SITES} http://projects.navynet.it/DLZ/:it PATCH_SITE_SUBDIR= bind9/${ISCVERSION} -PATCHFILES= +PATCHFILES= PATCH_DIST_STRIP= -p1 MAINTAINER= dinoex@FreeBSD.org @@ -40,6 +40,18 @@ PATCH_STRIP= -p1 .if defined(BATCH) # default package, can be configured in /etc/make.conf BINDDLZ_OPTIONS?= \"Threads\" \"OpenSSL\" \"PostgreSQL\" \"FileSystem\" +.if ${BINDDLZ_OPTIONS:M*PostgreSQL*} +WITH_POSTGRESQL_DRIVER=yes +.endif +.if ${BINDDLZ_OPTIONS:M*MySQL*} +WITH_MYSQL_DRIVER=yes +.endif +.if ${BINDDLZ_OPTIONS:M*BerkleyDB*} +WITH_BERKLEYDB_DRIVER=yes +.endif +.if ${BINDDLZ_OPTIONS:M*OpenLDAP*} +WITH_LDAP=yes +.endif .endif # make INDEX match NO_DESCRIBE=yes @@ -61,6 +73,7 @@ PLIST_SUB+= BIND931="" BIND922="@comment " .if defined(WITH_POSTGRESQL_DRIVER) .if !defined(WITHOUT_POSTGRESQL_DRIVER) POSTGRESQL_SUFFIX= +postgres +EXTRA_PATCHES+= ${FILESDIR}/postgres.patch USE_PGSQL= yes CONFIGURE_ARGS+= --with-dlz-postgres .endif @@ -68,28 +81,27 @@ CONFIGURE_ARGS+= --with-dlz-postgres .if defined(WITH_MYSQL_DRIVER) MYSQL_SUFFIX= +mysql -MYSQL_PORT?= databases/mysql323-client -LIB_DEPENDS+= mysqlclient:${PORTSDIR}/${MYSQL_PORT} +USE_MYSQL= yes CONFIGURE_ARGS+= --with-dlz-mysql .endif .if defined(WITH_LDAP) LDAP_SUFFIX= +ldap -.if defined(LDAP_PORT) -BUILD_DEPENDS+= ${LOCALBASE}/lib/${OPENLDAP_LIB}:${PORTSDIR}/${LDAP_PORT} -RUN_DEPENDS+= ${LOCALBASE}/lib/${OPENLDAP_LIB}:${PORTSDIR}/${LDAP_PORT} -.else USE_OPENLDAP_VER?= 22 -.endif CONFIGURE_ARGS+= --with-dlz-ldap .endif .if defined(WITH_BERKLEYDB_DRIVER) +WITH_BDB= yes +.endif + +.if defined(WITH_BDB) BERKLEYDB_SUFFIX= +db4 -BERKLEYDB_PORT?= databases/db41 -BERKLEYDB_LIB?= db41.1 +USE_BDB= yes +IGNORE_WITH_BDB= 2 3 40 +OBSOLETE_BDB_VAR= BERKLEYDB_PORT BERKLEYDB_LIB +BERKLEYDB_SUFFIX= +${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,} CONFIGURE_ARGS+= --with-dlz-bdb=${LOCALBASE} -LIB_DEPENDS+= ${BERKLEYDB_LIB}:${PORTSDIR}/${BERKLEYDB_PORT} .endif .if defined(WITH_FILESYSTEM_DRIVER) @@ -174,6 +186,13 @@ MAN8= dnssec-keygen.8 dnssec-signzone.8 lwresd.8 named-checkconf.8 \ pre-fetch: @ ${SETENV} ${SCRIPTS_ENV} ${SH} ${FILESDIR}/configure.bind9-dlz +.if defined(WITH_BDB) +post-patch: + @${REINPLACE_CMD} -e 's#db-4.2#${BDB_LIB_NAME}#g' \ + -e 's#db42#${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,}#g' \ + ${WRKSRC}/configure +.endif + pre-configure: .for FILE in check/named-checkconf.8 named/named.8 nsupdate/nsupdate.8 \ rndc/rndc.8 diff --git a/dns/bind9-dlz/files/configure.bind9-dlz b/dns/bind9-dlz/files/configure.bind9-dlz index 2bf482a..ced56a7 100644 --- a/dns/bind9-dlz/files/configure.bind9-dlz +++ b/dns/bind9-dlz/files/configure.bind9-dlz @@ -16,12 +16,9 @@ OldDLZ "use old Bind9.2.2" OFF \ OpenSSL "OpenSSL support" ON \ Threads "Thread support" ON \ PostgreSQL "PostgreSQL driver" ON \ -MySQL323 "MySQL 3.23 driver" OFF \ -MySQL40 "MySQL 4.0 driver" OFF \ -MySQL41 "MySQL 4.1 driver" OFF \ +MySQL "MySQL driver" OFF \ OpenLDAP22 "OpenLDAP 2.2 backend" OFF \ -BerkleyDB41 "BerkleyDB 4.1 backend" OFF \ -BerkleyDB42 "BerkleyDB 4.2 backend" OFF \ +BerkleyDB "Berkley DB 4.1+ backend" OFF \ FileSystem "Filesystem driver" ON \ Stub "Stub driver" OFF \ 2> /tmp/checklist.tmp.$$ @@ -60,32 +57,14 @@ while [ "$1" ]; do \"PostgreSQL\") echo WITH_POSTGRESQL_DRIVER=YES ;; - \"MySQL323\") + \"MySQL\") echo WITH_MYSQL_DRIVER=YES - echo MYSQL_PORT?=databases/mysql323-client ;; - \"MySQL40\") - echo WITH_MYSQL_DRIVER=YES - echo MYSQL_PORT?=databases/mysql40-client - ;; - \"MySQL41\") - echo WITH_MYSQL_DRIVER=YES - echo MYSQL_PORT?=databases/mysql41-client - ;; - \"OpenLDAP22\") + \"OpenLDAP\") echo WITH_LDAP=YES - echo LDAP_PORT?=net/openldap22-client - echo OPENLDAP_LIB?=libldap-2.2.so.7 - ;; - \"BerkleyDB41\") - echo WITH_BERKLEYDB_DRIVER=YES - echo BERKLEYDB_LIB?=db41.1 - echo BERKLEYDB_PORT?=databases/db41 ;; - \"BerkleyDB42\") - echo WITH_BERKLEYDB_DRIVER=YES - echo BERKLEYDB_LIB?=db-4.2 - echo BERKLEYDB_PORT?=databases/db42 + \"BerkleyDB\") + echo WITH_BDB=YES ;; \"FileSystem\") echo WITH_FILESYSTEM_DRIVER=YES diff --git a/dns/bind9-dlz/files/db42-bind922.patch b/dns/bind9-dlz/files/db42-bind922.patch index 701ccc6..536d84c 100644 --- a/dns/bind9-dlz/files/db42-bind922.patch +++ b/dns/bind9-dlz/files/db42-bind922.patch @@ -1,5 +1,5 @@ ---- configure.orig Wed Feb 11 01:19:46 2004 -+++ configure Wed Feb 11 01:20:41 2004 +--- configure.orig Mon Nov 28 23:50:21 2005 ++++ configure Mon Nov 28 23:54:39 2005 @@ -2441,7 +2441,7 @@ DLZ_BDB_LIB="yes" @@ -9,7 +9,7 @@ for d in $bdb_incdirs do if test -f $use_dlz_bdb/include${d}db.h -@@ -2455,11 +2455,11 @@ +@@ -2455,23 +2455,24 @@ then echo "$ac_t""not found" 1>&6 { echo "configure: error: Berkeley DB header was not found in $use_dlz_bdb/include, \ @@ -23,7 +23,12 @@ for d in $bdb_libnames do if test -f $use_dlz_bdb/lib/lib${d}.so -@@ -2471,7 +2471,7 @@ + then + DLZ_BDB_LIB="-l${d}" ++ break + fi + done + if test "$DLZ_BDB_LIB" = "yes" then echo "$ac_t""not found" 1>&6 diff --git a/dns/bind9-dlz/files/db42-bind931.patch b/dns/bind9-dlz/files/db42-bind931.patch index cceb663..330dfae 100644 --- a/dns/bind9-dlz/files/db42-bind931.patch +++ b/dns/bind9-dlz/files/db42-bind931.patch @@ -1,5 +1,5 @@ ---- configure.orig Wed Mar 16 22:05:10 2005 -+++ configure Wed Mar 16 22:11:32 2005 +--- configure.orig Sat Nov 26 23:30:45 2005 ++++ configure Sat Nov 26 23:33:43 2005 @@ -4919,7 +4919,7 @@ DLZ_BDB_LIB="yes" @@ -9,7 +9,7 @@ for d in $bdb_incdirs do if test -f $use_dlz_bdb/include${d}db.h -@@ -4934,14 +4934,14 @@ +@@ -4934,19 +4934,20 @@ echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 { { echo "$as_me:$LINENO: error: Berkeley DB header was not found in $use_dlz_bdb/include, \ @@ -27,7 +27,13 @@ for d in $bdb_libnames do if test -f $use_dlz_bdb/lib/lib${d}.so -@@ -4954,9 +4954,9 @@ + then + DLZ_BDB_LIB="-l${d}" ++ break + fi + done + +@@ -4954,9 +4955,9 @@ then echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 diff --git a/dns/bind9-dlz/files/postgres.patch b/dns/bind9-dlz/files/postgres.patch new file mode 100644 index 0000000..037aae9 --- /dev/null +++ b/dns/bind9-dlz/files/postgres.patch @@ -0,0 +1,134 @@ +--- bind-9.3.2/bin/named/dlz_postgres_driver.c.orig Tue May 23 13:33:45 2006 ++++ bind-9.3.2/bin/named/dlz_postgres_driver.c Tue May 23 13:37:43 2006 +@@ -351,7 +351,7 @@ + REQUIRE(*rs == NULL); + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d Getting DBI", dlz_thread_num); + + // get db instance / connection +@@ -369,7 +369,7 @@ + #endif /* ISC_PLATFORM_USETHREADS */ + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d Got DBI - checking query", dlz_thread_num); + + // if DBI is null, can't do anything else +@@ -433,7 +433,7 @@ + } + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d checked query", dlz_thread_num); + + // was a zone string passed? If so, make it safe for use in queries. +@@ -465,7 +465,7 @@ + } + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d did zone", dlz_thread_num); + + // was a record string passed? If so, make it safe for use in queries. +@@ -481,7 +481,7 @@ + + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d did record", dlz_thread_num); + + // was a client string passed? If so, make it safe for use in queries. +@@ -496,7 +496,7 @@ + } + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d did client", dlz_thread_num); + + // what type of query are we going to run? +@@ -526,7 +526,7 @@ + } + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d built query", dlz_thread_num); + + // if the querystring is null, Bummer, outta RAM. UPGRADE TIME!!! +@@ -536,7 +536,7 @@ + } + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d query is '%s'", dlz_thread_num, querystring); + + // output the full query string during debug so we can see +@@ -548,7 +548,7 @@ + // attempt query up to 3 times. + for(j=0; j < 3; j++){ + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d executing query for %d time", dlz_thread_num, j); + // try to get result set + *rs = PQexec((PGconn *)dbi->dbconn, querystring ); +@@ -556,7 +556,7 @@ + // if result set is null, reset DB connection, max 3 attempts. + for(i=0; *rs == NULL && i < 3; i++){ + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d resetting connection", dlz_thread_num); + result = ISC_R_FAILURE; + PQreset((PGconn *) dbi->dbconn); +@@ -567,12 +567,12 @@ + // result set ok, break outter loop + if(PQresultStatus(*rs) == PGRES_TUPLES_OK){ + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d rs ok", dlz_thread_num); + break; + }else{ // we got a result set object, but it's not right. + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d clearing rs", dlz_thread_num); + PQclear(*rs); // get rid of it + result = ISC_R_FAILURE; // incase this was the last attempt +@@ -582,7 +582,7 @@ + cleanup: // it's always good to cleanup after yourself + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d cleaning up", dlz_thread_num); + + // if we couldn't even allocate DBI, just return NULL +@@ -612,7 +612,7 @@ + #ifdef ISC_PLATFORM_USETHREADS + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d unlocking mutex", dlz_thread_num); + + // release the lock so another thread can use this dbi +@@ -625,7 +625,7 @@ + isc_mem_free(ns_g_mctx, querystring ); + + //** temporary logging message +-isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_ERROR, ++isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, ISC_LOG_DEBUG(2), + "%d returning", dlz_thread_num); + + // return result |