Keeping ports updated.

Greeting,

I have a number of jails that require some of the software to be built from ports. I have some questions.

1. With pkg, dependacies are simply installed using pkg. How are dependencies handled when building a port? Pkg? Also built from ports?

2. How do I skip having to press “enter” for every config option? “make -C”?

3. Depending on the answer to 1, how does one keep ports updated with all the options that were selected to begin with?
 
1. With pkg, dependacies are simply installed using pkg. How are dependencies handled when building a port? Pkg? Also built from ports?
See handbook 4.5. Using the Ports Collection , note the "Warning"
Before installing and using the Ports Collection, please be aware that it is generally ill-advised to use the Ports Collection in conjunction with the binary packages provided via pkg to install software. pkg, by default, tracks quarterly branch-releases of the ports tree and not HEAD. Dependencies could be different for a port in HEAD compared to its counterpart in a quarterly branch release and this could result in conflicts between dependencies installed by pkg and those from the Ports Collection. If the Ports Collection and pkg must be used in conjunction, then be sure that the Ports Collection and pkg are on the same branch release of the ports tree.

2. How do I skip having to press “enter” for every config option? “make -C”?
yes | make config-recursive

3. Depending on the answer to 1, how does one keep ports updated with all the options that were selected to begin with?
See handbook 4.5.4. Upgrading Ports, 4.5.4.1. Tools to Upgrade and Manage Ports, and see the manuals of those tools regarding options.
 
how does one keep ports updated with all the options that were selected to begin with?
Set your options in make.conf(5), for example:
Code:
DEFAULT_VERSIONS+= mysql=10.11m php=8.2 java=17 linux=rl9

OPTIONS_SET+= OPTIMIZED_CFLAGS

devel_cmake_UNSET= DOCS
devel_git_UNSET= GITWEB SEND_EMAIL
devel_log4cplus_UNSET= DOCS
devel_py-molecule_SET= DOCKER
editors_neovim_SET= PYNVIM
java_openjdk8_UNSET= CUPS X11
java_openjdk11_UNSET= CUPS
math_gmp_SET= CPU_OPTS
net_samba416_SET= MDNSRESPONDER
net_samba416_UNSET= AD_DC AVAHI CUPS FRUIT
print_ghostscript10_UNSET= CUPS
security_strongswan_SET= CURL GCM KDF SWANCTL VICI
security_sudo_SET= INSULTS
sysutils_cpupdate_SET= INTEL
sysutils_vm-bhyve_SET= BHYVE_FIRMWARE GRUB2_BHYVE
textproc_py-docutils_SET= PYGMENTS
Besides setting a "default" version for various components, you can also set/unset options on specific ports. Or set/unset certain "KNOBS" globally. Then build with BATCH set.
Code:
     BATCH         If defined, only operate on a port if it can be installed
                   100% automatically.
ports(7)

You should review this list from time to time, options change, they get added or removed. Sometimes dependencies change too.

But the best way is to simply set up a local repository, build once, install many. Does need some settling on common options though. But there's very little to gain if you have to build the same things over and over for different jails/systems. Not exactly efficient.
 
Back
Top