1afb33690SMurray Stokely.\" Copyright (c) 2002 Murray Stokely <murray@FreeBSD.org> 2afb33690SMurray Stokely.\" All rights reserved. 3de26e0adSMurray Stokely.\" 4de26e0adSMurray Stokely.\" Redistribution and use in source and binary forms, with or without 5de26e0adSMurray Stokely.\" modification, are permitted provided that the following conditions 6de26e0adSMurray Stokely.\" are met: 7de26e0adSMurray Stokely.\" 1. Redistributions of source code must retain the above copyright 8de26e0adSMurray Stokely.\" notice, this list of conditions and the following disclaimer. 9de26e0adSMurray Stokely.\" 2. Redistributions in binary form must reproduce the above copyright 10de26e0adSMurray Stokely.\" notice, this list of conditions and the following disclaimer in the 11de26e0adSMurray Stokely.\" documentation and/or other materials provided with the distribution. 12de26e0adSMurray Stokely.\" 13de26e0adSMurray Stokely.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 14de26e0adSMurray Stokely.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15de26e0adSMurray Stokely.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16de26e0adSMurray Stokely.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 17de26e0adSMurray Stokely.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18de26e0adSMurray Stokely.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19de26e0adSMurray Stokely.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20de26e0adSMurray Stokely.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21de26e0adSMurray Stokely.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22de26e0adSMurray Stokely.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23de26e0adSMurray Stokely.\" SUCH DAMAGE. 24de26e0adSMurray Stokely.\" 25de26e0adSMurray Stokely.\" $FreeBSD$ 26de26e0adSMurray Stokely.\" 27*9bb84a63SGlen Barber.Dd February 25, 2014 28de26e0adSMurray Stokely.Dt RELEASE 7 29de26e0adSMurray Stokely.Os 30de26e0adSMurray Stokely.Sh NAME 31de26e0adSMurray Stokely.Nm release 32afb33690SMurray Stokely.Nd "release building infrastructure" 33de26e0adSMurray Stokely.Sh DESCRIPTION 34de26e0adSMurray Stokely.Fx 35de26e0adSMurray Stokelyprovides a complete build environment suitable for users to make 36de26e0adSMurray Stokelyfull releases of the 37de26e0adSMurray Stokely.Fx 38994c71f0SMurray Stokelyoperating system. 39de26e0adSMurray StokelyAll of the tools necessary to build a release are available from the 40feacd98eSNathan Whitehorn.Fx 41feacd98eSNathan Whitehornsource code repository in 42de26e0adSMurray Stokely.Pa src/release . 43de26e0adSMurray StokelyA complete release can actually be built with only a single command, 44eee69fccSMurray Stokelyincluding the creation of ISO images suitable for burning to CD-ROM, 45feacd98eSNathan Whitehornmemory stick images, and an FTP install directory. 46de26e0adSMurray StokelyThis command is aptly named 47afb33690SMurray Stokely.Dq Li "make release" . 48de26e0adSMurray Stokely.Pp 49e8423d00SNathan WhitehornFor some users, it may be desirable to provide an absolutely clean 50e8423d00SNathan Whitehornbuild environment, with no local modifications to the source tree or to 51e8423d00SNathan Whitehorn.Xr make.conf 5 , 52e8423d00SNathan Whitehornand with clean checkouts of specific versions of the doc, src, and ports 53ebe27856SGlen Barbertrees. 54ebe27856SGlen BarberFor this purpose, a script 55ebe27856SGlen Barber.Pq Pa src/release/release.sh 56e8423d00SNathan Whitehornis provided to automate these checkouts and then execute 57e8423d00SNathan Whitehorn.Dq Li "make release" 58e8423d00SNathan Whitehornin a clean 59e8423d00SNathan Whitehorn.Xr chroot 8 . 60e8423d00SNathan Whitehorn.Pp 61de26e0adSMurray StokelyBefore attempting to build a release, the user is expected to be 62994c71f0SMurray Stokelyfamiliar with the contents of 63de26e0adSMurray Stokely.Xr build 7 , 6447280c4bSRuslan Ermilovand should have experience upgrading systems from source. 65e8423d00SNathan Whitehorn.Pp 66de26e0adSMurray StokelyThe release build process requires that 67de26e0adSMurray Stokely.Pa /usr/obj 68de26e0adSMurray Stokelybe populated with the output of 69d408a341SNathan Whitehorn.Dq Li "make buildworld" 70d408a341SNathan Whitehornand 71d408a341SNathan Whitehorn.Dq Li "make buildkernel" . 72e8423d00SNathan WhitehornThis is necessary to provide the object files for the release or, when 73e8423d00SNathan Whitehornusing 74ebe27856SGlen Barber.Pa release.sh , 75e8423d00SNathan Whitehornso that the object files for a complete system can be installed into a clean 76de26e0adSMurray Stokely.Xr chroot 8 77ebe27856SGlen Barberenvironment. 78ebe27856SGlen Barber.Pp 79ebe27856SGlen BarberIf the target release build is for a different architecture or machine type, 80ebe27856SGlen Barberthe 81ebe27856SGlen Barber.Va TARGET 82ebe27856SGlen Barberand 83ebe27856SGlen Barber.Va TARGET_ARCH 84ebe27856SGlen Barbervariables must be used. 85ebe27856SGlen BarberSee the supported 86ebe27856SGlen Barber.Fa release.conf 87ebe27856SGlen Barbervariables for more information. 88ebe27856SGlen Barber.Pp 89e8423d00SNathan WhitehornThe release procedure on some architectures may also require that the 90994c71f0SMurray Stokely.Xr md 4 91994c71f0SMurray Stokely(memory disk) device driver be present in the kernel 92ebe27856SGlen Barber.Pq either by being compiled in or available as a module . 93de26e0adSMurray Stokely.Pp 94de26e0adSMurray StokelyThis document does not cover source code management, quality 95de26e0adSMurray Stokelyassurance, or other aspects of the release engineering process. 96e8423d00SNathan Whitehorn.Sh CLEAN RELEASE GENERATION 97ebe27856SGlen BarberOfficial releases of 98ebe27856SGlen Barber.Fx 99ebe27856SGlen Barberare produced in a totally clean environment to 100e8423d00SNathan Whitehornensure consistency between the versions of the src, ports, and doc trees 101ebe27856SGlen Barberand to avoid contamination from the host system 102ebe27856SGlen Barber.Po such as local patches, changes 103e8423d00SNathan Whitehornto 104e8423d00SNathan Whitehorn.Xr make.conf 5 , 105ebe27856SGlen Barberetc. 106ebe27856SGlen Barber.Pc . 107ebe27856SGlen BarberThis is accomplished using the wrapper script 108ebe27856SGlen Barber.Pa src/release/release.sh . 109e8423d00SNathan Whitehorn.Pp 110ebe27856SGlen Barber.Ic release.sh 111ebe27856SGlen Barber.Op Fl c Ar release.conf 112e8423d00SNathan Whitehorn.Pp 113ebe27856SGlen Barber.Ic release.sh 114ebe27856SGlen Barberchecks out the 115ebe27856SGlen Barber.Li src/ , 116ebe27856SGlen Barber.Li ports/ , 117ebe27856SGlen Barberand 118ebe27856SGlen Barber.Li doc/ 119ebe27856SGlen Barbertrees to 120ebe27856SGlen Barber.Va CHROOTDIR , 121ebe27856SGlen Barberthen calls 122ebe27856SGlen Barber.Dq Li "make buildworld" 123ebe27856SGlen Barberand 124e8423d00SNathan Whitehorn.Dq Li "make installworld" 125e8423d00SNathan Whitehornto generate a 126e8423d00SNathan Whitehorn.Xr chroot 8 127ebe27856SGlen Barberenvironment. 128ebe27856SGlen BarberNext, 129e8423d00SNathan Whitehorn.Dq Li "make release" 130ebe27856SGlen Barberis run within the 131e8423d00SNathan Whitehorn.Xr chroot 8 132e8423d00SNathan Whitehornenvironment and places the result in 133ebe27856SGlen Barber.Pa $CHROOTDIR/R . 134e8423d00SNathan Whitehorn.Pp 135ebe27856SGlen BarberThe optional 136ebe27856SGlen Barber.Fa release.conf 137ebe27856SGlen Barberconfiguration file supports the following variables: 138ebe27856SGlen Barber.Bl -tag -width Ev 139ebe27856SGlen Barber.It Va CHROOTDIR 140ebe27856SGlen BarberThe directory within which the release will be built. 141ebe27856SGlen Barber.It Va SVNROOT 142ebe27856SGlen BarberThe 143ebe27856SGlen Barber.Xr svn 1 144ebe27856SGlen Barberhost used to check out the various trees. 145ebe27856SGlen BarberDefaults to 146ebe27856SGlen Barber.Pa svn://svn.FreeeBSD.org . 147ebe27856SGlen Barber.It Va SRCBRANCH 148ebe27856SGlen BarberThe 149ebe27856SGlen Barber.Li src/ 150ebe27856SGlen Barberbranch to use. 151ebe27856SGlen BarberDefaults to 152bda59883SGlen Barber.Va head/@rHEAD . 153ebe27856SGlen Barber.It Va DOCBRANCH 154ebe27856SGlen BarberThe 155ebe27856SGlen Barber.Li doc/ 156ebe27856SGlen Barberbranch to use. 157ebe27856SGlen BarberDefaults to 158bda59883SGlen Barber.Va head/@rHEAD . 159ebe27856SGlen Barber.It Va PORTBRANCH 160ebe27856SGlen BarberThe 161ebe27856SGlen Barber.Li ports/ 162ebe27856SGlen Barberbranch to use. 163ebe27856SGlen BarberDefaults to 164bda59883SGlen Barber.Va head/@rHEAD . 165ebe27856SGlen Barber.It Va TARGET 166bc1af85cSGlen BarberThe target machine type for cross-building a release. 167ebe27856SGlen Barber.It Va TARGET_ARCH 168bc1af85cSGlen BarberThe target machine architecture for cross-building a release. 169ebe27856SGlen Barber.Pp 170ebe27856SGlen BarberFor the supported list of 171ebe27856SGlen Barber.Va TARGET 172ebe27856SGlen Barberand 173ebe27856SGlen Barber.Va TARGET_ARCH 174ebe27856SGlen Barbercombinations, consult the output of 175ebe27856SGlen Barber.Dq make targets 176ebe27856SGlen Barberas documented in 177ebe27856SGlen Barber.Xr build 7 . 178ebe27856SGlen Barber.It Va KERNEL 179ebe27856SGlen BarberThe target kernel configuration to use. 180ebe27856SGlen BarberDefaults to 181ebe27856SGlen Barber.Va GENERIC . 182ebe27856SGlen BarberMultiple 183ebe27856SGlen Barber.Va KERNEL 184ebe27856SGlen Barberentries may be specified. 185ebe27856SGlen Barber.It Va MAKE_CONF 186ebe27856SGlen BarberThe 187ebe27856SGlen Barber.Xr make.conf 5 188ebe27856SGlen Barberto use for the release build. 189ebe27856SGlen BarberDefaults to 190ebe27856SGlen Barber.Fa /dev/null 191ebe27856SGlen Barberto prevent polluting the release with local system changes. 192ebe27856SGlen Barber.It Va SRC_CONF 193ebe27856SGlen BarberThe 194ebe27856SGlen Barber.Xr src.conf 5 195ebe27856SGlen Barberto use for the release build. 196ebe27856SGlen BarberDefaults to 197ebe27856SGlen Barber.Fa /dev/null 198ebe27856SGlen Barberto prevent polluting the release with local system changes. 199ebe27856SGlen Barber.It Va MAKE_FLAGS 200ebe27856SGlen BarberAdditional flags to pass to 201ebe27856SGlen Barber.Xr make 1 . 202ebe27856SGlen Barber.It Va WORLD_FLAGS 203ebe27856SGlen BarberAdditional flags to pass to 204e8423d00SNathan Whitehorn.Xr make 1 205ebe27856SGlen Barberduring the 206ebe27856SGlen Barber.Dq buildworld 207ebe27856SGlen Barberphase. 208ebe27856SGlen BarberDefaults to setting the number of 209de17cbccSHiroki Sato.Xr make 1 210ebe27856SGlen Barberjobs 211ebe27856SGlen Barber.Pq Ar -j 212bc1af85cSGlen Barberto the number of CPUs available on a SMP-capable system. 213ebe27856SGlen Barber.It Va KERNEL_FLAGS 214ebe27856SGlen BarberAdditional flags to pass to 215ebe27856SGlen Barber.Xr make 1 216ebe27856SGlen Barberduring the 217ebe27856SGlen Barber.Dq buildkernel 218ebe27856SGlen Barberphase. 219ebe27856SGlen BarberDefaults to setting the number of 220ebe27856SGlen Barber.Xr make 1 221ebe27856SGlen Barberjobs 222ebe27856SGlen Barber.Pq Ar -j 223bc1af85cSGlen Barberto half the number of CPUs available on a SMP-capable system. 224ebe27856SGlen Barber.It Va NODOC 225ebe27856SGlen BarberSet to a non-empty value to skip the 226ebe27856SGlen Barber.Li doc/ 227ebe27856SGlen Barbertree checkout. 228ebe27856SGlen BarberWhen set, 229ebe27856SGlen Barber.Va NODOC 230ebe27856SGlen Barberwill prevent the 231ebe27856SGlen Barber.Fa doc.txz 232ebe27856SGlen Barberdistribution package from being created. 233ebe27856SGlen Barber.It Va NOPORTS 234ebe27856SGlen BarberSet to a non-empty value to skip the 235ebe27856SGlen Barber.Li ports/ 236ebe27856SGlen Barbertree checkout. 237ebe27856SGlen BarberWhen set, 238ebe27856SGlen Barber.Va NOPORTS 239ebe27856SGlen Barberwill prevent the 240ebe27856SGlen Barber.Fa ports.txz 241ebe27856SGlen Barberdistribution package from being created. 242ebe27856SGlen BarberSetting this also sets 243ebe27856SGlen Barber.Va NODOC . 244f7f650c7SGlen Barber.It Va WITH_DVD 245f7f650c7SGlen BarberSet to a non-empty value to include the 246f7f650c7SGlen Barber.Cm dvdrom 247f7f650c7SGlen Barbertarget. 248*9bb84a63SGlen Barber.It Va VCSCMD 249*9bb84a63SGlen BarberThe command run to obtain the source trees. 250*9bb84a63SGlen BarberDefaults to 251*9bb84a63SGlen Barber.Qq Cm svn checkout . 252e8423d00SNathan Whitehorn.El 253e8423d00SNathan Whitehorn.Sh MAKEFILE TARGETS 254de26e0adSMurray StokelyThe release makefile 255994c71f0SMurray Stokely.Pq Pa src/release/Makefile 256de26e0adSMurray Stokelyis fairly abstruse. 257de26e0adSMurray StokelyMost developers will only be concerned with the 258afb33690SMurray Stokely.Cm release 259299a8b95SNathan Whitehornand 260299a8b95SNathan Whitehorn.Cm install 261299a8b95SNathan Whitehorntargets. 262994c71f0SMurray Stokely.\" XXX: Some sort of introduction to this list? All the others have one. 263e8423d00SNathan Whitehorn.Bl -tag -width ".Cm packagesystem" 264afb33690SMurray Stokely.It Cm release 265e8423d00SNathan WhitehornMeta-target to build all release media and distributions applicable to this 266299a8b95SNathan Whitehornplatform. 267299a8b95SNathan Whitehorn.It Cm install 268299a8b95SNathan WhitehornCopy all produced release media to 269299a8b95SNathan Whitehorn.Pa ${DESTDIR} . 270e8423d00SNathan Whitehorn.It Cm cdrom 271de17cbccSHiroki SatoBuilds installation CD-ROM images. 272de17cbccSHiroki SatoThis may require the 273e8423d00SNathan Whitehorn.Xr md 4 274e8423d00SNathan Whitehorn(memory disk) device driver be present in the kernel 275de17cbccSHiroki Sato(either by being compiled in or available as a module). 276de17cbccSHiroki SatoThis target produces files called 277ebe27856SGlen Barber.Pa disc1.iso 278299a8b95SNathan Whitehornand 279299a8b95SNathan Whitehorn.Pa bootonly.iso 280e8423d00SNathan Whitehornas its output. 281d7cfbadbSGlen Barber.It Cm dvdrom 282d7cfbadbSGlen BarberBuilds installation DVD-ROM images. 283d7cfbadbSGlen BarberThis may require the 284d7cfbadbSGlen Barber.Xr md 4 285d7cfbadbSGlen Barber(memory disk) device driver be present in the kernel 286d7cfbadbSGlen Barber(either by being compiled in or available as a module). 287d7cfbadbSGlen BarberThis target produces the 288d7cfbadbSGlen Barber.Pa dvd1.iso 289d7cfbadbSGlen Barberfile as its output. 290e8423d00SNathan Whitehorn.It Cm memstick 291e8423d00SNathan WhitehornBuilds an installation memory stick image named 292ebe27856SGlen Barber.Pa memstick.img . 293de17cbccSHiroki SatoNot applicable on all platforms. 294de17cbccSHiroki SatoRequires that the 295e8423d00SNathan Whitehorn.Xr md 4 296ebe27856SGlen Barber.Pq memory disk 297ebe27856SGlen Barberdevice driver be present in the kernel 298ebe27856SGlen Barber.Pq either by being compiled in or available as a module . 29916fb00c1SGlen Barber.It Cm mini-memstick 30016fb00c1SGlen BarberSimilar to 30116fb00c1SGlen Barber.Cm memstick , 30216fb00c1SGlen Barberwith the exception that the installation distribution sets 30316fb00c1SGlen Barberare not included. 304e8423d00SNathan Whitehorn.It Cm ftp 305e8423d00SNathan WhitehornCreates a directory named 306e8423d00SNathan Whitehorn.Pa ftp 307e8423d00SNathan Whitehorncontaining the distribution files used in network installations 308e8423d00SNathan Whitehornand suitable for upload to an FTP mirror. 309de26e0adSMurray Stokely.El 310de26e0adSMurray Stokely.Pp 311e8423d00SNathan WhitehornMajor subtargets called by targets above: 312e8423d00SNathan Whitehorn.Bl -tag -width ".Cm packagesystem" 313e8423d00SNathan Whitehorn.It Cm packagesystem 314ebe27856SGlen BarberGenerates all the distribution archives 315ebe27856SGlen Barber.Pq base, kernel, ports, doc 316e8423d00SNathan Whitehornapplicable on this platform. 317e8423d00SNathan Whitehorn.It Cm system 318e8423d00SNathan WhitehornBuilds a bootable installation system containing all the distribution files 319e8423d00SNathan Whitehornpackaged by the 320e8423d00SNathan Whitehorn.Cm packagesystem 321e8423d00SNathan Whitehorntarget, and suitable for imaging by the 322d7cfbadbSGlen Barber.Cm cdrom , 323d7cfbadbSGlen Barber.Cm dvdrom 324e8423d00SNathan Whitehornand 325e8423d00SNathan Whitehorn.Cm memstick 326e8423d00SNathan Whitehorntargets. 327e8423d00SNathan Whitehorn.It Cm reldoc 328994c71f0SMurray StokelyBuilds the release documentation. 329994c71f0SMurray StokelyThis includes the release notes, 330ebe27856SGlen Barberhardware guide, and installation instructions. 331ebe27856SGlen BarberOther documentation, such as the Handbook, 332ebe27856SGlen Barberis built during the 333e8423d00SNathan Whitehorn.Cm base.txz 334e8423d00SNathan Whitehorntarget invoked by 335e8423d00SNathan Whitehorn.Cm packagesystem . 336de26e0adSMurray Stokely.El 337de26e0adSMurray Stokely.Sh ENVIRONMENT 338de26e0adSMurray StokelyOptional variables: 339de17cbccSHiroki Sato.Bl -tag -width ".Ev TARGET_ARCH" 340de17cbccSHiroki Sato.It Ev OSRELEASE 341ebe27856SGlen BarberOptional base name for generated media images 342ebe27856SGlen Barber.Pq e.g., FreeBSD-9.0-RC2-amd64 . 343de17cbccSHiroki SatoDefaults to the output of 344de17cbccSHiroki Sato.Ic `uname -s`-`uname -r`-`uname -p` 345de17cbccSHiroki Satowithin the chroot. 346de17cbccSHiroki Sato.It Ev WORLDDIR 347ebe27856SGlen BarberLocation of a directory containing the src tree. 348ebe27856SGlen BarberBy default, the directory 349e8423d00SNathan Whitehornabove the one containing the makefile 350e8423d00SNathan Whitehorn.Pq Pa src . 351de17cbccSHiroki Sato.It Ev PORTSDIR 352ebe27856SGlen BarberLocation of a directory containing the ports tree. 353ebe27856SGlen BarberBy default, 354e8423d00SNathan Whitehorn.Pa /usr/ports . 355e8423d00SNathan WhitehornIf it is unset or cannot be found, ports will not be included in the release. 356de17cbccSHiroki Sato.It Ev DOCDIR 357ebe27856SGlen BarberLocation of a directory containing the doc tree. 358ebe27856SGlen BarberBy default, 359e8423d00SNathan Whitehorn.Pa /usr/doc . 360e8423d00SNathan WhitehornIf it is unset or cannot be found, most documentation will not be included in 361e8423d00SNathan Whitehornthe release; see 362e8423d00SNathan Whitehorn.Ev NODOC 363e8423d00SNathan Whitehornbelow. 364de17cbccSHiroki Sato.It Ev NOPORTS 365e8423d00SNathan WhitehornIf defined, the Ports Collection will be omitted from the release. 366de17cbccSHiroki Sato.It Ev NOSRC 367e8423d00SNathan WhitehornIf set, do not include system source code in the release. 368de17cbccSHiroki Sato.It Ev NODOC 3690cd4fb92SGlen BarberIf defined, the XML-based documentation from the 370de26e0adSMurray Stokely.Fx 371eee69fccSMurray StokelyDocumentation Project will not be built. 372eee69fccSMurray StokelyHowever, the 373eee69fccSMurray Stokely.Dq doc 374eee69fccSMurray Stokelydistribution will still be created with the minimal documentation set 375eee69fccSMurray Stokelyprovided in 376eee69fccSMurray Stokely.Pa src/share/doc . 377de17cbccSHiroki Sato.It Ev TARGET 37825923b97SRuslan ErmilovThe target hardware platform. 37925923b97SRuslan ErmilovThis is analogous to the 38025923b97SRuslan Ermilov.Dq Nm uname Fl m 38125923b97SRuslan Ermilovoutput. 38225923b97SRuslan ErmilovThis is necessary to cross-build some target architectures. 38325923b97SRuslan ErmilovFor example, cross-building for PC98 machines requires 384de17cbccSHiroki Sato.Ev TARGET_ARCH Ns = Ns Li i386 38525923b97SRuslan Ermilovand 386de17cbccSHiroki Sato.Ev TARGET Ns = Ns Li pc98 . 387e8423d00SNathan WhitehornIf not set, 388de17cbccSHiroki Sato.Ev TARGET 389e8423d00SNathan Whitehorndefaults to the current hardware platform. 390de17cbccSHiroki Sato.It Ev TARGET_ARCH 391e8423d00SNathan WhitehornThe target machine processor architecture. 392e8423d00SNathan WhitehornThis is analogous to the 393e8423d00SNathan Whitehorn.Dq Nm uname Fl p 394e8423d00SNathan Whitehornoutput. 395e8423d00SNathan WhitehornSet this to cross-build for a different architecture. 396e8423d00SNathan WhitehornIf not set, 397de17cbccSHiroki Sato.Ev TARGET_ARCH 398e8423d00SNathan Whitehorndefaults to the current machine architecture, unless 399de17cbccSHiroki Sato.Ev TARGET 400e8423d00SNathan Whitehornis also set, in which case it defaults to the appropriate 401e8423d00SNathan Whitehornvalue for that platform. 402e8423d00SNathan WhitehornTypically, one only needs to set 403de17cbccSHiroki Sato.Ev TARGET . 404de26e0adSMurray Stokely.El 405de26e0adSMurray Stokely.Sh FILES 40682f39c10SGlen Barber.Bl -tag -compact -width Pa 407de26e0adSMurray Stokely.It Pa /usr/doc/Makefile 408de26e0adSMurray Stokely.It Pa /usr/doc/share/mk/doc.project.mk 409de26e0adSMurray Stokely.It Pa /usr/ports/Mk/bsd.port.mk 410de26e0adSMurray Stokely.It Pa /usr/ports/Mk/bsd.sites.mk 411de26e0adSMurray Stokely.It Pa /usr/share/examples/etc/make.conf 412de26e0adSMurray Stokely.It Pa /usr/src/Makefile 413de26e0adSMurray Stokely.It Pa /usr/src/Makefile.inc1 414de26e0adSMurray Stokely.It Pa /usr/src/release/Makefile 415ebe27856SGlen Barber.It Pa /usr/src/release/release.sh 416ebe27856SGlen Barber.It Pa /usr/src/release/release.conf.sample 417de26e0adSMurray Stokely.El 418de26e0adSMurray Stokely.Sh EXAMPLES 419e8423d00SNathan WhitehornThe following sequence of commands can be used to build a 420e8423d00SNathan Whitehorn.Dq "-CURRENT snapshot": 421de26e0adSMurray Stokely.Bd -literal -offset indent 422de26e0adSMurray Stokelycd /usr 423e8423d00SNathan Whitehornsvn co svn://svn.freebsd.org/base/head src 424de26e0adSMurray Stokelycd src 425d408a341SNathan Whitehornmake buildworld buildkernel 426de26e0adSMurray Stokelycd release 4278ef63d0dSNathan Whitehornmake release 4288ef63d0dSNathan Whitehornmake install DESTDIR=/var/freebsd-snapshot 429de26e0adSMurray Stokely.Ed 430de26e0adSMurray Stokely.Pp 431299a8b95SNathan WhitehornAfter running these commands, all produced distribution files (tarballs 432299a8b95SNathan Whitehornfor FTP, CD-ROM images, etc.) are available in the 433299a8b95SNathan Whitehorn.Pa /var/freebsd-snapshot 434de26e0adSMurray Stokelydirectory. 435de26e0adSMurray Stokely.Pp 436994c71f0SMurray StokelyThe following sequence of commands can be used to build a 4371bcf2f1aSMurray Stokely.Dq "-CURRENT snapshot" 438e8423d00SNathan Whitehornin a clean environment, including ports and documentation: 439de26e0adSMurray Stokely.Bd -literal -offset indent 4405af5af75SGleb Smirnoffcd /usr/src/release 441ebe27856SGlen Barbersh release.sh 442ebe27856SGlen Barber.Ed 443ebe27856SGlen Barber.Pp 444ebe27856SGlen BarberOptionally, a configuration file can be used customize the release build, 445ebe27856SGlen Barbersuch as the subversion revision to use, the branch of the subversion tree for 446ebe27856SGlen Barber.Li src/ , 447ebe27856SGlen Barber.Li ports/ , 448ebe27856SGlen Barberand 449ebe27856SGlen Barber.Li doc/ . 450ebe27856SGlen Barber.Bd -literal -offset indent 451ebe27856SGlen Barbercd /usr/src/release 452ebe27856SGlen Barbersh release.sh -c $HOME/release.conf 453de26e0adSMurray Stokely.Ed 454e8423d00SNathan Whitehorn.Pp 455e8423d00SNathan WhitehornAfter running these commands, all prepared release files are available in the 456ebe27856SGlen Barber.Pa /scratch 457e8423d00SNathan Whitehorndirectory. 458ebe27856SGlen BarberThe target directory can be changed by specifying the 459ebe27856SGlen Barber.Va CHROOTDIR 460ebe27856SGlen Barbervariable in 461ebe27856SGlen Barber.Li release.conf . 462de26e0adSMurray Stokely.Sh SEE ALSO 463de26e0adSMurray Stokely.Xr cc 1 , 464de26e0adSMurray Stokely.Xr install 1 , 465de26e0adSMurray Stokely.Xr make 1 , 466af285c09SGlen Barber.Xr svn 1 Pq Pa ports/devel/subversion , 467de26e0adSMurray Stokely.Xr uname 1 , 468afb33690SMurray Stokely.Xr md 4 , 469de26e0adSMurray Stokely.Xr make.conf 5 , 470de26e0adSMurray Stokely.Xr build 7 , 471de26e0adSMurray Stokely.Xr ports 7 , 472afb33690SMurray Stokely.Xr chroot 8 , 473f5178c4fSMurray Stokely.Xr mtree 8 , 474f5178c4fSMurray Stokely.Xr sysctl 8 475994c71f0SMurray Stokely.Rs 4761bcf2f1aSMurray Stokely.%T "FreeBSD Release Engineering" 477aa4a335bSRuslan Ermilov.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng/ 478994c71f0SMurray Stokely.Re 479994c71f0SMurray Stokely.Rs 4801bcf2f1aSMurray Stokely.%T "FreeBSD Release Engineering of Third Party Packages" 481aa4a335bSRuslan Ermilov.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng-packages/ 482994c71f0SMurray Stokely.Re 483994c71f0SMurray Stokely.Rs 4841bcf2f1aSMurray Stokely.%T "FreeBSD Developers' Handbook" 485aa4a335bSRuslan Ermilov.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook/ 486994c71f0SMurray Stokely.Re 487de26e0adSMurray Stokely.Sh HISTORY 488de26e0adSMurray Stokely.Fx 489de26e0adSMurray Stokely1.x 4901bcf2f1aSMurray Stokelyused a manual checklist, compiled by 4911bcf2f1aSMurray Stokely.An Rod Grimes , 4921bcf2f1aSMurray Stokelyto produce a release. 493de26e0adSMurray StokelyApart from being incomplete, the list put a lot of specific demands on 494de26e0adSMurray Stokelyavailable file systems and was quite torturous to execute. 495de26e0adSMurray Stokely.Pp 496994c71f0SMurray StokelyAs part of the 497994c71f0SMurray Stokely.Fx 2.0 498994c71f0SMurray Stokelyrelease engineering effort, significant 499de26e0adSMurray Stokelyeffort was spent getting 500de26e0adSMurray Stokely.Pa src/release/Makefile 501de26e0adSMurray Stokelyinto a shape where it could at least automate most of the tediousness 502de26e0adSMurray Stokelyof building a release in a sterile environment. 503de26e0adSMurray Stokely.Pp 504e8423d00SNathan WhitehornFor the 505e8423d00SNathan Whitehorn.Fx 9.0 506e8423d00SNathan Whitehornrelease, 507e8423d00SNathan Whitehorn.Pa src/release/Makefile 508e8423d00SNathan Whitehornwas overhauled and the wrapper script 509e8423d00SNathan Whitehorn.Pa src/release/generate-release.sh 510e8423d00SNathan Whitehornintroduced to support the introduction of a new installer. 511e8423d00SNathan Whitehorn.Pp 512ebe27856SGlen BarberFor the 513ebe27856SGlen Barber.Fx 9.2 514ebe27856SGlen Barberrelease, 515ebe27856SGlen Barber.Pa src/release/release.sh 516ebe27856SGlen Barberwas introduced to support per-build configuration files. 517ebe27856SGlen Barber.Pa src/release/release.sh 518ebe27856SGlen Barberis heavily based on the 519ebe27856SGlen Barber.Pa src/release/generate-release.sh 520ebe27856SGlen Barberscript. 521ebe27856SGlen Barber.Pp 522594ca9baSTom RhodesAt near 1000 revisions spread over multiple branches, the 5230cd4fb92SGlen Barber.Xr svn 1 524994c71f0SMurray Stokelylog of 525994c71f0SMurray Stokely.Pa src/release/Makefile 526994c71f0SMurray Stokelycontains a vivid historical record of some 527de26e0adSMurray Stokelyof the hardships release engineers go through. 528de26e0adSMurray Stokely.Sh AUTHORS 529de26e0adSMurray Stokely.Pa src/release/Makefile 530afb33690SMurray Stokelywas originally written by 531afb33690SMurray Stokely.An -nosplit 532afb33690SMurray Stokely.An Rod Grimes , 533afb33690SMurray Stokely.An Jordan Hubbard , 534afb33690SMurray Stokelyand 535afb33690SMurray Stokely.An Poul-Henning Kamp . 536ebe27856SGlen Barber.Pp 537ebe27856SGlen BarberThis manual page was originally written by 538de26e0adSMurray Stokely.An Murray Stokely Aq murray@FreeBSD.org . 539ebe27856SGlen Barber.Pp 540ebe27856SGlen BarberIt was updated by 541ebe27856SGlen Barber.An Nathan Whitehorn Aq nwhitehorn@FreeBSD.org 542ebe27856SGlen Barberto include the 543ebe27856SGlen Barber.Fa generate-release.sh 544ebe27856SGlen Barberscript used for the 545ebe27856SGlen Barber.Fx 9.0 546ebe27856SGlen Barberrelease cycle. 547ebe27856SGlen Barber.Pp 548ebe27856SGlen BarberIt was later updated by 549ebe27856SGlen Barber.An Glen Barber Aq gjb@FreeBSD.org 550ebe27856SGlen Barberto include the 551ebe27856SGlen Barber.Fa release.sh 552ebe27856SGlen Barberscript used for the 553ebe27856SGlen Barber.Fx 9.2 554ebe27856SGlen Barberrelease cycle. 555