- renamed idn patches

- named could find zone to freeze correctly now (#236426)
This commit is contained in:
Adam Tkac 2007-04-18 11:25:21 +00:00
parent 0c76cb3934
commit 205d5ef896
4 changed files with 991 additions and 21 deletions

24
bind-9.4.0-dig-idn.patch Normal file
View File

@ -0,0 +1,24 @@
--- bind-9.4.0/bin/dig/Makefile.in.idn 2007-04-16 15:46:29.000000000 +0200
+++ bind-9.4.0/bin/dig/Makefile.in 2007-04-16 15:50:24.000000000 +0200
@@ -24,7 +24,7 @@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${BIND9_INCLUDES} \
- ${ISC_INCLUDES} ${LWRES_INCLUDES}
+ ${ISC_INCLUDES} ${LWRES_INCLUDES} -I../../contrib/idn/idnkit-1.0-src/include
CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS =
@@ -42,10 +42,10 @@
LWRESDEPLIBS = ../../lib/lwres/liblwres.@A@
DEPLIBS = ${DNSDEPLIBS} ${BIND9DEPLIBS} ${ISCDEPLIBS} ${ISCCFGDEPLIBS} \
- ${LWRESDEPLIBS}
+ ${LWRESDEPLIBS}
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} \
- ${ISCCFGLIBS} @IDNLIBS@ @LIBS@
+ ${ISCCFGLIBS} ../../contrib/idn/idnkit-1.0-src/lib/libidnkit.la @LIBS@
SUBDIRS =

View File

@ -0,0 +1,834 @@
--- idnkit-1.0-src/map/Makefile.am.autotools 2007-04-16 13:40:22.000000000 +0200
+++ idnkit-1.0-src/map/Makefile.am 2007-04-16 12:51:15.000000000 +0200
@@ -0,0 +1,2 @@
+map_DATA = \
+ jp.map
--- idnkit-1.0-src/Makefile.am.autotools 2007-04-16 13:39:09.000000000 +0200
+++ idnkit-1.0-src/Makefile.am 2007-04-15 17:24:51.000000000 +0200
@@ -0,0 +1,6 @@
+SUBDIRS = \
+ include \
+ lib \
+ man \
+ tools \
+ map
--- idnkit-1.0-src/tools/Makefile.am.autotools 2007-04-16 13:40:02.000000000 +0200
+++ idnkit-1.0-src/tools/Makefile.am 2007-04-16 12:03:20.000000000 +0200
@@ -0,0 +1,3 @@
+SUBDIRS = \
+ idnconv \
+ runidn
--- idnkit-1.0-src/tools/runidn/Makefile.am.autotools 2007-04-16 13:40:05.000000000 +0200
+++ idnkit-1.0-src/tools/runidn/Makefile.am 2007-04-16 13:17:17.000000000 +0200
@@ -0,0 +1,35 @@
+if RUNIDN
+bin_SCRIPTS =
+man1_MANS =
+lib_LTLIBRARIES = libidnkitres.la
+
+libidnkitres_la_SOURCES = \
+ resolver.lo stub.lo
+
+AM_CPPFLAGS = \
+ -DFOR_RUNIDN \
+ -I$(top_srcdir)/include \
+ $(ICONVINC)
+
+libidnkitres_la_LIBADD = \
+ $(top_srcdir)/lib/libidnkit.la \
+ $(LIBDL)
+
+AM_LDFLAGS = \
+ -version-number 1:0:1
+
+if COMPAT
+bin_SCRIPTS += runmdn
+man1_MANS += runmdn.1
+else
+bin_SCRIPTS += runidn
+man1_MANS += runidn.1
+endif
+
+runmdn: runidn
+ cp -f runidn runmdn
+
+runmdn.1: runidn.1
+ cp -f runidn.1 runmdn.1
+
+endif
--- idnkit-1.0-src/tools/idnconv/Makefile.am.autotools 2007-04-16 13:40:08.000000000 +0200
+++ idnkit-1.0-src/tools/idnconv/Makefile.am 2007-04-16 13:35:51.000000000 +0200
@@ -0,0 +1,29 @@
+if ! LITEONLY
+bin_PROGRAMS =
+man1_MANS =
+if COMPAT
+bin_PROGRAMS += mdnconva
+man1_MANS += mdnconv.1
+else
+bin_PROGRAMS += idnconv
+man1_MANS += idnconv.1
+endif
+
+idnconv_SOURCES = \
+ idnconv.c \
+ util.c \
+ selectiveencode.c
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ $(ICONVINC)
+
+idnconv_LDADD = \
+ $(top_srcdir)/lib/libidnkit.la
+
+mdnconv: idnconv
+ cp -f idnconv$(EXEEXT) mdnconv$(EXEEXT)
+
+mdnconv.1: idnconv.1
+ cp -f idnconv.1 mdnconv.1
+endif
--- idnkit-1.0-src/lib/Makefile.am.autotools 2007-04-16 13:39:47.000000000 +0200
+++ idnkit-1.0-src/lib/Makefile.am 2007-04-16 13:11:02.000000000 +0200
@@ -0,0 +1,85 @@
+lib_LTLIBRARIES = libidnkitlite.la
+if ! LITEONLY
+lib_LTLIBRARIES += libidnkit.la
+endif
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ $(ICONVINC) \
+ -DIDN_RESCONF_DIR="\"$(sysconfdir)\""
+
+AM_LDFLAGS = \
+ -version-number 1:0:2
+
+libidnkitlite_la_SOURCES = \
+ aliaslist.c \
+ api.c \
+ checker.c \
+ converter.c \
+ debug.c \
+ delimitermap.c \
+ filechecker.c \
+ filemapper.c \
+ log.c \
+ mapper.c \
+ mapselector.c \
+ nameprep.c \
+ normalizer.c \
+ punycode.c \
+ race.c \
+ res.c \
+ resconf.c \
+ result.c \
+ strhash.c \
+ ucsmap.c \
+ ucsset.c \
+ unicode.c \
+ unormalize.c \
+ ucs4.c \
+ utf8.c \
+ util.c \
+ version.c
+
+libidnkitlite_la_CPPFLAGS = \
+ -DWITHOUT_ICONV
+
+if ! LITEONLY
+libidnkit_la_SOURCES = \
+ aliaslist.c \
+ api.c \
+ checker.c \
+ converter.c \
+ debug.c \
+ delimitermap.c \
+ filechecker.c \
+ filemapper.c \
+ localencoding.c \
+ log.c \
+ mapper.c \
+ mapselector.c \
+ nameprep.c \
+ normalizer.c \
+ punycode.c \
+ race.c \
+ res.c \
+ resconf.c \
+ result.c \
+ strhash.c \
+ ucs4.c \
+ ucsmap.c \
+ ucsset.c \
+ unicode.c \
+ unormalize.c \
+ utf8.c \
+ util.c \
+ version.c
+endif
+
+sys_DATA = idn.conf idnalias.conf
+
+idn.conf: idn.conf.sample.in
+ sed -e 's%[@]mapdir[@]%$(datadir)/idnkit%' < idn.conf.sample.in > $@
+
+idnalias.conf: Makefile
+ $(SHELL) aliaslist.sh $(build) $(UTF8_NAME) > $@
+
--- idnkit-1.0-src/include/Makefile.am.autotools 2007-04-16 13:39:19.000000000 +0200
+++ idnkit-1.0-src/include/Makefile.am 2007-04-15 17:25:36.000000000 +0200
@@ -0,0 +1,3 @@
+SUBDIRS = \
+ idn \
+ mdn
--- idnkit-1.0-src/include/mdn/Makefile.am.autotools 2007-04-16 13:39:35.000000000 +0200
+++ idnkit-1.0-src/include/mdn/Makefile.am 2007-04-15 17:28:26.000000000 +0200
@@ -0,0 +1,10 @@
+if COMPAT
+mdn_HEADERS = \
+ api.h \
+ log.h \
+ res.h \
+ resconf.h \
+ result.h \
+ utf8.h \
+ version.h
+endif
--- idnkit-1.0-src/include/idn/Makefile.am.autotools 2007-04-16 13:39:24.000000000 +0200
+++ idnkit-1.0-src/include/idn/Makefile.am 2007-04-15 17:27:12.000000000 +0200
@@ -0,0 +1,32 @@
+idn_HEADERS = \
+ api.h \
+ assert.h \
+ checker.h \
+ converter.h \
+ debug.h \
+ delimitermap.h \
+ export.h \
+ filechecker.h \
+ filemapper.h \
+ localencoding.h \
+ log.h \
+ logmacro.h \
+ mapper.h \
+ mapselector.h \
+ nameprep.h \
+ normalizer.h \
+ punycode.h \
+ race.h \
+ res.h \
+ resconf.h \
+ result.h \
+ strhash.h \
+ ucsmap.h \
+ ucsset.h \
+ unicode.h \
+ unormalize.h \
+ ucs4.h \
+ utf8.h \
+ util.h \
+ version.h
+
--- idnkit-1.0-src/configure.ac.autotools 2007-04-16 13:39:01.000000000 +0200
+++ idnkit-1.0-src/configure.ac 2007-04-16 13:32:59.000000000 +0200
@@ -0,0 +1,553 @@
+dnl $Id: configure.in,v 1.1.1.1 2003/06/04 00:25:25 marka Exp $
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl Copyright (c) 2000 Japan Network Information Center. All rights reserved.
+dnl
+dnl By using this file, you agree to the terms and conditions set forth bellow.
+dnl
+dnl LICENSE TERMS AND CONDITIONS
+dnl
+dnl The following License Terms and Conditions apply, unless a different
+dnl license is obtained from Japan Network Information Center ("JPNIC"),
+dnl a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
+dnl Chiyoda-ku, Tokyo 101-0047, Japan.
+dnl
+dnl 1. Use, Modification and Redistribution (including distribution of any
+dnl modified or derived work) in source and/or binary forms is permitted
+dnl under this License Terms and Conditions.
+dnl
+dnl 2. Redistribution of source code must retain the copyright notices as they
+dnl appear in each source code file, this License Terms and Conditions.
+dnl
+dnl 3. Redistribution in binary form must reproduce the Copyright Notice,
+dnl this License Terms and Conditions, in the documentation and/or other
+dnl materials provided with the distribution. For the purposes of binary
+dnl distribution the "Copyright Notice" refers to the following language:
+dnl "Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved."
+dnl
+dnl 4. The name of JPNIC may not be used to endorse or promote products
+dnl derived from this Software without specific prior written approval of
+dnl JPNIC.
+dnl
+dnl 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
+dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
+dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+dnl BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+dnl WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+dnl OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+dnl ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+AC_PREREQ(2.59)
+AC_INIT([idnkit], [1.0], [bind9-bugs@isc.org])
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
+
+idndir="$includedir/idn"
+mdndir="$includedir/mdn"
+sysdir="$sysconfdir"
+mapdir="$datadir/idnkit"
+AC_SUBST(idndir)
+AC_SUBST(mdndir)
+AC_SUBST(sysdir)
+AC_SUBST(mapdir)
+
+AC_ARG_ENABLE([debug],
+ AS_HELP_STRING([--enable-debug], [enable debug codes [default=no]]),
+ [debug=$enableval], [debug=no])
+if test "$debug" = "yes"; then
+ CFLAGS="$CFLAGS -DDEBUG"
+fi
+
+AC_ARG_ENABLE([mdnkit-compat],
+ AS_HELP_STRING([--enable-mdnkit-compat], [enable mDNkit compatibility mode [default=no]]),
+ [mdnkit_compat=$enableval], [mdnkit_compat=no])
+if test "$mdnkit_compat" = "yes"; then
+ AC_DEFINE(ENABLE_MDNKIT_COMPAT, 1, [--enable-mdnkit-compat is specified])
+fi
+AM_CONDITIONAL(COMPAT, [test "$mdnkit_compat" = "yes"])
+
+AC_ARG_ENABLE([extra-ace],
+ AS_HELP_STRING([--enable-extra-ace], [enable additional ACE converters. [default=no]]),
+ [extraace=$enableval], [extraace=no])
+if test "$mdnkit_compat" = "yes"; then
+ AC_DEFINE(IDN_EXTRA_ACE, 1, [additional ACE converters compiled in.])
+fi
+
+AC_ARG_WITH([utf8],
+ AS_HELP_STRING([--with-utf8=NAME], [codeset name for UTF-8 encoding [UTF-8]]),
+ [UTF8_NAME="$withval"], [UTF8_NAME="UTF-8"])
+AC_DEFINE_UNQUOTED(IDN_UTF8_ENCODING_NAME, "$UTF8_NAME", [Define your iconv codeset name for utf-8.])
+AC_SUBST(UTF8_NAME)
+
+AC_ARG_ENABLE([liteonly],
+ AS_HELP_STRING([--enable-liteonly], [compile and install lite library only [default=no]]),
+ [liteonly=$enableval], [liteonly=no])
+AM_CONDITIONAL(LITEONLY, [test "$liteonly" = "yes"])
+
+AC_ARG_ENABLE([runidn],
+ AS_HELP_STRING([--enable-runidn], [compile and install runidn [default=no]]),
+ [install_runidn=$enableval], [install_runidn=no])
+if test "$install_runidn" = "yes"; then
+ if test "$liteonly" = "yes"; then
+ AC_MSG_ERROR([you can't set --enable-runidn and --enable-liteonly simultaneously])
+ fi
+fi
+AM_CONDITIONAL(RUNIDN, [test "$install_runidn" = "yes"])
+
+AC_ARG_WITH([iconv-include],
+ AS_HELP_STRING([--with-iconv-include=DIR], [iconv include files are in DIR []]),
+ [iconv_include="$withval"], [iconv_include="$includedir"])
+ICONVINC="-I$iconv_include"
+AC_SUBST(ICONVINC)
+
+AC_ARG_WITH([iconv],
+ AS_HELP_STRING([--with-iconv=LIB], [library for iconv []]),
+ [iconv="$withval"], [iconv="-lc"])
+ICONVLIB=$iconv
+AC_SUBST(ICONVLIB)
+
+AC_ARG_WITH([iconv-sofile],
+ AS_HELP_STRING([--with-iconv-sofile=PATH], [shared library file for libiconv]),
+ [ICONVSOFILE=$withval], [ICONVSOFILE=guess])
+if test "$ICONVSOFILE" = guess; then
+ if test "$liteonly" != yes ; then
+ if test "$ICONVLIB" = ""; then
+ ICONVSOFILE=none
+ else
+ AC_MSG_CHECKING(pathname of iconv shared library)
+ ic_libdir=
+ ic_libname=
+ case "$host" in
+ *-hpux*)
+ SO=sl
+ ;;
+ *)
+ SO=so
+ ;;
+ esac
+ for arg in $ICONVLIB; do
+ case "$arg" in
+ -L*) ic_libdir="$ic_libdir `echo $arg | sed s/-L//`" ;;
+ -l*) ic_libname=`echo $arg | sed s/-l//` ;;
+ /*.$SO*) ICONVSOFILE=$arg ;;
+ esac
+ done
+ if test "$ICONVSOFILE" = guess; then
+ if test "$ic_libname" = ""; then
+ AC_MSG_RESULT(unknown)
+ AC_MSG_WARN([use --with-iconv-sofile for specifying iconv shared library file])
+ ICONVSOFILE=none
+ else
+ if test "$ic_libdir" = ""; then
+ # Standard (and semi-standard) library directories
+ ic_libdir="/lib /usr/lib /usr/local/lib"
+ fi
+ for dir in $ic_libdir; do
+ ICONVSOFILE=`ls -r $dir/lib$ic_libname.$SO* 2>/dev/null | head -1`
+ if test "$ICONVSOFILE" != ""; then
+ break
+ fi
+ done
+ if test "$ICONVSOFILE" != ""; then
+ AC_MSG_RESULT($ICONVSOFILE)
+ else
+ AC_MSG_RESULT(unknown)
+ AC_MSG_WARN([use --with-iconv-sofile for specifying iconv shared library file])
+ ICONVSOFILE=none
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+AC_SUBST(ICONVSOFILE)
+
+dnl Figure out preload stuff.
+PRELOAD_VAR="LD_PRELOAD"
+PRELOAD_SEP=":"
+PRELOAD_LAST=""
+case "$host" in
+*-solaris*)
+ PRELOAD_SEP=" "
+ ;;
+*-linux*)
+ PRELOAD_SEP=" "
+ ;;
+*-osf*)
+ PRELOAD_VAR="_RLD_LIST"
+ PRELOAD_LAST=":DEFAULT"
+ ;;
+*-netbsd*)
+ if test -x /usr/bin/file -a -x /usr/bin/grep ; then
+ case "`/usr/bin/file /usr/bin/grep`" in
+ *ELF*)
+ PRELOAD_SEP=" "
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+AC_SUBST(PRELOAD_VAR)
+AC_SUBST(PRELOAD_SEP)
+AC_SUBST(PRELOAD_LAST)
+
+dnl Checks for standard tools.
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CXX
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
+AM_PROG_LIBTOOL
+
+AC_PATH_PROGS(PERL, perl, perl)
+
+dnl Checks for header files.
+AC_CHECK_HEADERS(pwd.h langinfo.h locale.h netdb.h stddef.h stdlib.h string.h sys/socket.h unistd.h)
+if test "$install_runidn" = "yes"; then
+ AC_CHECK_HEADERS(dlfcn.h)
+fi
+
+saved_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS $ICONVINC"
+if test "$liteonly" != "yes"; then
+ AC_CHECK_HEADERS(iconv.h)
+fi
+CPPFLAGS=$saved_CPPFLAGS
+
+dnl Checks for data types.
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_TYPE_UID_T
+AC_CHECK_TYPES([ptrdiff_t])
+
+dnl for dnsproxy.
+AC_CHECK_TYPE(BOOL, int)
+
+dnl Checks for libraries.
+if test "$install_runidn" = yes ; then
+ AC_CHECK_LIB(socket, socket)
+ AC_CHECK_LIB(nsl, inet_addr)
+ AC_CHECK_LIB(dl, dlopen, [
+ LIBS="-ldl $LIBS"
+ LIBDL="-ldl"
+ AC_DEFINE(HAVE_LIBDL, 1, [Define if you have the dl library (-ldl).])
+ AC_SUBST(LIBDL)
+ ])
+fi
+
+dnl Checks for library functions.
+AC_FUNC_MALLOC
+AC_FUNC_MEMCMP
+AC_FUNC_REALLOC
+AC_FUNC_SELECT_ARGTYPES
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS(vsnprintf setvbuf setlocale nl_langinfo memmove bcopy setenv unsetenv inet_ntoa socket gethostname isascii memset putenv select sethostname strchr strerror strpbrk strrchr strtoul)
+if test "$install_runidn" = yes ; then
+ AC_CHECK_FUNCS(gethostbyname gethostbyname2 gethostbyaddr)
+ AC_CHECK_FUNCS(gethostbyname_r gethostbyname2_r gethostbyaddr_r, find_gethost_r=yes)
+ AC_CHECK_FUNCS(getipnodebyname getipnodebyaddr freehostent)
+ AC_CHECK_FUNCS(getaddrinfo freeaddrinfo getnameinfo)
+ AC_CHECK_FUNCS(dlopen dlsym)
+fi
+
+if test "$install_runidn" = yes ; then
+dnl Checks the flavor of gethostbyaddr* functions.
+ AC_CACHE_CHECK(flavor of gethostbyaddr, ac_cv_flavor_gethostbyaddr,
+ [ac_cv_flavor_gethostbyaddr=unknown
+ AC_TRY_RUN(
+ [
+ #include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+ struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type) {
+ return NULL;
+ }
+ int main() {
+ (void)gethostbyaddr(NULL, 0, 0);
+ return 0;
+ }
+ ], ac_cv_flavor_gethostbyaddr=glibc2_2,,
+ ac_cv_flavor_gethostbyaddr=unknown)
+ AC_TRY_RUN(
+ [
+ #include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+ struct hostent *gethostbyaddr(const char *addr, size_t len, int type) {
+ return NULL;
+ }
+ int main() {
+ (void)gethostbyaddr(NULL, 0, 0);
+ return 0;
+ }
+ ], ac_cv_flavor_gethostbyaddr=glibc,,
+ ac_cv_flavor_gethostbyaddr=unknown)
+ AC_TRY_RUN(
+ [
+ #include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+ struct hostent *gethostbyaddr(const char *addr, int len, int type) {
+ return NULL;
+ }
+ int main() {
+ (void)gethostbyaddr(NULL, 0, 0);
+ return 0;
+ }
+ ], ac_cv_flavor_gethostbyaddr=traditional,,
+ ac_cv_flavor_gethostbyaddr=unknown)
+ if test "$ac_cv_func_gethostbyaddr" = no ; then
+ ac_cv_flavor_gethostbyaddr=none
+ fi])
+
+ case "$ac_cv_flavor_gethostbyaddr" in
+ glibc2_2)
+ ac_cv_type_ghba_addr_t='const void *'
+ ac_cv_type_ghba_addrlen_t='socklen_t'
+ ;;
+ glibc)
+ ac_cv_type_ghba_addr_t='const char *'
+ ac_cv_type_ghba_addrlen_t='size_t'
+ ;;
+ traditional | none)
+ ac_cv_type_ghba_addr_t='const char *'
+ ac_cv_type_ghba_addrlen_t='int'
+ ;;
+ *)
+ AC_MSG_ERROR([can't build runidn, since parameter type list of gethostbyaddr() is unknown to configure.])
+ ;;
+ esac
+ AC_DEFINE_UNQUOTED(GHBA_ADDR_T, $ac_cv_type_ghba_addr_t,
+ [Define as the type of the 1st argument of gethostbyaddr.])
+ AC_DEFINE_UNQUOTED(GHBA_ADDRLEN_T, $ac_cv_type_ghba_addrlen_t,
+ [Define as the type of the 2nd argument of gethostbyaddr.])
+
+dnl Checks the flavor of getnameinfo functions.
+ AC_CACHE_CHECK(flavor of getnameinfo, ac_cv_flavor_getnameinfo,
+ [ac_cv_flavor_getnameinfo=unknown
+ AC_TRY_RUN(
+ [
+ #include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+ int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
+ socklen_t hostlen, char *serv, socklen_t servlen,
+ unsigned int flags) {
+ return NULL;
+ }
+ int main() {
+ (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
+ return 0;
+ }
+ ], ac_cv_flavor_getnameinfo=glibc2_2_2,,
+ ac_cv_flavor_getnameinfo=unknown)
+ AC_TRY_RUN(
+ [
+ #include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+ int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
+ socklen_t hostlen, char *serv, socklen_t servlen,
+ int flags) {
+ return NULL;
+ }
+ int main() {
+ (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
+ return 0;
+ }
+ ], ac_cv_flavor_getnameinfo=rfc2553bis_03,,
+ ac_cv_flavor_getnameinfo=unknown)
+ AC_TRY_RUN(
+ [
+ #include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+ int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
+ size_t hostlen, char *serv, size_t servlen, int flags) {
+ return NULL;
+ }
+ int main() {
+ (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
+ return 0;
+ }
+ ], ac_cv_flavor_getnameinfo=rfc2553,,
+ ac_cv_flavor_getnameinfo=unknown)
+ AC_TRY_RUN(
+ [
+ #include <stddef.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netdb.h>
+ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
+ size_t hostlen, char *serv, size_t servlen, int flags) {
+ return NULL;
+ }
+ int main() {
+ (void)getnameinfo(NULL, 0, NULL, 0, NULL, 0, 0);
+ return 0;
+ }
+ ], ac_cv_flavor_getnameinfo=rfc2133,,
+ ac_cv_flavor_getnameinfo=unknown)
+ if test "$ac_cv_func_getnameinfo" = no ; then
+ ac_cv_flavor_getnameinfo=none
+ fi])
+
+ case "$ac_cv_flavor_getnameinfo" in
+ glibc2_2_2)
+ ac_cv_type_gni_salen_t='socklen_t'
+ ac_cv_type_gni_hostlen_t='socklen_t'
+ ac_cv_type_gni_servlen_t='socklen_t'
+ ac_cv_type_gni_flags_t='unsigned int'
+ ;;
+ rfc2553bis_03)
+ ac_cv_type_gni_salen_t='socklen_t'
+ ac_cv_type_gni_hostlen_t='socklen_t'
+ ac_cv_type_gni_servlen_t='socklen_t'
+ ac_cv_type_gni_flags_t='int'
+ ;;
+ rfc2553)
+ ac_cv_type_gni_salen_t='socklen_t'
+ ac_cv_type_gni_hostlen_t='size_t'
+ ac_cv_type_gni_servlen_t='size_t'
+ ac_cv_type_gni_flags_t='int'
+ ;;
+ rfc2133 | none)
+ ac_cv_type_gni_salen_t='size_t'
+ ac_cv_type_gni_hostlen_t='size_t'
+ ac_cv_type_gni_servlen_t='size_t'
+ ac_cv_type_gni_flags_t='int'
+ ;;
+ *)
+ AC_MSG_ERROR([can't build runidn, since parameter type list of getnameinfo() is unknown to configure.])
+ esac
+ AC_DEFINE_UNQUOTED(GNI_SALEN_T, $ac_cv_type_gni_salen_t,
+ [Define as the type of the 2nd argument of getnameinfo.])
+ AC_DEFINE_UNQUOTED(GNI_HOSTLEN_T, $ac_cv_type_gni_hostlen_t,
+ [Define as the type of the 4th argument of getnameinfo.])
+ AC_DEFINE_UNQUOTED(GNI_SERVLEN_T, $ac_cv_type_gni_servlen_t,
+ [Define as the type of the 6th argument of getnameinfo.])
+ AC_DEFINE_UNQUOTED(GNI_FLAGS_T, $ac_cv_type_gni_flags_t,
+ [Define as the type of the 7th argument of getnameinfo.])
+fi
+
+dnl resume here.
+dnl Checks the flavor of gethost*_r functions.
+if test "$find_gethost_r" = yes; then
+ AC_CACHE_CHECK(flavor of gethostbyname_r, ac_cv_flavor_gethost_r,
+ [AC_TRY_RUN(
+changequote(<<, >>)dnl
+<<
+#include <stddef.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <stdio.h>
+int main()
+{
+ int err = 0;
+ struct hostent hebuf, *hp;
+ char buf[10];
+ /* Try resolving a invalid name using glibc flavor. */
+ (void)gethostbyname_r("@#!", &hebuf, buf, sizeof(buf), &hp, &err);
+ if (err != 0)
+ return 0; /* glibc flavor */
+ else
+ return 1; /* Sun flavor */
+}
+>>,
+changequote([, ])dnl
+ ac_cv_flavor_gethost_r=glibc,
+ ac_cv_flavor_gethost_r=sun,
+ ac_cv_flavor_gethost_r=sun)])
+ if test "$ac_cv_flavor_gethost_r" = "glibc"; then
+ AC_DEFINE(GETHOST_R_GLIBC_FLAVOR, 1,
+ [Define if the prototype of gethost*_r is glibc flavor.])
+ fi
+fi
+
+dnl Checks for iconv library.
+if test "$liteonly" != yes ; then
+ AC_MSG_CHECKING(for iconv)
+ saved_CPPFLAGS=$CPPFLAGS
+ saved_LIBS=$LIBS
+ CPPFLAGS="$CPPFLAGS $ICONVINC"
+ LIBS="$LIBS $ICONVLIB"
+ AC_TRY_LINK([
+ #include <iconv.h>
+ ], [
+ iconv_t i;
+ i = iconv_open("ISO-8859-1", "UTF-8");
+ ], [iconv_try_link=yes], [iconv_try_link=no])
+ LIBS=$saved_LIBS
+ CPPFLAGS=$saved_CPPFLAGS
+ AC_MSG_RESULT($iconv_try_link)
+ if test "$iconv_try_link" = no ; then
+ AC_MSG_ERROR(iconv function not available)
+ fi
+fi
+
+dnl Check for codeset name for UTF-8.
+if test "$liteonly" != yes ; then
+ AC_MSG_CHECKING([for codeset name $UTF8_NAME])
+ saved_CPPFLAGS=$CPPFLAGS
+ saved_LIBS=$LIBS
+ CPPFLAGS="$CPPFLAGS $ICONVINC"
+ LIBS="$LIBS $ICONVLIB"
+ AC_TRY_RUN([
+ #include <stddef.h>
+ #include <stdlib.h>
+ #include <iconv.h>
+ #define UTF8_NAME "$UTF8_NAME"
+ #define ICONV_FAIL ((iconv_t)(-1))
+ /* Check if the codeset name UTF8_NAME is valid by performing iconv_open(). */
+ int main() {
+ int i;
+ /* list of codeset names likely to exist */
+ static char *codeset[] = {
+ "ASCII", "ISO-8859-1", "ISO8859-1", "iso8859_1", "8859-1",
+ "Shift_JIS", "SJIS", "sjis", NULL,
+ };
+
+ /* First try null conversion. */
+ if (iconv_open(UTF8_NAME, UTF8_NAME) != ICONV_FAIL) return 0;
+
+ /* Unfortunately, above check fails on certain systems, such as Solaris. */
+ for (i = 0; codeset[i] != NULL; i++) {
+ if (iconv_open(UTF8_NAME, codeset[i]) != ICONV_FAIL) return 0;
+ }
+ return 1;
+ }
+ ], utf8_name_valid=yes, utf8_name_valid=no, utf8_name_valid=unknown)
+ LIBS=$saved_LIBS
+ CPPFLAGS=$saved_CPPFLAGS
+ AC_MSG_RESULT($utf8_name_valid)
+fi
+
+dnl Output.
+AC_CONFIG_HEADER(include/config.h)
+AC_OUTPUT(
+ Makefile
+ include/Makefile
+ include/idn/Makefile
+ include/mdn/Makefile
+ lib/Makefile
+ man/Makefile
+ tools/Makefile
+ tools/idnconv/Makefile
+ tools/runidn/Makefile
+ tools/runidn/runidn
+ map/Makefile
+ lib/tests/Makefile
+)
--- idnkit-1.0-src/man/Makefile.am.autotools 2007-04-16 13:39:57.000000000 +0200
+++ idnkit-1.0-src/man/Makefile.am 2007-04-16 14:02:24.000000000 +0200
@@ -0,0 +1,43 @@
+man3_MANS =
+man5_MANS = idnrc.5 idnalias.conf.5
+if LITEONLY
+if COMPAT
+man3_MANS += libmdnlite.3
+man5_MANS += mdn.conf.5
+else
+man3_MANS += libidnkitlite.3
+man5_MANS += idn.conf.5
+endif
+else
+if COMPAT
+man3_MANS += libmdn.3 libmdnlite.3
+man5_MANS += mdn.conf.5
+else
+man3_MANS += libidnkit.3 libidnkitlite.3
+man5_MANS += idn.conf.5
+endif
+endif
+
+idnrc.5: idn.conf.5.in
+ cp -f idn.conf.5.in idnrc.5
+
+idnalias.conf.5: idn.conf.5.in
+ cp -f idn.conf.5.in idnalias.conf.5
+
+libidnkit.3: libidnkit.3.in
+ cp -f libidnkit.3.in libidnkit.3
+
+libidnkitlite.3: libidnkit.3
+ cp -f libidnkit.3 libidnkitlite.3
+
+libmdnlite.3: libidnkit.3
+ cp -f libidnkit.3 libmdnlite.3
+
+libmdn.3: libidnkit.3
+ cp -f libidnkit.3 libmdn.3
+
+idn.conf.5: idn.conf.5.in
+ sed 's%[@]sysconfdir[@]%$(sysdir)%' < idn.conf.5.in > $@
+
+mdn.conf.5: idn.conf.5
+ cp -f idn.conf.5 mdn.conf.5

View File

@ -0,0 +1,120 @@
--- bind-9.4.0/lib/dns/view.c.freeze 2007-04-18 11:51:02.000000000 +0200
+++ bind-9.4.0/lib/dns/view.c 2007-04-18 12:50:30.000000000 +0200
@@ -1140,6 +1140,28 @@
}
isc_result_t
+dns_viewlist_findzone(dns_viewlist_t *list, const char* name,
+ dns_rdataclass_t rdclass, dns_zone_t **zonep)
+{
+ dns_view_t *view;
+ isc_result_t result;
+
+ REQUIRE(list != NULL);
+
+ for (view = ISC_LIST_HEAD(*list);
+ view != NULL;
+ view = ISC_LIST_NEXT(view, link)) {
+ if (view->rdclass != rdclass)
+ continue;
+ result = dns_zt_find(view->zonetable, name,
+ 0, NULL, zonep);
+ if (result == ISC_R_SUCCESS)
+ return ISC_R_SUCCESS;
+ }
+ return ISC_R_NOTFOUND;
+}
+
+isc_result_t
dns_view_load(dns_view_t *view, isc_boolean_t stop) {
REQUIRE(DNS_VIEW_VALID(view));
--- bind-9.4.0/lib/dns/include/dns/view.h.freeze 2007-04-18 12:03:13.000000000 +0200
+++ bind-9.4.0/lib/dns/include/dns/view.h 2007-04-18 12:49:47.000000000 +0200
@@ -592,6 +592,19 @@
*/
isc_result_t
+dns_viewlist_findzone(dns_viewlist_t *list, const char* name,
+ dns_rdataclass_t rdclass, dns_zone_t **zonep);
+
+/*%<
+ * Search zone with 'name' in view with 'rdclass' in viewlist 'list'
+ * If found, zone is returned in *zonep
+ *
+ * Returns:
+ *\li #ISC_R_SUCCESS A matching zone was found.
+ *\li #ISC_R_NOTFOUND No matching zone was found.
+ */
+
+isc_result_t
dns_view_findzone(dns_view_t *view, dns_name_t *name, dns_zone_t **zonep);
/*%<
* Search for the zone 'name' in the zone table of 'view'.
--- bind-9.4.0/bin/named/server.c.freeze 2007-04-18 12:44:26.000000000 +0200
+++ bind-9.4.0/bin/named/server.c 2007-04-18 12:48:02.000000000 +0200
@@ -3922,19 +3922,23 @@
rdclass = dns_rdataclass_in;
}
- if (viewtxt == NULL)
- viewtxt = "_default";
- result = dns_viewlist_find(&server->viewlist, viewtxt,
- rdclass, &view);
- if (result != ISC_R_SUCCESS)
- goto fail1;
+ if (viewtxt == NULL) {
+ result = dns_viewlist_findzone(&server->viewlist, dns_fixedname_name(&name),
+ rdclass, zonep);
+ }
+ else {
+ result = dns_viewlist_find(&server->viewlist, viewtxt,
+ rdclass, &view);
+ if (result != ISC_R_SUCCESS)
+ goto fail1;
- result = dns_zt_find(view->zonetable, dns_fixedname_name(&name),
- 0, NULL, zonep);
+ result = dns_zt_find(view->zonetable, dns_fixedname_name(&name),
+ 0, NULL, zonep);
+ dns_view_detach(&view);
+ }
/* Partial match? */
if (result != ISC_R_SUCCESS && *zonep != NULL)
dns_zone_detach(zonep);
- dns_view_detach(&view);
fail1:
return (result);
}
--- bind-9.4.0/bin/named_sdb/server.c.freeze 2007-04-18 12:52:58.000000000 +0200
+++ bind-9.4.0/bin/named_sdb/server.c 2007-04-18 12:54:29.000000000 +0200
@@ -3917,15 +3917,20 @@
rdclass = dns_rdataclass_in;
}
- if (viewtxt == NULL)
- viewtxt = "_default";
- result = dns_viewlist_find(&server->viewlist, viewtxt,
- rdclass, &view);
- if (result != ISC_R_SUCCESS)
- goto fail1;
-
- result = dns_zt_find(view->zonetable, dns_fixedname_name(&name),
- 0, NULL, zonep);
+ if (viewtxt == NULL) {
+ result = dns_viewlist_findzone(&server->viewlist, dns_fixedname_name(&name),
+ rdclass, zonep);
+ }
+ else {
+ result = dns_viewlist_find(&server->viewlist, viewtxt,
+ rdclass, &view);
+ if (result != ISC_R_SUCCESS)
+ goto fail1;
+
+ result = dns_zt_find(view->zonetable, dns_fixedname_name(&name),
+ 0, NULL, zonep);
+ dns_view_detach(&view);
+ }
/* Partial match? */
if (result != ISC_R_SUCCESS && *zonep != NULL)
dns_zone_detach(zonep);

View File

@ -6,7 +6,6 @@
%{?!efence: %define efence 0}
%{?!test: %define test 0}
%{?!WITH_DBUS: %define WITH_DBUS 1} # + dynamic forwarder table management with D-BUS
%{?!DEBUGINFO: %define DEBUGINFO 1}
%{?!bind_uid: %define bind_uid 25}
%{?!bind_gid: %define bind_gid 25}
%{?!selinux: %define selinux 1}
@ -18,7 +17,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: BSD-like
Version: 9.4.0
Release: 6%{?dist}
Release: 7%{?dist}
Epoch: 31
Url: http://www.isc.org/products/BIND/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -79,9 +78,10 @@ Patch61: bind-9.3.4-sdb-sqlite-src.patch
Patch62: bind-9.4.0-sdb-sqlite-bld.patch
Patch63: bind-9.4.0-dnssec-directory.patch
%if %{IDN}
Patch64: idnkit-autotools.patch
Patch65: dig-idn.patch
Patch64: bind-9.4.0-idnkit-autotools.patch
Patch65: bind-9.4.0-dig-idn.patch
%endif
Patch66: bind-9.4.0-zone-freeze.patch
#
Requires: bind-libs = %{epoch}:%{version}-%{release}, glibc >= 2.2, mktemp
Requires(post): grep, chkconfig >= 1.3.26
@ -308,10 +308,13 @@ pushd contrib/idn
popd
%patch65 -p1 -b .idn
%endif
%patch66 -p1 -b .freeze
:;
%build
export CFLAGS="$RPM_OPT_FLAGS"
%if %{IDN}
pushd contrib/idn/idnkit-1.0-src
libtoolize --copy --force; aclocal; automake -a; autoconf
@ -322,13 +325,6 @@ popd
libtoolize --copy --force; aclocal; autoconf
cp -f /usr/share/libtool/config.{guess,sub} .
%if %{DEBUGINFO}
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -O0"
export CFLAGS="$RPM_OPT_FLAGS";
%else
export CFLAGS=`echo $RPM_OPT_FLAGS | sed 's/-O2 -g/-g3 -gdwarf-2/g'`;
%endif
export CPPFLAGS="$CFLAGS";
%if %{WITH_DBUS}
%ifarch s390x x86_64 ppc64
# every 64-bit arch EXCEPT ia64 has dbus architecture dependant
@ -363,11 +359,6 @@ export LDFLAGS=-lefence
if [ -s openssl_config.h ]; then cat openssl_config.h >> config.h ; fi;
make %{?_smp_mflags}
%if !%{DEBUGINFO}
%define debug_package %{nil}
%endif
%install
rm -rf ${RPM_BUILD_ROOT}
@ -493,11 +484,6 @@ done
* differ from the following default contents:
;d}' > sample/etc/rndc.conf;
#
%if !%{DEBUGINFO}
echo 'WARNING - NOT generating debuginfo!'
/usr/lib/rpm/brp-compress
exit 0
%endif
chmod 0755 ${RPM_BUILD_ROOT}%{_libdir}/lib*so.*
:;
@ -820,6 +806,12 @@ rm -rf ${RPM_BUILD_ROOT}
%changelog
* Tue Apr 17 2007 Adam Tkac <atkac redhat com> 31:9.4.0-7.fc7
- removed DEBUGINFO option because with this option (default) was bind
builded with -O0 and without this flag no debuginfo package was produced.
(I want faster bind => -O2 + debuginfo)
- fixed zone finding (#236426)
* Mon Apr 16 2007 Adam Tkac <atkac redhat com> 31:9.4.0-6.fc7
- added idn support (still under development with upstream, disabled by default)