Configuring options/knobs without `make config`

Kevin Oberman rkoberman at
Thu Jul 27 23:13:00 UTC 2017

On Thu, Jul 27, 2017 at 7:36 AM, Morse, Richard E.,MGH <
REMORSE at> wrote:

> Hi! I’m trying to document the setup of a new system, and I’m finding it
> really complicated to document exactly which options I choose for various
> ports.
> I was wondering if there is some magic command-line syntax, (ideally to
> postmaster) that would let me document the options selected in the form of
> a command — something like:
>         postmaster editors/vim -o NOLUA,NOPYTHON,NORUBY,CONSOLE,NOGNOME
> (to indicate the changes from the default settings; I would be fine if I
> had to specify every option, I suppose, but ideally only ones that changed…)
> Thanks,
> Ricky
Short answer is "no". because the ports system always remembers teh chosen
configuration for any port and that is stored in the pkg database, I am not
aware of any tool that allows setting of options from the command line.
That said, it is certainly possible and does not look difficult to
implement. It would probably be both easiest and more supportable to set
the options in the command line into the DB. Of course, '-o' is already in
use, so that would net be available.

More difficult to deal with is the issue of default options. Frankly, that
is not an issue that is really handled at all well with any of the current
tools and periodically bites my in the ass. Clearly, requiring all options
to e listed on the command line is not workable. (Just look at the list of
options on some multimedia ports.) So the assumption is that the command
line only specifies variations from defaults, but that does not address how
to deal with changes in defaults or with deleted options. I don't have
obvious answers on this. Do you? It's certainly not trivial.

As a non-answer to your question, maybe a dump of the current options. That
could easily be added to most any tool ad it is a one-line command.
make -C PORT_PATH showconfig
where "PORT_PATH" is the path to the port, e.g.
/usr/ports/multimedia/ffmpeg. It could easily in a simple wrapper around
some other command such as portmaster.

Maybe someone else has a better idea, but it does not look at all simple to
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman at
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

More information about the freebsd-ports mailing list