Where is the data from make config stored.

Hi,

I setup a system and finely was able to get something working. Most things just required a simple google search to find the answer to what I needed to add/remove and this can be easily be done with make config and you can look at the config with: make showconfig
Code:
===> The following configuration options are available for vim-9.0.0379:
     MAKE_JOBS=off: Enable parallel build
     NLS=on: Native Language Support
     XTERM_SAVE=off: Restore xterm screen after exit
====> Optional language bindings
     LUA=off: Lua scripting language support
     PERL=on: Perl scripting language support
     PYTHON=on: Python bindings or support
     RUBY=off: Ruby bindings or support
     SCHEME=off: MzScheme (Racket) bindings
     TCL=off: Tcl scripting language support
====> Options available for the single CTAGS: you have to select exactly one of them
     CTAGS_BASE=on: Use system ctags
     CTAGS_EXUBERANT=off: Use exctags instead of ctags
     CTAGS_UNIVERSAL=off: Use uctags instead of ctags
===> Use 'make config' to modify these settings
Other things took much more time and more or less trial and error to figure out what needed to be compiled in. Then I somehow corrupted my ports. I moved ports.old used git to get a new ports tree and if I typed make showconfig I could still what I set in the new ports tree. What I would like to do is make my production environment and the development environment the same.

Is there a file where the configs are stored, or can I somehow move them from system to system?

Kind Regards,
Al
 
The ports configuration options are stored in /var/db/ports

To remove a single port configuration you can use make rmconfig or if you want to remove recursive configuration you can use "rmconfig-recursive" for more details check the ports(7) manual page
 
So for vim, on one of my systems:
Code:
% cat /var/db/ports/editors_vim/options
# This file is auto-generated by 'make config'.
# Options for vim-9.1.0015_2
_OPTIONS_READ=vim-9.1.0015_2
_FILE_COMPLETE_OPTIONS_LIST=MAKE_JOBS NLS XTERM_SAVE XXD CTAGS_BASE CTAGS_EXUBERANT CTAGS_UNIVERSAL LUA PERL PYTHON RUBY SCHEME TCL
OPTIONS_FILE_UNSET+=MAKE_JOBS
OPTIONS_FILE_UNSET+=NLS
OPTIONS_FILE_UNSET+=XTERM_SAVE
OPTIONS_FILE_SET+=XXD
OPTIONS_FILE_SET+=CTAGS_BASE
OPTIONS_FILE_UNSET+=CTAGS_EXUBERANT
OPTIONS_FILE_UNSET+=CTAGS_UNIVERSAL
OPTIONS_FILE_UNSET+=LUA
OPTIONS_FILE_UNSET+=PERL
OPTIONS_FILE_UNSET+=PYTHON
OPTIONS_FILE_UNSET+=RUBY
OPTIONS_FILE_UNSET+=SCHEME
OPTIONS_FILE_UNSET+=TCL
 
Code:
     PORT_DBDIR    Directory where the results of configuring OPTIONS are
                   stored.  Defaults to /var/db/ports.  Each port where
                   OPTIONS have been configured will have a uniquely named
                   sub-directory, containing a single file options.
ports(7)

Options are more easily transferred if you set them in make.conf. To take the example vim config from richardtoohey2 :
Code:
editors_vim_UNSET= NLS PYTHON

This also saves you from forgetting to set/unset specific options. You can then build everything with BATCH set and not worry about those settings.
Code:
     BATCH         If defined, only operate on a port if it can be installed
                   100% automatically.
 
If you use ports-mgmt/poudriere, the options are stored in /usr/local/etc/poudriere.d.

I have a make.conf file (can't recall where I learnt to have one there) and an options subdirectory.

Code:
% file /usr/local/etc/poudriere.d/make.conf
/usr/local/etc/poudriere.d/make.conf: makefile script, ASCII text
% ls -hln /usr/local/etc/poudriere.d/options
total 1
drwxr-xr-x  2 0 0    3B  4 Sep  2022 deskutils_remind
drwxr-xr-x  2 0 0    3B 11 Mar  2023 editors_libreoffice
drwxr-xr-x  2 0 0    3B  3 Oct  2023 mail_thunderbird
drwxr-xr-x  2 0 0    3B 16 Oct  2022 multimedia_simplescreenrecorder
drwxr-xr-x  2 0 0    3B 23 Dec  2021 multimedia_webcamd
drwxr-xr-x  2 0 0    3B 11 Mar  2023 sysutils_openzfs
drwxr-xr-x  2 0 0    3B 11 Mar  2023 www_chromium
drwxr-xr-x  2 0 0    3B 23 Dec  2021 www_falkon
drwxr-xr-x  2 0 0    3B 26 Sep  2023 www_tor-browser
%
 
Just a suggestion, you don't have to use this configuration system at all. The very simple alternative is setting port options in your make.conf, e.g. like this:

Code:
DEFAULT_VERSIONS+= ssl=libressl samba=4.16

OPTIONS_UNSET+= GSSAPI_BASE GSSAPI_NONE HEIMDAL ALSA JACK PULSE PULSEAUDIO
OPTIONS_SET+= GSSAPI_MIT SNDIO PORTAUDIO OSS

devel_android-tools-adb_UNSET+= MDNSRESPONDER
devel_e2fsprogs-libss_SET+= KRBSUPP_MIT
devel_e2fsprogs-libss_UNSET+= KRBSUPP_BASE
editors_libreoffice_SET+= JAVA KDE5 SYSTRAY WEBDAV
editors_libreoffice_UNSET+= GTK2 GTK3
....

This is the beginning of my /usr/local/etc/poudriere.d/make.conf (for use with poudriere).

I personally prefer this because it's all in one place, IMHO making many things easier. You see both your "catch all" port options and the ones specific to a port. You can easily share it, it's better maintainable, it's flexible because it's actually a "makefile". What I mean with the latter is, you can do things like e.g. this:

Code:
.if ${.CURDIR:M*/www/node*}
OPTIONS_SET+=   BUNDLED_SSL
.endif

(matching all ports starting with "www/node")

Or, to have similar port settings outside of poudriere, I have this /etc/make.conf:

Code:
DEVELOPER=      yes

.include </usr/local/etc/poudriere.d/make.conf>

In the end, it's a matter of taste of course.
 
Back
Top