Solved [Solved] FreeBSD 9.2: SRCCONF doesn't seem to overrule

ShelLuser

Son of Beastie

Reaction score: 1,814
Messages: 3,600

Hi gang!

I've been using the source tree to keep my servers up to date for quite some time now. One aspect which I particularly like is having the option to control which parts get build and which don't. So, for example, because I'm using the source tree exclusively I opted to skip building software like sendmail, sysinstall and freebsd-update.

However, on one of my servers I'm also using a Jail which I'd like to keep as pristine as possible. So while my host uses Postfix and as because of that doesn't have Sendmail installed I want the jail to use Sendmail since that is the default.

To this end I copied /etc/src.conf to /etc/src.dogma.conf and removed the lines which prevented the build of those programs. So basically this is my /etc/src.dogma.conf:

Code:
## Compiler specification
CC=clang
CPP=clang-cpp
CXX=clang++

## Optimized options for world
WITHOUT_BLUETOOTH=
WITHOUT_FLOPPY=
WITHOUT_IPX=
WITHOUT_QUOTAS=
WITHOUT_USB=
WITHOUT_WIRELESS=
The main difference with my regular src.conf is the absence of these lines:

Code:
WITH_CLANG_IS_CC=
WITHOUT_CVS=
WITHOUT_FREEBSD_UPDATE=
WITHOUT_SENDMAIL=
WITHOUT_SYSINSTALL=
Now, just to make sure everything works as expected I've emptied /usr/obj before running # make buildworld SRCCONF=/etc/src.dogma.conf.

Because this is a test I've installed the whole lot to a new location, namely /usr/jails/dogma.new as follows:

Code:
# make installworld DESTDIR=/usr/jails/dogma.new
# make distribution DESTDIR=/usr/jails/dogma.new
However, after running those commands I don't end up with /usr/jails/dogma.new/usr/sbin/sysinstall, or (when looking from the jail root) /etc/mail and such.

So either I'm overlooking the obvious or SRCCONF didn't overrule my regular src.conf. Does anyone have a hint as to what might be going on here?
 
OP
ShelLuser

ShelLuser

Son of Beastie

Reaction score: 1,814
Messages: 3,600

Re: FreeBSD 9.2 source: SRCCONF doesn't seem to overrule

Solved. Way too obvious even...

I assumed that by building the world, based on instructions in /etc/src.dogma.conf, it would then set up the environment in /usr/obj and from there on install the whole lot. To some degree this assumption is right, however the part which I overlooked was that the instructions in src.conf are also used during the installation stage.

So my mistake above was not specifying SRCCONF during the installation. I should have used this:

Code:
# make installworld SRCCONF=/etc/src.dogma.conf DESTDIR=/usr/jails/dogma.new
# make distribution SRCCONF=/etc/src.dogma.conf DESTDIR=/usr/jails/dogma.new
After that the jail environment gets set up as I expected it to be.

So basically; if you need to build 2 environments it might be best to build the world using a configuration which builds most parts and then do the installation while specifying a configuration which skips some of them. That way you can perform one build run and two different installation runs.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,283
Messages: 33,826

Re: FreeBSD 9.2 source: SRCCONF doesn't seem to overrule

ShelLuser said:
So basically; if you need to build 2 environments it might be best to build the world using a configuration which builds most parts and then do the installation while specifying a configuration which skips some of them. That way you can perform one build run and two different installation runs.
This works for the most part but not for things like WITHOUT_IPX. If you only do installworld with it set ifconfig(8) is going to complain about missing IPX libraries. Because ifconfig(8) was built with IPX enabled but installed without the needed libraries. It's best to use SRCCONF during both the build the install phase.
 
Top