FreeBSD Tinderbox mini-HOWTO
First you need to initialize the settings
tinderbox, by answering a few simple questions (choose as
sqlite database and specify the file name):
# cd ${pb}/scripts && ./tc Setup
Next you have to create jails to build packages. At the heart of
tinderbox lie just
chroot(8)() and
NFS or
nullfs (preferable because it doesn't need to configure anything). This required
ftp/lftp to be installed:
# cd ${pb}/scripts && ./tc createJail -j 9.1 -t 9.1-RELEASE -u LFTP -H ftp.freebsd.org
As the host option
-H makes sense to substitute your nearest mirror.
Add working ports tree and let this be your directory
/home/bkouhi/tinderbox/ports with the name FreeBSD:
# cd ${pb}/scripts && ./tc createPortsTree -p FreeBSD -u NONE -m /home/bkouhi/tinderbox/ports
Using option
-u NONE we explicitly specify that the update ports tree is not necessary, and usually you can update it through
SVN.
# cd ${pb}/scripts && ./tc createBuild -b 9.1-FreeBSD -j 9.1 -p FreeBSD
If you have done something wrong (e.g., invalid parameter was specified in some of the commands) and the entry into the database already got, you must manually (using
sqlite3 tinderbox.db) delete the corresponding records (usually from tables jails , ports_trees or builds).
As a local cache
distfile is logical to use the already existing:
# cd ${pb}/scripts && ./tc configDistfile -c /usr/ports/distfiles
Now you are ready to build your first package in a
tinderbox. For example,
security/sudo for FreeBSD-9.1 (indicating that prefer to mount directories via nullfs and consider problems with
pkg-plist fatal errors):
# cd ${pb}/scripts && ./tc tinderbuild -nullfs -plistcheck -b 9.1-FreeBSD security/sudo
If all goes well, after a while you will have new packages in the
packages/9.1-FreeBSD and build-logs in
logs/9.1-FreeBSD (if you build a port or any of its dependencies not work, the package does not appear, and error logs are looking for in the catalog
errors/9.1-FreeBSD and carefully study them).
See
Tinderbox User Guide for more details.