diff options
| author | Adam Tkac <atkac@fedoraproject.org> | 2007-11-15 10:50:41 +0000 |
|---|---|---|
| committer | Adam Tkac <atkac@fedoraproject.org> | 2007-11-15 10:50:41 +0000 |
| commit | 429d2e2cb523882c6c0e8db5979cc0fb487d73dc (patch) | |
| tree | c1c5071e05bdd46e012e91869976730a62b95d01 | |
| parent | 746204d389858522e97e860f570cbb0b4cd63a1c (diff) | |
- added bind-sdb again, contains SDB modules and DLZ modules (#374261)
- bind-9.3.1rc1-sdb.patch replaced by bind-9.5-sdb.patch
| -rw-r--r-- | bind-9.3.1rc1-sdb.patch | 128 | ||||
| -rw-r--r-- | bind-9.3.2-redhat_doc.patch | 4 | ||||
| -rw-r--r-- | bind-9.4.0-sdb-sqlite-bld.patch | 4 | ||||
| -rw-r--r-- | bind.spec | 65 | ||||
| -rwxr-xr-x | named.init | 38 |
5 files changed, 70 insertions, 169 deletions
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" @@ -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.2.%{RELEASEVER}%{?dist} +Release: 16.3.%{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 <kas@fi.muni.cz> %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.225 2007/11/12 16:07:06 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.226 2007/11/15 10:50: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,12 +579,22 @@ 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 - %files libs %defattr(-,root,root,0755) %{_libdir}/*so.* @@ -648,6 +669,10 @@ rm -rf ${RPM_BUILD_ROOT} %{_sbindir}/bind-chroot-admin %changelog +* Wed Nov 15 2007 Adam Tkac <atkac redhat com> 32:9.5.0-16.3.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 <atkac redhat com> 32:9.5.0-16.2.a6 - removed Requires: openldap, postgresql, mysql, db4, unixODBC (#374261) - new L.ROOT-SERVERS.NET address @@ -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/bin/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 } |
