svn commit: r259530 - in stable/9: release release/amd64 release/i386 release/scripts share/man/man7

Glen Barber gjb at FreeBSD.org
Wed Dec 18 00:07:54 UTC 2013


Author: gjb
Date: Wed Dec 18 00:07:52 2013
New Revision: 259530
URL: http://svnweb.freebsd.org/changeset/base/259530

Log:
  MFC r254224, r254294, r254328, r258307, r258309, r258310, r258314,
      r258317, r258319, r258320, r258669, r258786, r258853, r258949,
      r259079, r259246:
  
  r254224:
    Update the wrapper script to 'release.sh', as used by the
    FreeBSD Release Engineering Team as of 9.2-RELEASE.
  
    Document that a cross-build release is possible by setting
    the TARGET and TARGET_ARCH variables.
  
    Include an example of using release.sh with and without the
    optional configuration file.
  
    Document the supported release.sh configuration file variables.
  
    Update the 'cdrom' target output file to disc1.iso.
  
    Update the 'memstick' target output file to memstick.img.
  
    Add attributions for the last major updates to this manual page.
  
    Fix some mdoc(7) style nits.
  
  r254294:
    Remove the defaults for TARGET/TARGET_ARCH.
  
    Note that WORLD_FLAGS and KERNEL_FLAGS set the number of
    make(1) jobs only on SMP-capable systems.
  
  r254328:
    Remove the {SRC,DOC,PORT}REVISION variables from release(7), and
    update the default {SRC,DOC,PORT}BRANCH defaults.
  
  r258307:
    Add a script and configuration files to fetch pre-built packages
    from pkg.FreeBSD.org for inclusion on release medium (dvd1.iso).
  
    The script sources ${.CURDIR}/${TARGET}/pkg-stage.conf, which sets
    several environment variables, such as the pkg(8) ABI, PACKAGESITE,
    PKG_DBDIR, and PKG_CACHEDIR.  PKG_CACHEDIR is set to the directory
    on the release medium used by bsdconfig(8) (/packages/${ABI}).  ABI
    is determined by output of 'make -C /usr/src/release -V REVISION'.
    See pkg.conf(5) for descripton on other variables set here.
  
    The list of packages to include are set within the configuration
    file.
  
    The script and configuration files are intended to be run by the
    'make dvd' target within the release directory, and assume the
    release is built within a chroot environment (such as by using
    release.sh).
  
  r258309:
    Set the PKG_CACHEDIR directory to 'dvd/' instead of 'release/'
    in preparation of adding a 'dvd1.iso' target.
  
  r258310:
    Add the 'dvd1.iso' target.  This mimics the 'release.iso' target,
    with the additional step of fetching packages for inclusion on the
    dvd image.
  
    The 'pkg-stage' target is used to run 'scripts/pkg-stage.sh' if
    the '${TARGET}/pkg-stage.conf' configuration file exists (currently
    only amd64 and i386).
  
    Allow dvd1.iso to be skipped if NODVD=1.
  
  r258314:
    Fix how ABI is evaluated so it matches more than a dot-zero
    case.
  
  r258317:
    Document the 'dvdrom' target.
  
  r258319:
    Remove WITHOUT_PROFILE=1 for the dvd1.iso medium.
  
  r258320:
    Simplify PKG_ABI for pkg-stage.sh.
  
  r258669:
    Document the dvdrom target and NODVD variable.
  
  r258786:
    Move OPTIONS_UNSET outside of the PBUILD_FLAGS variable, otherwise
    the textproc/docproj port build fails.
  
  r258853:
    Turn off the dvdrom target by default.  dvd1.iso is now built by
    specifying 'WITH_DVD=1' during 'make release'.
  
  r258949:
    Ensure WITH_DVD is not empty to prevent 'WITH_DVD= ' from evaluating
    to true.
  
  r259079:
    Add WITH_DVD to RELEASE_RMAKEFLAGS, otherwise it is not actually
    passed to 'make release'.
  
  r259246:
    Prevent release build errors found during snapshot builds where if
    NOPORTS=1, pkg-stage.sh cannot build the ports-mgmt/pkg port if
    WITH_DVD=1.
  
  Tested against:	stable/9 at r259512
  Sponsored by:	The FreeBSD Foundation

Added:
  stable/9/release/amd64/pkg-stage.conf
     - copied, changed from r258307, head/release/amd64/pkg-stage.conf
  stable/9/release/i386/pkg-stage.conf
     - copied, changed from r258307, head/release/i386/pkg-stage.conf
  stable/9/release/scripts/pkg-stage.sh
     - copied, changed from r258307, head/release/scripts/pkg-stage.sh
Modified:
  stable/9/release/Makefile
  stable/9/release/release.conf.sample
  stable/9/release/release.sh
  stable/9/share/man/man7/release.7
Directory Properties:
  stable/9/release/   (props changed)
  stable/9/share/man/man7/   (props changed)

Modified: stable/9/release/Makefile
==============================================================================
--- stable/9/release/Makefile	Tue Dec 17 23:31:51 2013	(r259529)
+++ stable/9/release/Makefile	Wed Dec 18 00:07:52 2013	(r259530)
@@ -4,6 +4,7 @@
 # 
 # User-driven targets:
 #  cdrom: Builds release CD-ROM media (disc1.iso)
+#  dvdrom: Builds release DVD-ROM media (dvd1.iso)
 #  memstick: Builds memory stick image (memstick.img)
 #  mini-memstick: Builds minimal memory stick image (mini-memstick.img)
 #  ftp: Sets up FTP distribution area (ftp)
@@ -18,6 +19,7 @@
 #  NOPORTS:  if set, do not distribute ports tree
 #  NOSRC:    if set, do not distribute source tree
 #  NODOC:    if set, do not generate release documentation
+#  WITH_DVD: if set, generate dvd1.iso
 #  TARGET/TARGET_ARCH: architecture of built release 
 #
 
@@ -26,11 +28,15 @@ PORTSDIR?=	/usr/ports
 DOCDIR?=	/usr/doc
 RELNOTES_LANG?= en_US.ISO8859-1
 
-TARGET?=	${MACHINE}
+.if !defined(TARGET) || empty(TARGET)
+TARGET=		${MACHINE}
+.endif
+.if !defined(TARGET_ARCH) || empty(TARGET_ARCH)
 .if ${TARGET} == ${MACHINE}
-TARGET_ARCH?=	${MACHINE_ARCH}
+TARGET_ARCH=	${MACHINE_ARCH}
 .else
-TARGET_ARCH?=	${TARGET}
+TARGET_ARCH=	${TARGET}
+.endif
 .endif
 IMAKE=		${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}
 DISTDIR=	dist
@@ -72,6 +78,10 @@ IMAGES=
 .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
 RELEASE_TARGETS+= cdrom
 IMAGES+=	disc1.iso bootonly.iso
+. if defined(WITH_DVD) && !empty(WITH_DVD)
+RELEASE_TARGETS+= dvdrom
+IMAGES+=	dvd1.iso
+. endif
 .endif
 .if exists(${.CURDIR}/${TARGET}/make-memstick.sh)
 RELEASE_TARGETS+= memstick.img
@@ -80,7 +90,12 @@ IMAGES+=	memstick.img
 IMAGES+=	mini-memstick.img
 .endif
 
+CLEANFILES=	packagesystem *.txz MANIFEST system ${IMAGES}
+CLEANDIRS=	dist ftp release bootonly dvd
+beforeclean:
+	chflags -R noschg .
 .include <bsd.obj.mk>
+clean: beforeclean
 
 base.txz:
 	mkdir -p ${DISTDIR}
@@ -165,6 +180,25 @@ bootonly: packagesystem
 	echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf
 	cp ${.CURDIR}/rc.local bootonly/etc
 
+dvd:
+# Install system
+	mkdir -p ${.TARGET}
+	cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \
+		DESTDIR=${.OBJDIR}/${.TARGET} WITHOUT_RESCUE=1 WITHOUT_KERNEL_SYMBOLS=1
+# Copy distfiles
+	mkdir -p ${.TARGET}/usr/freebsd-dist
+	cp *.txz MANIFEST ${.TARGET}/usr/freebsd-dist
+# Copy documentation, if generated
+.if !defined(NODOC)
+	cp reldoc/* ${.TARGET}
+.endif
+# Set up installation environment
+	ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf
+	echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf
+	echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf
+	cp ${.CURDIR}/rc.local ${.TARGET}/etc
+	touch ${.TARGET}
+
 release/cdrom.inf: system
 	echo "CD_VERSION = ${REVISION}-${BRANCH}" > ${.TARGET}
 	echo "CD_VOLUME = 1" >> ${.TARGET}
@@ -173,6 +207,9 @@ release.iso: disc1.iso
 disc1.iso: system release/cdrom.inf
 	sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} release
 
+dvd1.iso: dvd pkg-stage
+	sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b FreeBSD_Install ${.TARGET} dvd
+
 bootonly/cdrom.inf: bootonly
 	echo "CD_VERSION = ${REVISION}-${BRANCH}" > ${.TARGET}
 	echo "CD_VOLUME = 1" >> ${.TARGET}
@@ -192,7 +229,14 @@ packagesystem: base.txz kernel.txz ${EXT
 	sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST
 	touch ${.TARGET}
 
+pkg-stage:
+.if(exists(${.CURDIR}/${TARGET}/pkg-stage.conf))
+	sh ${.CURDIR}/scripts/pkg-stage.sh ${.CURDIR}/${TARGET}/pkg-stage.conf \
+		${REVISION}
+.endif
+
 cdrom: disc1.iso bootonly.iso
+dvdrom: dvd1.iso
 ftp: packagesystem
 	rm -rf ftp
 	mkdir -p ftp
@@ -202,15 +246,6 @@ release:
 	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj
 	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS}
 
-clean:
-	chflags -R noschg .
-	rm -rf dist ftp
-	rm -f packagesystem
-	rm -f *.txz MANIFEST
-	rm -f system
-	rm -rf release bootonly
-	rm -f disc1.iso bootonly.iso memstick.img
-
 install:
 .if defined(DESTDIR) && !empty(DESTDIR)
 	mkdir -p ${DESTDIR}

Copied and modified: stable/9/release/amd64/pkg-stage.conf (from r258307, head/release/amd64/pkg-stage.conf)
==============================================================================
--- head/release/amd64/pkg-stage.conf	Mon Nov 18 15:22:55 2013	(r258307, copy source)
+++ stable/9/release/amd64/pkg-stage.conf	Wed Dec 18 00:07:52 2013	(r259530)
@@ -3,14 +3,14 @@
 # $FreeBSD$
 #
 
-export PKG_ABI="freebsd:$(echo ${REVISION} | tr -d '.0'):x86:64"
+export PKG_ABI="freebsd:${REVISION%.[0-9]*}:x86:64"
 export ASSUME_ALWAYS_YES=1
 export __PKG_CONF="/etc/pkg/FreeBSD.conf"
 export PACKAGESITE="http://pkg.FreeBSD.org/${PKG_ABI}/latest"
 export MIRROR_TYPE="SRV"
 export REPO_AUTOUPDATE="NO"
 export PKG_DBDIR="/tmp/pkg"
-export PKG_CACHEDIR="release/packages/${PKG_ABI}"
+export PKG_CACHEDIR="dvd/packages/${PKG_ABI}"
 export PERMISSIVE="YES"
 export PKGCMD="/usr/sbin/pkg -d -C ${__PKG_CONF}"
 

Copied and modified: stable/9/release/i386/pkg-stage.conf (from r258307, head/release/i386/pkg-stage.conf)
==============================================================================
--- head/release/i386/pkg-stage.conf	Mon Nov 18 15:22:55 2013	(r258307, copy source)
+++ stable/9/release/i386/pkg-stage.conf	Wed Dec 18 00:07:52 2013	(r259530)
@@ -3,14 +3,14 @@
 # $FreeBSD$
 #
 
-export PKG_ABI="freebsd:$(echo ${REVISION} | tr -d '.0'):x86:32"
+export PKG_ABI="freebsd:${REVISION%.[0-9]*}:x86:32"
 export ASSUME_ALWAYS_YES=1
 export __PKG_CONF="/etc/pkg/FreeBSD.conf"
 export PACKAGESITE="http://pkg.FreeBSD.org/${PKG_ABI}/latest"
 export MIRROR_TYPE="SRV"
 export REPO_AUTOUPDATE="NO"
 export PKG_DBDIR="/tmp/pkg"
-export PKG_CACHEDIR="release/packages/${PKG_ABI}"
+export PKG_CACHEDIR="dvd/packages/${PKG_ABI}"
 export PERMISSIVE="YES"
 export PKGCMD="/usr/sbin/pkg -d -C ${__PKG_CONF}"
 

Modified: stable/9/release/release.conf.sample
==============================================================================
--- stable/9/release/release.conf.sample	Tue Dec 17 23:31:51 2013	(r259529)
+++ stable/9/release/release.conf.sample	Wed Dec 18 00:07:52 2013	(r259530)
@@ -44,3 +44,4 @@ PORTREVISION="-rHEAD"
 #NODOC=
 #NOPORTS=
 #RELSTRING=
+#WITH_DVD=

Modified: stable/9/release/release.sh
==============================================================================
--- stable/9/release/release.sh	Tue Dec 17 23:31:51 2013	(r259529)
+++ stable/9/release/release.sh	Wed Dec 18 00:07:52 2013	(r259530)
@@ -78,6 +78,9 @@ TARGET_ARCH="${TARGET}"
 NODOC=
 NOPORTS=
 
+# Set to non-empty value to build dvd1.iso as part of the release.
+WITH_DVD=
+
 get_rev_branch () {
 	# Set up the OSVERSION, BRANCH, and REVISION based on the src/ tree
 	# checked out.
@@ -142,7 +145,7 @@ CHROOT_DMAKEFLAGS="${CONF_FILES}"
 RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}"
 RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}"
 RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \
-	${DOCPORTS}"
+	${DOCPORTS} WITH_DVD=${WITH_DVD}"
 
 # Force src checkout if configured
 FORCE_SRC_KEY=
@@ -174,6 +177,7 @@ fi
 
 get_rev_branch
 
+cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
 cd ${CHROOTDIR}/usr/src
 make ${CHROOT_WMAKEFLAGS} buildworld
 make ${CHROOT_IMAKEFLAGS} installworld DESTDIR=${CHROOTDIR}
@@ -190,9 +194,9 @@ build_doc_ports() {
 	_OSVERSION=$(sysctl -n kern.osreldate)
 	if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then
 		PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes"
-		PBUILD_FLAGS="${PBUILD_FLAGS} OPTIONS_UNSET='FOP IGOR'"
+		PBUILD_FLAGS="${PBUILD_FLAGS}"
 		chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \
-			${PBUILD_FLAGS} install clean distclean
+			${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean
 	fi
 }
 
@@ -208,7 +212,6 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CO
 fi
 
 if [ -d ${CHROOTDIR}/usr/ports ]; then
-	cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
 	build_doc_ports ${CHROOTDIR}
 fi
 

Copied and modified: stable/9/release/scripts/pkg-stage.sh (from r258307, head/release/scripts/pkg-stage.sh)
==============================================================================
--- head/release/scripts/pkg-stage.sh	Mon Nov 18 15:22:55 2013	(r258307, copy source)
+++ stable/9/release/scripts/pkg-stage.sh	Wed Dec 18 00:07:52 2013	(r259530)
@@ -24,8 +24,13 @@ fi
 REVISION="${2}"
 . "${1}" || exit 1
 
+# If NOPORTS is set for the release, do not attempt to build pkg(8).
+if [ ! -f /usr/ports/Makefile ]; then
+	exit 0
+fi
+
 if [ ! -x /usr/local/sbin/pkg ]; then
-	/usr/sbin/pkg bootstrap	
+	/usr/bin/make -C /usr/ports/ports-mgmt/pkg install clean
 fi
 
 /bin/mkdir -p ${PKG_CACHEDIR}

Modified: stable/9/share/man/man7/release.7
==============================================================================
--- stable/9/share/man/man7/release.7	Tue Dec 17 23:31:51 2013	(r259529)
+++ stable/9/share/man/man7/release.7	Wed Dec 18 00:07:52 2013	(r259530)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd November 7, 2013
+.Dd December 2, 2013
 .Dt RELEASE 7
 .Os
 .Sh NAME
@@ -50,8 +50,9 @@ For some users, it may be desirable to p
 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
+trees.
+For this purpose, a script
+.Pq Pa src/release/release.sh
 is provided to automate these checkouts and then execute
 .Dq Li "make release"
 in a clean
@@ -70,72 +71,180 @@ and
 .Dq Li "make buildkernel" .
 This is necessary to provide the object files for the release or, when
 using
-.Pa generate-release.sh ,
+.Pa release.sh ,
 so that the object files for a complete system can be installed into a clean
 .Xr chroot 8
-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).
+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
 The release procedure on some architectures may also require that the
 .Xr md 4
 (memory disk) device driver be present in the kernel
-(either by being compiled in or available as a module).
+.Pq either by being compiled in or available as a module .
 .Pp
 This document does not cover source code management, quality
 assurance, or other aspects of the release engineering process.
 .Sh CLEAN RELEASE GENERATION
-Official releases of FreeBSD are produced in a totally clean environment to
+Official releases of
+.Fx
+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
+and to avoid contamination from the host system
+.Po such as 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
+etc.
+.Pc .
+This is accomplished using the wrapper script
+.Pa src/release/release.sh .
+.Pp
+.Ic release.sh
+.Op Fl c Ar release.conf
+.Pp
+.Ic release.sh
+checks out the
+.Li src/ ,
+.Li ports/ ,
+and
+.Li doc/
+trees to
+.Va CHROOTDIR ,
+then calls
+.Dq Li "make buildworld"
+and
 .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 .
-Once the various source trees have been obtained, it executes
+environment.
+Next,
 .Dq Li "make release"
-within the
+is run 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.
+.Pa $CHROOTDIR/R .
 .Pp
-Environment variables:
-.Bl -tag -width ".Cm MAKE_FLAGS"
-.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, doc, and ports repositories.
+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.
+.It Va SVNROOT
+The
+.Xr svn 1
+host used to check out the various trees.
 Defaults to
-.Pa svn://svn.freebsd.org/base
-for the source tree,
-.Pa svn://svn.freebsd.org/ports/head
-for the Ports Collection, and
-.Pa svn://svn.freebsd.org/doc/head
-for the Documentation Project source.
-.It Ev RELSTRING
-Optional base name for generated media images (e.g. FreeBSD-9.0-RC2-amd64).
-Defaults to the output of
-.Ic `uname -s`-`uname -r`-`uname -p`
-within the chroot.
+.Pa svn://svn.FreeeBSD.org .
+.It Va SRCBRANCH
+The
+.Li src/
+branch to use.
+Defaults to
+.Va head/@rHEAD .
+.It Va DOCBRANCH
+The
+.Li doc/
+branch to use.
+Defaults to
+.Va head/@rHEAD .
+.It Va PORTBRANCH
+The
+.Li ports/
+branch to use.
+Defaults to
+.Va head/@rHEAD .
+.It Va TARGET
+The target machine type for cross-building a release.
+.It Va TARGET_ARCH
+The target machine architecture for cross-building a release.
+.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.
+Defaults to
+.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.
+Defaults to
+.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
+to the number of CPUs available on a SMP-capable system.
+.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
+to half the number of CPUs available on a SMP-capable system.
+.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 .
+.It Va WITH_DVD
+Set to a non-empty value to include the
+.Cm dvdrom
+target.
 .El
 .Sh MAKEFILE TARGETS
 The release makefile
@@ -164,17 +273,27 @@ and possibly that the
 (memory disk) device driver be present in the kernel
 (either by being compiled in or available as a module). This target
 produces files called
-.Pa release.iso
+.Pa disc1.iso
 and
 .Pa bootonly.iso
 as its output.
+.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.
 .It Cm memstick
 Builds an installation memory stick image named
-.Pa memstick .
+.Pa memstick.img .
 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).
+.Pq memory disk
+device driver be present in the kernel
+.Pq either by being compiled in or available as a module .
 .It Cm mini-memstick
 Similar to
 .Cm memstick ,
@@ -190,39 +309,51 @@ and suitable for upload to an FTP mirror
 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)
+Generates all the distribution archives
+.Pq 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
+.Cm cdrom ,
+.Cm dvdrom
 and
 .Cm memstick
 targets.
 .It Cm reldoc
 Builds the release documentation.
 This includes the release notes,
-hardware guide, and installation instructions. Other documentation (e.g.
-the Handbook) is built during the
+hardware guide, and installation instructions.
+Other documentation, such as the Handbook,
+is built during the
 .Cm base.txz
 target invoked by
 .Cm packagesystem.
 .El
 .Sh ENVIRONMENT
 Optional variables:
-.Bl -tag -width ".Va TARGET_ARCH"
-.It Va WORLDDIR
-Location of a directory containing the src tree. By default, the directory
+.Bl -tag -width ".Ev TARGET_ARCH"
+.It Ev OSRELEASE
+Optional base name for generated media images
+.Pq e.g., FreeBSD-9.0-RC2-amd64 .
+Defaults to the output of
+.Ic `uname -s`-`uname -r`-`uname -p`
+within the chroot.
+.It Ev 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,
+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,
+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
@@ -279,7 +410,8 @@ Typically, one only needs to set
 .It Pa /usr/src/Makefile
 .It Pa /usr/src/Makefile.inc1
 .It Pa /usr/src/release/Makefile
-.It Pa /usr/src/release/generate-release.sh
+.It Pa /usr/src/release/release.sh
+.It Pa /usr/src/release/release.conf.sample
 .El
 .Sh EXAMPLES
 The following sequence of commands can be used to build a
@@ -304,13 +436,27 @@ The following sequence of commands can b
 in a clean environment, including ports and documentation:
 .Bd -literal -offset indent
 cd /usr/src/release
-export SVNROOT=svn://svn.freebsd.org/base
-sh generate-release.sh head /local3/release
+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
 .Ed
 .Pp
 After running these commands, all prepared release files are available in the
-.Pa /local3/release/R
+.Pa /scratch
 directory.
+The target directory can be changed by specifying the
+.Va CHROOTDIR
+variable in
+.Li release.conf .
 .Sh SEE ALSO
 .Xr cc 1 ,
 .Xr install 1 ,
@@ -361,6 +507,16 @@ was overhauled and the wrapper script
 .Pa src/release/generate-release.sh
 introduced to support the introduction of a new installer.
 .Pp
+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
 At near 1000 revisions spread over multiple branches, the
 .Xr svn 1
 log of
@@ -375,5 +531,22 @@ was originally written by
 .An Jordan Hubbard ,
 and
 .An Poul-Henning Kamp .
-This manual page was written by
+.Pp
+This manual page was originally written by
 .An Murray Stokely Aq murray at FreeBSD.org .
+.Pp
+It was updated by
+.An Nathan Whitehorn Aq nwhitehorn at 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 at FreeBSD.org
+to include the
+.Fa release.sh
+script used for the
+.Fx 9.2
+release cycle.


More information about the svn-src-all mailing list