From 7efdf6ade8a9da2994eabbeb3d29506bdaf90d38 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Nov 15 2007 10:49:41 +0000 Subject: - added bind-sdb again, contains SDB modules and DLZ modules (#374261) - bind-9.3.1rc1-sdb.patch replaced by bind-9.5-sdb.patch --- diff --git a/bind-9.3.1rc1-sdb.patch b/bind-9.3.1rc1-sdb.patch deleted file mode 100644 index 2433a34..0000000 --- a/bind-9.3.1rc1-sdb.patch +++ /dev/null @@ -1,128 +0,0 @@ ---- bind-9.4.0/configure.in.sdb 2007-03-06 12:59:32.000000000 +0100 -+++ bind-9.4.0/configure.in 2007-03-06 12:59:32.000000000 +0100 -@@ -2478,6 +2478,7 @@ - bin/tests/system/tkey/Makefile - bin/tests/headerdep_test.sh - bin/dnssec/Makefile -+ bin/sdb_tools/Makefile - doc/Makefile - doc/arm/Makefile - doc/misc/Makefile ---- bind-9.4.0/bin/Makefile.in.sdb 2004-03-05 05:57:10.000000000 +0100 -+++ bind-9.4.0/bin/Makefile.in 2007-03-06 12:59:32.000000000 +0100 -@@ -19,7 +19,7 @@ - VPATH = @srcdir@ - top_srcdir = @top_srcdir@ - --SUBDIRS = named rndc dig dnssec tests nsupdate check -+SUBDIRS = named rndc dig dnssec tests nsupdate check sdb_tools - TARGETS = - - @BIND9_MAKE_RULES@ ---- bind-9.4.0/bin/named/main.c.sdb 2006-11-10 19:51:14.000000000 +0100 -+++ bind-9.4.0/bin/named/main.c 2007-03-06 13:43:31.000000000 +0100 -@@ -72,6 +72,9 @@ - * Include header files for database drivers here. - */ - /* #include "xxdb.h" */ -+#include "ldapdb.h" -+#include "pgsqldb.h" -+#include "dirdb.h" - - /* - * Include DLZ drivers if appropriate. -@@ -639,6 +642,10 @@ - ns_main_earlyfatal("isc_app_start() failed: %s", - isc_result_totext(result)); - -+ ldapdb_clear(); -+ pgsqldb_clear(); -+ dirdb_clear(); -+ - isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, - ISC_LOG_NOTICE, "starting BIND %s%s", ns_g_version, - saved_command_line); -@@ -692,6 +699,57 @@ - isc_result_totext(result)); - #endif - -+ result = ldapdb_init(); -+ if (result != ISC_R_SUCCESS) -+ { -+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, -+ ISC_LOG_ERROR, -+ "SDB ldap module initialisation failed: %s.", -+ isc_result_totext(result) -+ ); -+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, -+ ISC_LOG_ERROR, -+ "SDB ldap zone database will be unavailable." -+ ); -+ }else -+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, -+ ISC_LOG_NOTICE, "SDB ldap zone database module loaded." -+ ); -+ -+ result = pgsqldb_init(); -+ if (result != ISC_R_SUCCESS) -+ { -+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, -+ ISC_LOG_ERROR, -+ "SDB pgsql module initialisation failed: %s.", -+ isc_result_totext(result) -+ ); -+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, -+ ISC_LOG_ERROR, -+ "SDB pgsql zone database will be unavailable." -+ ); -+ }else -+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, -+ ISC_LOG_NOTICE, "SDB postgreSQL DB zone database module loaded." -+ ); -+ -+ result = dirdb_init(); -+ if (result != ISC_R_SUCCESS) -+ { -+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, -+ ISC_LOG_ERROR, -+ "SDB directory DB module initialisation failed: %s.", -+ isc_result_totext(result) -+ ); -+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, -+ ISC_LOG_ERROR, -+ "SDB directory DB zone database will be unavailable." -+ ); -+ }else -+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, -+ ISC_LOG_NOTICE, "SDB directory DB zone database module loaded." -+ ); -+ - ns_server_create(ns_g_mctx, &ns_g_server); - } - -@@ -717,6 +775,10 @@ - - dns_name_destroy(); - -+ ldapdb_clear(); -+ pgsqldb_clear(); -+ dirdb_clear(); -+ - isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, - ISC_LOG_NOTICE, "exiting"); - ns_log_shutdown(); ---- bind-9.4.0/bin/named/Makefile.in.sdb 2007-03-06 12:59:32.000000000 +0100 -+++ bind-9.4.0/bin/named/Makefile.in 2007-03-06 12:59:32.000000000 +0100 -@@ -26,10 +26,10 @@ - # - # Add database drivers here. - # --DBDRIVER_OBJS = --DBDRIVER_SRCS = -+DBDRIVER_OBJS = ldapdb.o pgsqldb.o dirdb.o -+DBDRIVER_SRCS = ldapdb.c pgsqldb.c dirdb.c - DBDRIVER_INCLUDES = --DBDRIVER_LIBS = -+DBDRIVER_LIBS = -lldap -llber -lpq - - DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers diff --git a/bind-9.3.2-redhat_doc.patch b/bind-9.3.2-redhat_doc.patch index 759947d..3536eb8 100644 --- a/bind-9.3.2-redhat_doc.patch +++ b/bind-9.3.2-redhat_doc.patch @@ -48,9 +48,9 @@ +\fBRed Hat BIND SDB support:\fR +.PP +Red Hat ships named with compiled in Simplified Database Backend modules that ISC -+provides in the "contrib/sdb" directory. ++provides in the "contrib/sdb" directory. Install bind-sdb package if you want use them +.PP -+The SDB modules for LDAP, PostGreSQL, DirDB and SQLite are compiled into named. ++The SDB modules for LDAP, PostGreSQL, DirDB and SQLite are compiled into named-sdb. +.PP +See the documentation for the various SDB modules in /usr/share/doc/bind-sdb-*/ . +.br diff --git a/bind-9.4.0-sdb-sqlite-bld.patch b/bind-9.4.0-sdb-sqlite-bld.patch index 9e6909d..4e8a71a 100644 --- a/bind-9.4.0-sdb-sqlite-bld.patch +++ b/bind-9.4.0-sdb-sqlite-bld.patch @@ -1,5 +1,5 @@ ---- bind-9.4.0/bin/named/main.c.sdb-sqlite-bld 2007-03-12 14:00:05.000000000 +0100 -+++ bind-9.4.0/bin/named/main.c 2007-03-12 14:02:34.000000000 +0100 +--- bind-9.4.0/bin/named/main-sdb.c.sdb-sqlite-bld 2007-03-12 14:00:05.000000000 +0100 ++++ bind-9.4.0/bin/named/main-sdb.c 2007-03-12 14:02:34.000000000 +0100 @@ -74,6 +74,7 @@ /* #include "xxdb.h" */ #include "ldapdb.h" diff --git a/bind-9.5-sdb.patch b/bind-9.5-sdb.patch new file mode 100644 index 0000000..0f30f1d --- /dev/null +++ b/bind-9.5-sdb.patch @@ -0,0 +1,216 @@ +diff -up bind-9.5.0a6/configure.in.sdb bind-9.5.0a6/configure.in +--- bind-9.5.0a6/configure.in.sdb 2007-06-19 01:47:16.000000000 +0200 ++++ bind-9.5.0a6/configure.in 2007-11-15 10:10:06.000000000 +0100 +@@ -2735,6 +2735,7 @@ AC_CONFIG_FILES([ + bin/tests/system/tkey/Makefile + bin/tests/headerdep_test.sh + bin/dnssec/Makefile ++ bin/sdb_tools/Makefile + doc/Makefile + doc/arm/Makefile + doc/misc/Makefile +diff -up bind-9.5.0a6/bin/Makefile.in.sdb bind-9.5.0a6/bin/Makefile.in +--- bind-9.5.0a6/bin/Makefile.in.sdb 2007-06-20 01:46:59.000000000 +0200 ++++ bind-9.5.0a6/bin/Makefile.in 2007-11-15 10:10:06.000000000 +0100 +@@ -19,7 +19,7 @@ srcdir = @srcdir@ + VPATH = @srcdir@ + top_srcdir = @top_srcdir@ + +-SUBDIRS = named rndc dig dnssec tests nsupdate check ++SUBDIRS = named rndc dig dnssec tests nsupdate check sdb_tools + TARGETS = + + @BIND9_MAKE_RULES@ +diff -up bind-9.5.0a6/bin/named/Makefile.in.sdb bind-9.5.0a6/bin/named/Makefile.in +--- bind-9.5.0a6/bin/named/Makefile.in.sdb 2007-11-15 10:10:06.000000000 +0100 ++++ bind-9.5.0a6/bin/named/Makefile.in 2007-11-15 10:11:56.000000000 +0100 +@@ -26,10 +26,10 @@ top_srcdir = @top_srcdir@ + # + # Add database drivers here. + # +-DBDRIVER_OBJS = +-DBDRIVER_SRCS = ++DBDRIVER_OBJS = ldapdb.o pgsqldb.o dirdb.o ++DBDRIVER_SRCS = ldapdb.c pgsqldb.c dirdb.c + DBDRIVER_INCLUDES = +-DBDRIVER_LIBS = ++DBDRIVER_LIBS = -lldap -llber -lpq + + DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers + +@@ -43,7 +43,7 @@ CINCLUDES = -I${srcdir}/include -I${srcd + ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \ + ${DLZDRIVER_INCLUDES} ${DBDRIVER_INCLUDES} + +-CDEFINES = @USE_DLZ@ ++CDEFINES = + + CWARNINGS = + +@@ -66,21 +66,20 @@ DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS} + + LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \ + ${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} \ +- ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} @LIBS@ ++ @LIBS@ + + SUBDIRS = unix + +-TARGETS = named@EXEEXT@ lwresd@EXEEXT@ ++TARGETS = named@EXEEXT@ named-sdb@EXEEXT@ lwresd@EXEEXT@ + + OBJS = builtin.o client.o config.o control.o \ + controlconf.o interfacemgr.o \ +- listenlist.o log.o logconf.o main.o notify.o \ ++ listenlist.o log.o logconf.o notify.o \ + query.o server.o sortlist.o \ + tkeyconf.o tsigconf.o update.o xfrout.o \ + zoneconf.o \ + lwaddr.o lwresd.o lwdclient.o lwderror.o lwdgabn.o \ + lwdgnba.o lwdgrbn.o lwdnoop.o lwsearch.o \ +- ${DLZDRIVER_OBJS} ${DBDRIVER_OBJS} + + UOBJS = unix/os.o + +@@ -88,7 +87,7 @@ GENERATED = bind9.xsl.h + + SRCS = builtin.c client.c config.c control.c \ + controlconf.c interfacemgr.c \ +- listenlist.c log.c logconf.c main.c notify.c \ ++ listenlist.c log.c logconf.c main.c main-sdb.c notify.c \ + query.c server.c sortlist.c \ + tkeyconf.c tsigconf.c update.c xfrout.c \ + zoneconf.c \ +@@ -116,15 +115,26 @@ main.o: main.c + -DNS_LOCALSTATEDIR=\"${localstatedir}\" \ + -DNS_SYSCONFDIR=\"${sysconfdir}\" -c ${srcdir}/main.c + ++main-sdb.o : main-sdb.c ++ ${CC} ${ALL_CFLAGS} @USE_DLZ@ \ ++ -DVERSION=\"${VERSION}\" \ ++ -DNS_LOCALSTATEDIR=\"${localstatedir}\" \ ++ -DNS_SYSCONFDIR=\"${sysconfdir}\" -c ${srcdir}/main-sdb.c ++ + config.o: config.c + ${CC} ${ALL_CFLAGS} \ + -DVERSION=\"${VERSION}\" \ + -DNS_LOCALSTATEDIR=\"${localstatedir}\" \ + -c ${srcdir}/config.c + +-named@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS} ++named@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS} main.o ++ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ ++ ${OBJS} main.o ${UOBJS} ${LIBS} ++ ++named-sdb@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS} main-sdb.o ${DLZDRIVER_OBJS} ${DBDRIVER_OBJS} + ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \ +- ${OBJS} ${UOBJS} ${LIBS} ++ ${OBJS} main-sdb.o ${DLZDRIVER_OBJS} ${DBDRIVER_OBJS} ${UOBJS} ${LIBS} \ ++ ${DLZDRIVER_LIBS} ${DBDRIVER_LIBS} + + lwresd@EXEEXT@: named@EXEEXT@ + rm -f lwresd@EXEEXT@ +@@ -149,8 +159,9 @@ installdirs: + $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man5 + $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8 + +-install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs ++install:: named@EXEEXT@ named-sdb@EXEEXT@ lwresd@EXEEXT@ installdirs + ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir} ++ ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-sdb@EXEEXT@ ${DESTDIR}${sbindir} + (cd ${DESTDIR}${sbindir}; rm -f lwresd@EXEEXT@; @LN@ named@EXEEXT@ lwresd@EXEEXT@) + ${INSTALL_DATA} ${srcdir}/named.8 ${DESTDIR}${mandir}/man8 + ${INSTALL_DATA} ${srcdir}/lwresd.8 ${DESTDIR}${mandir}/man8 +diff -up bind-9.5.0a6/bin/named/main-sdb.c.sdb bind-9.5.0a6/bin/named/main-sdb.c +--- bind-9.5.0a6/bin/named/main-sdb.c.sdb 2007-11-15 10:10:06.000000000 +0100 ++++ bind-9.5.0a6/bin/named/main-sdb.c 2007-11-15 10:10:06.000000000 +0100 +@@ -72,6 +72,9 @@ + * Include header files for database drivers here. + */ + /* #include "xxdb.h" */ ++#include "ldapdb.h" ++#include "pgsqldb.h" ++#include "dirdb.h" + + /* + * Include DLZ drivers if appropriate. +@@ -641,6 +644,10 @@ setup(void) { + ns_main_earlyfatal("isc_app_start() failed: %s", + isc_result_totext(result)); + ++ ldapdb_clear(); ++ pgsqldb_clear(); ++ dirdb_clear(); ++ + isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, + ISC_LOG_NOTICE, "starting BIND %s%s", ns_g_version, + saved_command_line); +@@ -702,6 +709,57 @@ setup(void) { + isc_result_totext(result)); + #endif + ++ result = ldapdb_init(); ++ if (result != ISC_R_SUCCESS) ++ { ++ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, ++ ISC_LOG_ERROR, ++ "SDB ldap module initialisation failed: %s.", ++ isc_result_totext(result) ++ ); ++ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, ++ ISC_LOG_ERROR, ++ "SDB ldap zone database will be unavailable." ++ ); ++ }else ++ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, ++ ISC_LOG_NOTICE, "SDB ldap zone database module loaded." ++ ); ++ ++ result = pgsqldb_init(); ++ if (result != ISC_R_SUCCESS) ++ { ++ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, ++ ISC_LOG_ERROR, ++ "SDB pgsql module initialisation failed: %s.", ++ isc_result_totext(result) ++ ); ++ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, ++ ISC_LOG_ERROR, ++ "SDB pgsql zone database will be unavailable." ++ ); ++ }else ++ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, ++ ISC_LOG_NOTICE, "SDB postgreSQL DB zone database module loaded." ++ ); ++ ++ result = dirdb_init(); ++ if (result != ISC_R_SUCCESS) ++ { ++ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, ++ ISC_LOG_ERROR, ++ "SDB directory DB module initialisation failed: %s.", ++ isc_result_totext(result) ++ ); ++ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, ++ ISC_LOG_ERROR, ++ "SDB directory DB zone database will be unavailable." ++ ); ++ }else ++ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, ++ ISC_LOG_NOTICE, "SDB directory DB zone database module loaded." ++ ); ++ + ns_server_create(ns_g_mctx, &ns_g_server); + } + +@@ -727,6 +785,10 @@ cleanup(void) { + + dns_name_destroy(); + ++ ldapdb_clear(); ++ pgsqldb_clear(); ++ dirdb_clear(); ++ + isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, + ISC_LOG_NOTICE, "exiting"); + ns_log_shutdown(); diff --git a/bind.spec b/bind.spec index f28fce1..40c2a6a 100644 --- a/bind.spec +++ b/bind.spec @@ -21,7 +21,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv Name: bind License: ISC Version: 9.5.0 -Release: 16.4.%{RELEASEVER}%{?dist} +Release: 16.5.%{RELEASEVER}%{?dist} Epoch: 32 Url: http://www.isc.org/products/BIND/ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -69,7 +69,7 @@ Patch80: bind-9.5-edns.patch # SDB patches Patch11: bind-9.3.2b2-sdbsrc.patch -Patch12: bind-9.3.1rc1-sdb.patch +Patch12: bind-9.5-sdb.patch Patch62: bind-9.4.0-sdb-sqlite-bld.patch Patch68: bind-9.4.1-ldap-api.patch @@ -90,8 +90,8 @@ Requires: bind-libs = %{epoch}:%{version}-%{release}, glibc >= 2.2, mktemp Requires(post): grep, chkconfig >= 1.3.26 Requires(pre): shadow-utils Requires(preun):chkconfig >= 1.3.26 -Obsoletes: bind-config, caching-nameserver, bind-sdb -Provides: bind-config, caching-nameserver, bind-sdb +Obsoletes: bind-config, caching-nameserver +Provides: bind-config, caching-nameserver %if %{selinux} Requires(post): policycoreutils %endif @@ -121,11 +121,23 @@ BIND (Berkeley Internet Name Domain) is an implementation of the DNS which resolves host names to IP addresses; a resolver library (routines for applications to use when interfacing with DNS); and tools for verifying that the DNS server is operating properly. -It also includes SDB (Simplified Database Backend) which includes support for -using alternative Zone Databases stored in an LDAP server (ldapdb), -a postgreSQL database (pgsqldb), an sqlite database (sqlitedb), + +%if %{SDB} +%package sdb +Summary: BIND server with database backends and DLZ suppport +Group: System Environment/Daemons +Requires: bind = %{epoch}:%{version}-%{release} + +%description sdb +BIND (Berkeley Internet Name Domain) is an implementation of the DNS +(Domain Name System) protocols. BIND includes a DNS server (named-sdb) +which has compiled-in SDB (Simplified Database Backend) which includes +support for using alternative Zone Databases stored in an LDAP server +(ldapdb), a postgreSQL database (pgsqldb), an sqlite database (sqlitedb), or in the filesystem (dirdb), in addition to the standard in-memory RBT -(Red Black Tree) zone database. +(Red Black Tree) zone database. It also includes support for DLZ +(Dynamic Loadable Zones) +%endif %package libs Summary: Libraries used by the BIND DNS packages @@ -194,6 +206,7 @@ Based on the code from Jan "Yenya" Kasprzak %patch69 -p1 -b .generate-xml %if %{SDB} %patch11 -p1 -b .sdbsrc +cp -f bin/named/main.c bin/named/main-sdb.c # SDB ldap cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named # SDB postgreSQL @@ -405,7 +418,7 @@ for f in my.internal.zone.db slaves/my.slave.internal.zone.db slaves/my.ddns.int echo '@ in soa localhost. root 1 3H 15M 1W 1D ns localhost.' > sample/var/named/$f; done -/usr/bin/tail -n '+'`/bin/egrep -n '\\$Id: bind.spec,v 1.226 2007/11/12 16:29:47 atkac Exp $/+1/' | bc` bin/rndc/rndc.conf | sed '/Sample rndc configuration file./{p;i\ +/usr/bin/tail -n '+'`/bin/egrep -n '\\$Id: bind.spec,v 1.227 2007/11/15 10:49:41 atkac Exp $/+1/' | bc` bin/rndc/rndc.conf | sed '/Sample rndc configuration file./{p;i\ *\ * NOTE: you only need to create this file if it is to\ * differ from the following default contents: @@ -455,6 +468,14 @@ if [ "$1" -ge 1 ]; then fi; :; +%if %{SDB} +%post sdb +/sbin/service named try-restart > /dev/null 2>&1 || :; + +%postun sdb +/sbin/service named try-restart > /dev/null 2>&1 || :; +%endif + %triggerpostun -- bind < 8.2.2_P5-15 /sbin/chkconfig --add named /sbin/ldconfig @@ -537,12 +558,6 @@ rm -rf ${RPM_BUILD_ROOT} %{_sbindir}/named-bootconf %{_sbindir}/rndc* %{_sbindir}/named-compilezone -%if %{SDB} -%{_sbindir}/zone2ldap -%{_sbindir}/ldap2zone -%{_sbindir}/zonetodb -%{_sbindir}/zone2sqlite -%endif %defattr(0644,root,root,0755) %{_mandir}/man5/named.conf.5* %{_mandir}/man5/rndc.conf.5* @@ -554,10 +569,6 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man8/named-checkzone.8* %{_mandir}/man8/named-compilezone.8* %{_mandir}/man8/rndc-confgen.8* -%if %{SDB} -%{_mandir}/man1/zone2ldap.1* -%doc contrib/sdb/ldap/README.ldap contrib/sdb/ldap/INSTALL.ldap contrib/sdb/pgsql/README.sdb_pgsql -%endif %doc CHANGES COPYRIGHT README %doc doc/arm doc/misc %doc sample/ @@ -568,9 +579,21 @@ rm -rf ${RPM_BUILD_ROOT} %attr(750,root,root) %{_sbindir}/namedGetForwarders %attr(750,root,root) %{_sbindir}/namedSetForwarders %endif + %if %{SDB} +%files sdb +%defattr(0644,root,root,0755) +%{_mandir}/man1/zone2ldap.1* +%doc contrib/sdb/ldap/README.ldap contrib/sdb/ldap/INSTALL.ldap contrib/sdb/pgsql/README.sdb_pgsql %dir %{_sysconfdir}/openldap/schema %config(noreplace) %{_sysconfdir}/openldap/schema/dnszone.schema +%defattr(0750,root,root,0755) +%{_sbindir}/named-sdb +%{_sbindir}/zone2ldap +%{_sbindir}/ldap2zone +%{_sbindir}/zonetodb +%{_sbindir}/zone2sqlite + %endif @@ -648,6 +671,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_sbindir}/bind-chroot-admin %changelog +* Wed Nov 15 2007 Adam Tkac 32:9.5.0-16.5.a6 +- added bind-sdb again, contains SDB modules and DLZ modules +- bind-9.3.1rc1-sdb.patch replaced by bind-9.5-sdb.patch + * Mon Nov 12 2007 Adam Tkac 32:9.5.0-16.4.a6 - removed Requires: openldap, postgresql, mysql, db4, unixODBC - new L.ROOT-SERVERS.NET address diff --git a/named.init b/named.init index ea508ca..a3498c1 100755 --- a/named.init +++ b/named.init @@ -26,6 +26,11 @@ RETVAL=0 export KRB5_KTNAME=${KEYTAB_FILE:-/etc/named.keytab} +named='named' +if [ -x /usr/sbin/named-sdb ]; then + named='named-sdb' +fi + # Don't kill named during clean-up NAMED_SHUTDOWN_TIMEOUT=${NAMED_SHUTDOWN_TIMEOUT:-100} @@ -63,7 +68,7 @@ start() [ "${NETWORKING}" = "no" ] && exit 1 - [ -x /usr/sbin/named ] || exit 5 + [ -x /usr/sbin/"$named" ] || exit 5 # Handle -c option previous_option='unspecified'; @@ -83,7 +88,7 @@ start() # all pre-start is done, lets start named echo -n $"Starting named: " - if [ -n "`/sbin/pidof -o %PPID named`" ]; then + if [ -n "`/sbin/pidof -o %PPID "$named"`" ]; then echo -n $"named: already running" failure echo @@ -112,19 +117,18 @@ start() # check if configuration is correct if [ -x /usr/sbin/named-checkconf ] && [ -x /usr/sbin/named-checkzone ] && /usr/sbin/named-checkconf $ckcf_options ${named_conf} >/dev/null 2>&1; then - daemon /usr/sbin/named -u named ${OPTIONS}; + daemon /usr/sbin/"$named" -u named ${OPTIONS}; RETVAL=$? if [ $RETVAL -eq 0 ]; then - rm -f /var/run/named.pid; - rm -f /var/run/named_sdb.pid; - ln -s $ROOTDIR/var/run/named/named.pid /var/run/named.pid; + rm -f /var/run/{named,named-sdb}.pid; + ln -s $ROOTDIR/var/run/named/"$named".pid /var/run/"$named".pid; fi; - if [ -n "`/sbin/pidof -o %PPID named`" ]; then + if [ -n "`/sbin/pidof -o %PPID "$named"`" ]; then # Verify that named actually started (JM 2006-10-04) - if [ ! -e $ROOTDIR/var/run/named/named.pid ]; then + if [ ! -e $ROOTDIR/var/run/named/"$named".pid ]; then # If there is not a file containing the PID of the now running named daemon then create it (JM 2006-10-04) - echo `/sbin/pidof -o %PPID named` > $ROOTDIR/var/run/named/named.pid; + echo `/sbin/pidof -o %PPID "$named"` > $ROOTDIR/var/run/named/"$named".pid; fi; fi; else @@ -152,12 +156,12 @@ stop() { [ -x /usr/sbin/rndc ] && /usr/sbin/rndc stop >/dev/null 2>&1; RETVAL=$? # is it still here? - if /sbin/pidof -o %PPID named >/dev/null; then + if /sbin/pidof -o %PPID "$named" >/dev/null; then timeout=0 while : ; do - if /sbin/pidof -o %PPID named >/dev/null; then + if /sbin/pidof -o %PPID "$named" >/dev/null; then if [ $timeout -ge $NAMED_SHUTDOWN_TIMEOUT ]; then - killproc named -TERM >/dev/null 2>&1 + killproc "$named" -TERM >/dev/null 2>&1 RETVAL=$? echo $"no response, killing with -TERM " break @@ -174,7 +178,7 @@ stop() { # remove pid files if [ $RETVAL -eq 0 ]; then rm -f /var/lock/subsys/named - rm -f /var/run/named.pid + rm -f /var/run/{named,named-sdb}.pid fi; # unmount mounted filesystems/directories @@ -201,7 +205,7 @@ stop() { rhstatus() { [ -x /usr/sbin/rndc ] && /usr/sbin/rndc status; - status /usr/sbin/named; + status /usr/sbin/"$named"; return $? } restart() { @@ -209,14 +213,14 @@ restart() { start } reload() { - echo -n $"Reloading named: " - p=`/sbin/pidof -o %PPID named` + echo -n $"Reloading "$named": " + p=`/sbin/pidof -o %PPID "$named"` RETVAL=$? if [ "$RETVAL" -eq 0 ]; then /usr/sbin/rndc reload >/dev/null 2>&1 || /bin/kill -HUP $p; RETVAL=$? fi - [ "$RETVAL" -eq 0 ] && success $"named reload" || failure $"named reload" + [ "$RETVAL" -eq 0 ] && success $"$named reload" || failure $"$named reload" echo return $RETVAL }