1 ## How to Create an Official Synth Repo
5 * Make sure /usr/dports is updated and that it contains no cruft (git pull; git status). Remove any cruft.
7 * Make sure your 'synth' is up-to-date 'pkg upgrade synth'. If you already updated your system you may have to build synth from scratch, from /usr/dports/ports-mgmt/synth.
9 * Make sure /etc/make.conf is clean.
11 * Update /usr/src to the current master, make sure there is no cruft in it
13 * Do a full buildworld, buildkernel, installkernel and installworld
19 * /usr/local/etc/synth/ contains the synth configuation. It should contain a synth.ini file (you may have to rename the template), and you will have to create or edit a LiveSystem-make.conf file.
21 * System requirements are hefty. Just linking chromium alone eats at least 30GB, for example. Concurrent c++ compiles can eat up to 2GB per process. We recommend at least 100GB of SSD based swap space and 300GB of free space on the filesystem.
23 * synth.ini should contain this. Plus modify the builders and jobs to suit your system. With 128G of ram, 30/30 or 40/25 works well. If you have 32G of ram, maybe 8/8 or less.
26 ; Take care when hand editing!
28 [Global Configuration]
29 profile_selected= LiveSystem
32 Operating_system= DragonFly
33 Directory_packages= /build/synth/live_packages
34 Directory_repository= /build/synth/live_packages/All
35 Directory_portsdir= /build/synth/dports
36 Directory_options= /build/synth/options
37 Directory_distfiles= /usr/distfiles
38 Directory_buildbase= /build/synth/build
39 Directory_logs= /build/synth/logs
40 Directory_ccache= disabled
42 Number_of_builders= 30
43 Max_jobs_per_builder= 30
46 Display_with_ncurses= true
47 leverage_prebuilt= false
50 * LiveSystem-make.conf should contain one line to restrict licensing to only what is allowed to be built as a binary package:
53 LICENSES_ACCEPTED= NONE
56 * Make sure there is no other cruft in /usr/local/etc/synth/
58 * In the example above, the synth working dirs are in "/build/synth". Make sure the base directories exist. Clean out any cruft for a fresh build from-scratch:
61 rm -rf /build/synth/live_packages/*
62 rm -rf /build/synth/logs
63 mkdir /build/synth/logs
66 * Run synth everything. I recommend doing this in a 'screen' session in case you lose your ssh session (assuming you are ssh'd into the build machine).
69 (optionally start a screen session)
73 * A full synth build takes over 24 hours to run on a 48-core box, around 12 hours to run on a 64-core box. On a 4-core/8-thread box it will take at least 3 days. There will be times when swap space is heavily used. If you have not run synth before, monitor your memory and swap loads to make sure you have configured the jobs properly. If you are overloading the system, you may have to ^C the synth run, reduce the jobs, and start it again. It will pick up where it left off.
75 * When synth finishes, let it rebuild the database. You then have a working binary repo.
77 * It is usually a good idea to run synth several times to pick up any stuff it couldn't build the first time. Each of these incremental runs may take a few hours, depending on what it tries to build.