# Synth Profiles



## PacketMan (Feb 28, 2016)

I am interested in learning more ports-mgmt/*synth* profiles, especially to 'compete' with ports-mgmt/poudriere, in the sense of using one machine to build packages for other machines.

I've been experimenting with using the "LiveSystem" profile and Bittorrent Sync to have a powerful master builder do the building of custom configured (non-default optioned) ports, and then let Synth on the smaller less powerful machines run their own build jobs, using any pre-built packages it can (either via fetch option, or pre-built by the 'master builder'), or discarding what is not right, and building locally.  This seems to be working okay (more testing required) and I'll likly do a write up later.

But I am also interested in setting up a 'master builder' to support unique build environments for individual machines. Can I use synth profiles like this:

Individual profile for Computer A, B, C, etc.
Configure port build options (default plus custom optioned) on a per profile basis.
Update ports tree.
Run build jobs on each profile.
Push build results to each Computer A, B, C, etc.
Use Synth locally, or ports-mgmt/pkg to bring each computer up to date, independent of each other computer.


So assuming I can do this, where can I read more on Synth.  https://github.com/jrmarino/synth has an introductory explanation, but I'd like to read something in much greater detail.

Or Marino do you want to write a few big paragraphs here?


----------



## marino (Feb 29, 2016)

PacketMan said:


> Individual profile for Computer A, B, C, etc.



Yes, but it only makes sense when A, B, C are different architectures / releases of FreeBSD.  If A and B (for example) would be the same freebsd release, they should share a repository otherwise there would be a great deal of redundant building -- far more waste than having a common repository that has more packages than either A or B needs.



> Configure port build options (default plus custom optioned) on a per profile basis.


yes, of course.



> Update ports tree.


There is no limit to the number of ports trees you can use. 
Unless you are asking if synth will run portsnap or svn for you to update the tree.  It won't do that.  It also assumes the tree is static during all building.



> Run build jobs on each profile.


I don't understand this bullet.  why else would a profile exist?



> Push build results to each Computer A, B, C, etc.


No, it's out of scope and concept for a repository builder (although it's not clear to me what "results" are.  logs?  the entire output repo directory?)



> Use Synth locally, or ports-mgmt/pkg to bring each computer up to date, independent of each other computer.


yes, although it's not "or", it's "and"


----------



## PacketMan (Feb 29, 2016)

marino@ said:


> Yes, but it only makes sense when A, B, C are different architectures / releases of FreeBSD.  If A and B (for example) would be the same freebsd release, they should share a repository otherwise there would be a great deal of redundant building -- far more waste than having a common repository that has more packages than either A or B needs.



Why different architectures?  How about a few machines all same release, but each with uniquely configured options (thus different dependencies) including say desktop packages for example?


----------



## marino (Feb 29, 2016)

then you are forced to have to have different repositories.

The example still seems to be based on the concept of one machine, one repository though.  The general concept is supposed to be one repository, many machines (as in the owner of all machines using the same respository would also normally want the same options for all the machines)


----------



## PacketMan (Feb 29, 2016)

marino@ said:


> then you are forced to have to have different repositories.



Sorry I am such a newb when it comes to this stuff.  So each profile would have its own repository?


----------



## marino (Feb 29, 2016)

pretty much, yes.
Maybe you can come up with a contrived example where profiles share a repository, but i think it's safe to say that each profile implies a separate repository.


----------



## free-and-bsd (Apr 6, 2016)

Finally, I've come to this as well. It seems like in my case, where, due to different hardware, I have x11/nvidia-driver on one machine and x11/nvidia-driver-304 on another, and no nvidia-driver on yet another, I also have to create separate profiles for each?

Because a number of packages then depend on libGL provided by nvidia-driver which differs from version to version, and it'll be OpenGL where no nvidia-driver is installed, as in case of Intel HD graphics on my laptop.

Do I read it correctly?


----------



## free-and-bsd (Apr 6, 2016)

Thankfully, synth makes it all easily possible: I just attach my HDD from another computer, mount it to $mountpoint and then create a profile where /var/db/packages is changed to $mountpoint/var... and system root to $mountpoint/ accordingly. And packages directory as well, I guess.

Or is there a more convenient way of doing it?


----------

