Configuring farbot

Introduction

The farbot configuration file is composed of five different section types:

  • Releases Configuration
  • Partitions Configuration
  • PackageSets Configuration
  • Installations Configuration

The configuration uses an Apache-style syntax.

Releases Configuration

The Releases section defines at least one Release within a farbot configuration file.

Releases Configuration Options

BuildRoot
Used as the working directory for release builds. A per release directory is added by farbot at build time.
InstallRoot
Installation clients will load installation data from this directory. This directory will end up being NFS and TFTP exported.
NFSHost
The IP address/FQDN of the machine that will be acting as an NFS server for the installation files.
Release Configuration Options
<Release Name>
The Release section must be named. ex: <Release 6.0>
CVSRoot
The FreeBSD CVS repository mirror. ex: /home/ncvs
CVSTag
The CVS tag for this release. ex: RELENG_6_0
LocalData
Custom files to be made available at install time via the NFS mout in the path /dist/local.
InstallCSDs
Whether to create ISO install images.
PackageBuildOptions

An optional list of options to pass to every package build for this release. BuildOptions for a given package override this global setting.. ex:

<PackageBuildOptions>
    WITHOUT_X11  true
</PackageBuildOptions>

Partitions Configuration

The Partitions section defines at least one PartitionMap with at least one Partition within a farbot configuration file.

PartitionMap Configuration Options

<PartitionMap Name>
The PartitionMap section must be named. ex: <PartitionMap Standard>
Partition Configuration Options
Mount
Mount point for this partition. ex: /usr
Size
The size of this partition. ex: 512MB
Type
Type of filesystem. ex: ufs
SoftUpdates
Whether to enable soft updates on this filesystem.

PackageSets Configuration

The PackageSets section defines at least one PackageSets within a farbot configuration file.

PackageSet Configuration Options

<PackageSet Name>
The PackageSet section must be named. ex: <PackageSet Base>
Package Configuration Options
Port
The category and name of this port. ex: security/sudo
Package
Optional: The package name of this port, if it differs from the port name. ex: mysql50-server
BuildOptions

An optional list of options to pass to the package build. ex:

<BuildOptions>
    WITH_COLLATION  latin1_general_ci
    WITH_OPTION  true
</BuildOptions>

Installations Configuration

The Installations section defines at least one Installation within a farbot configuration file.

Installation Configuration Options

<Installation Name>
The Installation section must be named. ex: <Installation Database>
Description
A human-readable description for this installation, used in the installation-selection boot menu generated by farbot.
Release
A Release name defined in the Releases section above. There may only be one release per installation.
PackageSet
A list of PackageSet names as defined in the PackageSets section.
NetworkDevice
The network device to mount the the NFS root from. ex: em0
Disk Section Options
<Disk Name>
A disk name that matches the corresponding system disk for the following PartitionMap. ex: ad0
PartitionMap
A PartitionMap name as defined in the Partitions section above. Only list one PartitionMap per disk.
PostInstall Section Options
Command
A command to be run from /dist/local after the installation boots for the first time. See LocalData above.

Example Configuration File

An example configuration follows. The same configuration file is included with the distribution as farbot.conf.

#
# Releases
#
<Releases>
        # Release Build Working Directory
        BuildRoot       /export/freebsd/build

        # Install/NFS Directory
        # Clients will load installation data from this directory
        InstallRoot     /export/freebsd/netinstall

        # NFS/TFTP Server Host/IP
        # The host exporting the installation data.
        # Should probably be the local machine
        NFSHost         jumpstart.example.org

        <Release 6.1>
                # FreeBSD CVS Repository Mirror
                CVSRoot         /home/ncvs
                # Release Tag
                CVSTag          RELENG_6_1

                # LocalData will be copied into the release
                # distribution. These files will be available at
                # install time via the NFS mount, in the path /dist/local
                LocalData       /export/freebsd/postinst

                # Enable creation of ISO install images
                # Requires cdrtools
                InstallCDs      True
        </Release>

        <Release 6-STABLE>
                # FreeBSD CVS Repository Mirror
                CVSRoot /home/ncvs
                # Release Tag
                CVSTag  RELENG_6
        </Release>
</Releases>

#
# Partition Maps
#
<Partitions>
        <PartitionMap Standard>
                <Partition 1>
                        Mount           /
                        Size            512MB
                        Type            ufs
                        SoftUpdates     no
                </Partition>

                <Partition 2>
                        Size            4GB
                        Type            swap
                </Partition>

                <Partition 3>
                        Mount           /var
                        Size            10GB
                        Type            ufs
                </Partition>

                <Partition 4>
                        Mount           /tmp
                        Size            1GB
                        Type            ufs
                </Partition>

                <Partition 5>
                        # All remaining space
                        Mount           /usr
                        Size            0GB
                        Type            ufs
                </Partition>
        </PartitionMap>
</Partitions>

#
# Package Sets
#
<PackageSets>
        <PackageSet Base>
                <Package>
                        Port            security/sudo
                </Package>
        </PackageSet>
        <PackageSet Database>
                <Package>
                        Port            databases/mysql50-server
                        # If your build options modify the name
                        # of the resulting package, use the Package
                        # option to define the correct name.
                        #Package                mysql50-server
                        <BuildOptions>
                                WITH_COLLATION  latin1_general_ci
                        </BuildOptions>
                </Package>
        </PackageSet>
</PackageSets>


#
# Installation Types
#
<Installations>
        <Installation Standard>
                # Human-readable Description.
                # Used in the installation-selection boot menu
                Description     Standard Installation
                Release         6.0
                PackageSet      Base
                PackageSet      Database
                NetworkDevice   em0
                <Disk ad0>
                        PartitionMap    Standard
                </Disk>
                <PostInstall>
                        Command /dist/local/postinst/local.sh database
                        Command /dist/local/postinst/cleanup.sh everything
                </PostInstall>
        </Installation>
</Installations>