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$
|
|
|
|
.\"
|
2011-03-22 01:21:51 +00:00
|
|
|
.Dd March 18, 2011
|
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
|
2002-03-13 09:54:31 +00:00
|
|
|
CVS 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,
|
2002-03-13 09:54:31 +00:00
|
|
|
installation floppies, 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
|
|
|
|
trees. For this purpose, a script
|
|
|
|
.Pq Pa src/release/generate-release.sh
|
|
|
|
is provided to automate these checkouts and then execute
|
|
|
|
.Dq Li "make release"
|
|
|
|
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
|
2011-03-22 01:21:51 +00:00
|
|
|
.Dq Li "make buildworld" .
|
|
|
|
This is necessary to provide the object files for the release or, when
|
|
|
|
using
|
|
|
|
.Pa generate-release.sh ,
|
|
|
|
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
|
2011-03-22 01:21:51 +00:00
|
|
|
environment. In this second case, the built world must be capable of running
|
|
|
|
on the build system (i.e. it must be for the same architecture and be
|
|
|
|
compatible with the installed kernel).
|
|
|
|
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
|
2003-03-23 04:23:10 +00:00
|
|
|
(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
|
|
|
|
Official releases of FreeBSD are produced in a totally clean environment to
|
|
|
|
ensure consistency between the versions of the src, ports, and doc trees
|
|
|
|
and to avoid contamination from the host system (e.g. local patches, changes
|
|
|
|
to
|
|
|
|
.Xr make.conf 5 ,
|
|
|
|
etc.). This is accomplished using the wrapper script
|
|
|
|
.Pa src/release/generate-release.sh .
|
|
|
|
.Pp
|
|
|
|
.Ic generate-release.sh
|
|
|
|
svn-branch scratch-dir
|
|
|
|
.Pp
|
|
|
|
.Ic generate-release.sh
|
|
|
|
calls
|
|
|
|
.Dq Li "make installworld"
|
|
|
|
to generate a
|
|
|
|
.Xr chroot 8
|
|
|
|
environment in
|
|
|
|
.Ar scratch-dir .
|
|
|
|
It then checks out the src tree specified by
|
|
|
|
.Ar svn-branch
|
|
|
|
using
|
|
|
|
.Xr svn 1
|
|
|
|
and (optionally) the ports and documentation trees using
|
|
|
|
.Xr csup 1
|
|
|
|
or
|
|
|
|
.Xr cvs 1 .
|
|
|
|
Once the various source trees have been obtained, it executes
|
|
|
|
.Dq Li "make release"
|
|
|
|
within the
|
|
|
|
.Xr chroot 8
|
|
|
|
environment and places the result in
|
|
|
|
.Pa $scratch-dir/R .
|
|
|
|
Note that because this uses a chroot, it cannot be used to cross-build
|
|
|
|
.Fx
|
|
|
|
release media.
|
|
|
|
.Pp
|
|
|
|
Environment variables:
|
|
|
|
.Bl -tag -width ".Cm MAKE_FLAGS"
|
|
|
|
.It Ev CVSUP_HOST
|
|
|
|
The CVSUP server to use for the doc and ports trees. One of
|
|
|
|
.Ev CVSUP_HOST
|
|
|
|
or
|
|
|
|
.Ev CVSROOT
|
|
|
|
must be specified for ports and documentation to be included in the release.
|
|
|
|
.It Ev CVSROOT
|
|
|
|
The location of the
|
|
|
|
.Fx
|
|
|
|
CVS repository to use for the doc and ports trees. One of
|
|
|
|
.Ev CVSUP_HOST
|
|
|
|
or
|
|
|
|
.Ev CVSROOT
|
|
|
|
must be specified for ports and documentation to be included in the release.
|
|
|
|
.It Ev CVS_TAG
|
|
|
|
If the variable
|
|
|
|
.Ev CVS_TAG
|
|
|
|
is set, that tag will be used for CVS checkouts (doc and ports), otherwise
|
|
|
|
.Ic generate-release.sh
|
|
|
|
will use HEAD.
|
|
|
|
.It Ev MAKE_FLAGS
|
|
|
|
This environment variable can be set to pass flags (e.g. -j) to
|
|
|
|
.Xr make 1
|
|
|
|
when invoked by the script.
|
|
|
|
.It Ev SVNROOT
|
|
|
|
The location of the FreeBSD SVN source repository. Defaults to
|
|
|
|
.Pa svn://svn.freebsd.org/base .
|
|
|
|
.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
|
2002-03-13 06:33:26 +00:00
|
|
|
target.
|
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
|
|
|
|
platform. All output goes to
|
|
|
|
.Pa ${.OBJDIR} ,
|
|
|
|
which will likely be either
|
|
|
|
.Pa src/release
|
|
|
|
or the equivalent path in
|
|
|
|
.Pa /usr/obj .
|
|
|
|
.It Cm cdrom
|
|
|
|
Builds installation CD-ROM images. On some systems, this may require that
|
|
|
|
.Xr mkisofs 8
|
|
|
|
be installed
|
|
|
|
.Pq Pa sysutils/cdrtools
|
|
|
|
and possibly that 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 a file called
|
|
|
|
.Pa release.iso
|
|
|
|
as its output.
|
|
|
|
.It Cm memstick
|
|
|
|
Builds an installation memory stick image named
|
|
|
|
.Pa memstick .
|
|
|
|
Not applicable on all platforms. Requires that the
|
|
|
|
.Xr md 4
|
|
|
|
(memory disk) device driver be present in the kernel
|
|
|
|
(either by being compiled in or available as a module).
|
|
|
|
.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
|
|
|
|
Generates all the distribution archives (e.g. base, kernel, ports, doc)
|
|
|
|
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
|
|
|
|
.Cm cdrom
|
|
|
|
and
|
|
|
|
.Cm memstick
|
|
|
|
targets.
|
|
|
|
.It Cm reldoc
|
2002-03-13 09:54:31 +00:00
|
|
|
Builds the release documentation.
|
|
|
|
This includes the release notes,
|
2011-03-22 01:21:51 +00:00
|
|
|
hardware guide, and installation instructions. Other documentation (e.g.
|
|
|
|
the Handbook) is built during the
|
|
|
|
.Cm base.txz
|
|
|
|
target invoked by
|
|
|
|
.Cm packagesystem.
|
2002-03-13 06:33:26 +00:00
|
|
|
.El
|
|
|
|
.Sh ENVIRONMENT
|
|
|
|
Optional variables:
|
2011-03-22 01:21:51 +00:00
|
|
|
.Bl -tag -width ".Va TARGET_ARCH"
|
|
|
|
.It Va WORLDDIR
|
|
|
|
Location of a directory containing the src tree. By default, the directory
|
|
|
|
above the one containing the makefile
|
|
|
|
.Pq Pa src .
|
|
|
|
.It Va PORTSDIR
|
|
|
|
Location of a directory containing the ports tree. By default,
|
|
|
|
.Pa /usr/ports .
|
|
|
|
If it is unset or cannot be found, ports will not be included in the release.
|
|
|
|
.It Va DOCDIR
|
|
|
|
Location of a directory containing the doc tree. By default,
|
|
|
|
.Pa /usr/doc .
|
|
|
|
If it is unset or cannot be found, most documentation will not be included in
|
|
|
|
the release; see
|
|
|
|
.Ev NODOC
|
|
|
|
below.
|
|
|
|
.It Va NOPORTS
|
|
|
|
If defined, the Ports Collection will be omitted from the release.
|
|
|
|
.It Va NOSRC
|
|
|
|
If set, do not include system source code in the release.
|
2002-03-15 09:23:21 +00:00
|
|
|
.It Va NODOC
|
2003-05-05 05:36:20 +00:00
|
|
|
If defined, the SGML-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 .
|
2002-04-30 13:50:04 +00:00
|
|
|
.It Va TARGET
|
|
|
|
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
|
|
|
|
.Va TARGET_ARCH Ns = Ns Li i386
|
|
|
|
and
|
|
|
|
.Va TARGET Ns = Ns Li pc98 .
|
2011-03-22 01:21:51 +00:00
|
|
|
If not set,
|
|
|
|
.Va TARGET
|
|
|
|
defaults to the current hardware platform.
|
|
|
|
.It Va TARGET_ARCH
|
|
|
|
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,
|
|
|
|
.Va TARGET_ARCH
|
|
|
|
defaults to the current machine architecture, unless
|
|
|
|
.Va TARGET
|
|
|
|
is also set, in which case it defaults to the appropriate
|
|
|
|
value for that platform.
|
|
|
|
Typically, one only needs to set
|
|
|
|
.Va TARGET .
|
2002-03-13 06:33:26 +00:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -compact
|
|
|
|
.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
|
2011-03-22 01:21:51 +00:00
|
|
|
.It Pa /usr/src/release/generate-release.sh
|
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
|
|
|
|
make buildworld
|
|
|
|
cd release
|
2011-03-22 01:21:51 +00:00
|
|
|
make obj release
|
2002-03-13 06:33:26 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
After running these commands, a complete system suitable for FTP or
|
2002-03-17 07:22:51 +00:00
|
|
|
CD-ROM distribution is available in the
|
2011-03-22 01:21:51 +00:00
|
|
|
.Pa /usr/obj/usr/src/release
|
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
|
|
|
|
cd /usr/src
|
|
|
|
make buildworld
|
|
|
|
cd release
|
2011-03-22 01:21:51 +00:00
|
|
|
export CVSUP_HOST=cvsupN.freebsd.org
|
|
|
|
sh generate-release.sh head /local3/release
|
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
|
|
|
|
.Pa /local3/release/R
|
|
|
|
directory.
|
2002-03-13 06:33:26 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr cc 1 ,
|
2002-03-14 04:21:50 +00:00
|
|
|
.Xr cvs 1 ,
|
2002-03-13 06:33:26 +00:00
|
|
|
.Xr install 1 ,
|
|
|
|
.Xr make 1 ,
|
2009-08-18 12:24:27 +00:00
|
|
|
.Xr svn 1 Pq Pa ports/devel/subversion-freebsd ,
|
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
|
|
|
|
release,
|
|
|
|
.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
|
2009-08-18 12:24:27 +00:00
|
|
|
At near 1000 revisions spread over multiple branches, the
|
2002-03-14 04:21:50 +00:00
|
|
|
.Xr cvs 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 .
|
2002-03-13 09:54:31 +00:00
|
|
|
This manual page was written by
|
2002-03-13 06:33:26 +00:00
|
|
|
.An Murray Stokely Aq murray@FreeBSD.org .
|