Subject: Questions about mk.conf
To: None <netbsd-help@NetBSD.org>
From: Eye of the Beholder <eye.of.the.8eholder@gmail.com>
List: netbsd-help
Date: 03/23/2006 17:02:20
Hello.
I guess this is the right list for my questions although
{current,netbsd,pkgsrc}-users may also be right.

This is my /etc/mk.conf
.ifdef BSD_PKG_MK
# pkgsrc
#USE_X11BASE=YES
CFLAGS+= -march=pentium4 -pipe
X11_TYPE=xorg
X11BASE=/usr/pkg/xorg
FAILOVER_FETCH=YES
PKG_RCD_SCRIPTS=YES
MANZ=YES
PKG_SUFX=.tbz
WRKOBJDIR=/tmp/pkgsrc-obj
USE_XPKGWEDGE?= NO
MASTER_SORT= .gr .de .de .ch .se .fi
SMART_MESSAGES=yes
LSOF_MORE_SECURE?= 1
MOZILLA_USE_LINUX= YES
MOZILLA_USE_XFT?= YES
XAW_TYPE?=3d
XLOCK_DEFAULT_MODE=matrix
PKG_DEFAULT_OPTIONS= ( many options )
ACCEPTABLE_LICENSES=  ( many licenses )

.else
# base system
BSDOBJDIR=/usr/obj
BUILD=YES
MKNLS=YES
MKOBJDIRS=YES
MKPOSTFIX=NO
MKKERBEROS=NO
MKUPDATE=YES
MKYP=NO
MKMANZ=YES
MKIPFILTER=NO
DESTDIR=/usr/obj/destdir
RELEASEDIR=/usr/obj/release
TOOLDIR=/usr/obj/tools
.endif

1) The base system part

I have read that i should use build.sh instead of running make. So the command i
use is the following.
./build.sh -D /usr/obj/destdir -O /usr/obj/ -R /usr/obj/release -T /usr/obj/tools -u
distribution
(If it fails for some reason i then use "-u -o")

a) None of the variables i have selected in mk.conf are honoured. I have read in the
build.sh code that this is done so that if the mk.conf is wrong the build doesn't fail.
Since build.sh runs "make target" (distribution in my example) shouldn't mk.conf be
sourced ? If i run "make distribution" manually it works.

b) Is there any way that i use these variables in build.sh ?

c) after that i install the sources (i have rebooted to the new kernel ofcourse) with
./build.sh -D /usr/obj/destdir -O /usr/obj/ -R /usr/obj/release -T /usr/obj/tools -u
-o install=/
postinstall -s /usr/src check
postinstall -s /usr/src fix
etcupdate -s /usr/src

This installs all the sets while i don't want them all (for example i don't want
games.tgz). I have seen during the install the INSTALLSETS variable so i tried
passing it to build.sh with " -V INSTALLSETS="blah" " but it doesn't work.
This isn't a major problem since i can do "cat /etc/mtree/set.games |xargs rm" but
i just ask for knowledge's sake.

d) When i have built the base system with options different than the installation cd
and install it to / i get some files that are not part of the system now (e.g if i
choose MKMANZ=YES i will have the uncompressed man pages, or if i choose MKPOSTFIX=NO
i will have postfix from the base system of the installation cd). Is there any program
that sees that or i should manually take care of them ?

2) pkgsrc part
I compile xorg and it gets installed in /usr/pkg/xorg
I have read in pkgsrc/mk/defaults/mk.conf that X11BASE says where X is installed and
is also the default path for X11 packages. My problem is that no package gets installed
in /usr/pkg/xorg. I have disabled as you see USE_XPKGWEDGE and i thought that it will
work but for example xterm is installed in /usr/pkg.
If i use the USE_X11BASE that i have commented all packages get installed in the xorg
path which isn't wanted either.

a) Is there any way to say that some packages (e.g xterm,Xrandr,Xrender,Xaw3d,etc)
get installed in /usr/pkg/xorg ? not all of them though.


Thank you for your time and sorry for my big post.