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*ebe27856SGlen Barber.Dd August 11, 2013 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 53*ebe27856SGlen Barbertrees. 54*ebe27856SGlen BarberFor this purpose, a script 55*ebe27856SGlen 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 74*ebe27856SGlen 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 77*ebe27856SGlen Barberenvironment. 78*ebe27856SGlen Barber.Pp 79*ebe27856SGlen BarberIf the target release build is for a different architecture or machine type, 80*ebe27856SGlen Barberthe 81*ebe27856SGlen Barber.Va TARGET 82*ebe27856SGlen Barberand 83*ebe27856SGlen Barber.Va TARGET_ARCH 84*ebe27856SGlen Barbervariables must be used. 85*ebe27856SGlen BarberSee the supported 86*ebe27856SGlen Barber.Fa release.conf 87*ebe27856SGlen Barbervariables for more information. 88*ebe27856SGlen 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 92*ebe27856SGlen 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 97*ebe27856SGlen BarberOfficial releases of 98*ebe27856SGlen Barber.Fx 99*ebe27856SGlen Barberare produced in a totally clean environment to 100e8423d00SNathan Whitehornensure consistency between the versions of the src, ports, and doc trees 101*ebe27856SGlen Barberand to avoid contamination from the host system 102*ebe27856SGlen Barber.Po such as local patches, changes 103e8423d00SNathan Whitehornto 104e8423d00SNathan Whitehorn.Xr make.conf 5 , 105*ebe27856SGlen Barberetc. 106*ebe27856SGlen Barber.Pc . 107*ebe27856SGlen BarberThis is accomplished using the wrapper script 108*ebe27856SGlen Barber.Pa src/release/release.sh . 109e8423d00SNathan Whitehorn.Pp 110*ebe27856SGlen Barber.Ic release.sh 111*ebe27856SGlen Barber.Op Fl c Ar release.conf 112e8423d00SNathan Whitehorn.Pp 113*ebe27856SGlen Barber.Ic release.sh 114*ebe27856SGlen Barberchecks out the 115*ebe27856SGlen Barber.Li src/ , 116*ebe27856SGlen Barber.Li ports/ , 117*ebe27856SGlen Barberand 118*ebe27856SGlen Barber.Li doc/ 119*ebe27856SGlen Barbertrees to 120*ebe27856SGlen Barber.Va CHROOTDIR , 121*ebe27856SGlen Barberthen calls 122*ebe27856SGlen Barber.Dq Li "make buildworld" 123*ebe27856SGlen Barberand 124e8423d00SNathan Whitehorn.Dq Li "make installworld" 125e8423d00SNathan Whitehornto generate a 126e8423d00SNathan Whitehorn.Xr chroot 8 127*ebe27856SGlen Barberenvironment. 128*ebe27856SGlen BarberNext, 129e8423d00SNathan Whitehorn.Dq Li "make release" 130*ebe27856SGlen Barberis run within the 131e8423d00SNathan Whitehorn.Xr chroot 8 132e8423d00SNathan Whitehornenvironment and places the result in 133*ebe27856SGlen Barber.Pa $CHROOTDIR/R . 134e8423d00SNathan Whitehorn.Pp 135*ebe27856SGlen BarberThe optional 136*ebe27856SGlen Barber.Fa release.conf 137*ebe27856SGlen Barberconfiguration file supports the following variables: 138*ebe27856SGlen Barber.Bl -tag -width Ev 139*ebe27856SGlen Barber.It Va CHROOTDIR 140*ebe27856SGlen BarberThe directory within which the release will be built. 141*ebe27856SGlen Barber.It Va SVNROOT 142*ebe27856SGlen BarberThe 143*ebe27856SGlen Barber.Xr svn 1 144*ebe27856SGlen Barberhost used to check out the various trees. 145*ebe27856SGlen BarberDefaults to 146*ebe27856SGlen Barber.Pa svn://svn.FreeeBSD.org . 147*ebe27856SGlen Barber.It Va SRCBRANCH 148*ebe27856SGlen BarberThe 149*ebe27856SGlen Barber.Li src/ 150*ebe27856SGlen Barberbranch to use. 151*ebe27856SGlen BarberDefaults to 152*ebe27856SGlen Barber.Va head/ . 153*ebe27856SGlen Barber.It Va DOCBRANCH 154*ebe27856SGlen BarberThe 155*ebe27856SGlen Barber.Li doc/ 156*ebe27856SGlen Barberbranch to use. 157*ebe27856SGlen BarberDefaults to 158*ebe27856SGlen Barber.Va head/ . 159*ebe27856SGlen Barber.It Va PORTBRANCH 160*ebe27856SGlen BarberThe 161*ebe27856SGlen Barber.Li ports/ 162*ebe27856SGlen Barberbranch to use. 163*ebe27856SGlen BarberDefaults to 164*ebe27856SGlen Barber.Va head/ . 165*ebe27856SGlen Barber.It Va SRCREVISION 166*ebe27856SGlen BarberThe revision of the 167*ebe27856SGlen Barber.Li src/ 168*ebe27856SGlen Barbertree to use. 169*ebe27856SGlen BarberDefaults to the current top of tree revision. 170*ebe27856SGlen Barber.It Va DOCREVISION 171*ebe27856SGlen BarberThe revision of the 172*ebe27856SGlen Barber.Li doc/ 173*ebe27856SGlen Barbertree to use. 174*ebe27856SGlen BarberDefaults to the current top of tree revision. 175*ebe27856SGlen Barber.It Va PORTREVISION 176*ebe27856SGlen BarberThe revision of the 177*ebe27856SGlen Barber.Li ports/ 178*ebe27856SGlen Barbertree to use. 179*ebe27856SGlen BarberDefaults to the current top of tree revision. 180*ebe27856SGlen Barber.It Va TARGET 181*ebe27856SGlen BarberThe target machine type for the release. 182*ebe27856SGlen BarberDefaults to the current machine type. 183*ebe27856SGlen Barber.It Va TARGET_ARCH 184*ebe27856SGlen BarberThe target machine architecture for the release. 185*ebe27856SGlen BarberDefaults to the value of 186*ebe27856SGlen Barber.Va TARGET . 187*ebe27856SGlen Barber.Pp 188*ebe27856SGlen BarberFor the supported list of 189*ebe27856SGlen Barber.Va TARGET 190*ebe27856SGlen Barberand 191*ebe27856SGlen Barber.Va TARGET_ARCH 192*ebe27856SGlen Barbercombinations, consult the output of 193*ebe27856SGlen Barber.Dq make targets 194*ebe27856SGlen Barberas documented in 195*ebe27856SGlen Barber.Xr build 7 . 196*ebe27856SGlen Barber.It Va KERNEL 197*ebe27856SGlen BarberThe target kernel configuration to use. 198*ebe27856SGlen BarberDefaults to 199*ebe27856SGlen Barber.Va GENERIC . 200*ebe27856SGlen BarberMultiple 201*ebe27856SGlen Barber.Va KERNEL 202*ebe27856SGlen Barberentries may be specified. 203*ebe27856SGlen Barber.It Va MAKE_CONF 204*ebe27856SGlen BarberThe 205*ebe27856SGlen Barber.Xr make.conf 5 206*ebe27856SGlen Barberto use for the release build. 207*ebe27856SGlen BarberDefaults to 208*ebe27856SGlen Barber.Fa /dev/null 209*ebe27856SGlen Barberto prevent polluting the release with local system changes. 210*ebe27856SGlen Barber.It Va SRC_CONF 211*ebe27856SGlen BarberThe 212*ebe27856SGlen Barber.Xr src.conf 5 213*ebe27856SGlen Barberto use for the release build. 214*ebe27856SGlen BarberDefaults to 215*ebe27856SGlen Barber.Fa /dev/null 216*ebe27856SGlen Barberto prevent polluting the release with local system changes. 217*ebe27856SGlen Barber.It Va MAKE_FLAGS 218*ebe27856SGlen BarberAdditional flags to pass to 219*ebe27856SGlen Barber.Xr make 1 . 220*ebe27856SGlen Barber.It Va WORLD_FLAGS 221*ebe27856SGlen BarberAdditional flags to pass to 222e8423d00SNathan Whitehorn.Xr make 1 223*ebe27856SGlen Barberduring the 224*ebe27856SGlen Barber.Dq buildworld 225*ebe27856SGlen Barberphase. 226*ebe27856SGlen BarberDefaults to setting the number of 227de17cbccSHiroki Sato.Xr make 1 228*ebe27856SGlen Barberjobs 229*ebe27856SGlen Barber.Pq Ar -j 230*ebe27856SGlen Barberto the number of CPUs available on the system. 231*ebe27856SGlen Barber.It Va KERNEL_FLAGS 232*ebe27856SGlen BarberAdditional flags to pass to 233*ebe27856SGlen Barber.Xr make 1 234*ebe27856SGlen Barberduring the 235*ebe27856SGlen Barber.Dq buildkernel 236*ebe27856SGlen Barberphase. 237*ebe27856SGlen BarberDefaults to setting the number of 238*ebe27856SGlen Barber.Xr make 1 239*ebe27856SGlen Barberjobs 240*ebe27856SGlen Barber.Pq Ar -j 241*ebe27856SGlen Barberto half the number of CPUs available on the system. 242*ebe27856SGlen Barber.It Va NODOC 243*ebe27856SGlen BarberSet to a non-empty value to skip the 244*ebe27856SGlen Barber.Li doc/ 245*ebe27856SGlen Barbertree checkout. 246*ebe27856SGlen BarberWhen set, 247*ebe27856SGlen Barber.Va NODOC 248*ebe27856SGlen Barberwill prevent the 249*ebe27856SGlen Barber.Fa doc.txz 250*ebe27856SGlen Barberdistribution package from being created. 251*ebe27856SGlen Barber.It Va NOPORTS 252*ebe27856SGlen BarberSet to a non-empty value to skip the 253*ebe27856SGlen Barber.Li ports/ 254*ebe27856SGlen Barbertree checkout. 255*ebe27856SGlen BarberWhen set, 256*ebe27856SGlen Barber.Va NOPORTS 257*ebe27856SGlen Barberwill prevent the 258*ebe27856SGlen Barber.Fa ports.txz 259*ebe27856SGlen Barberdistribution package from being created. 260*ebe27856SGlen BarberSetting this also sets 261*ebe27856SGlen Barber.Va NODOC . 262e8423d00SNathan Whitehorn.El 263e8423d00SNathan Whitehorn.Sh MAKEFILE TARGETS 264de26e0adSMurray StokelyThe release makefile 265994c71f0SMurray Stokely.Pq Pa src/release/Makefile 266de26e0adSMurray Stokelyis fairly abstruse. 267de26e0adSMurray StokelyMost developers will only be concerned with the 268afb33690SMurray Stokely.Cm release 269299a8b95SNathan Whitehornand 270299a8b95SNathan Whitehorn.Cm install 271299a8b95SNathan Whitehorntargets. 272994c71f0SMurray Stokely.\" XXX: Some sort of introduction to this list? All the others have one. 273e8423d00SNathan Whitehorn.Bl -tag -width ".Cm packagesystem" 274afb33690SMurray Stokely.It Cm release 275e8423d00SNathan WhitehornMeta-target to build all release media and distributions applicable to this 276299a8b95SNathan Whitehornplatform. 277299a8b95SNathan Whitehorn.It Cm install 278299a8b95SNathan WhitehornCopy all produced release media to 279299a8b95SNathan Whitehorn.Pa ${DESTDIR} . 280e8423d00SNathan Whitehorn.It Cm cdrom 281de17cbccSHiroki SatoBuilds installation CD-ROM images. 282de17cbccSHiroki SatoThis may require the 283e8423d00SNathan Whitehorn.Xr md 4 284e8423d00SNathan Whitehorn(memory disk) device driver be present in the kernel 285de17cbccSHiroki Sato(either by being compiled in or available as a module). 286de17cbccSHiroki SatoThis target produces files called 287*ebe27856SGlen Barber.Pa disc1.iso 288299a8b95SNathan Whitehornand 289299a8b95SNathan Whitehorn.Pa bootonly.iso 290e8423d00SNathan Whitehornas its output. 291e8423d00SNathan Whitehorn.It Cm memstick 292e8423d00SNathan WhitehornBuilds an installation memory stick image named 293*ebe27856SGlen Barber.Pa memstick.img . 294de17cbccSHiroki SatoNot applicable on all platforms. 295de17cbccSHiroki SatoRequires that the 296e8423d00SNathan Whitehorn.Xr md 4 297*ebe27856SGlen Barber.Pq memory disk 298*ebe27856SGlen Barberdevice driver be present in the kernel 299*ebe27856SGlen Barber.Pq either by being compiled in or available as a module . 300e8423d00SNathan Whitehorn.It Cm ftp 301e8423d00SNathan WhitehornCreates a directory named 302e8423d00SNathan Whitehorn.Pa ftp 303e8423d00SNathan Whitehorncontaining the distribution files used in network installations 304e8423d00SNathan Whitehornand suitable for upload to an FTP mirror. 305de26e0adSMurray Stokely.El 306de26e0adSMurray Stokely.Pp 307e8423d00SNathan WhitehornMajor subtargets called by targets above: 308e8423d00SNathan Whitehorn.Bl -tag -width ".Cm packagesystem" 309e8423d00SNathan Whitehorn.It Cm packagesystem 310*ebe27856SGlen BarberGenerates all the distribution archives 311*ebe27856SGlen Barber.Pq base, kernel, ports, doc 312e8423d00SNathan Whitehornapplicable on this platform. 313e8423d00SNathan Whitehorn.It Cm system 314e8423d00SNathan WhitehornBuilds a bootable installation system containing all the distribution files 315e8423d00SNathan Whitehornpackaged by the 316e8423d00SNathan Whitehorn.Cm packagesystem 317e8423d00SNathan Whitehorntarget, and suitable for imaging by the 318e8423d00SNathan Whitehorn.Cm cdrom 319e8423d00SNathan Whitehornand 320e8423d00SNathan Whitehorn.Cm memstick 321e8423d00SNathan Whitehorntargets. 322e8423d00SNathan Whitehorn.It Cm reldoc 323994c71f0SMurray StokelyBuilds the release documentation. 324994c71f0SMurray StokelyThis includes the release notes, 325*ebe27856SGlen Barberhardware guide, and installation instructions. 326*ebe27856SGlen BarberOther documentation, such as the Handbook, 327*ebe27856SGlen Barberis built during the 328e8423d00SNathan Whitehorn.Cm base.txz 329e8423d00SNathan Whitehorntarget invoked by 330e8423d00SNathan Whitehorn.Cm packagesystem . 331de26e0adSMurray Stokely.El 332de26e0adSMurray Stokely.Sh ENVIRONMENT 333de26e0adSMurray StokelyOptional variables: 334de17cbccSHiroki Sato.Bl -tag -width ".Ev TARGET_ARCH" 335de17cbccSHiroki Sato.It Ev OSRELEASE 336*ebe27856SGlen BarberOptional base name for generated media images 337*ebe27856SGlen Barber.Pq e.g., FreeBSD-9.0-RC2-amd64 . 338de17cbccSHiroki SatoDefaults to the output of 339de17cbccSHiroki Sato.Ic `uname -s`-`uname -r`-`uname -p` 340de17cbccSHiroki Satowithin the chroot. 341de17cbccSHiroki Sato.It Ev WORLDDIR 342*ebe27856SGlen BarberLocation of a directory containing the src tree. 343*ebe27856SGlen BarberBy default, the directory 344e8423d00SNathan Whitehornabove the one containing the makefile 345e8423d00SNathan Whitehorn.Pq Pa src . 346de17cbccSHiroki Sato.It Ev PORTSDIR 347*ebe27856SGlen BarberLocation of a directory containing the ports tree. 348*ebe27856SGlen BarberBy default, 349e8423d00SNathan Whitehorn.Pa /usr/ports . 350e8423d00SNathan WhitehornIf it is unset or cannot be found, ports will not be included in the release. 351de17cbccSHiroki Sato.It Ev DOCDIR 352*ebe27856SGlen BarberLocation of a directory containing the doc tree. 353*ebe27856SGlen BarberBy default, 354e8423d00SNathan Whitehorn.Pa /usr/doc . 355e8423d00SNathan WhitehornIf it is unset or cannot be found, most documentation will not be included in 356e8423d00SNathan Whitehornthe release; see 357e8423d00SNathan Whitehorn.Ev NODOC 358e8423d00SNathan Whitehornbelow. 359de17cbccSHiroki Sato.It Ev NOPORTS 360e8423d00SNathan WhitehornIf defined, the Ports Collection will be omitted from the release. 361de17cbccSHiroki Sato.It Ev NOSRC 362e8423d00SNathan WhitehornIf set, do not include system source code in the release. 363de17cbccSHiroki Sato.It Ev NODOC 3640cd4fb92SGlen BarberIf defined, the XML-based documentation from the 365de26e0adSMurray Stokely.Fx 366eee69fccSMurray StokelyDocumentation Project will not be built. 367eee69fccSMurray StokelyHowever, the 368eee69fccSMurray Stokely.Dq doc 369eee69fccSMurray Stokelydistribution will still be created with the minimal documentation set 370eee69fccSMurray Stokelyprovided in 371eee69fccSMurray Stokely.Pa src/share/doc . 372de17cbccSHiroki Sato.It Ev TARGET 37325923b97SRuslan ErmilovThe target hardware platform. 37425923b97SRuslan ErmilovThis is analogous to the 37525923b97SRuslan Ermilov.Dq Nm uname Fl m 37625923b97SRuslan Ermilovoutput. 37725923b97SRuslan ErmilovThis is necessary to cross-build some target architectures. 37825923b97SRuslan ErmilovFor example, cross-building for PC98 machines requires 379de17cbccSHiroki Sato.Ev TARGET_ARCH Ns = Ns Li i386 38025923b97SRuslan Ermilovand 381de17cbccSHiroki Sato.Ev TARGET Ns = Ns Li pc98 . 382e8423d00SNathan WhitehornIf not set, 383de17cbccSHiroki Sato.Ev TARGET 384e8423d00SNathan Whitehorndefaults to the current hardware platform. 385de17cbccSHiroki Sato.It Ev TARGET_ARCH 386e8423d00SNathan WhitehornThe target machine processor architecture. 387e8423d00SNathan WhitehornThis is analogous to the 388e8423d00SNathan Whitehorn.Dq Nm uname Fl p 389e8423d00SNathan Whitehornoutput. 390e8423d00SNathan WhitehornSet this to cross-build for a different architecture. 391e8423d00SNathan WhitehornIf not set, 392de17cbccSHiroki Sato.Ev TARGET_ARCH 393e8423d00SNathan Whitehorndefaults to the current machine architecture, unless 394de17cbccSHiroki Sato.Ev TARGET 395e8423d00SNathan Whitehornis also set, in which case it defaults to the appropriate 396e8423d00SNathan Whitehornvalue for that platform. 397e8423d00SNathan WhitehornTypically, one only needs to set 398de17cbccSHiroki Sato.Ev TARGET . 399de26e0adSMurray Stokely.El 400de26e0adSMurray Stokely.Sh FILES 40182f39c10SGlen Barber.Bl -tag -compact -width Pa 402de26e0adSMurray Stokely.It Pa /usr/doc/Makefile 403de26e0adSMurray Stokely.It Pa /usr/doc/share/mk/doc.project.mk 404de26e0adSMurray Stokely.It Pa /usr/ports/Mk/bsd.port.mk 405de26e0adSMurray Stokely.It Pa /usr/ports/Mk/bsd.sites.mk 406de26e0adSMurray Stokely.It Pa /usr/share/examples/etc/make.conf 407de26e0adSMurray Stokely.It Pa /usr/src/Makefile 408de26e0adSMurray Stokely.It Pa /usr/src/Makefile.inc1 409de26e0adSMurray Stokely.It Pa /usr/src/release/Makefile 410*ebe27856SGlen Barber.It Pa /usr/src/release/release.sh 411*ebe27856SGlen Barber.It Pa /usr/src/release/release.conf.sample 412de26e0adSMurray Stokely.El 413de26e0adSMurray Stokely.Sh EXAMPLES 414e8423d00SNathan WhitehornThe following sequence of commands can be used to build a 415e8423d00SNathan Whitehorn.Dq "-CURRENT snapshot": 416de26e0adSMurray Stokely.Bd -literal -offset indent 417de26e0adSMurray Stokelycd /usr 418e8423d00SNathan Whitehornsvn co svn://svn.freebsd.org/base/head src 419de26e0adSMurray Stokelycd src 420d408a341SNathan Whitehornmake buildworld buildkernel 421de26e0adSMurray Stokelycd release 4228ef63d0dSNathan Whitehornmake release 4238ef63d0dSNathan Whitehornmake install DESTDIR=/var/freebsd-snapshot 424de26e0adSMurray Stokely.Ed 425de26e0adSMurray Stokely.Pp 426299a8b95SNathan WhitehornAfter running these commands, all produced distribution files (tarballs 427299a8b95SNathan Whitehornfor FTP, CD-ROM images, etc.) are available in the 428299a8b95SNathan Whitehorn.Pa /var/freebsd-snapshot 429de26e0adSMurray Stokelydirectory. 430de26e0adSMurray Stokely.Pp 431994c71f0SMurray StokelyThe following sequence of commands can be used to build a 4321bcf2f1aSMurray Stokely.Dq "-CURRENT snapshot" 433e8423d00SNathan Whitehornin a clean environment, including ports and documentation: 434de26e0adSMurray Stokely.Bd -literal -offset indent 4355af5af75SGleb Smirnoffcd /usr/src/release 436*ebe27856SGlen Barbersh release.sh 437*ebe27856SGlen Barber.Ed 438*ebe27856SGlen Barber.Pp 439*ebe27856SGlen BarberOptionally, a configuration file can be used customize the release build, 440*ebe27856SGlen Barbersuch as the subversion revision to use, the branch of the subversion tree for 441*ebe27856SGlen Barber.Li src/ , 442*ebe27856SGlen Barber.Li ports/ , 443*ebe27856SGlen Barberand 444*ebe27856SGlen Barber.Li doc/ . 445*ebe27856SGlen Barber.Bd -literal -offset indent 446*ebe27856SGlen Barbercd /usr/src/release 447*ebe27856SGlen Barbersh release.sh -c $HOME/release.conf 448de26e0adSMurray Stokely.Ed 449e8423d00SNathan Whitehorn.Pp 450e8423d00SNathan WhitehornAfter running these commands, all prepared release files are available in the 451*ebe27856SGlen Barber.Pa /scratch 452e8423d00SNathan Whitehorndirectory. 453*ebe27856SGlen BarberThe target directory can be changed by specifying the 454*ebe27856SGlen Barber.Va CHROOTDIR 455*ebe27856SGlen Barbervariable in 456*ebe27856SGlen Barber.Li release.conf . 457de26e0adSMurray Stokely.Sh SEE ALSO 458de26e0adSMurray Stokely.Xr cc 1 , 459de26e0adSMurray Stokely.Xr install 1 , 460de26e0adSMurray Stokely.Xr make 1 , 461af285c09SGlen Barber.Xr svn 1 Pq Pa ports/devel/subversion , 462de26e0adSMurray Stokely.Xr uname 1 , 463afb33690SMurray Stokely.Xr md 4 , 464de26e0adSMurray Stokely.Xr make.conf 5 , 465de26e0adSMurray Stokely.Xr build 7 , 466de26e0adSMurray Stokely.Xr ports 7 , 467afb33690SMurray Stokely.Xr chroot 8 , 468f5178c4fSMurray Stokely.Xr mtree 8 , 469f5178c4fSMurray Stokely.Xr sysctl 8 470994c71f0SMurray Stokely.Rs 4711bcf2f1aSMurray Stokely.%T "FreeBSD Release Engineering" 472aa4a335bSRuslan Ermilov.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng/ 473994c71f0SMurray Stokely.Re 474994c71f0SMurray Stokely.Rs 4751bcf2f1aSMurray Stokely.%T "FreeBSD Release Engineering of Third Party Packages" 476aa4a335bSRuslan Ermilov.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/articles/releng-packages/ 477994c71f0SMurray Stokely.Re 478994c71f0SMurray Stokely.Rs 4791bcf2f1aSMurray Stokely.%T "FreeBSD Developers' Handbook" 480aa4a335bSRuslan Ermilov.%U http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/developers-handbook/ 481994c71f0SMurray Stokely.Re 482de26e0adSMurray Stokely.Sh HISTORY 483de26e0adSMurray Stokely.Fx 484de26e0adSMurray Stokely1.x 4851bcf2f1aSMurray Stokelyused a manual checklist, compiled by 4861bcf2f1aSMurray Stokely.An Rod Grimes , 4871bcf2f1aSMurray Stokelyto produce a release. 488de26e0adSMurray StokelyApart from being incomplete, the list put a lot of specific demands on 489de26e0adSMurray Stokelyavailable file systems and was quite torturous to execute. 490de26e0adSMurray Stokely.Pp 491994c71f0SMurray StokelyAs part of the 492994c71f0SMurray Stokely.Fx 2.0 493994c71f0SMurray Stokelyrelease engineering effort, significant 494de26e0adSMurray Stokelyeffort was spent getting 495de26e0adSMurray Stokely.Pa src/release/Makefile 496de26e0adSMurray Stokelyinto a shape where it could at least automate most of the tediousness 497de26e0adSMurray Stokelyof building a release in a sterile environment. 498de26e0adSMurray Stokely.Pp 499e8423d00SNathan WhitehornFor the 500e8423d00SNathan Whitehorn.Fx 9.0 501e8423d00SNathan Whitehornrelease, 502e8423d00SNathan Whitehorn.Pa src/release/Makefile 503e8423d00SNathan Whitehornwas overhauled and the wrapper script 504e8423d00SNathan Whitehorn.Pa src/release/generate-release.sh 505e8423d00SNathan Whitehornintroduced to support the introduction of a new installer. 506e8423d00SNathan Whitehorn.Pp 507*ebe27856SGlen BarberFor the 508*ebe27856SGlen Barber.Fx 9.2 509*ebe27856SGlen Barberrelease, 510*ebe27856SGlen Barber.Pa src/release/release.sh 511*ebe27856SGlen Barberwas introduced to support per-build configuration files. 512*ebe27856SGlen Barber.Pa src/release/release.sh 513*ebe27856SGlen Barberis heavily based on the 514*ebe27856SGlen Barber.Pa src/release/generate-release.sh 515*ebe27856SGlen Barberscript. 516*ebe27856SGlen Barber.Pp 517594ca9baSTom RhodesAt near 1000 revisions spread over multiple branches, the 5180cd4fb92SGlen Barber.Xr svn 1 519994c71f0SMurray Stokelylog of 520994c71f0SMurray Stokely.Pa src/release/Makefile 521994c71f0SMurray Stokelycontains a vivid historical record of some 522de26e0adSMurray Stokelyof the hardships release engineers go through. 523de26e0adSMurray Stokely.Sh AUTHORS 524de26e0adSMurray Stokely.Pa src/release/Makefile 525afb33690SMurray Stokelywas originally written by 526afb33690SMurray Stokely.An -nosplit 527afb33690SMurray Stokely.An Rod Grimes , 528afb33690SMurray Stokely.An Jordan Hubbard , 529afb33690SMurray Stokelyand 530afb33690SMurray Stokely.An Poul-Henning Kamp . 531*ebe27856SGlen Barber.Pp 532*ebe27856SGlen BarberThis manual page was originally written by 533de26e0adSMurray Stokely.An Murray Stokely Aq murray@FreeBSD.org . 534*ebe27856SGlen Barber.Pp 535*ebe27856SGlen BarberIt was updated by 536*ebe27856SGlen Barber.An Nathan Whitehorn Aq nwhitehorn@FreeBSD.org 537*ebe27856SGlen Barberto include the 538*ebe27856SGlen Barber.Fa generate-release.sh 539*ebe27856SGlen Barberscript used for the 540*ebe27856SGlen Barber.Fx 9.0 541*ebe27856SGlen Barberrelease cycle. 542*ebe27856SGlen Barber.Pp 543*ebe27856SGlen BarberIt was later updated by 544*ebe27856SGlen Barber.An Glen Barber Aq gjb@FreeBSD.org 545*ebe27856SGlen Barberto include the 546*ebe27856SGlen Barber.Fa release.sh 547*ebe27856SGlen Barberscript used for the 548*ebe27856SGlen Barber.Fx 9.2 549*ebe27856SGlen Barberrelease cycle. 550