On 3/30/14 10:21 PM, Randy Pratt wrote: > On Sun, 30 Mar 2014 17:13:15 -0400 > "John W. O'Brien" <j...@saltant.com> wrote: > >> [blah blah blah] >> [...] >> The first part of my solution to these problems is to store only the >> options that I know I care about. That is, I know I need to find out >> where a stored option disagrees with the default. >> >> I couldn't figure out how to use the stock tools to peel apart currently >> stored options from current default options, so I wrote a >> ``nondefaultconfig`` target for Mk/bsd.port.mk (see attached), set all >> the common options (DOCS, IPv6, etc) explicitly in /etc/make.conf using >> OPTIONS_SET/OPTIONS_UNSET, and ran the new target against all of my >> installed ports, replacing a subtree full of options files with a >> single, quite modest make.conf. To make this more generally-useful, it >> would need to behave more like NEW_OPTIONS. >> >> cd /usr/ports >> pkg info -aoq | sort | xargs -n1 make nondefaultconfig -C \ >> >> /usr/local/etc/poudriere.d/$jail-make.conf >> rm -fr /usr/local/etc/poudriere.d/$jail-$ports-$set-options >> [...] > > I found this posting useful to find OPTIONS: > > http://docs.freebsd.org/cgi/mid.cgi?CAOjFWZ45ACYnaByYxxrGoyqTOeS7_EDV6MwoH98-GtDe-F3Yug > > The mailing list archives seem to be missing for the past month PR187557 > so here an excerpt from my notes: > >> On 3/4/2014 9:40 AM, Thierry Thomas wrote: >> from within a port's directory, >> >> make showconfig >> >> will show you the current options set and >> >> make __MAKE_CONF=/dev/null PORT_DBDIR=/var/empty showconfig >> >> will show you the defaults. > > See make(1)'s -C option for specifying ports pathname. > > It shouldn't take too much to write a small script and find > the diff in the output for each command.
Randy, I like that this approach doesn't muck with /usr/ports/Mk/. I doubt I would have discovered __MAKE_CONF on my own, but now that I know to look for it, I see that it's covered early in make(1): First of all, the initial list of specifications will be read from the system makefile, sys.mk, unless inhibited with the -r option. The standard sys.mk as shipped with FreeBSD also handles make.conf(5), the default path to which can be altered via the make variable __MAKE_CONF. -John
signature.asc
Description: OpenPGP digital signature