From 6f4a6bc254c8ce9ca927c330050f4a1b003afe25 Mon Sep 17 00:00:00 2001 From: Christoph Schug Date: Thu, 4 Jul 2002 13:10:47 +0000 Subject: [PATCH] Fixed the mess I caused yesterday :-) --- bind8/bind.patch | 41 +++++++++++++++++++++++++---------------- bind8/bind8.spec | 17 +++++++---------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/bind8/bind.patch b/bind8/bind.patch index 216fdd8adc..bea0d921c5 100644 --- a/bind8/bind.patch +++ b/bind8/bind.patch @@ -1,43 +1,52 @@ ---- src/lib/isc/eventlib.c.orig Wed Jul 3 19:17:43 2002 -+++ src/lib/isc/eventlib.c Wed Jul 3 19:21:30 2002 -@@ -293,9 +293,9 @@ +--- src/lib/isc/eventlib.c.orig Thu Jul 4 15:01:28 2002 ++++ src/lib/isc/eventlib.c Thu Jul 4 15:02:04 2002 +@@ -293,9 +293,15 @@ evPrintf(ctx, 4, "pselect(%d, 0x%lx, 0x%lx, 0x%lx, %d.%09ld)\n", ctx->fdMax+1, -- (u_long)ctx->rdLast.fds_bits[0], -- (u_long)ctx->wrLast.fds_bits[0], -- (u_long)ctx->exLast.fds_bits[0], ++#ifdef __linux__ + (u_long)ctx->rdLast.__fds_bits[0], + (u_long)ctx->wrLast.__fds_bits[0], + (u_long)ctx->exLast.__fds_bits[0], ++#else + (u_long)ctx->rdLast.fds_bits[0], + (u_long)ctx->wrLast.fds_bits[0], + (u_long)ctx->exLast.fds_bits[0], ++#endif tp ? tp->tv_sec : -1, tp ? tp->tv_nsec : -1); ---- src/lib/isc/ev_files.c.orig Wed Jul 3 19:22:45 2002 -+++ src/lib/isc/ev_files.c Wed Jul 3 19:23:16 2002 -@@ -146,9 +146,9 @@ +--- src/lib/isc/ev_files.c.orig Thu Jul 4 15:01:42 2002 ++++ src/lib/isc/ev_files.c Thu Jul 4 15:01:54 2002 +@@ -146,9 +146,15 @@ evPrintf(ctx, 5, "evSelectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n", fd, eventmask, -- (u_long)ctx->rdNext.fds_bits[0], -- (u_long)ctx->wrNext.fds_bits[0], -- (u_long)ctx->exNext.fds_bits[0]); ++#ifdef __linux__ + (u_long)ctx->rdNext.__fds_bits[0], + (u_long)ctx->wrNext.__fds_bits[0], + (u_long)ctx->exNext.__fds_bits[0]); ++#else + (u_long)ctx->rdNext.fds_bits[0], + (u_long)ctx->wrNext.fds_bits[0], + (u_long)ctx->exNext.fds_bits[0]); ++#endif return (0); } -@@ -262,9 +262,9 @@ +@@ -262,9 +268,15 @@ evPrintf(ctx, 5, "evDeselectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n", del->fd, eventmask, -- (u_long)ctx->rdNext.fds_bits[0], -- (u_long)ctx->wrNext.fds_bits[0], -- (u_long)ctx->exNext.fds_bits[0]); ++#ifdef __linux__ + (u_long)ctx->rdNext.__fds_bits[0], + (u_long)ctx->wrNext.__fds_bits[0], + (u_long)ctx->exNext.__fds_bits[0]); ++#else + (u_long)ctx->rdNext.fds_bits[0], + (u_long)ctx->wrNext.fds_bits[0], + (u_long)ctx->exNext.fds_bits[0]); ++#endif /* Couldn't free it before now since we were using fields out of it. */ FREE(del); diff --git a/bind8/bind8.spec b/bind8/bind8.spec index 1780834d77..88595c083b 100644 --- a/bind8/bind8.spec +++ b/bind8/bind8.spec @@ -33,7 +33,7 @@ Distribution: OpenPKG [REL] Group: DNS License: GPL Version: 8.3.3 -Release: 20020703 +Release: 20020704 # list of sources Source0: ftp://ftp.isc.org/isc/bind/src/%{version}/bind-src.tar.gz @@ -65,12 +65,7 @@ Conflicts: bind %prep %setup0 -q -c -n bind8-%{version} %setup1 -q -T -D -a 1 -## FIXME: surely we need the patch for Linux only but those do not work -## as documented in RPM-HOWTO. Any hints how to work around the -## situation without requireing external patch program? -%ifarch linux2.2 %patch0 -p0 -%endif %build PATH="%{l_prefix}/bin:$PATH"; export PATH @@ -172,15 +167,17 @@ Conflicts: bind rm -rf $RPM_BUILD_ROOT %pre - if [ $1 -gt 1 -a -e $RPM_INSTALL_PREFIX/var/bind/ndc ]; then + if [ $1 -gt 1 ]; then # stop daemon before any upgrade - $RPM_INSTALL_PREFIX/sbin/ndc stop >/dev/null 2>&1 + ls >/dev/null 2>&1 $RPM_INSTALL_PREFIX/var/bind/ndc \ + && $RPM_INSTALL_PREFIX/sbin/ndc stop >/dev/null 2>&1 fi %preun - if [ $1 -eq 0 -a -e $RPM_INSTALL_PREFIX/var/bind/ndc ]; then + if [ $1 -eq 0 ]; then # stop daemon before removing package - $RPM_INSTALL_PREFIX/sbin/ndc stop >/dev/null 2>&1 + ls >/dev/null 2>&1 $RPM_INSTALL_PREFIX/var/bind/ndc \ + && $RPM_INSTALL_PREFIX/sbin/ndc stop >/dev/null 2>&1 # remove dynamically generated files rm -f $RPM_INSTALL_PREFIX/var/bind/* fi