3 Configuration: Installation & Setup

Download the freebsd-update-server software. A tarball may be downloaded, or use csup(1) and the projects-all collection.

Update scripts/build.conf appropriately. It is sourced during all build operations.

Here is the default build.conf, which should be modified.

# $FreeBSD: projects/freebsd-update-server/scripts/build.conf,v 1.1 2006/08/31 07:48:40 cperciva Exp $

# Main configuration file for FreeBSD Update builds.  The
# release-specific configuration data is lower down in
# the scripts tree.

# Location from which to fetch releases
export FTP=ftp://ftp2.freebsd.org/pub/FreeBSD/releases

# Host platform
export HOSTPLATFORM=`uname -m`

# Host name to use inside jails
export BUILDHOSTNAME=${HOSTPLATFORM}-builder.daemonology.net

# Location of SSH key
export SSHKEY=/root/.ssh/id_dsa

# SSH account into which files are uploaded
MASTERACCT=builder@wadham.daemonology.net

# Directory into which files are uploaded
MASTERDIR=update-master.freebsd.org

Parameters for consideration would be:

FTP

This is the location where ISO images are downloaded from (by the fetchiso() subroutine of scripts/build.subr). The location configured here is not limited to FTP URIs. Any URI scheme supported by the standard fetch(1) utility should work fine. In our own setup the ISO images are on the same internal http server that will be serving the updates.

Customizations to the fetchiso() code can be installed by copying the default build.subr script to the release- and architecture-specific area at scripts/RELEASE/ARCHITECTURE/build.subr and applying local edits.

BUILDHOSTNAME

The name of the build host. This information will be displayed on updated systems when issuing:

% uname -v
SSHKEY

The SSH key for uploading files to the update server. A key pair can be created by typing ssh-keygen -t dsa. This parameter is optional; standard password authentication will be used as a fallback authentication method when SSHKEY is not defined.

ssh-keygen(1) has more detailed information about SSH and the appropriate steps for creating and using one.

MASTERACCT

Account that files are uploaded to on the update server.

MASTERDIR

Directory where files are uploaded to on the update server.

The default build.conf file shipped with the freebsd-update-server sources are suitable for building i386™ releases of FreeBSD. As an example of building an update server for other architectures we will show in the following paragraphs the configuration changes needed for an AMD64 update server:

  1. Create a build environment for AMD64:

    % mkdir -p /usr/local/freebsd-update-server/scripts/RELEASE-7.2/amd64
    
  2. Install a build.conf file in the newly created build directory. The build configuration options for FreeBSD 7.2-RELEASE on AMD64 should be similar to:

    # SHA256 hash of RELEASE disc1.iso image.
    export RELH=1ea1f6f652d7c5f5eab7ef9f8edbed50cb664b08ed761850f95f48e86cc71ef5
    
    # Components of the world, source, and kernels
    export WORLDPARTS="base catpages dict doc games info manpages proflibs lib32"
    export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5  \
                    lib libexec release rescue sbin secure share sys tools  \
                    ubin usbin cddl"
    export KERNELPARTS="generic"
    
    # EOL date
    export EOL=1275289200
    

    Note: To generate the "End of Life" number for build.conf, refer to the "Estimated EOL" posted on the FreeBSD Security Website. You can derive the value of EOL from the date listed on the web site, using the date(1) utility, e.g.:

    % date -j -f '%Y%m%d-%H%M%S' '20090401-000000' '+%s'
    

    Note: The sha256(1) hash key for the desired release, is published within the respective release announcement.

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.