net/bind 9.7.2-P3
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>
Fri, 24 Dec 2010 07:00:34 +0000 (01:00 -0600)
committerYaakov Selkowitz <yselkowitz@users.sourceforge.net>
Fri, 24 Dec 2010 07:00:34 +0000 (01:00 -0600)
13 files changed:
9.5.0-parallel-build.patch [new file with mode: 0644]
9.7.2-libidn.patch [new file with mode: 0644]
bind-9.7.2_p3-1.cygport [moved from bind-9.7.1-1.cygport with 73% similarity]
bind.hint
libbind9_60.hint
libdns-devel.hint
libdns69.hint [moved from libdns66.hint with 73% similarity]
libisc-devel.hint
libisc62.hint [moved from libisc60.hint with 100% similarity]
libisccc60.hint
libisccfg-devel.hint
libisccfg62.hint [moved from libisccfg60.hint with 77% similarity]
liblwres60.hint

diff --git a/9.5.0-parallel-build.patch b/9.5.0-parallel-build.patch
new file mode 100644 (file)
index 0000000..0860041
--- /dev/null
@@ -0,0 +1,15 @@
+Fedora patch: bind-9.5-parallel-build.patch
+
+--- bind-9.5.0b1/lib/dns/Makefile.in.parallel  2008-01-17 18:27:38.000000000 +0100
++++ bind-9.5.0b1/lib/dns/Makefile.in   2008-01-17 18:27:45.000000000 +0100
+@@ -19,10 +19,6 @@ srcdir =    @srcdir@
+ VPATH =               @srcdir@
+ top_srcdir =  @top_srcdir@
+-# Attempt to disable parallel processing.
+-.NOTPARALLEL:
+-.NO_PARALLEL:
+-
+ @BIND9_VERSION@
+ @LIBDNS_API@
diff --git a/9.7.2-libidn.patch b/9.7.2-libidn.patch
new file mode 100644 (file)
index 0000000..c8978d2
--- /dev/null
@@ -0,0 +1,298 @@
+Fedora patches:
+bind-9.5-libidn.patch
+bind-9.5-libidn2.patch
+bind95-rh461409.patch
+bind-9.5-libidn3.patch
+
+--- origsrc/bind-9.7.2-P3/bin/dig/Makefile.in  2010-12-24 00:18:37.679834200 -0600
++++ src/bind-9.7.2-P3/bin/dig/Makefile.in      2010-12-24 00:16:51.000000000 -0600
+@@ -46,10 +46,10 @@ DEPLIBS =  ${DNSDEPLIBS} ${BIND9DEPLIBS}
+               ${LWRESDEPLIBS}
+ LIBS =                ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
+-              ${ISCLIBS} @IDNLIBS@ @LIBS@
++              ${ISCLIBS} @IDNLIBS@ @LIBS@ -lidn
+ NOSYMLIBS =   ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
+-              ${ISCNOSYMLIBS} @IDNLIBS@ @LIBS@
++              ${ISCNOSYMLIBS} @IDNLIBS@ @LIBS@ -lidn
+ SUBDIRS =
+@@ -67,6 +67,8 @@ HTMLPAGES =  dig.html host.html nslookup.
+ MANOBJS =     ${MANPAGES} ${HTMLPAGES}
++EXT_CFLAGS = -DWITH_LIBIDN
++
+ @BIND9_MAKE_RULES@
+ dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
+--- origsrc/bind-9.7.2-P3/bin/dig/dighost.c    2010-12-24 00:18:37.679834200 -0600
++++ src/bind-9.7.2-P3/bin/dig/dighost.c        2010-12-24 00:16:52.000000000 -0600
+@@ -44,6 +44,11 @@
+ #include <idn/api.h>
+ #endif
++#ifdef WITH_LIBIDN
++#include <stringprep.h>
++#include <idna.h>
++#endif
++
+ #include <dns/byaddr.h>
+ #ifdef DIG_SIGCHASE
+ #include <dns/dnssec.h>
+@@ -153,6 +158,14 @@ static void               idn_check_result(idn_result
+ int  idnoptions       = 0;
+ #endif
++#ifdef WITH_LIBIDN
++static isc_result_t   libidn_locale_to_utf8 (const char* from, char *to);
++static isc_result_t   libidn_utf8_to_ascii (const char* from, char *to);
++static isc_result_t   output_filter (isc_buffer_t *buffer,
++                                     unsigned int used_org,
++                                     isc_boolean_t absolute);
++#endif
++
+ /*%
+  * Exit Codes:
+  *
+@@ -1193,6 +1206,9 @@ setup_system(void) {
+       dig_searchlist_t *domain = NULL;
+       lwres_result_t lwresult;
+       unsigned int lwresflags;
++#ifdef WITH_LIBIDN
++      isc_result_t result;
++#endif
+       debug("setup_system()");
+@@ -1251,8 +1267,15 @@ setup_system(void) {
+ #ifdef WITH_IDN
+       initialize_idn();
++      
++#endif
++#ifdef WITH_LIBIDN
++      result = dns_name_settotextfilter(output_filter);
++      check_result(result, "dns_name_settotextfilter");
++#ifdef HAVE_SETLOCALE
++      setlocale (LC_ALL, "");
++#endif
+ #endif
+-
+       if (keyfile[0] != 0)
+               setup_file_key();
+       else if (keysecret[0] != 0)
+@@ -1958,12 +1981,14 @@ setup_lookup(dig_lookup_t *lookup) {
+       idn_result_t mr;
+       char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME];
+ #endif
++#ifdef WITH_LIBIDN
++      char utf8_str[MXNAME], utf8_name[MXNAME], ascii_name[MXNAME];
++#endif
+-#ifdef WITH_IDN
++#if defined (WITH_IDN) || defined (WITH_LIBIDN)
+       result = dns_name_settotextfilter(output_filter);
+       check_result(result, "dns_name_settotextfilter");
+ #endif
+-
+       REQUIRE(lookup != NULL);
+       INSIST(!free_now);
+@@ -2000,6 +2025,14 @@ setup_lookup(dig_lookup_t *lookup) {
+       mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, lookup->textname,
+                           utf8_textname, sizeof(utf8_textname));
+       idn_check_result(mr, "convert textname to UTF-8");
++#elif defined (WITH_LIBIDN)
++      result = libidn_locale_to_utf8 (lookup->textname, utf8_str);
++      check_result (result, "convert textname to UTF-8");
++      len = strlen (utf8_str);
++      if (len < MXNAME)
++              (void) strcpy (utf8_name, utf8_str);
++      else
++              fatal ("Too long name");
+ #endif
+       /*
+@@ -2012,15 +2045,11 @@ setup_lookup(dig_lookup_t *lookup) {
+       if (lookup->new_search) {
+ #ifdef WITH_IDN
+               if ((count_dots(utf8_textname) >= ndots) || !usesearch) {
+-                      lookup->origin = NULL; /* Force abs lookup */
+-                      lookup->done_as_is = ISC_TRUE;
+-                      lookup->need_search = usesearch;
+-              } else if (lookup->origin == NULL && usesearch) {
+-                      lookup->origin = ISC_LIST_HEAD(search_list);
+-                      lookup->need_search = ISC_FALSE;
+-              }
++#elif defined (WITH_LIBIDN)
++              if ((count_dots(utf8_name) >= ndots) || !usesearch) {
+ #else
+               if ((count_dots(lookup->textname) >= ndots) || !usesearch) {
++#endif
+                       lookup->origin = NULL; /* Force abs lookup */
+                       lookup->done_as_is = ISC_TRUE;
+                       lookup->need_search = usesearch;
+@@ -2028,7 +2057,6 @@ setup_lookup(dig_lookup_t *lookup) {
+                       lookup->origin = ISC_LIST_HEAD(search_list);
+                       lookup->need_search = ISC_FALSE;
+               }
+-#endif
+       }
+ #ifdef WITH_IDN
+@@ -2045,6 +2073,20 @@ setup_lookup(dig_lookup_t *lookup) {
+                           IDN_IDNCONV | IDN_LENCHECK, utf8_textname,
+                           idn_textname, sizeof(idn_textname));
+       idn_check_result(mr, "convert UTF-8 textname to IDN encoding");
++#elif defined (WITH_LIBIDN)
++      if (lookup->origin != NULL) {
++              result = libidn_locale_to_utf8 (lookup->origin->origin, utf8_str);
++              check_result (result, "convert origin to UTF-8");
++              if (len > 0 && utf8_name[len - 1] != '.') {
++                      utf8_name[len++] = '.';
++                      if (len + strlen (utf8_str) < MXNAME)
++                              (void) strcpy (utf8_name + len, utf8_str);
++                      else
++                              fatal ("Too long name + origin");
++              }
++      }
++
++      result = libidn_utf8_to_ascii (utf8_name, ascii_name);
+ #else
+       if (lookup->origin != NULL) {
+               debug("trying origin %s", lookup->origin->origin);
+@@ -2100,6 +2142,13 @@ setup_lookup(dig_lookup_t *lookup) {
+                       result = dns_name_fromtext(lookup->name, &b,
+                                                  dns_rootname, 0,
+                                                  &lookup->namebuf);
++#elif defined (WITH_LIBIDN)
++                      len = strlen (ascii_name);
++                      isc_buffer_init(&b, ascii_name, len);
++                      isc_buffer_add(&b, len);
++                      result = dns_name_fromtext(lookup->name, &b,
++                                                 dns_rootname, 0,
++                                                 &lookup->namebuf);
+ #else
+                       len = strlen(lookup->textname);
+                       isc_buffer_init(&b, lookup->textname, len);
+@@ -3625,7 +3674,7 @@ destroy_libs(void) {
+       void * ptr;
+       dig_message_t *chase_msg;
+ #endif
+-#ifdef WITH_IDN
++#if defined (WITH_IDN) || defined (WITH_LIBIDN)
+       isc_result_t result;
+ #endif
+@@ -3664,6 +3713,10 @@ destroy_libs(void) {
+       result = dns_name_settotextfilter(NULL);
+       check_result(result, "dns_name_settotextfilter");
+ #endif
++#ifdef WITH_LIBIDN
++      result = dns_name_settotextfilter (NULL);
++      check_result(result, "clearing dns_name_settotextfilter");
++#endif
+       dns_name_destroy();
+       if (commctx != NULL) {
+@@ -3842,6 +3895,97 @@ idn_check_result(idn_result_t r, const c
+       }
+ }
+ #endif /* WITH_IDN */
++#ifdef WITH_LIBIDN
++static isc_result_t
++libidn_locale_to_utf8 (const char *from, char *to) {
++      char *utf8_str;
++
++      debug ("libidn_locale_to_utf8");
++      utf8_str = stringprep_locale_to_utf8 (from);
++      if (utf8_str != NULL) {
++              (void) strcpy (to, utf8_str);
++              free (utf8_str);
++              return ISC_R_SUCCESS;
++      }
++
++      debug ("libidn_locale_to_utf8: failure");
++      return ISC_R_FAILURE;
++}
++static isc_result_t
++libidn_utf8_to_ascii (const char *from, char *to) {
++      char *ascii;
++      int iresult;
++
++      debug ("libidn_utf8_to_ascii");
++      iresult = idna_to_ascii_8z (from, &ascii, 0);
++      if (iresult != IDNA_SUCCESS) {
++              debug ("idna_to_ascii_8z: %s", idna_strerror (iresult));
++              return ISC_R_FAILURE;
++      }
++
++      (void) strcpy (to, ascii);
++      free (ascii);
++      return ISC_R_SUCCESS;
++}
++
++static isc_result_t
++output_filter (isc_buffer_t *buffer, unsigned int used_org,
++             isc_boolean_t absolute) {
++
++      char tmp1[MXNAME], *tmp2;
++        size_t fromlen, tolen;
++        isc_boolean_t end_with_dot;
++      int iresult;
++
++      debug ("output_filter");
++
++        fromlen = isc_buffer_usedlength (buffer) - used_org;
++      if (fromlen >= MXNAME)
++              return ISC_R_SUCCESS;
++        memcpy (tmp1, (char *) isc_buffer_base (buffer) + used_org, fromlen);
++        end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE;
++        if (absolute && !end_with_dot) {
++                fromlen++;
++              if (fromlen >= MXNAME)
++                      return ISC_R_SUCCESS;
++                tmp1[fromlen - 1] = '.';
++        }
++        tmp1[fromlen] = '\0';
++
++      iresult = idna_to_unicode_8z8z (tmp1, &tmp2, 0);
++      if (iresult != IDNA_SUCCESS) {
++              debug ("output_filter: %s", idna_strerror (iresult));
++              return ISC_R_SUCCESS;
++      }
++
++      (void) strcpy (tmp1, tmp2);
++      free (tmp2);
++
++      tmp2 = stringprep_utf8_to_locale (tmp1);
++      if (tmp2 == NULL) {
++              debug ("output_filter: stringprep_utf8_to_locale failed");
++              return ISC_R_SUCCESS;
++      }
++
++      (void) strcpy (tmp1, tmp2);
++      free (tmp2);
++
++        tolen = strlen (tmp1);
++        if (absolute && !end_with_dot && tmp1[tolen - 1] == '.')
++                tolen--;
++
++        if (isc_buffer_length (buffer) < used_org + tolen)
++                return ISC_R_NOSPACE;
++
++      debug ("%s", tmp1);
++
++        isc_buffer_subtract (buffer, isc_buffer_usedlength (buffer) - used_org);
++        memcpy (isc_buffer_used (buffer), tmp1, tolen);
++        isc_buffer_add (buffer, tolen);
++
++        return ISC_R_SUCCESS;
++}
++#endif /* WITH_LIBIDN*/
+ #ifdef DIG_SIGCHASE
+ void
similarity index 73%
rename from bind-9.7.1-1.cygport
rename to bind-9.7.2_p3-1.cygport
index d1db643be9e5dca74b6478fa2e979dee3dfab5c6..1662a9a17fc59b15264747ccaaa76ac923ebb9db 100644 (file)
@@ -7,21 +7,18 @@ SRC_URI="http://ftp.isc.org/isc/${PN}${PV_MAJ}/${_pv}/${PN}-${_pv}.tar.gz
 SRC_DIR="${PN}-${_pv}"
 
 PATCH_URI="
-       http://cvs.fedoraproject.org/viewvc/devel/bind/bind-9.5-libidn.patch?view=co
-       http://cvs.fedoraproject.org/viewvc/devel/bind/bind-9.5-libidn2.patch?view=co
-       http://cvs.fedoraproject.org/viewvc/devel/bind/bind-9.5-libidn3.patch?view=co
-       http://cvs.fedoraproject.org/viewvc/devel/bind/bind95-rh461409.patch?view=co
-       http://cvs.fedoraproject.org/viewvc/devel/bind/bind-9.5-parallel-build.patch?view=co
        9.7.1-configure.patch
        9.7.1-lwconfig-win32.patch
        9.7.1-no-undefined.patch
+       9.7.2-libidn.patch
+       9.5.0-parallel-build.patch
 "
 
 PKG_NAMES="bind"
 bind_CONTENTS='--exclude=man3 etc/ usr/bin/*.exe* usr/sbin/ usr/share/'
 
 libs="bind9 dns isc isccc isccfg lwres"
-apis=(_60   66  60  60    60     60)
+apis=(_60   69  62  60    62     60)
 n=0
 for l in ${libs}
 do
index 18de2db40dc55e55d0a2ab86a3fc05131fee34a3..33b0d704e6d3435b21878f5caa326748e568f3fe 100644 (file)
--- a/bind.hint
+++ b/bind.hint
@@ -1,4 +1,4 @@
 category: Net
-requires: libbind9_60 libdns66 libgcc1 libidn11 libisc60 libisccc60 libisccfg60 liblwres60 libopenldap2_3_0 libpq5
+requires: libbind9_60 libdns69 libidn11 libisc62 libisccc60 libisccfg62 liblwres60 libopenldap2_3_0 libpq5
 sdesc: "DNS utilities suite"
 ldesc: "DNS libraries and utilities suite"
index 6aa44371a85a1572c3b3f9b51c9de82f0e6e43fb..f6efe563758a26d46332b40f00983cb65cd47f6f 100644 (file)
@@ -1,5 +1,5 @@
 category: Net
-requires: libdns66 libgcc1 libisc60 libisccfg60
+requires: libdns69 libisc62 libisccfg62
 external-source: bind
 sdesc: "BIND Bind9 library (runtime)"
 ldesc: "DNS libraries and utilities suite"
index a30872852833ddac66fffa636bd7ab4eb10d0841..2a3d105100566e943b21d11dfa4f20c1a1661d9a 100644 (file)
@@ -1,5 +1,5 @@
 category: Net
-requires: libdns66 libisc-devel openssl-devel
+requires: libdns69 libisc-devel openssl-devel
 external-source: bind
 sdesc: "BIND DNS library (development)"
 ldesc: "DNS libraries and utilities suite"
similarity index 73%
rename from libdns66.hint
rename to libdns69.hint
index 463a33aebb77914fd899a8dbdd38815ed45b80d2..14f833f56329aa83081345160be8b145e9557502 100644 (file)
@@ -1,5 +1,5 @@
 category: Net
-requires: libgcc1 libisc60 libopenssl098
+requires: libgcc1 libisc62 libopenssl098
 external-source: bind
 sdesc: "BIND DNS library (runtime)"
 ldesc: "DNS libraries and utilities suite"
index 4f0a5bdaf845795289652cc88184562d5f7a5cd7..5f1d030006283b9b30d53ff7607983d7fce4169a 100644 (file)
@@ -1,5 +1,5 @@
 category: Net
-requires: libisc60 libxml2-devel
+requires: libisc62 libxml2-devel
 external-source: bind
 sdesc: "BIND ISC library (development)"
 ldesc: "DNS libraries and utilities suite"
similarity index 100%
rename from libisc60.hint
rename to libisc62.hint
index af107906a20df8c908f86418087c76e3195b5455..db8df55bb537ad291bee428aa53961394ad0f3bf 100644 (file)
@@ -1,5 +1,5 @@
 category: Net
-requires: libgcc1 libisc60
+requires: libisc62
 external-source: bind
 sdesc: "BIND Command Channel library (runtime)"
 ldesc: "DNS libraries and utilities suite"
index 1c36d67f9dcc286fe9cebcbf6ffc269bc41d5ac0..7b2b3fa2589d24ea7e4d38142951b0928f8e5040 100644 (file)
@@ -1,5 +1,5 @@
 category: Net
-requires: libisccfg60 libdns-devel libisc-devel
+requires: libisccfg62 libdns-devel libisc-devel
 external-source: bind
 sdesc: "BIND Config File library (development)"
 ldesc: "DNS libraries and utilities suite"
similarity index 77%
rename from libisccfg60.hint
rename to libisccfg62.hint
index 90ba0bffe09912b1b66eed6c0124f33ecacb5287..09b48849c70a9583b681b775701fa63f7e17da89 100644 (file)
@@ -1,5 +1,5 @@
 category: Net
-requires: libdns66 libgcc1 libisc60
+requires: libdns69 libisc62
 external-source: bind
 sdesc: "BIND Config File library (runtime)"
 ldesc: "DNS libraries and utilities suite"
index 4701827650c3287f3e4223cc8285de364a13bdfa..d957fb3942746ba2959e45a4e2ba24f30b6f54cb 100644 (file)
@@ -1,5 +1,5 @@
 category: Net
-requires: libgcc1 libisc60
+requires:
 external-source: bind
 sdesc: "BIND Lightweight Resolver library (runtime)"
 ldesc: "DNS libraries and utilities suite"
This page took 0.040415 seconds and 5 git commands to generate.