From ad0a5e14705ac22ac3bb4de8c8e89107f82eb738 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Sep 06 2007 12:04:26 +0000 Subject: - patches bind-9.4-2119_revert.patch and libbind-9.3.1rc1-fix_h_errno.patch are obsoleted by bind-9.4-_res_errno.patch --- diff --git a/bind-9.4-2119_revert.patch b/bind-9.4-2119_revert.patch deleted file mode 100644 index 57e0f25..0000000 --- a/bind-9.4-2119_revert.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -up bind-9.4.2b1/lib/bind/resolv/res_init.c.recurs bind-9.4.2b1/lib/bind/resolv/res_init.c ---- bind-9.4.2b1/lib/bind/resolv/res_init.c.recurs 2007-08-31 09:01:10.000000000 +0200 -+++ bind-9.4.2b1/lib/bind/resolv/res_init.c 2007-08-31 09:13:41.000000000 +0200 -@@ -166,9 +166,7 @@ __res_vinit(res_state statp, int preinit - #endif - int dots; - union res_sockaddr_union u[2]; -- int maxns = MAXNS; - -- RES_SET_H_ERRNO(statp, 0); - if (statp->_u._ext.ext != NULL) - res_ndestroy(statp); - -@@ -218,22 +216,8 @@ __res_vinit(res_state statp, int preinit - statp->_u._ext.ext->nsaddrs[0].sin = statp->nsaddr; - strcpy(statp->_u._ext.ext->nsuffix, "ip6.arpa"); - strcpy(statp->_u._ext.ext->nsuffix2, "ip6.int"); -- } else { -- /* -- * Historically res_init() rarely, if at all, failed. -- * Examples and applications exist which do not check -- * our return code. Furthermore several applications -- * simply call us to get the systems domainname. So -- * rather then immediately fail here we store the -- * failure, which is returned later, in h_errno. And -- * prevent the collection of 'nameserver' information -- * by setting maxns to 0. Thus applications that fail -- * to check our return code wont be able to make -- * queries anyhow. -- */ -- RES_SET_H_ERRNO(statp, NETDB_INTERNAL); -- maxns = 0; -- } -+ } else -+ return (-1); - #ifdef RESOLVSORT - statp->nsort = 0; - #endif -@@ -362,7 +346,7 @@ __res_vinit(res_state statp, int preinit - continue; - } - /* read nameservers to query */ -- if (MATCH(buf, "nameserver") && nserv < maxns) { -+ if (MATCH(buf, "nameserver") && nserv < MAXNS) { - struct addrinfo hints, *ai; - char sbuf[NI_MAXSERV]; - const size_t minsiz = -@@ -498,7 +482,7 @@ __res_vinit(res_state statp, int preinit - if ((cp = getenv("RES_OPTIONS")) != NULL) - res_setoptions(statp, cp, "env"); - statp->options |= RES_INIT; -- return (statp->res_h_errno); -+ return (0); - } - - static void diff --git a/bind-9.4-_res_errno.patch b/bind-9.4-_res_errno.patch new file mode 100644 index 0000000..b325eb1 --- /dev/null +++ b/bind-9.4-_res_errno.patch @@ -0,0 +1,33 @@ +Written-by: Mark Andrews +Reviewed-by: Adam Tkac + +diff -up bind-9.5.0a6/lib/bind/resolv/res_data.c._res_errno bind-9.5.0a6/lib/bind/resolv/res_data.c +--- bind-9.5.0a6/lib/bind/resolv/res_data.c._res_errno 2007-09-06 09:26:29.000000000 +0200 ++++ bind-9.5.0a6/lib/bind/resolv/res_data.c 2007-09-06 09:28:14.000000000 +0200 +@@ -40,7 +40,6 @@ static const char rcsid[] = "$Id: res_da + #include + + #include "port_after.h" +-#undef _res + + const char *_res_opcodes[] = { + "QUERY", +@@ -70,6 +69,7 @@ const char *_res_sectioncodes[] = { + }; + #endif + ++#undef _res + #ifndef __BIND_NOSTATIC + struct __res_state _res + # if defined(__BIND_RES_TEXT) +@@ -77,6 +77,10 @@ struct __res_state _res + # endif + ; + ++#if defined(DO_PTHREADS) || defined(__linux) ++#define _res (*__res_state()) ++#endif ++ + /* Proto. */ + + int res_ourserver_p(const res_state, const struct sockaddr_in *); diff --git a/bind.spec b/bind.spec index 779ef68..18bcfc1 100644 --- a/bind.spec +++ b/bind.spec @@ -20,7 +20,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv Name: bind License: BSD-like Version: 9.4.2 -Release: 0.2.%{RELEASEVER}%{?dist} +Release: 0.3.%{RELEASEVER}%{?dist} Epoch: 31 Url: http://www.isc.org/products/BIND/ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -56,7 +56,6 @@ Patch10: bind-9.3.2b1-PIE.patch Patch11: bind-9.3.2b2-sdbsrc.patch Patch12: bind-9.3.1rc1-sdb.patch Patch13: bind-9.3.1rc1-fix_libbind_includedir.patch -Patch14: libbind-9.3.1rc1-fix_h_errno.patch Patch16: bind-9.3.2-redhat_doc.patch Patch17: bind-9.3.2b1-fix_sdb_ldap.patch Patch22: bind-9.3.1-sdb_dbus.patch @@ -73,7 +72,7 @@ Patch66: bind-9.4.0-zone-freeze.patch Patch68: bind-9.4.1-ldap-api.patch Patch70: bind-9.4-update.patch Patch71: bind-9.4-dbus.patch -Patch72: bind-9.4-2119_revert.patch +Patch73: bind-9.4-_res_errno.patch # Requires: bind-libs = %{epoch}:%{version}-%{release}, glibc >= 2.2, mktemp Requires(post): grep, chkconfig >= 1.3.26 @@ -259,7 +258,6 @@ cp -fp contrib/sdb/sqlite/zone2sqlite.c bin/sdb_tools %endif %if %{LIBBIND} %patch13 -p1 -b .fix_libbind_includedir -%patch14 -p1 -b .fix_h_errno %endif %patch16 -p1 -b .redhat_doc %if %{WITH_DBUS} @@ -299,7 +297,7 @@ popd %endif %patch66 -p1 -b .freeze %patch70 -p1 -b .update -%patch72 -p1 -b .2119_revert +%patch73 -p1 -b .errno :; @@ -461,7 +459,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.191 2007/09/03 07:54:59 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.192 2007/09/06 12:04:26 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: @@ -785,6 +783,11 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Thu Sep 06 2007 Adam Tkac 31:9.4.2-0.3.b1 +- patches bind-9.4-2119_revert.patch and + libbind-9.3.1rc1-fix_h_errno.patch are obsoleted by + bind-9.4-_res_errno.patch + * Fri Aug 31 2007 Adam Tkac 31:9.4.2-0.2.b1 - temporary revert ISC 2119 change which conflicts with our "libbind-errno" patch (#254501) diff --git a/libbind-9.3.1rc1-fix_h_errno.patch b/libbind-9.3.1rc1-fix_h_errno.patch deleted file mode 100644 index aa52d86..0000000 --- a/libbind-9.3.1rc1-fix_h_errno.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- bind-9.3.1rc1/lib/bind/irs/irs_data.c.fix_h_errno 2004-11-29 20:15:43.000000000 -0500 -+++ bind-9.3.1rc1/lib/bind/irs/irs_data.c 2005-03-09 21:05:52.000000000 -0500 -@@ -222,12 +222,7 @@ - void - __h_errno_set(struct __res_state *res, int err) { - -- --#if (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) -- res->res_h_errno = err; --#else - h_errno = res->res_h_errno = err; --#endif - } - - #endif /*__BIND_NOSTATIC*/ ---- bind-9.3.1rc1/lib/bind/resolv/res_query.c.fix_h_errno 2004-03-16 07:34:19.000000000 -0500 -+++ bind-9.3.1rc1/lib/bind/resolv/res_query.c 2005-03-09 21:53:34.000000000 -0500 -@@ -192,6 +192,8 @@ - } - return (-1); - } -+ if( n > 0 ) -+ RES_SET_H_ERRNO(statp,0); - return (n); - } -