Synth - ports-mgmt/synth
Synth is best summed up by the first paragraph of README.md at the maintainer's github site.
Synth is an advanced concurrent (parallel) ports building tool aimed at regular users that prefer or require building their own packages from source. Synth will build packages in a clean environment that exactly mirrors the system it builds on, creates a local repository, installs a pkg repository configuration file that causes the local packages to be used with the highest priority,and automatically upgrades the system with a single command.
It is further described by its own pkg-descr file.
Synth is a custom package repository builder for FreeBSD and DragonFly. It is intended to replace Portmaster, portupgrade, and poudriere for the average user. It is simple to learn (the powerful options are limited in number) and user-friendly, but it is extremely fast due to its parallel building capability. It will "drop-in" on any system as it leverages the stock pkg(8) facilities. All ports are built in a clean environment, so it is finally safe to build ports as needed on a live system. The default profile is the system itself, not a new jail, which can be a valuable feature for some environments. To bring a system up-to-date only requires one command after the ports tree is updated: > synth upgrade-system
Synth is a relatively recent addition to FreeBSD's ports, added on Jan 2016. It supports Flavors and is actively maintained.
FreeBSD uses specific default versions of lang ports. Python 2.7, Perl 5.26, PHP 7.1. If the system is kept up to date with current release versions of these languages then the overrides will be in
DEFAULT_VERSIONS+= python=3.7 python3=3.7 perl5=5.28 php=7.2
/etc/make.conf exists on the system it should be copied to
/usr/local/etc/synth/LiveSystem-make.conf prior to running Synth for the first time to ensure Synth uses the correct versions.
If Synth is being installed on an already established system with many packages and services already installed, then the first-run will be the longest as it compiles all installed packages for it's own repository.
Port Makefile Config Options
If no config exists for any given port, Synth will not present you with the config dialog, and will assume defaults for all options (the same as
make config and accepting all the defaults choices).
If you need to make changes to a given port's config options, then prior to running Synth simply cd to the given port's directory and manually run
make config saving the changes. When Synth builds a port it will use any respective saved configuration options if they exist.
Occasionally an error similar to the following, will stop the upgrade-system process before Synth moves to the build phase:
A preliminary scan has revealed the cached options of 2 ports are obsolete. Please update or remove the saved options and try again. e.g. make -C /usr/ports/devel/oniguruma config e.g. make -C /usr/ports/devel/oniguruma rmconfig Unfortunately, the system upgrade failed.
The solution is to save a new config or simply remove it using one of the two respective examples provided. This will need to be done for each port identified by Synth. Once all configurations have been resolved Synth should continue on to the build phase.
portsnap auto to update the ports tree.
pkg version -vPL= to determine if any packages require updating.
If packages have updates then
synth status to do the scan of the updated ports tree and to do a dry run of upgrade-system.
synth upgrade-system to build and install the updates.
To automate the workflow add the following series of commands to root's crontab:
portsnap auto > /dev/null; ( pkg version -vPL=; synth status; )
Upon receiving the email from the completed crob job notifying you there are updates to install, login and install the updates:
When Synth begins building packages it will display a ncurses status page like this:
Once all the ports have been compiled into packages, Synth then updates its local repository with them.
Lastly Synth compares packages in its local repository to the packages installed on the system, installing, reinstalling, or upgrading them as required.
Synth can also be used to build and install new ports to the system. As opposed to first installing the port directly from the ports tree and then running Synth afterwards to sync it's repository with the system.
synth install port-origin
Refer to Synth(1) for more information regarding this and other available command options.
NOTE: Synth builds ports for its repository in its own build directories leaving the system's ports tree unmodified.