Configuring options/knobs without `make config`

Thomas Mueller mueller6722 at
Fri Jul 28 02:31:49 UTC 2017

from Kevin Oberman:

> 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 me.

NetBSD with pkgsrc, and Gentoo portage have no options dialog; options are put in mk.conf or make.conf : much easier to deal with.

Dialog4ports is a big improvement over the old options dialog which generally messed up the screen.  I had to, and still have to, run "make config-recursive" several times because something new would show up on the second run and possibly further runs of "make config-recursive".

It's nice to have something like

PKG_DEFAULT_OPTIONS+= ssl inet6 nls ncurses pcre gtk3 x11 fftw esound cups sndfile


PKG_OPTIONS.msmtp+= idn 
PKG_OPTIONS.w3m+= w3m-image-gtk2
PKG_OPTIONS.gcc-aux+= testsuite

or USE= ... in Gentoo with portage.

Is there any way to achieve something like that with FreeBSD using ports?

It would be a big nuisance to have to put all nondefault options on the command line with portmaster, and a bigger nuisance when building or updating many ports with a single portmaster command.


More information about the freebsd-ports mailing list