From b04e39c4932ad13166ab67affae33dc8fdf677bc Mon Sep 17 00:00:00 2001 From: Doug Barton Date: Fri, 8 Oct 2004 00:14:28 +0000 Subject: 1. Incorporate most of Ruslan's improvements to where and how the /etc/namedb symlink is created. 2. Incorporate Brian's suggestion to make the link relative. This is necessary to handle situations (such as mergemaster) where the user is building a tree in a seperate environment. This will also fix the problem with the way DESTDIR is set in 'make release'. 3. Add a new knob, NO_BIND_MTREE, as suggested by the folks who already have stuff in /var/named that they don't want me to mess with. 4. Update make.conf(5) with the new stuff, and correct a few paths that have changed since I last updated it. --- etc/Makefile | 13 +++++++++++-- share/examples/etc/make.conf | 2 ++ share/man/man5/make.conf.5 | 15 +++++++++++++-- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/etc/Makefile b/etc/Makefile index f05f83e02e90..0900b53c9f9b 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -122,9 +122,17 @@ distribution: ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${MTREE} ${DESTDIR}/etc/mtree -.if !defined(NO_BIND_ETC) && !defined(NO_BIND) +.if !defined(NO_BIND) +.if !defined(NO_BIND_ETC) cd ${.CURDIR}/namedb; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${NAMEDB} ${DESTDIR}/var/named/etc/namedb +.endif +.if !defined(NO_BIND_MTREE) + @if [ ! -e ${DESTDIR}/etc/namedb ]; then \ + set -x; \ + ln -s ../var/named/etc/namedb ${DESTDIR}/etc/namedb; \ + fi +.endif .endif cd ${.CURDIR}/ppp; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ ${PPPCNF} ${DESTDIR}/etc/ppp @@ -184,9 +192,10 @@ distrib-dirs: mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \ -p ${DESTDIR}/usr/include .endif +.if !defined(NO_BIND_MTREE) mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \ -p ${DESTDIR}/var/named - ln -fhs /var/named/etc/namedb ${DESTDIR}/etc/namedb +.endif .endif .if !defined(NO_SENDMAIL) mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/ diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf index 4a52626ae4b5..d84aed540eaf 100644 --- a/share/examples/etc/make.conf +++ b/share/examples/etc/make.conf @@ -145,10 +145,12 @@ # # Variables to control whether parts of the base BIND are built. # Defining NO_BIND makes all of the following BIND variables obsolete. +# Please see the more detailed descriptions in make.conf(5). #NO_BIND= true # Do not build any part of BIND #NO_BIND_DNSSEC= true # Do not build dnssec-keygen, dnssec-signzone #NO_BIND_ETC= true # Do not install files to /etc/namedb #NO_BIND_LIBS_LWRES= true # Do not install the lwres library +#NO_BIND_MTREE= true # Do not run mtree to create chroot directories #NO_BIND_NAMED= true # Do not build named, rndc, lwresd, etc. #NO_BIND_UTILS= true # Do not build dig, host, nslookup, nsupdate #WITH_BIND_LIBS= true # Install the BIND libs and include files diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index 7834436a32bd..60a6ef56fa43 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2004 +.Dd October 5, 2004 .Dt MAKE.CONF 5 .Os .Sh NAME @@ -612,12 +612,23 @@ and .It Va NO_BIND_ETC .Pq Vt bool Set to avoid installing the default files to -.Pa /etc/namedb . +.Pa /var/named/etc/namedb . .It Va NO_BIND_LIBS_LWRES .Pq Vt bool Set to avoid installing the lightweight resolver library in .Pa /usr/lib . The library that is private to the build system may still be built as needed. +.It Va NO_BIND_MTREE +.Pq Vt bool +Set to avoid running +.Xr mtree 8 +to create the chroot directory structure under +.Pa /var/named , +and avoid creating an +.Pa /etc/namedb +symlink to the chroot directory. +This option should typically be used together with +.Vt NO_BIND_ETC . .It Va NO_BIND_NAMED .Pq Vt bool Set to avoid building or installing -- cgit v1.3