diff --git a/.cvsignore b/.cvsignore index f98ee96..ef07409 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ hesiod-3.0.2.tar.gz +hesiod-3.1.0.tar.gz diff --git a/hesiod-3.1.0-dnsparse.patch b/hesiod-3.1.0-dnsparse.patch new file mode 100644 index 0000000..36772c5 --- /dev/null +++ b/hesiod-3.1.0-dnsparse.patch @@ -0,0 +1,49 @@ +If the response is larger than 1024 bytes, go ahead and retry. + +--- hesiod-3.1.0/hesiod.c 2006-03-30 13:22:57.000000000 -0500 ++++ hesiod-3.1.0/hesiod.c 2006-03-30 13:28:16.000000000 -0500 +@@ -327,7 +327,8 @@ + */ + static char **get_txt_records(struct hesiod_p *ctx, const char *name) + { +- unsigned char qbuf[PACKETSZ], abuf[MAX_HESRESP]; ++ unsigned char qbuf[PACKETSZ], *abuf; ++ char **tmp; +- int n; ++ int n, i, len; + + /* Make sure the resolver is initialized. */ +@@ -343,14 +344,30 @@ + } + + /* Send the query. */ +- n = res_send(qbuf, n, abuf, MAX_HESRESP); +- if (n < 0) ++ abuf = NULL; ++ len = 1024; ++ i = n; ++ do ++ { ++ abuf = realloc(abuf, len); ++ n = res_send(qbuf, i, abuf, len); ++ if (n < len) ++ { ++ break; ++ } ++ len = n + 1024; ++ } while(1); ++ if (n < sizeof(HEADER)) + { + errno = ECONNREFUSED; + return NULL; + } + +- return hesiod_parse_result(ctx, abuf, n); ++ tmp = hesiod_parse_result(ctx, abuf, n); ++ ++ free(abuf); ++ ++ return tmp; + } + + char **hesiod_parse_result(void *ctx, const unsigned char *abuf, int alen) diff --git a/hesiod-3.1.0-libresolv.patch b/hesiod-3.1.0-libresolv.patch new file mode 100644 index 0000000..468938a --- /dev/null +++ b/hesiod-3.1.0-libresolv.patch @@ -0,0 +1,17 @@ +Try to correctly find res_mkquery in libresolv, even in cases where a +preprocessor-based rename in may screw us up. +--- hesiod-3.1.0/configure.in 2006-03-30 11:22:11.000000000 -0500 ++++ hesiod-3.1.0/configure.in 2006-03-30 13:31:02.000000000 -0500 +@@ -12,7 +12,11 @@ + AC_EGREP_HEADER(pw_change, pwd.h, AC_DEFINE(HAVE_PW_CHANGE)) + AC_EGREP_HEADER(pw_expire, pwd.h, AC_DEFINE(HAVE_PW_EXPIRE)) + +-AC_CHECK_FUNC(res_mkquery, :, [AC_CHECK_LIB(resolv, res_mkquery)]) ++AC_CHECK_FUNC(res_mkquery, :, [AC_CHECK_LIB(resolv, res_mkquery,,[ ++saveLIBS="$LIBS" ++LIBS="-lresolv $LIBS" ++AC_TRY_LINK([#include ],[res_mkquery(0,NULL,0,0,NULL,0,NULL,NULL,0);],[AC_DEFINE(HAVE_RES_MKQUERY,1,[Define if your libresolv provides res_mkquery.])],[LIBS="$saveLIBS"]) ++])]) + + AC_CONFIG_HEADER(config.h) + AC_OUTPUT(Makefile) diff --git a/hesiod-3.1.0-str.patch b/hesiod-3.1.0-str.patch new file mode 100644 index 0000000..f243e85 --- /dev/null +++ b/hesiod-3.1.0-str.patch @@ -0,0 +1,25 @@ +One or both strings is supplied through a configuration file, so we have no +guarantees about its length. + +--- hesiod-3.1.0/hesservbyname.c 2006-03-30 11:22:11.000000000 -0500 ++++ hesiod-3.1.0/hesservbyname.c 2006-03-30 13:13:50.000000000 -0500 +@@ -187,7 +187,7 @@ + + static int cistrcmp(const char *s1, const char *s2) + { +- while (*s1 && tolower(*s1) == tolower(*s2)) ++ while (*s1 && *s2 && tolower(*s1) == tolower(*s2)) + { + s1++; + s2++; +--- hesiod-3.1.0/hesiod.c 2006-03-30 13:13:50.000000000 -0500 ++++ hesiod-3.1.0/hesiod.c 2006-03-30 13:19:03.000000000 -0500 +@@ -465,7 +465,7 @@ + + static int cistrcmp(const char *s1, const char *s2) + { +- while (*s1 && tolower(*s1) == tolower(*s2)) ++ while (*s1 && *s2 && tolower(*s1) == tolower(*s2)) + { + s1++; + s2++; diff --git a/hesiod.spec b/hesiod.spec index 3a241fc..86f3391 100644 --- a/hesiod.spec +++ b/hesiod.spec @@ -1,17 +1,16 @@ Name: hesiod -Version: 3.0.2 -Release: 31.2.1 +Version: 3.1.0 +Release: 1 Source: ftp://athena-dist.mit.edu/pub/ATHENA/hesiod/hesiod-%{version}.tar.gz -Patch0: hesiod-3.0.2-shlib.patch Patch1: hesiod-3.0.2-env.patch -Patch2: hesiod-3.0.2-str.patch -Patch3: hesiod-3.0.2-dnsparse.patch -Patch4: hesiod-3.0.2-libresolv.patch +Patch2: hesiod-3.1.0-str.patch +Patch3: hesiod-3.1.0-dnsparse.patch +Patch4: hesiod-3.1.0-libresolv.patch Summary: Hesiod libraries and sample programs. Group: System Environment/Libraries License: MIT Buildroot: %{_tmppath}/hesiod-root -BuildPrereq: autoconf +BuildRequires: autoconf %description Hesiod is a system which uses existing DNS functionality to provide access @@ -33,6 +32,9 @@ ensure synchronize the files among multiple hosts. This package contains the header files and libraries required for building programs which use Hesiod. %changelog +* Thu Mar 30 2006 Nalin Dahyabhai - 3.1.0-1 +- update to 3.1.0 (#187372) + * Fri Feb 10 2006 Jesse Keating - 3.0.2-31.2.1 - bump again for double-long bug on ppc(64) @@ -148,24 +150,11 @@ the header files and libraries required for building programs which use Hesiod. %prep %setup -q -%patch0 -p1 -b .shlib %patch1 -p1 -b .env %patch2 -p1 -b .str %patch3 -p1 -b .dnsparse %patch4 -p1 -b .libresolv - autoconf -for manpage in *.3; do - if grep -q '^\.so man3/hesiod.3' $manpage ; then - echo .so hesiod.3 > $manpage - elif grep -q '^\.so man3/hesiod_getmailhost.3' $manpage ; then - echo .so hesiod_getmailhost.3 > $manpage - elif grep -q '^\.so man3/hesiod_getpwnam.3' $manpage ; then - echo .so hesiod_getpwnam.3 > $manpage - elif grep -q '^\.so man3/hesiod_getservbyname.3' $manpage ; then - echo .so hesiod_getservbyname.3 > $manpage - fi -done %build %configure @@ -173,7 +162,8 @@ make %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT -%makeinstall +make install DESTDIR=$RPM_BUILD_ROOT +rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la %clean rm -rf $RPM_BUILD_ROOT @@ -185,9 +175,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc README NEWS -%{_bindir}/hesinfo %{_libdir}/libhesiod.so.* -%{_mandir}/man1/* %{_mandir}/man5/* %files devel diff --git a/sources b/sources index e567ab5..a408e3e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0362311e80fb1e029a1588cbbd09ad57 hesiod-3.0.2.tar.gz +89c785d350e75d6628754659ee4583e8 hesiod-3.1.0.tar.gz