update to 3.2.1

- update to 3.2.1 (whoops, missed 3.2 completely)
 - merged all patches or equivalents
 - re-merged hesinfo, so we obsolete it now
 - adds a pkgconfig configuration file for libhesiod
- correct inconsistent changelog dates, assuming day-of-week is correct
This commit is contained in:
Nalin Dahyabhai 2013-04-03 18:04:04 -04:00
parent 8a805efc43
commit 13ffbf9323
8 changed files with 19 additions and 160 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
hesiod-3.0.2.tar.gz hesiod-3.0.2.tar.gz
hesiod-3.1.0.tar.gz hesiod-3.1.0.tar.gz
/hesiod-3.2.1.tar.gz

View File

@ -1,56 +0,0 @@
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,8 +327,9 @@
*/
static char **get_txt_records(struct hesiod_p *ctx, const char *name)
{
- unsigned char qbuf[PACKETSZ], abuf[MAX_HESRESP];
- int n;
+ unsigned char qbuf[PACKETSZ], *abuf;
+ char **tmp;
+ int n, i, len;
/* Make sure the resolver is initialized. */
if ((_res.options & RES_INIT) == 0 && res_init() == -1)
@@ -343,14 +344,36 @@
}
/* 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);
+ if (abuf == NULL)
+ {
+ n = -1;
+ break;
+ }
+ n = res_send(qbuf, i, abuf, len);
+ if (n < len)
+ {
+ break;
+ }
+ len = n + 1024;
+ } while(1);
+ if (n < (ssize_t) sizeof(HEADER))
{
errno = ECONNREFUSED;
+ free(abuf);
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)

View File

@ -1,29 +0,0 @@
Ignore environment variables in setuid or setgid programs. The glibc-internal
copy of the library already implements a similar check.
--- hesiod-3.0.2/hesiod.c Wed Oct 3 14:53:37 2001
+++ hesiod-3.0.2/hesiod.c Wed Oct 3 14:55:02 2001
@@ -52,6 +52,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <ctype.h>
#include "hesiod.h"
@@ -79,13 +80,13 @@
if (ctx)
{
*context = ctx;
- configname = getenv("HESIOD_CONFIG");
+ configname = ((getuid() == geteuid()) && (getgid() == getegid())) ? getenv("HESIOD_CONFIG") : NULL;
if (!configname)
configname = SYSCONFDIR "/hesiod.conf";
if (read_config_file(ctx, configname) >= 0)
{
/* The default rhs can be overridden by an environment variable. */
- p = getenv("HES_DOMAIN");
+ p = ((getuid() == geteuid()) && (getgid() == getegid())) ? getenv("HES_DOMAIN") : NULL;
if (p)
{
if (ctx->rhs)

View File

@ -1,20 +0,0 @@
Try to correctly find res_mkquery in libresolv, even in cases where a
preprocessor-based rename in <resolv.h> 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,14 @@
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_MSG_CHECKING([if res_mkquery is provided by libresolv])
+AC_TRY_LINK([#include <resolv.h>],[res_mkquery(0,NULL,0,0,NULL,0,NULL,NULL,0);],[AC_DEFINE(HAVE_RES_MKQUERY,1,[Define if your libresolv provides res_mkquery.])
+AC_MSG_RESULT(yes)],[LIBS="$saveLIBS"
+AC_MSG_RESULT(no)])
+])])
AC_CONFIG_HEADER(config.h)
AC_OUTPUT(Makefile)

View File

@ -1,14 +0,0 @@
Let libtool decide the install mode for the libtool archive and the real files
which it tracks.
--- hesiod-3.1.0/Makefile.in 2006-06-20 14:24:10.000000000 -0400
+++ hesiod-3.1.0/Makefile.in 2006-06-20 14:24:05.000000000 -0400
@@ -48,7 +48,7 @@
${top_srcdir}/mkinstalldirs ${DESTDIR}${includedir}
${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man3
${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man5
- ${LIBTOOL} --mode=install ${INSTALL} -m 644 libhesiod.la \
+ ${LIBTOOL} --mode=install ${INSTALL} libhesiod.la \
${DESTDIR}${libdir}
${INSTALL} -m 444 ${srcdir}/hesiod.h ${DESTDIR}${includedir}
${INSTALL} -m 444 ${srcdir}/hesiod.3 ${DESTDIR}${mandir}/man3

View File

@ -1,25 +0,0 @@
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++;

View File

@ -1,17 +1,13 @@
Name: hesiod Name: hesiod
Version: 3.1.0 Version: 3.2.1
Release: 23%{?dist} Release: 1%{?dist}
Source: ftp://athena-dist.mit.edu/pub/ATHENA/hesiod/hesiod-%{version}.tar.gz Source: ftp://athena-dist.mit.edu/pub/ATHENA/hesiod/hesiod-%{version}.tar.gz
Patch1: hesiod-3.1.0-env.patch
Patch2: hesiod-3.1.0-str.patch
Patch3: hesiod-3.1.0-dnsparse.patch
Patch4: hesiod-3.1.0-libresolv.patch
Patch5: hesiod-3.1.0-perms.patch
Summary: Shared libraries for querying the Hesiod naming service Summary: Shared libraries for querying the Hesiod naming service
Group: System Environment/Libraries Group: System Environment/Libraries
License: MIT License: MIT
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, automake, libtool BuildRequires: autoconf, automake, libtool
Obsoletes: hesinfo < 3.2
%description %description
Hesiod is a system which uses existing DNS functionality to provide access Hesiod is a system which uses existing DNS functionality to provide access
@ -33,6 +29,13 @@ ensure the files are synchronized among multiple hosts. This package contains
the header files and libraries required for building programs which use Hesiod. the header files and libraries required for building programs which use Hesiod.
%changelog %changelog
* Wed Apr 3 2013 Nalin Dahyabhai <nalin@fedoraproject.org> - 3.2.1-1
- update to 3.2.1
- merged all patches or equivalents
- re-merged hesinfo, so we obsolete it now
- adds a pkgconfig configuration file for libhesiod
- correct inconsistent changelog dates, assuming day-of-week is correct
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-23 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
@ -80,7 +83,7 @@ the header files and libraries required for building programs which use Hesiod.
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.1.0-10 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.1.0-10
- Autorebuild for GCC 4.3 - Autorebuild for GCC 4.3
* Wed Aug 22 2006 Nalin Dahyabhai <nalin@redhat.com> - 3.1.0-9 * Wed Aug 23 2006 Nalin Dahyabhai <nalin@redhat.com> - 3.1.0-9
- rebuild - rebuild
* Mon Jul 17 2006 Nalin Dahyabhai <nalin@redhat.com> - 3.1.0-8 * Mon Jul 17 2006 Nalin Dahyabhai <nalin@redhat.com> - 3.1.0-8
@ -151,7 +154,7 @@ the header files and libraries required for building programs which use Hesiod.
* Fri Jan 10 2003 Phil Knirsch <pknirsch@redhat.com> 3.0.2-23 * Fri Jan 10 2003 Phil Knirsch <pknirsch@redhat.com> 3.0.2-23
- Build shared lib correctly on s390 and s390x (with gcc -shared -fPIC). - Build shared lib correctly on s390 and s390x (with gcc -shared -fPIC).
* Wed Sep 24 2002 Nalin Dahyabhai <nalin@redhat.com> 3.0.2-22 * Wed Sep 25 2002 Nalin Dahyabhai <nalin@redhat.com> 3.0.2-22
- look harder for res_mkquery() in libresolv - look harder for res_mkquery() in libresolv
* Wed Aug 21 2002 Nalin Dahyabhai <nalin@redhat.com> * Wed Aug 21 2002 Nalin Dahyabhai <nalin@redhat.com>
@ -189,7 +192,7 @@ the header files and libraries required for building programs which use Hesiod.
- remove the shared library patch -- different packages with shared libraries - remove the shared library patch -- different packages with shared libraries
tend to use different sonames, so we'd run inevitably run into problems tend to use different sonames, so we'd run inevitably run into problems
* Thu Aug 21 2001 Nalin Dahyabhai <nalin@redhat.com> * Thu Aug 23 2001 Nalin Dahyabhai <nalin@redhat.com>
- remove pre and post scripts -- authconfig handles that stuff now - remove pre and post scripts -- authconfig handles that stuff now
- add the hesiod man page back in, as bind-devel doesn't provide it any more - add the hesiod man page back in, as bind-devel doesn't provide it any more
@ -224,13 +227,9 @@ the header files and libraries required for building programs which use Hesiod.
%prep %prep
%setup -q %setup -q
%patch1 -p1 -b .env
%patch2 -p1 -b .str
%patch3 -p1 -b .dnsparse
%patch4 -p1 -b .libresolv
%patch5 -p1 -b .perms
libtoolize -f -i libtoolize -f -i
aclocal aclocal
automake -f -a
autoconf -f -i autoconf -f -i
%build %build
@ -252,11 +251,14 @@ rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc README NEWS %doc README NEWS
%{_bindir}/*
%{_libdir}/libhesiod.so.* %{_libdir}/libhesiod.so.*
%{_mandir}/man1/*
%{_mandir}/man5/* %{_mandir}/man5/*
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/libhesiod.so %{_libdir}/libhesiod.so
%{_libdir}/pkgconfig/*
%{_includedir}/hesiod.h %{_includedir}/hesiod.h
%{_mandir}/man3/* %{_mandir}/man3/*

View File

@ -1 +1 @@
89c785d350e75d6628754659ee4583e8 hesiod-3.1.0.tar.gz d8fe6d7d081c9c14d5d3d8a466998eeb hesiod-3.2.1.tar.gz