2002-03-14 04:21:50 +00:00
|
|
|
.\" Copyright (c) 2002 Murray Stokely <murray@FreeBSD.org>
|
|
|
|
.\" All rights reserved.
|
2002-03-13 06:33:26 +00:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
Merge ^/projects/release-embedded into ^/head.
After several months of testing and fixing (and breaking)
various parts of release/release.sh changes, it is now
possible to build FreeBSD/arm images as part of the release
process.
When EMBEDDEDBUILD is set in the release.conf file, release.sh
will create the build environment, then run a separate script
in release/${XDEV}/release.sh [1]. Currently, only arm is
supported.
The release/${XDEV}/release.sh configures the build environment
specific for the target image, such as installing gcc(1),
installing additional third-party software from the ports tree,
and fetching external sources.
Once the build environment is set up, release/${XDEV}/release.sh
runs Crochet, written by Tim Kientzle, which builds the userland
and kernel, and creates an image that can be written to an SD
card with dd(1). Many thanks to Tim for his work on Crochet.
Sample configurations for FreeBSD/arm boards are in the
release/arm/ directory, and Crochet configuration files for each
board are located in release/tools/arm/. Supported boards at this
time are: BEAGLEBONE, PANDABOARD, RPI-B, and WANDBOARD-QUAD.
Adding support for additional boards will continue in the
projects/release-embedded/ branch, and incrementally merged back
to head/.
Many thanks to the FreeBSD Foundation for the support and
sponsorship of this project.
[1] XDEV is used in order to keep the various configurations
organized by architecture, but since TARGET and TARGET_ARCH
are used to build the chroot, the values of those variables
cannot be used.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
2014-03-05 23:17:53 +00:00
|
|
|
.Dd March 5, 2014
|
2002-03-13 06:33:26 +00:00
|
|
|
.Dt RELEASE 7
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm release
|
2002-03-14 04:21:50 +00:00
|
|
|
.Nd "release building infrastructure"
|
2002-03-13 06:33:26 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Fx
|
|
|
|
provides a complete build environment suitable for users to make
|
|
|
|
full releases of the
|
|
|
|
.Fx
|
2002-03-13 09:54:31 +00:00
|
|
|
operating system.
|
2002-03-13 06:33:26 +00:00
|
|
|
All of the tools necessary to build a release are available from the
|
2011-04-12 12:57:46 +00:00
|
|
|
.Fx
|
|
|
|
source code repository in
|
2002-03-13 06:33:26 +00:00
|
|
|
.Pa src/release .
|
|
|
|
A complete release can actually be built with only a single command,
|
2002-03-17 07:22:51 +00:00
|
|
|
including the creation of ISO images suitable for burning to CD-ROM,
|
2011-04-12 12:57:46 +00:00
|
|
|
memory stick images, and an FTP install directory.
|
2002-03-13 06:33:26 +00:00
|
|
|
This command is aptly named
|
2002-03-14 04:21:50 +00:00
|
|
|
.Dq Li "make release" .
|
2002-03-13 06:33:26 +00:00
|
|
|
.Pp
|
2011-03-22 01:21:51 +00:00
|
|
|
For some users, it may be desirable to provide an absolutely clean
|
|
|
|
build environment, with no local modifications to the source tree or to
|
|
|
|
.Xr make.conf 5 ,
|
|
|
|
and with clean checkouts of specific versions of the doc, src, and ports
|
2013-08-11 18:57:27 +00:00
|
|
|
trees.
|
|
|
|
For this purpose, a script
|
|
|
|
.Pq Pa src/release/release.sh
|
2011-03-22 01:21:51 +00:00
|
|
|
is provided to automate these checkouts and then execute
|
2012-03-29 05:02:12 +00:00
|
|
|
.Dq Li "make release"
|
2011-03-22 01:21:51 +00:00
|
|
|
in a clean
|
|
|
|
.Xr chroot 8 .
|
|
|
|
.Pp
|
2002-03-13 06:33:26 +00:00
|
|
|
Before attempting to build a release, the user is expected to be
|
2002-03-13 09:54:31 +00:00
|
|
|
familiar with the contents of
|
2002-03-13 06:33:26 +00:00
|
|
|
.Xr build 7 ,
|
2004-08-09 13:22:44 +00:00
|
|
|
and should have experience upgrading systems from source.
|
2011-03-22 01:21:51 +00:00
|
|
|
.Pp
|
2002-03-13 06:33:26 +00:00
|
|
|
The release build process requires that
|
|
|
|
.Pa /usr/obj
|
|
|
|
be populated with the output of
|
2012-03-29 05:02:12 +00:00
|
|
|
.Dq Li "make buildworld"
|
2011-05-31 12:59:15 +00:00
|
|
|
and
|
|
|
|
.Dq Li "make buildkernel" .
|
2011-03-22 01:21:51 +00:00
|
|
|
This is necessary to provide the object files for the release or, when
|
|
|
|
using
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pa release.sh ,
|
2011-03-22 01:21:51 +00:00
|
|
|
so that the object files for a complete system can be installed into a clean
|
2002-03-13 06:33:26 +00:00
|
|
|
.Xr chroot 8
|
2013-08-11 18:57:27 +00:00
|
|
|
environment.
|
|
|
|
.Pp
|
|
|
|
If the target release build is for a different architecture or machine type,
|
|
|
|
the
|
|
|
|
.Va TARGET
|
|
|
|
and
|
|
|
|
.Va TARGET_ARCH
|
|
|
|
variables must be used.
|
|
|
|
See the supported
|
|
|
|
.Fa release.conf
|
|
|
|
variables for more information.
|
|
|
|
.Pp
|
2011-03-22 01:21:51 +00:00
|
|
|
The release procedure on some architectures may also require that the
|
2002-03-13 09:54:31 +00:00
|
|
|
.Xr md 4
|
|
|
|
(memory disk) device driver be present in the kernel
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pq either by being compiled in or available as a module .
|
2002-03-13 06:33:26 +00:00
|
|
|
.Pp
|
|
|
|
This document does not cover source code management, quality
|
|
|
|
assurance, or other aspects of the release engineering process.
|
2011-03-22 01:21:51 +00:00
|
|
|
.Sh CLEAN RELEASE GENERATION
|
2013-08-11 18:57:27 +00:00
|
|
|
Official releases of
|
|
|
|
.Fx
|
|
|
|
are produced in a totally clean environment to
|
2011-03-22 01:21:51 +00:00
|
|
|
ensure consistency between the versions of the src, ports, and doc trees
|
2013-08-11 18:57:27 +00:00
|
|
|
and to avoid contamination from the host system
|
|
|
|
.Po such as local patches, changes
|
2011-03-22 01:21:51 +00:00
|
|
|
to
|
|
|
|
.Xr make.conf 5 ,
|
2013-08-11 18:57:27 +00:00
|
|
|
etc.
|
|
|
|
.Pc .
|
|
|
|
This is accomplished using the wrapper script
|
|
|
|
.Pa src/release/release.sh .
|
2011-03-22 01:21:51 +00:00
|
|
|
.Pp
|
2013-08-11 18:57:27 +00:00
|
|
|
.Ic release.sh
|
|
|
|
.Op Fl c Ar release.conf
|
2011-03-22 01:21:51 +00:00
|
|
|
.Pp
|
2013-08-11 18:57:27 +00:00
|
|
|
.Ic release.sh
|
|
|
|
checks out the
|
|
|
|
.Li src/ ,
|
|
|
|
.Li ports/ ,
|
|
|
|
and
|
|
|
|
.Li doc/
|
|
|
|
trees to
|
|
|
|
.Va CHROOTDIR ,
|
|
|
|
then calls
|
|
|
|
.Dq Li "make buildworld"
|
|
|
|
and
|
2011-03-22 01:21:51 +00:00
|
|
|
.Dq Li "make installworld"
|
|
|
|
to generate a
|
|
|
|
.Xr chroot 8
|
2013-08-11 18:57:27 +00:00
|
|
|
environment.
|
|
|
|
Next,
|
2011-03-22 01:21:51 +00:00
|
|
|
.Dq Li "make release"
|
2013-08-11 18:57:27 +00:00
|
|
|
is run within the
|
2011-03-22 01:21:51 +00:00
|
|
|
.Xr chroot 8
|
|
|
|
environment and places the result in
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pa $CHROOTDIR/R .
|
2011-03-22 01:21:51 +00:00
|
|
|
.Pp
|
2013-08-11 18:57:27 +00:00
|
|
|
The optional
|
|
|
|
.Fa release.conf
|
|
|
|
configuration file supports the following variables:
|
|
|
|
.Bl -tag -width Ev
|
|
|
|
.It Va CHROOTDIR
|
|
|
|
The directory within which the release will be built.
|
Merge ^/projects/release-embedded into ^/head.
After several months of testing and fixing (and breaking)
various parts of release/release.sh changes, it is now
possible to build FreeBSD/arm images as part of the release
process.
When EMBEDDEDBUILD is set in the release.conf file, release.sh
will create the build environment, then run a separate script
in release/${XDEV}/release.sh [1]. Currently, only arm is
supported.
The release/${XDEV}/release.sh configures the build environment
specific for the target image, such as installing gcc(1),
installing additional third-party software from the ports tree,
and fetching external sources.
Once the build environment is set up, release/${XDEV}/release.sh
runs Crochet, written by Tim Kientzle, which builds the userland
and kernel, and creates an image that can be written to an SD
card with dd(1). Many thanks to Tim for his work on Crochet.
Sample configurations for FreeBSD/arm boards are in the
release/arm/ directory, and Crochet configuration files for each
board are located in release/tools/arm/. Supported boards at this
time are: BEAGLEBONE, PANDABOARD, RPI-B, and WANDBOARD-QUAD.
Adding support for additional boards will continue in the
projects/release-embedded/ branch, and incrementally merged back
to head/.
Many thanks to the FreeBSD Foundation for the support and
sponsorship of this project.
[1] XDEV is used in order to keep the various configurations
organized by architecture, but since TARGET and TARGET_ARCH
are used to build the chroot, the values of those variables
cannot be used.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
2014-03-05 23:17:53 +00:00
|
|
|
.It Va CHROOT_MAKEENV
|
|
|
|
Additional
|
|
|
|
.Xr make 1
|
|
|
|
arguments to pass through, which directly affect the
|
|
|
|
tuning of the build chroot.
|
2013-08-11 18:57:27 +00:00
|
|
|
.It Va SVNROOT
|
|
|
|
The
|
|
|
|
.Xr svn 1
|
|
|
|
host used to check out the various trees.
|
2012-09-17 02:45:52 +00:00
|
|
|
Defaults to
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pa svn://svn.FreeeBSD.org .
|
|
|
|
.It Va SRCBRANCH
|
|
|
|
The
|
|
|
|
.Li src/
|
|
|
|
branch to use.
|
2013-02-03 10:26:24 +00:00
|
|
|
Defaults to
|
2013-08-14 14:45:47 +00:00
|
|
|
.Va head/@rHEAD .
|
2013-08-11 18:57:27 +00:00
|
|
|
.It Va DOCBRANCH
|
|
|
|
The
|
|
|
|
.Li doc/
|
|
|
|
branch to use.
|
2013-02-03 10:26:24 +00:00
|
|
|
Defaults to
|
2013-08-14 14:45:47 +00:00
|
|
|
.Va head/@rHEAD .
|
2013-08-11 18:57:27 +00:00
|
|
|
.It Va PORTBRANCH
|
|
|
|
The
|
|
|
|
.Li ports/
|
|
|
|
branch to use.
|
2013-02-03 10:26:24 +00:00
|
|
|
Defaults to
|
2013-08-14 14:45:47 +00:00
|
|
|
.Va head/@rHEAD .
|
2013-08-11 18:57:27 +00:00
|
|
|
.It Va TARGET
|
2013-08-13 20:22:57 +00:00
|
|
|
The target machine type for cross-building a release.
|
2013-08-11 18:57:27 +00:00
|
|
|
.It Va TARGET_ARCH
|
2013-08-13 20:22:57 +00:00
|
|
|
The target machine architecture for cross-building a release.
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pp
|
|
|
|
For the supported list of
|
|
|
|
.Va TARGET
|
|
|
|
and
|
|
|
|
.Va TARGET_ARCH
|
|
|
|
combinations, consult the output of
|
|
|
|
.Dq make targets
|
|
|
|
as documented in
|
|
|
|
.Xr build 7 .
|
|
|
|
.It Va KERNEL
|
|
|
|
The target kernel configuration to use.
|
|
|
|
Defaults to
|
|
|
|
.Va GENERIC .
|
|
|
|
Multiple
|
|
|
|
.Va KERNEL
|
|
|
|
entries may be specified.
|
|
|
|
.It Va MAKE_CONF
|
|
|
|
The
|
|
|
|
.Xr make.conf 5
|
|
|
|
to use for the release build.
|
2013-02-03 10:26:24 +00:00
|
|
|
Defaults to
|
2013-08-11 18:57:27 +00:00
|
|
|
.Fa /dev/null
|
|
|
|
to prevent polluting the release with local system changes.
|
|
|
|
.It Va SRC_CONF
|
|
|
|
The
|
|
|
|
.Xr src.conf 5
|
|
|
|
to use for the release build.
|
2013-02-03 10:26:24 +00:00
|
|
|
Defaults to
|
2013-08-11 18:57:27 +00:00
|
|
|
.Fa /dev/null
|
|
|
|
to prevent polluting the release with local system changes.
|
|
|
|
.It Va MAKE_FLAGS
|
|
|
|
Additional flags to pass to
|
|
|
|
.Xr make 1 .
|
|
|
|
.It Va WORLD_FLAGS
|
|
|
|
Additional flags to pass to
|
|
|
|
.Xr make 1
|
|
|
|
during the
|
|
|
|
.Dq buildworld
|
|
|
|
phase.
|
|
|
|
Defaults to setting the number of
|
|
|
|
.Xr make 1
|
|
|
|
jobs
|
|
|
|
.Pq Ar -j
|
2013-08-13 20:22:57 +00:00
|
|
|
to the number of CPUs available on a SMP-capable system.
|
2013-08-11 18:57:27 +00:00
|
|
|
.It Va KERNEL_FLAGS
|
|
|
|
Additional flags to pass to
|
|
|
|
.Xr make 1
|
|
|
|
during the
|
|
|
|
.Dq buildkernel
|
|
|
|
phase.
|
|
|
|
Defaults to setting the number of
|
|
|
|
.Xr make 1
|
|
|
|
jobs
|
|
|
|
.Pq Ar -j
|
2013-08-13 20:22:57 +00:00
|
|
|
to half the number of CPUs available on a SMP-capable system.
|
2013-08-11 18:57:27 +00:00
|
|
|
.It Va NODOC
|
|
|
|
Set to a non-empty value to skip the
|
|
|
|
.Li doc/
|
|
|
|
tree checkout.
|
|
|
|
When set,
|
|
|
|
.Va NODOC
|
|
|
|
will prevent the
|
|
|
|
.Fa doc.txz
|
|
|
|
distribution package from being created.
|
|
|
|
.It Va NOPORTS
|
|
|
|
Set to a non-empty value to skip the
|
|
|
|
.Li ports/
|
|
|
|
tree checkout.
|
|
|
|
When set,
|
|
|
|
.Va NOPORTS
|
|
|
|
will prevent the
|
|
|
|
.Fa ports.txz
|
|
|
|
distribution package from being created.
|
|
|
|
Setting this also sets
|
|
|
|
.Va NODOC .
|
2013-12-02 18:47:57 +00:00
|
|
|
.It Va WITH_DVD
|
|
|
|
Set to a non-empty value to include the
|
|
|
|
.Cm dvdrom
|
|
|
|
target.
|
2014-02-25 22:13:48 +00:00
|
|
|
.It Va VCSCMD
|
|
|
|
The command run to obtain the source trees.
|
|
|
|
Defaults to
|
|
|
|
.Qq Cm svn checkout .
|
Merge ^/projects/release-embedded into ^/head.
After several months of testing and fixing (and breaking)
various parts of release/release.sh changes, it is now
possible to build FreeBSD/arm images as part of the release
process.
When EMBEDDEDBUILD is set in the release.conf file, release.sh
will create the build environment, then run a separate script
in release/${XDEV}/release.sh [1]. Currently, only arm is
supported.
The release/${XDEV}/release.sh configures the build environment
specific for the target image, such as installing gcc(1),
installing additional third-party software from the ports tree,
and fetching external sources.
Once the build environment is set up, release/${XDEV}/release.sh
runs Crochet, written by Tim Kientzle, which builds the userland
and kernel, and creates an image that can be written to an SD
card with dd(1). Many thanks to Tim for his work on Crochet.
Sample configurations for FreeBSD/arm boards are in the
release/arm/ directory, and Crochet configuration files for each
board are located in release/tools/arm/. Supported boards at this
time are: BEAGLEBONE, PANDABOARD, RPI-B, and WANDBOARD-QUAD.
Adding support for additional boards will continue in the
projects/release-embedded/ branch, and incrementally merged back
to head/.
Many thanks to the FreeBSD Foundation for the support and
sponsorship of this project.
[1] XDEV is used in order to keep the various configurations
organized by architecture, but since TARGET and TARGET_ARCH
are used to build the chroot, the values of those variables
cannot be used.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
2014-03-05 23:17:53 +00:00
|
|
|
.It Va CHROOTBUILD_SKIP
|
|
|
|
If defined, the
|
|
|
|
.Li buildworld ,
|
|
|
|
.Li installworld ,
|
|
|
|
and
|
|
|
|
.Li distribution
|
|
|
|
stages of the
|
|
|
|
.Xr chroot 8
|
|
|
|
build environment setup are skipped.
|
|
|
|
This is intended solely for cases where the
|
|
|
|
.Xr chroot 8
|
|
|
|
userland are provided by alternate means.
|
|
|
|
.El
|
|
|
|
.Sh EMBEDDED BUILDS
|
|
|
|
The following
|
|
|
|
.Fa release.conf
|
|
|
|
variables are relevant only to release builds for embedded systems:
|
|
|
|
.Bl -tag -width Ev
|
|
|
|
.It Va EMBEDDEDBUILD
|
|
|
|
Set to a non-null value to enable functionality for embedded device
|
|
|
|
release builds.
|
|
|
|
.Pq This option is considered highly experimental.
|
|
|
|
.Pp
|
|
|
|
When set,
|
|
|
|
.Va WITH_DVD
|
|
|
|
is unset, and
|
|
|
|
.Va NODOC
|
|
|
|
is defined.
|
|
|
|
Additionally,
|
|
|
|
.Va XDEV
|
|
|
|
and
|
|
|
|
.Va XDEV_ARCH
|
|
|
|
must also be defined.
|
|
|
|
When the build environment is created,
|
|
|
|
.Fa release.sh
|
|
|
|
runs a separate build script located in an architecture-specific
|
|
|
|
directory in
|
|
|
|
.Pa src/release/${XDEV}/ .
|
|
|
|
.It Va EMBEDDEDPORTS
|
|
|
|
Set to the list of any ports that are required for the target device
|
|
|
|
in the format of
|
|
|
|
.Fa category/port .
|
|
|
|
The
|
|
|
|
.Fa devel/subversion
|
|
|
|
port is built by default.
|
|
|
|
.It Va CROCHETSRC
|
|
|
|
Set to the source URL for the Crochet build tool.
|
|
|
|
.It Va CROCHETBRANCH
|
|
|
|
Set to the subversion branch from
|
|
|
|
.Va ${CROCHETSRC}
|
|
|
|
to use.
|
|
|
|
Defaults to
|
|
|
|
.Pa trunk .
|
|
|
|
.It Va UBOOTSRC
|
|
|
|
Set to the source URL of u-boot, if required.
|
|
|
|
.It Va UBOOTBRANCH
|
|
|
|
Set to the subversion branch from
|
|
|
|
.Va ${UBOOTSRC}
|
|
|
|
to use.
|
|
|
|
Defaults to
|
|
|
|
.Pa trunk .
|
|
|
|
.It Va UBOOTDIR
|
|
|
|
Set to the target directory within
|
|
|
|
.Va ${CHROOTDIR}
|
|
|
|
to check out
|
|
|
|
.Va ${UBOOTSRC}/${UBOOTBRANCH} .
|
2011-03-22 01:21:51 +00:00
|
|
|
.El
|
|
|
|
.Sh MAKEFILE TARGETS
|
2002-03-13 06:33:26 +00:00
|
|
|
The release makefile
|
2002-03-13 09:54:31 +00:00
|
|
|
.Pq Pa src/release/Makefile
|
2002-03-13 06:33:26 +00:00
|
|
|
is fairly abstruse.
|
|
|
|
Most developers will only be concerned with the
|
2002-03-14 04:21:50 +00:00
|
|
|
.Cm release
|
2011-04-11 14:30:45 +00:00
|
|
|
and
|
|
|
|
.Cm install
|
|
|
|
targets.
|
2002-03-13 09:54:31 +00:00
|
|
|
.\" XXX: Some sort of introduction to this list? All the others have one.
|
2011-03-22 01:21:51 +00:00
|
|
|
.Bl -tag -width ".Cm packagesystem"
|
2002-03-14 04:21:50 +00:00
|
|
|
.It Cm release
|
2011-03-22 01:21:51 +00:00
|
|
|
Meta-target to build all release media and distributions applicable to this
|
2011-04-11 14:30:45 +00:00
|
|
|
platform.
|
|
|
|
.It Cm install
|
2012-03-29 05:02:12 +00:00
|
|
|
Copy all produced release media to
|
2011-04-11 14:30:45 +00:00
|
|
|
.Pa ${DESTDIR} .
|
2011-03-22 01:21:51 +00:00
|
|
|
.It Cm cdrom
|
2013-02-03 10:26:24 +00:00
|
|
|
Builds installation CD-ROM images.
|
|
|
|
This may require the
|
2011-03-22 01:21:51 +00:00
|
|
|
.Xr md 4
|
|
|
|
(memory disk) device driver be present in the kernel
|
2013-02-03 10:26:24 +00:00
|
|
|
(either by being compiled in or available as a module).
|
|
|
|
This target produces files called
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pa disc1.iso
|
2011-04-11 14:30:45 +00:00
|
|
|
and
|
|
|
|
.Pa bootonly.iso
|
2011-03-22 01:21:51 +00:00
|
|
|
as its output.
|
2013-11-18 18:45:27 +00:00
|
|
|
.It Cm dvdrom
|
|
|
|
Builds installation DVD-ROM images.
|
|
|
|
This may require the
|
|
|
|
.Xr md 4
|
|
|
|
(memory disk) device driver be present in the kernel
|
|
|
|
(either by being compiled in or available as a module).
|
|
|
|
This target produces the
|
|
|
|
.Pa dvd1.iso
|
|
|
|
file as its output.
|
2011-03-22 01:21:51 +00:00
|
|
|
.It Cm memstick
|
|
|
|
Builds an installation memory stick image named
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pa memstick.img .
|
2013-02-03 10:26:24 +00:00
|
|
|
Not applicable on all platforms.
|
|
|
|
Requires that the
|
2011-03-22 01:21:51 +00:00
|
|
|
.Xr md 4
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pq memory disk
|
|
|
|
device driver be present in the kernel
|
|
|
|
.Pq either by being compiled in or available as a module .
|
2013-11-07 19:17:17 +00:00
|
|
|
.It Cm mini-memstick
|
|
|
|
Similar to
|
|
|
|
.Cm memstick ,
|
|
|
|
with the exception that the installation distribution sets
|
|
|
|
are not included.
|
2011-03-22 01:21:51 +00:00
|
|
|
.It Cm ftp
|
|
|
|
Creates a directory named
|
|
|
|
.Pa ftp
|
|
|
|
containing the distribution files used in network installations
|
|
|
|
and suitable for upload to an FTP mirror.
|
2002-03-13 06:33:26 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
2011-03-22 01:21:51 +00:00
|
|
|
Major subtargets called by targets above:
|
|
|
|
.Bl -tag -width ".Cm packagesystem"
|
|
|
|
.It Cm packagesystem
|
2013-08-11 18:57:27 +00:00
|
|
|
Generates all the distribution archives
|
|
|
|
.Pq base, kernel, ports, doc
|
2011-03-22 01:21:51 +00:00
|
|
|
applicable on this platform.
|
|
|
|
.It Cm system
|
|
|
|
Builds a bootable installation system containing all the distribution files
|
|
|
|
packaged by the
|
|
|
|
.Cm packagesystem
|
|
|
|
target, and suitable for imaging by the
|
2013-11-18 18:45:27 +00:00
|
|
|
.Cm cdrom ,
|
|
|
|
.Cm dvdrom
|
2011-03-22 01:21:51 +00:00
|
|
|
and
|
|
|
|
.Cm memstick
|
|
|
|
targets.
|
|
|
|
.It Cm reldoc
|
2002-03-13 09:54:31 +00:00
|
|
|
Builds the release documentation.
|
|
|
|
This includes the release notes,
|
2013-08-11 18:57:27 +00:00
|
|
|
hardware guide, and installation instructions.
|
|
|
|
Other documentation, such as the Handbook,
|
|
|
|
is built during the
|
2011-03-22 01:21:51 +00:00
|
|
|
.Cm base.txz
|
|
|
|
target invoked by
|
2012-05-20 16:09:40 +00:00
|
|
|
.Cm packagesystem .
|
2002-03-13 06:33:26 +00:00
|
|
|
.El
|
|
|
|
.Sh ENVIRONMENT
|
|
|
|
Optional variables:
|
2013-02-03 10:26:24 +00:00
|
|
|
.Bl -tag -width ".Ev TARGET_ARCH"
|
|
|
|
.It Ev OSRELEASE
|
2013-08-11 18:57:27 +00:00
|
|
|
Optional base name for generated media images
|
|
|
|
.Pq e.g., FreeBSD-9.0-RC2-amd64 .
|
2013-02-03 10:26:24 +00:00
|
|
|
Defaults to the output of
|
|
|
|
.Ic `uname -s`-`uname -r`-`uname -p`
|
|
|
|
within the chroot.
|
|
|
|
.It Ev WORLDDIR
|
2013-08-11 18:57:27 +00:00
|
|
|
Location of a directory containing the src tree.
|
|
|
|
By default, the directory
|
2011-03-22 01:21:51 +00:00
|
|
|
above the one containing the makefile
|
|
|
|
.Pq Pa src .
|
2013-02-03 10:26:24 +00:00
|
|
|
.It Ev PORTSDIR
|
2013-08-11 18:57:27 +00:00
|
|
|
Location of a directory containing the ports tree.
|
|
|
|
By default,
|
2011-03-22 01:21:51 +00:00
|
|
|
.Pa /usr/ports .
|
|
|
|
If it is unset or cannot be found, ports will not be included in the release.
|
2013-02-03 10:26:24 +00:00
|
|
|
.It Ev DOCDIR
|
2013-08-11 18:57:27 +00:00
|
|
|
Location of a directory containing the doc tree.
|
|
|
|
By default,
|
2011-03-22 01:21:51 +00:00
|
|
|
.Pa /usr/doc .
|
|
|
|
If it is unset or cannot be found, most documentation will not be included in
|
|
|
|
the release; see
|
2012-03-29 05:02:12 +00:00
|
|
|
.Ev NODOC
|
2011-03-22 01:21:51 +00:00
|
|
|
below.
|
2013-02-03 10:26:24 +00:00
|
|
|
.It Ev NOPORTS
|
2011-03-22 01:21:51 +00:00
|
|
|
If defined, the Ports Collection will be omitted from the release.
|
2013-02-03 10:26:24 +00:00
|
|
|
.It Ev NOSRC
|
2011-03-22 01:21:51 +00:00
|
|
|
If set, do not include system source code in the release.
|
2013-02-03 10:26:24 +00:00
|
|
|
.It Ev NODOC
|
2012-09-17 02:45:52 +00:00
|
|
|
If defined, the XML-based documentation from the
|
2002-03-13 06:33:26 +00:00
|
|
|
.Fx
|
2002-03-17 07:22:51 +00:00
|
|
|
Documentation Project will not be built.
|
|
|
|
However, the
|
|
|
|
.Dq doc
|
|
|
|
distribution will still be created with the minimal documentation set
|
|
|
|
provided in
|
|
|
|
.Pa src/share/doc .
|
2013-02-03 10:26:24 +00:00
|
|
|
.It Ev TARGET
|
2002-04-30 13:50:04 +00:00
|
|
|
The target hardware platform.
|
|
|
|
This is analogous to the
|
|
|
|
.Dq Nm uname Fl m
|
|
|
|
output.
|
|
|
|
This is necessary to cross-build some target architectures.
|
|
|
|
For example, cross-building for PC98 machines requires
|
2013-02-03 10:26:24 +00:00
|
|
|
.Ev TARGET_ARCH Ns = Ns Li i386
|
2002-04-30 13:50:04 +00:00
|
|
|
and
|
2013-02-03 10:26:24 +00:00
|
|
|
.Ev TARGET Ns = Ns Li pc98 .
|
2011-03-22 01:21:51 +00:00
|
|
|
If not set,
|
2013-02-03 10:26:24 +00:00
|
|
|
.Ev TARGET
|
2011-03-22 01:21:51 +00:00
|
|
|
defaults to the current hardware platform.
|
2013-02-03 10:26:24 +00:00
|
|
|
.It Ev TARGET_ARCH
|
2011-03-22 01:21:51 +00:00
|
|
|
The target machine processor architecture.
|
|
|
|
This is analogous to the
|
|
|
|
.Dq Nm uname Fl p
|
|
|
|
output.
|
|
|
|
Set this to cross-build for a different architecture.
|
|
|
|
If not set,
|
2013-02-03 10:26:24 +00:00
|
|
|
.Ev TARGET_ARCH
|
2011-03-22 01:21:51 +00:00
|
|
|
defaults to the current machine architecture, unless
|
2013-02-03 10:26:24 +00:00
|
|
|
.Ev TARGET
|
2011-03-22 01:21:51 +00:00
|
|
|
is also set, in which case it defaults to the appropriate
|
|
|
|
value for that platform.
|
|
|
|
Typically, one only needs to set
|
2013-02-03 10:26:24 +00:00
|
|
|
.Ev TARGET .
|
2002-03-13 06:33:26 +00:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
2012-05-30 01:52:01 +00:00
|
|
|
.Bl -tag -compact -width Pa
|
2002-03-13 06:33:26 +00:00
|
|
|
.It Pa /usr/doc/Makefile
|
|
|
|
.It Pa /usr/doc/share/mk/doc.project.mk
|
|
|
|
.It Pa /usr/ports/Mk/bsd.port.mk
|
|
|
|
.It Pa /usr/ports/Mk/bsd.sites.mk
|
|
|
|
.It Pa /usr/share/examples/etc/make.conf
|
|
|
|
.It Pa /usr/src/Makefile
|
|
|
|
.It Pa /usr/src/Makefile.inc1
|
|
|
|
.It Pa /usr/src/release/Makefile
|
2013-08-11 18:57:27 +00:00
|
|
|
.It Pa /usr/src/release/release.sh
|
|
|
|
.It Pa /usr/src/release/release.conf.sample
|
2002-03-13 06:33:26 +00:00
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
2011-03-22 01:21:51 +00:00
|
|
|
The following sequence of commands can be used to build a
|
|
|
|
.Dq "-CURRENT snapshot":
|
2002-03-13 06:33:26 +00:00
|
|
|
.Bd -literal -offset indent
|
|
|
|
cd /usr
|
2011-03-22 01:21:51 +00:00
|
|
|
svn co svn://svn.freebsd.org/base/head src
|
2002-03-13 06:33:26 +00:00
|
|
|
cd src
|
2011-05-31 12:59:15 +00:00
|
|
|
make buildworld buildkernel
|
2002-03-13 06:33:26 +00:00
|
|
|
cd release
|
2011-04-11 15:03:01 +00:00
|
|
|
make release
|
|
|
|
make install DESTDIR=/var/freebsd-snapshot
|
2002-03-13 06:33:26 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
2011-04-11 14:30:45 +00:00
|
|
|
After running these commands, all produced distribution files (tarballs
|
|
|
|
for FTP, CD-ROM images, etc.) are available in the
|
|
|
|
.Pa /var/freebsd-snapshot
|
2002-03-13 06:33:26 +00:00
|
|
|
directory.
|
|
|
|
.Pp
|
2002-03-13 09:54:31 +00:00
|
|
|
The following sequence of commands can be used to build a
|
2002-03-15 09:23:21 +00:00
|
|
|
.Dq "-CURRENT snapshot"
|
2011-03-22 01:21:51 +00:00
|
|
|
in a clean environment, including ports and documentation:
|
2002-03-13 06:33:26 +00:00
|
|
|
.Bd -literal -offset indent
|
2012-01-14 18:16:10 +00:00
|
|
|
cd /usr/src/release
|
2013-08-11 18:57:27 +00:00
|
|
|
sh release.sh
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
Optionally, a configuration file can be used customize the release build,
|
|
|
|
such as the subversion revision to use, the branch of the subversion tree for
|
|
|
|
.Li src/ ,
|
|
|
|
.Li ports/ ,
|
|
|
|
and
|
|
|
|
.Li doc/ .
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
cd /usr/src/release
|
|
|
|
sh release.sh -c $HOME/release.conf
|
2002-03-13 06:33:26 +00:00
|
|
|
.Ed
|
2011-03-22 01:21:51 +00:00
|
|
|
.Pp
|
|
|
|
After running these commands, all prepared release files are available in the
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pa /scratch
|
2011-03-22 01:21:51 +00:00
|
|
|
directory.
|
2013-08-11 18:57:27 +00:00
|
|
|
The target directory can be changed by specifying the
|
|
|
|
.Va CHROOTDIR
|
|
|
|
variable in
|
|
|
|
.Li release.conf .
|
2002-03-13 06:33:26 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr cc 1 ,
|
|
|
|
.Xr install 1 ,
|
|
|
|
.Xr make 1 ,
|
2013-01-31 20:15:43 +00:00
|
|
|
.Xr svn 1 Pq Pa ports/devel/subversion ,
|
2002-03-13 06:33:26 +00:00
|
|
|
.Xr uname 1 ,
|
2002-03-14 04:21:50 +00:00
|
|
|
.Xr md 4 ,
|
2002-03-13 06:33:26 +00:00
|
|
|
.Xr make.conf 5 ,
|
|
|
|
.Xr build 7 ,
|
|
|
|
.Xr ports 7 ,
|
2002-03-14 04:21:50 +00:00
|
|
|
.Xr chroot 8 ,
|
2003-04-07 11:40:25 +00:00
|
|
|
.Xr mtree 8 ,
|
|
|
|
.Xr sysctl 8
|
2002-03-13 09:54:31 +00:00
|
|
|
.Rs
|
2002-03-15 09:23:21 +00:00
|
|
|
.%T "FreeBSD Release Engineering"
|
2010-01-15 16:01:22 +00:00
|
|
|
.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng/
|
2002-03-13 09:54:31 +00:00
|
|
|
.Re
|
|
|
|
.Rs
|
2002-03-15 09:23:21 +00:00
|
|
|
.%T "FreeBSD Release Engineering of Third Party Packages"
|
2010-01-15 16:01:22 +00:00
|
|
|
.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng-packages/
|
2002-03-13 09:54:31 +00:00
|
|
|
.Re
|
|
|
|
.Rs
|
2002-03-15 09:23:21 +00:00
|
|
|
.%T "FreeBSD Developers' Handbook"
|
2010-01-15 16:01:22 +00:00
|
|
|
.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook/
|
2002-03-13 09:54:31 +00:00
|
|
|
.Re
|
2002-03-13 06:33:26 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
.Fx
|
|
|
|
1.x
|
2002-03-15 09:23:21 +00:00
|
|
|
used a manual checklist, compiled by
|
|
|
|
.An Rod Grimes ,
|
|
|
|
to produce a release.
|
2002-03-13 06:33:26 +00:00
|
|
|
Apart from being incomplete, the list put a lot of specific demands on
|
2002-12-12 17:26:04 +00:00
|
|
|
available file systems and was quite torturous to execute.
|
2002-03-13 06:33:26 +00:00
|
|
|
.Pp
|
2002-03-13 09:54:31 +00:00
|
|
|
As part of the
|
|
|
|
.Fx 2.0
|
|
|
|
release engineering effort, significant
|
|
|
|
effort was spent getting
|
2002-03-13 06:33:26 +00:00
|
|
|
.Pa src/release/Makefile
|
|
|
|
into a shape where it could at least automate most of the tediousness
|
|
|
|
of building a release in a sterile environment.
|
|
|
|
.Pp
|
2011-03-22 01:21:51 +00:00
|
|
|
For the
|
|
|
|
.Fx 9.0
|
2012-03-29 05:02:12 +00:00
|
|
|
release,
|
2011-03-22 01:21:51 +00:00
|
|
|
.Pa src/release/Makefile
|
|
|
|
was overhauled and the wrapper script
|
|
|
|
.Pa src/release/generate-release.sh
|
|
|
|
introduced to support the introduction of a new installer.
|
|
|
|
.Pp
|
2013-08-11 18:57:27 +00:00
|
|
|
For the
|
|
|
|
.Fx 9.2
|
|
|
|
release,
|
|
|
|
.Pa src/release/release.sh
|
|
|
|
was introduced to support per-build configuration files.
|
|
|
|
.Pa src/release/release.sh
|
|
|
|
is heavily based on the
|
|
|
|
.Pa src/release/generate-release.sh
|
|
|
|
script.
|
|
|
|
.Pp
|
2009-08-18 12:24:27 +00:00
|
|
|
At near 1000 revisions spread over multiple branches, the
|
2012-09-17 02:45:52 +00:00
|
|
|
.Xr svn 1
|
2002-03-13 09:54:31 +00:00
|
|
|
log of
|
|
|
|
.Pa src/release/Makefile
|
|
|
|
contains a vivid historical record of some
|
2002-03-13 06:33:26 +00:00
|
|
|
of the hardships release engineers go through.
|
|
|
|
.Sh AUTHORS
|
|
|
|
.Pa src/release/Makefile
|
2002-03-15 09:23:21 +00:00
|
|
|
was originally written by
|
2002-03-14 04:21:50 +00:00
|
|
|
.An -nosplit
|
|
|
|
.An Rod Grimes ,
|
|
|
|
.An Jordan Hubbard ,
|
|
|
|
and
|
|
|
|
.An Poul-Henning Kamp .
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pp
|
|
|
|
This manual page was originally written by
|
2002-03-13 06:33:26 +00:00
|
|
|
.An Murray Stokely Aq murray@FreeBSD.org .
|
2013-08-11 18:57:27 +00:00
|
|
|
.Pp
|
|
|
|
It was updated by
|
|
|
|
.An Nathan Whitehorn Aq nwhitehorn@FreeBSD.org
|
|
|
|
to include the
|
|
|
|
.Fa generate-release.sh
|
|
|
|
script used for the
|
|
|
|
.Fx 9.0
|
|
|
|
release cycle.
|
|
|
|
.Pp
|
|
|
|
It was later updated by
|
|
|
|
.An Glen Barber Aq gjb@FreeBSD.org
|
|
|
|
to include the
|
|
|
|
.Fa release.sh
|
|
|
|
script used for the
|
|
|
|
.Fx 9.2
|
|
|
|
release cycle.
|