Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jun 1997 08:39:26 +0200
From:      sthaug@nethelp.no
To:        beckmann@nacamar.de
Cc:        hackers@FreeBSD.ORG
Subject:   Re: BIND 8.1
Message-ID:  <19991.866011166@verdi.nethelp.no>
In-Reply-To: Your message of "Wed, 11 Jun 1997 00:55:16 %2B0200"
References:  <v03102803afc38732e1b0@[195.52.251.6]>

next in thread | previous in thread | raw e-mail | index | archive | help
> I wish to ask if anyone is working actively on porting BIND 8.1 to FreeBSD,

BIND 8.1 compiles out of the box for FreeBSD >= 2.2. By "out of the
box" I mean "make clean; make depend; make". I did the initial port,
and fed this back to the BIND developers. For earlier versions, see
the following message.

Steinar Haug, Nethelp consulting, sthaug@nethelp.no
----------------------------------------------------------------------
To: bind-bugs@isc.org
Subject: Fixes for bind-8.1.1-T1A on FreeBSD-2.1.7.1 (and earlier)
From: sthaug@nethelp.no
Date: Sun, 25 May 1997 15:38:53 +0200

bind-8.1.1-T1A doesn't compile "out of the box" on FreeBSD-2.1.7.1 and
earlier. This is partly my fault - when I did the original FreeBSD port,
I didn't have any 2.1.7.1 system to test on (only 2.2 and newer).

I still don't have a 2.1.7.1 system, but I've compiled 8.1.1-T1A on a
2.2 system, but in a 2.1.7.1 *changerooted* environment (ie. 2.1.7.1
include files, compilers etc).

There's only one real problem: The following line from port/settings
tickles a bug in the 2.1.7.1 sh:

	eval "env=`echo \\${\$var-'$val'}`"

and you get the error message:

	port/settings: 1: Syntax error: Bad substitution

The enclosed diff fixes this for FreeBSD 2.1.7.1. The resulting named
runs fine on FreeBSD 2.2.

I've also verified that the same .settings file (as the original) is
produced on these platforms:

	SunOS 4.1.3/gcc
	Solaris 2.5.1/gcc
	Digital Unix 3.2G/cc
	HP-UX 10.20/cc

when doing an "out of the box" compile (make clean; make depend; make).
Note that I've only verified that .settings is equal - I haven't tried
running 8.1.1-T1A named on all these platforms.

One other change suggested for FreeBSD-2.1.7.1 and earlier: AF_INET6
is undefined in 2.1.7.1 and earlier, and defined to be 28 in 2.2 and
newer (/usr/include/sys/socket.h). port/freebsd/include/port_after.h
currently defines AF_INET6 as 24 (if undefined). I'd suggest changing
this to 28, to be compatible with newer versions of FreeBSD.

Steinar Haug, Nethelp consulting, sthaug@nethelp.no
----------------------------------------------------------------------
*** settings.orig	Tue Dec 17 22:49:17 1996
--- settings	Sun May 25 14:16:51 1997
***************
*** 22,28 ****
  while read setting; do
  	var=`expr "$setting" : "'\([A-Z0-9_]*\)="`
  	val=`expr "$setting" : "'[A-Z0-9_]*=\([^']*\)'\$"`
! 	eval "env=`echo \\${\$var-'$val'}`"
  	result="$result '$var=$env'"
  done
  
--- 22,29 ----
  while read setting; do
  	var=`expr "$setting" : "'\([A-Z0-9_]*\)="`
  	val=`expr "$setting" : "'[A-Z0-9_]*=\([^']*\)'\$"`
! 	rhs="\${""$var""-\$val}"
! 	eval "env=$rhs"
  	result="$result '$var=$env'"
  done
  
*** port_after.h.orig	Fri Apr 25 20:12:50 1997
--- port_after.h	Sun May 25 15:15:47 1997
***************
*** 31,35 ****
   * derived systems for which AF_INET6 is defined.
   */
  #ifndef AF_INET6
! #define AF_INET6	24
  #endif
--- 31,35 ----
   * derived systems for which AF_INET6 is defined.
   */
  #ifndef AF_INET6
! #define AF_INET6	28
  #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991.866011166>