Here are two files that make stateful configuration of world building somewhat easier.
I expect that the way this will be used is to allow Paul, et. al. the option of setting a default, and having the system ask users if they want to live with Paul's default, or if they want to select their own default instead. This is a proof of concept; it works on my machine, but obviously it could be hacked until the end of time, and not everyone would be satisfied. Basically, you dump these two files int /usr/src, and then add # # System configuration # .include <Makefile.world> Before "TGTS=" at the top of /usr/src/Makefile. It will force you to select options (offerring defaults) for two example knobs. It then writes the results to a file called /etc/world.mk, which is then sucked back in by the Makefile.world, after it adds a .BEGIN target that causes the file to be rebuilt if it's missing any options. Basically, this means that you can incrementally add knobs, and anyone who builds, instead of getting surprised by the new knobs, ends up getting asked to select the new knob. If you are afraid of running from a cron script, you can: yes x | make world or make world < /dev/null And it will select the defaults, or: yes n | make world And it will turn all new knobs off automatically. You can edit the file by hand if you need/want to; knobs the script doesn't know about will go away, as will anything other than the default comments, but the ability is there for knobs it knows about. The script as written has two default knobs, "PRISTINE" and "BOB"; these are terrible names, but the are only intended as examples (I expect that the actuall names will be things like "KNOB_DELETE_INCLUDES" and "KNOB_DELETE_PERL", etc.). Basically, it ends up being three data lines in a shell script, per new knob. Note that I haven't tried a "make release" with this yet; I expect you will want to copy in the /etc/world.mk from the local system to do the build, or add the /dev/null redirect to the sub-shell in the jail for the build. -- Terry
# Support mandatory option recording # # Original: 06 Jul 2002, Terry Lambert # WORLD_CONFIG= /etc/world.mk .BEGIN: @sh ${.CURDIR}/worldconfig.sh ${WORLD_CONFIG} .if exists(${WORLD_CONFIG}) .include "${WORLD_CONFIG}" .endif
worldconfig.sh
Description: Bourne shell script