http://people.freebsd.org/~bapt/portbuild2.png

portbuild2 is an attempt to recode portbuild (pointyhat)

Rationale

Principle

Design

https://lh3.googleusercontent.com/-PyxQTBtkpgo/ULjOD73TasI/AAAAAAAAAoQ/MrGqVg8sRVs/s617/portbuild2-arch.png

Master

Job Queue

WebDAV

Node

Todo

How it works

Fetching the sources (ports and src)

Fetching the sources is done via svn. if new code has been fetched (new revision available after svn -q update) then a new snapshot is created. The builds always take the latest snapshot (zfs clone) when getting the base sources or ports tree.

a script is automatically run to cleanup old and unused (no clone) snapshots.

Architecture

Master

the master machine will contains multiple jails:

portbuild instance

the portbuild instance will be run from the host, it will attach to an existing persist jail containing the minimum data possible:

 etc/
 etc/group
 etc/pwd.db
 etc/spwd.db
 etc/master.passwd
 etc/passwd
 portbuild/

group only contains the "portmgr" group and passwd only contains the "portmgr" user all the data (webdav) will be created in portbuild (which is the only directory owned by "portmgr")

The jail and the application should be started the following way:

$ jail -c persist name=portbuild host.hostname=portbuild ip4=inherit ip6=inherit path=/path/to/the/jail
$ portbuild -j portbuild -u portmgr -r /portbuild -P 8080

portbuild2 (last edited 2012-12-04 17:56:44 by BaptisteDaroussin)