----------
Synth is one of two tools that can be used to create local package repositories for FreeBSD (the other being Poudriere). It is quite fast due to building packages in RAM.
Requirements
To use Synth you need a ports tree in place (in /usr/ports). If you don't have it, fetch it using the tool portsnap or check it out from SVN:
Code: Select all
# portsnap fetch extract
Code: Select all
# svnlite co svn://svn.freebsd.org/ports/head /usr/ports
Synth also needs a distfiles directory. Either create it in the default location or, as Synth suggests, feel free to put it somewhere else as in that case you can always delete your ports directory and keep the distfiles (remember to adjust configuration in that case!):
Code: Select all
# mkdir -p /usr/ports/distfiles
To install Synth either use pkg or build from ports:
Code: Select all
pkg install synth
Code: Select all
make -C /usr/ports/ports-mgmt/synth
Now you need to configure Synth:
Code: Select all
# synth configure
Synth will suggest a certain number of builders (I) and jobs (J) based on your hardware (CPU and RAM available). Feel free to tune these numbers! Depending on several factors (and depending on what you want to build) other configurations may fit your needs better. Builders are the number of packages that are build concurrently. Jobs are the number of threads used for compilation of every builder. Example: If you have a four core CPU with hyperthreading that means you have eight threads available. To theoretically saturate your CPU you could use 1 builder and 8 jobs. This would be the equivalent to building software with "make -j 8". You could also decide to use 2 builders with 4 jobs each or 4 builders with 2 jobs. Since package building consists of more steps than just compiling, your CPU usually won't be under maximum load all the time. For that reason it can make sense for example to configure Synth to use 4 builders with 3 jobs even if you don't actually have 12 threads! Play with this number and find out what works best for your machine and your workload.
You should leave K and L enabled unless you have very little RAM. If you experience that Synth is using high amounts of swap all the time, first consider building less packages concurrently or with less jobs. As a last resort disable K and/or L.
Disable M if you can't stand the curses interface.
N gives you the option to fetch prebuilt packages (from the FreeBSD repo) to satisfy dependencies instead of building those locally, too.
And then there's H which will be discussed separately.
Using Synth
To be written...