Subject: pkg/18953: bind8 package building fails under solaris (use of zoularis)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <pierre.bourgin@pcotech.fr>
List: netbsd-bugs
Date: 11/06/2002 04:04:25
>Number:         18953
>Category:       pkg
>Synopsis:       bind8 package building fails under solaris (use of zoularis)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 06 04:05:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     pierre bourgin
>Release:        solaris 5.7 sparc
>Organization:
>Environment:
SunOS tequila 5.7 Generic_106541-20 sun4u sparc SUNW,Ultra-250
>Description:
problems that cancel the build process of the package bind-8.3.3:

1. unable to generate man pages while building this package

2. the installation process uses (/usr/sbin/)install instead 
   of /usr/ucb/install under solaris

3. the installation process put stuff into /usr/local (instead 
   of /usr/pkg)

4. the uninstallation of this package leaves the file /usr/pkg/include/bind/sys/cdefs.h


>How-To-Repeat:
with the pksgrc.tar.gz of 2002-oct-12 (but cvsweb did not show any 
modifications since that date): 

% cd pkgsrc/net/bind8 && bmake install
>Fix:
1. 
solaris 5.7 does not recognize '-mandoc' as a library for nroff. a solution is to use groff instead to produce man pages, that implies 
groff (zoularis) package to be present while building the bind8 package.

I don't know how to implement this package requierment and I don't know 
how to avoid disturbing other zoularis target platform (darwin, linux)

for the use of groff, we must patch the work/doc/man/Makefile file (
that implies to update the patches/patch-aa file):
-------------------------------------------------------------
--- ../doc/man/Makefile.orig    Mon Nov 29 20:22:07 1999
+++ ../doc/man/Makefile
 @@ -105,7 +105,7 @@ XFER_INDOT=
 # can be used.
 #      MANROFF = cat
 #
-MANROFF = ( tbl | nroff -mandoc )
+MANROFF = ( tbl | groff -mandoc )
------------------------------------------------------------- 

2.
In the same file, the use of (/usr/sbin/)install fails to install man 
pages : /usr/ucb/install should be used instead on Solaris platform. 

a dirty hack is to use this patch, but it uses  should disturb the 
linux or darwin use of zoularis; no other solution like a use of a 
variable ${INSTALL} for instance ?
-------------------------------------------------------------
--- ../doc/man/Makefile.orig    Mon Nov 29 20:22:07 1999
+++ ../doc/man/Makefile
@@ -76,7 +76,7 @@ CATEXT = 0
 #
 # Command to install manual entries
 #
-INSTALL= install
+INSTALL= /usr/ucb/install

 #
 # `install' options to set Owner and Group for manual entries. Eg. for
-------------------------------------------------------------


3.
this point is (really) easier to fix:
-------------------------------------------------------------
--- port/solaris/Makefile.set.orig      Mon Jun 24 02:33:16 2002
+++ port/solaris/Makefile.set
@@ -1,12 +1,14 @@
 'CC=gcc'
 'CDEBUG=-g -O2'
-'DESTBIN=/usr/local/bin'
-'DESTSBIN=/usr/local/sbin'
-'DESTEXEC=/usr/local/sbin'
-'DESTMAN=/usr/local/share/man'
-'DESTHELP=/usr/local/lib'
-'DESTETC=/usr/local/etc'
-'DESTRUN=/usr/local/etc'
+'DESTBIN=${PREFIX}/bin'
+'DESTLIB=${PREFIX}/lib'
+'DESTINC=${PREFIX}/include/bind'
+'DESTSBIN=${PREFIX}/sbin'
+'DESTEXEC=${PREFIX}/libexec'
+'DESTMAN=${PREFIX}/share/man'
+'DESTHELP=${PREFIX}/share/doc/bind8'
+'DESTETC=${PREFIX}/etc'
+'DESTRUN=/var/run'
 'LDS=:'
 'AR=/usr/ccs/bin/ar cru'
 'LEX=/usr/ccs/bin/lex'
-------------------------------------------------------------

4.
create a file PLIST-SunOS and uses it inside the Makefile:
-------------------------------------------------------------
--- Makefile.orig       Wed Nov  6 12:12:03 2002
+++ Makefile    Wed Nov  6 12:40:19 2002
@@ -27,6 +27,10 @@
 PLIST_SRC=             ${PKGDIR}/PLIST-Linux
 .endif

+.if ${OPSYS} == "SunOS"
+PLIST_SRC=             ${PKGDIR}/PLIST-SunOS
+.endif
+
 post-build:
        @(cd ${WRKDIR}/doc/man && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${
MAKEFILE} clean all)

-------------------------------------------------------------

PLIST-SunOS file:
-------------------------------------------------------------
bin/addr
bin/dig
bin/dnsquery
bin/host
bin/mkservdb
bin/nslookup
bin/nsupdate
etc/rc.d/named
include/bind/arpa/inet.h
include/bind/arpa/nameser.h
include/bind/arpa/nameser_compat.h
include/bind/hesiod.h
include/bind/irp.h
include/bind/irs.h
include/bind/isc/assertions.h
include/bind/isc/dst.h
include/bind/isc/eventlib.h
include/bind/isc/heap.h
include/bind/isc/irpmarshall.h
include/bind/isc/list.h
include/bind/isc/logging.h
include/bind/isc/memcluster.h
include/bind/isc/misc.h
include/bind/isc/tree.h
include/bind/netdb.h
include/bind/res_update.h
include/bind/resolv.h
include/bind/sys/bitypes.h
include/bind/sys/cdefs.h
lib/libbind.a
lib/libbind_r.a
libexec/dnskeygen
libexec/named-xfer
sbin/irpd
sbin/named
sbin/named-bootconf
sbin/ndc
share/doc/bind8/acl.html
share/doc/bind8/address_list.html
share/doc/bind8/comments.html
share/doc/bind8/config.html
share/doc/bind8/controls.html
share/doc/bind8/docdef.html
share/doc/bind8/example.html
share/doc/bind8/include.html
share/doc/bind8/index.html
share/doc/bind8/key.html
share/doc/bind8/logging.html
share/doc/bind8/master.html
share/doc/bind8/nslookup.help
share/doc/bind8/options.html
share/doc/bind8/server.html
share/doc/bind8/trusted-keys.html
share/doc/bind8/zone.html
man/cat1/dig.0
man/cat1/dnsquery.0
man/cat1/dnskeygen.0
man/cat3/getaddrinfo.0
man/cat3/gethostbyname.0
man/cat3/getipnodebyname.0
man/cat3/getnameinfo.0
man/cat3/getnetent.0
man/cat3/hesiod.0
man/cat3/inet_cidr.0
man/cat3/resolver.0
man/cat3/tsig.0
man/cat5/named.conf.0
man/cat5/irs.conf.0
man/cat5/resolver.0
man/cat7/hostname.0
man/cat7/mailaddr.0
man/cat8/named.0
man/cat8/named-bootconf.0
man/cat8/named-xfer.0
man/cat8/ndc.0
man/cat8/nslookup.0
man/cat8/nsupdate.0
@dirrm include/bind/arpa
@dirrm include/bind/isc
@dirrm include/bind/sys
@dirrm include/bind
@dirrm share/doc/bind8
-------------------------------------------------------------

>Release-Note:
>Audit-Trail:
>Unformatted: