Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2014 19:37:12 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r264623 - in user/cperciva/freebsd-update-build/scripts: 10.0-RELEASE 10.0-RELEASE/i386 8.0-RELEASE 8.4-RELEASE 8.4-RELEASE/i386 9.0-RELEASE 9.1-RELEASE 9.2-RELEASE 9.2-RELEASE/i386
Message-ID:  <201404171937.s3HJbCmD010978@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Thu Apr 17 19:37:12 2014
New Revision: 264623
URL: http://svnweb.freebsd.org/changeset/base/264623

Log:
  Refresh with update builder (with iso location removed).

Added:
  user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/
  user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/build.subr
  user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/i386/
  user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/i386/build.conf   (contents, props changed)
  user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/
  user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/build.subr
  user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/i386/
  user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/i386/build.conf   (contents, props changed)
  user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/
  user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/build.subr
  user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/i386/
  user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/i386/build.conf   (contents, props changed)
Modified:
  user/cperciva/freebsd-update-build/scripts/8.0-RELEASE/build.subr
  user/cperciva/freebsd-update-build/scripts/9.0-RELEASE/build.subr
  user/cperciva/freebsd-update-build/scripts/9.1-RELEASE/build.subr

Added: user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/build.subr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/build.subr	Thu Apr 17 19:37:12 2014	(r264623)
@@ -0,0 +1,199 @@
+# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0.
+
+# Download and verify a release ISO image.
+fetchiso () {
+	log "Starting fetch"
+
+	# Figure out where the disc1 ISO image is
+	RELNUM=${REL%-*}
+#	ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso
+	ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso
+
+	# Fetch the ISO image.  We consider the ISO image to be
+	# the One True Release and don't look at the files used
+	# for FTP installs.  The FreeBSD 4.7-RELEASE ISO and FTP
+	# files were not identical, but this should never happen
+	# again.
+	fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1
+
+	log "Verifying dvd1 hash"
+
+	# Check that the downloaded ISO has the correct hash.
+	if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then
+		echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash."
+		rm ${WORKDIR}/iso.img
+		return 1
+	fi
+}
+
+# Extract the released trees and, if appropriate, construct a world (base
+# plus source code) in which to perform builds.
+extractiso () {
+	# Create and mount a md(4) attached to the ISO image.
+	ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n`
+	mkdir -p ${WORKDIR}/iso
+	mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso
+
+	# Extract the various components into different directories
+	log "Extracting components"
+	for C in ${WORLDPARTS}; do
+		mkdir -p ${WORKDIR}/release/R/trees/world/${C}
+		cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz |
+		    tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C}
+	done
+	for C in ${KERNELPARTS}; do
+		mkdir -p ${WORKDIR}/release/R/trees/kernel/${C}
+		cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz |
+		    tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C}
+	done
+	for C in ${SOURCEPARTS}; do
+		mkdir -p ${WORKDIR}/release/R/trees/src/${C}
+		cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz |
+		    tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C}
+	done
+
+	# If the release ISO we're handling belongs to the platform
+	# we're running right now, create a world image for future use.
+	# XXX delphij if [ ${TARGET} = ${HOSTPLATFORM} ]; then
+		log "Constructing world+src image"
+
+		# Create directory for world
+		mkdir ${WORKDIR}/world/
+
+		# Extract world and source distributions
+		for C in ${WORLDPARTS}; do
+			cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz |
+			    tar -xpzf - -C ${WORKDIR}/world/
+		done
+		for C in ${SOURCEPARTS}; do
+			cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz |
+			    tar -xpzf - -C ${WORKDIR}/world/
+		done
+
+		# build a single tarball of them.
+		tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world .
+
+		# clean up
+		nuke world
+	# XXX delphij fi
+
+	# Unmount and detach the ISO image md(4).
+	umount ${WORKDIR}/iso
+	rmdir ${WORKDIR}/iso
+	mdconfig -d -u ${ISOMD}
+}
+
+# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2
+buildworld () {
+	# We need a devfs inside the jail.  Note that we are using a
+	# jail here in order to keep the environment as "clean" as
+	# possible, not for security reasons; we assume that the
+	# original source code plus patches we add personally will
+	# not do anything evil.
+	mount -t devfs devfs ${WORKDIR}/$1/dev
+
+	# We need to be able to set file flags
+	sysctl security.jail.chflags_allowed=1 >/dev/null
+
+	# Build stuff.
+	jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3			\
+	    /usr/bin/env -i PATH=${PATH} RELP=${RELP}			\
+		BRANCH_OVERRIDE=$2 \
+		TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}		\
+	    /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log
+		# Function for logging what we're doing
+		log () {
+			echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2
+		}
+
+		# Build the world
+		log "Building world"
+		cd /usr/src &&
+		    make buildworld -j17 2>&1
+
+		# Build and kernel
+		log "Building kernel"
+		cd /usr/src &&
+		    make buildkernel -j17 2>&1
+
+		# Build and install release images
+		log "Building release"
+		cd /usr/src/release &&
+		    make release NODVD= 2>&1 &&
+		    make install NODVD= DESTDIR=/R 2>&1
+	EOF
+
+	# Put all the components into the right places.
+	log "Moving components into staging area"
+	jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3			\
+	    /usr/bin/env -i PATH=${PATH}				\
+		WORLDPARTS="${WORLDPARTS}"				\
+		KERNELPARTS="${KERNELPARTS}"				\
+		SOURCEPARTS="${SOURCEPARTS}"				\
+	    /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log
+		# Create area for uncompressed components
+		mkdir -p /R/trees
+
+		# Move world components into place
+		for C in ${WORLDPARTS}; do
+			mkdir -p /R/trees/world/${C}
+			cat /R/ftp/${C}.txz |
+			    tar -xpzf - -C /R/trees/world/${C}
+		done
+
+		# Move kernel components into place
+		for C in ${KERNELPARTS}; do
+			mkdir -p /R/trees/kernel/${C}
+			cat /R/ftp/${C}.txz |
+			    tar -xpzf - -C /R/trees/kernel/${C}
+		done
+
+		# Extract src components into place
+		for C in ${SOURCEPARTS}; do
+			mkdir -p /R/trees/src/${C}
+			cat /R/ftp/${C}.txz |
+			    tar -xpzf - -C /R/trees/src/${C}
+		done
+	EOF
+
+	# Get rid of the devfs we no longer need.
+	umount ${WORKDIR}/$1/dev
+}
+
+# Perform a build in ${WORKDIR}/$1, but with the date set 400 days
+# into the future.  Turn off NTP before we change the date and
+# turn it back on afterwards.
+futurebuildworld () {
+	# Turn off ntpd if necessary
+	if /etc/rc.d/ntpd status |
+	    grep -q 'is running'; then
+		ntpd_was_running=1
+		log "Turning off NTP"
+		/etc/rc.d/ntpd stop >/dev/null
+	else
+		ntpd_was_running=0
+	fi
+
+	date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null
+	buildworld $1 FUTUREBUILD
+	date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null
+
+	# Turn ntpd back on, if appropriate
+	if [ ${ntpd_was_running} = 1 ]; then
+		log "Turning NTP back on"
+		/etc/rc.d/ntpd start >/dev/null
+	fi
+}
+
+# Add extra docs to ${WORKDIR}/$1
+addextradocs () {
+	log "Extracting extra docs"
+
+	# 8.0 doesn't have any extra docs
+}
+
+# Fixup: the "kernel" kernel is really the "generic" kernel.
+indexpublish () {
+	sed -E 's,kernel\|kernel,kernel|generic,'
+}               
+

Added: user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/i386/build.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/scripts/10.0-RELEASE/i386/build.conf	Thu Apr 17 19:37:12 2014	(r264623)
@@ -0,0 +1,10 @@
+# SHA256 hash of disc1.iso image.
+export RELH=2c09643b3f79c703e424c03408882369025cec655c24a6d81ee073081ee75ebc
+
+# Components of the world, source, and kernels
+export WORLDPARTS="base doc games"
+export SOURCEPARTS="src"
+export KERNELPARTS="kernel"
+
+# EOL date
+export EOL=1422748799

Modified: user/cperciva/freebsd-update-build/scripts/8.0-RELEASE/build.subr
==============================================================================
--- user/cperciva/freebsd-update-build/scripts/8.0-RELEASE/build.subr	Thu Apr 17 19:31:09 2014	(r264622)
+++ user/cperciva/freebsd-update-build/scripts/8.0-RELEASE/build.subr	Thu Apr 17 19:37:12 2014	(r264623)
@@ -4,3 +4,65 @@ addextradocs () {
 
 	# 8.0 doesn't have any extra docs
 }
+
+# Extract the released trees and, if appropriate, construct a world (base
+# plus source code) in which to perform builds.
+extractiso () {
+	# Create and mount a md(4) attached to the ISO image.
+	ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n`
+	mkdir -p ${WORKDIR}/iso
+	mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso
+
+	# Extract the various components into different directories
+	log "Extracting components"
+	for C in ${WORLDPARTS}; do
+		mkdir -p ${WORKDIR}/release/R/trees/world/${C}
+		cat ${WORKDIR}/iso/${REL}/${C}/${C}.?? |
+		    tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C}
+	done
+	for C in ${KERNELPARTS}; do
+		mkdir -p ${WORKDIR}/release/R/trees/kernel/${C}
+		cat ${WORKDIR}/iso/${REL}/kernels/${C}.?? |
+		    tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C}
+	done
+	for C in ${SOURCEPARTS}; do
+		mkdir -p ${WORKDIR}/release/R/trees/src/${C}
+		cat ${WORKDIR}/iso/${REL}/src/s${C}.?? |
+		    tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C}
+	done
+
+	# If the release ISO we're handling belongs to the platform
+	# we're running right now, create a world image for future use.
+	if [ ${TARGET} = ${HOSTPLATFORM} ]; then
+		log "Constructing world+src image"
+
+		# Create directory for world
+		mkdir ${WORKDIR}/world/
+
+		# Extract world and source distributions
+		for C in ${WORLDPARTS}; do
+			cat ${WORKDIR}/iso/${REL}/${C}/${C}.?? |
+			    tar -xpzf - -C ${WORKDIR}/world/
+		done
+		for C in ${SOURCEPARTS}; do
+			cat ${WORKDIR}/iso/${REL}/src/s${C}.?? |
+			    tar -xpzf - -C ${WORKDIR}/world/usr/src/
+		done
+
+		# Grab the 7.x version of /bin/ln -- necessary to make
+		# buildworld work on a 7.x kernel which lacks linkat().
+		tar -cf- /bin/ln |
+		    tar -xpf- -C ${WORKDIR}/world/
+
+		# build a single tarball of them.
+		tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world .
+
+		# clean up
+		nuke world
+	fi
+
+	# Unmount and detach the ISO image md(4).
+	umount ${WORKDIR}/iso
+	rmdir ${WORKDIR}/iso
+	mdconfig -d -u ${ISOMD}
+}

Added: user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/build.subr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/build.subr	Thu Apr 17 19:37:12 2014	(r264623)
@@ -0,0 +1,6 @@
+# Add extra docs to ${WORKDIR}/$1
+addextradocs () {
+	log "Extracting extra docs"
+
+	# 8.0 doesn't have any extra docs
+}

Added: user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/i386/build.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/scripts/8.4-RELEASE/i386/build.conf	Thu Apr 17 19:37:12 2014	(r264623)
@@ -0,0 +1,13 @@
+# SHA256 hash of RELEASE disc1.iso image.
+export RELH=73ecc5ba0c36e7682c4862e7351d385e2e07bc97a09f9dff326d3cc1ec690cf8
+
+# Components of the world, source, and kernels
+export WORLDPARTS="base catpages dict doc games info manpages proflibs"
+export SOURCEPARTS="base bin cddl contrib crypto etc games gnu	\
+		include	krb5 lib libexec release rescue sbin secure	\
+		share sys tools	ubin usbin"
+export KERNELPARTS="generic"
+
+# EOL date
+export EOL=1435708799
+

Modified: user/cperciva/freebsd-update-build/scripts/9.0-RELEASE/build.subr
==============================================================================
--- user/cperciva/freebsd-update-build/scripts/9.0-RELEASE/build.subr	Thu Apr 17 19:31:09 2014	(r264622)
+++ user/cperciva/freebsd-update-build/scripts/9.0-RELEASE/build.subr	Thu Apr 17 19:37:12 2014	(r264623)
@@ -98,7 +98,7 @@ buildworld () {
 	# Build stuff.
 	jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3			\
 	    /usr/bin/env -i PATH=${PATH} RELP=${RELP}			\
-		BRANCH_OVERRIDE=$2 JFLAG=${JFLAG}			\
+		BRANCH_OVERRIDE=$2					\
 		TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}		\
 	    /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log
 		# Function for logging what we're doing
@@ -109,12 +109,12 @@ buildworld () {
 		# Build the world
 		log "Building world"
 		cd /usr/src &&
-		    make buildworld ${JFLAG} 2>&1
+		    make buildworld -j17 2>&1
 
 		# Build and kernel
 		log "Building kernel"
 		cd /usr/src &&
-		    make buildkernel ${JFLAG} 2>&1
+		    make buildkernel -j17 2>&1
 
 		# Build and install release images
 		log "Building release"

Modified: user/cperciva/freebsd-update-build/scripts/9.1-RELEASE/build.subr
==============================================================================
--- user/cperciva/freebsd-update-build/scripts/9.1-RELEASE/build.subr	Thu Apr 17 19:31:09 2014	(r264622)
+++ user/cperciva/freebsd-update-build/scripts/9.1-RELEASE/build.subr	Thu Apr 17 19:37:12 2014	(r264623)
@@ -98,7 +98,7 @@ buildworld () {
 	# Build stuff.
 	jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3			\
 	    /usr/bin/env -i PATH=${PATH} RELP=${RELP}			\
-		BRANCH_OVERRIDE=$2 JFLAG=${JFLAG}			\
+		BRANCH_OVERRIDE=$2					\
 		TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}		\
 	    /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log
 		# Function for logging what we're doing
@@ -109,12 +109,12 @@ buildworld () {
 		# Build the world
 		log "Building world"
 		cd /usr/src &&
-		    make buildworld ${JFLAG} 2>&1
+		    make buildworld -j17 2>&1
 
 		# Build and kernel
 		log "Building kernel"
 		cd /usr/src &&
-		    make buildkernel ${JFLAG} 2>&1
+		    make buildkernel -j17 2>&1
 
 		# Build and install release images
 		log "Building release"

Added: user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/build.subr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/build.subr	Thu Apr 17 19:37:12 2014	(r264623)
@@ -0,0 +1,199 @@
+# Overrides to FreeBSD Update build subroutines for FreeBSD 9.0.
+
+# Download and verify a release ISO image.
+fetchiso () {
+	log "Starting fetch"
+
+	# Figure out where the disc1 ISO image is
+	RELNUM=${REL%-*}
+#	ISO=${FTP}/${TARGET}/ISO-IMAGES/${RELNUM}/${REL}-${TARGET}-disc1.iso
+	ISO=${FTP}/FreeBSD-${REL}-${TARGET}-disc1.iso
+
+	# Fetch the ISO image.  We consider the ISO image to be
+	# the One True Release and don't look at the files used
+	# for FTP installs.  The FreeBSD 4.7-RELEASE ISO and FTP
+	# files were not identical, but this should never happen
+	# again.
+	fetch -o ${WORKDIR}/iso.img -rR ${ISO} 2>&1
+
+	log "Verifying dvd1 hash"
+
+	# Check that the downloaded ISO has the correct hash.
+	if ! [ "`sha256 -q ${WORKDIR}/iso.img`" = "${RELH}" ]; then
+		echo "FreeBSD ${REL}-${TARGET}-dvd1.iso has incorrect hash."
+		rm ${WORKDIR}/iso.img
+		return 1
+	fi
+}
+
+# Extract the released trees and, if appropriate, construct a world (base
+# plus source code) in which to perform builds.
+extractiso () {
+	# Create and mount a md(4) attached to the ISO image.
+	ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n`
+	mkdir -p ${WORKDIR}/iso
+	mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso
+
+	# Extract the various components into different directories
+	log "Extracting components"
+	for C in ${WORLDPARTS}; do
+		mkdir -p ${WORKDIR}/release/R/trees/world/${C}
+		cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz |
+		    tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C}
+	done
+	for C in ${KERNELPARTS}; do
+		mkdir -p ${WORKDIR}/release/R/trees/kernel/${C}
+		cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz |
+		    tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C}
+	done
+	for C in ${SOURCEPARTS}; do
+		mkdir -p ${WORKDIR}/release/R/trees/src/${C}
+		cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz |
+		    tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C}
+	done
+
+	# If the release ISO we're handling belongs to the platform
+	# we're running right now, create a world image for future use.
+	# XXX delphij if [ ${TARGET} = ${HOSTPLATFORM} ]; then
+		log "Constructing world+src image"
+
+		# Create directory for world
+		mkdir ${WORKDIR}/world/
+
+		# Extract world and source distributions
+		for C in ${WORLDPARTS}; do
+			cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz |
+			    tar -xpzf - -C ${WORKDIR}/world/
+		done
+		for C in ${SOURCEPARTS}; do
+			cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.txz |
+			    tar -xpzf - -C ${WORKDIR}/world/
+		done
+
+		# build a single tarball of them.
+		tar -czf ${WORKDIR}/../world.tgz -C ${WORKDIR}/world .
+
+		# clean up
+		nuke world
+	# XXX delphij fi
+
+	# Unmount and detach the ISO image md(4).
+	umount ${WORKDIR}/iso
+	rmdir ${WORKDIR}/iso
+	mdconfig -d -u ${ISOMD}
+}
+
+# Perform a build in ${WORKDIR}/$1 with BRANCH_OVERRIDE set to $2
+buildworld () {
+	# We need a devfs inside the jail.  Note that we are using a
+	# jail here in order to keep the environment as "clean" as
+	# possible, not for security reasons; we assume that the
+	# original source code plus patches we add personally will
+	# not do anything evil.
+	mount -t devfs devfs ${WORKDIR}/$1/dev
+
+	# We need to be able to set file flags
+	sysctl security.jail.chflags_allowed=1 >/dev/null
+
+	# Build stuff.
+	jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3			\
+	    /usr/bin/env -i PATH=${PATH} RELP=${RELP}			\
+		BRANCH_OVERRIDE=$2 VERSION="FreeBSD 9.1-RELEASE i386 902001"	\
+		TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}		\
+	    /bin/sh -e <<-"EOF" 2>&1 >${WORKDIR}/$1-build.log
+		# Function for logging what we're doing
+		log () {
+			echo "`date` $1 for FreeBSD/${TARGET} ${RELP}" 1>&2
+		}
+
+		# Build the world
+		log "Building world"
+		cd /usr/src &&
+		    make buildworld -j17 2>&1
+
+		# Build and kernel
+		log "Building kernel"
+		cd /usr/src &&
+		    make buildkernel -j17 2>&1
+
+		# Build and install release images
+		log "Building release"
+		cd /usr/src/release &&
+		    make release 2>&1 &&
+		    make install DESTDIR=/R 2>&1
+	EOF
+
+	# Put all the components into the right places.
+	log "Moving components into staging area"
+	jail ${WORKDIR}/$1 ${BUILDHOSTNAME} 127.1.2.3			\
+	    /usr/bin/env -i PATH=${PATH}				\
+		WORLDPARTS="${WORLDPARTS}"				\
+		KERNELPARTS="${KERNELPARTS}"				\
+		SOURCEPARTS="${SOURCEPARTS}"				\
+	    /bin/sh -e <<-"EOF" 2>&1 >>${WORKDIR}/$1-build.log
+		# Create area for uncompressed components
+		mkdir -p /R/trees
+
+		# Move world components into place
+		for C in ${WORLDPARTS}; do
+			mkdir -p /R/trees/world/${C}
+			cat /R/ftp/${C}.txz |
+			    tar -xpzf - -C /R/trees/world/${C}
+		done
+
+		# Move kernel components into place
+		for C in ${KERNELPARTS}; do
+			mkdir -p /R/trees/kernel/${C}
+			cat /R/ftp/${C}.txz |
+			    tar -xpzf - -C /R/trees/kernel/${C}
+		done
+
+		# Extract src components into place
+		for C in ${SOURCEPARTS}; do
+			mkdir -p /R/trees/src/${C}
+			cat /R/ftp/${C}.txz |
+			    tar -xpzf - -C /R/trees/src/${C}
+		done
+	EOF
+
+	# Get rid of the devfs we no longer need.
+	umount ${WORKDIR}/$1/dev
+}
+
+# Perform a build in ${WORKDIR}/$1, but with the date set 400 days
+# into the future.  Turn off NTP before we change the date and
+# turn it back on afterwards.
+futurebuildworld () {
+	# Turn off ntpd if necessary
+	if /etc/rc.d/ntpd status |
+	    grep -q 'is running'; then
+		ntpd_was_running=1
+		log "Turning off NTP"
+		/etc/rc.d/ntpd stop >/dev/null
+	else
+		ntpd_was_running=0
+	fi
+
+	date -n `date -j -v+400d "+%y%m%d%H%M.%S"` >/dev/null
+	buildworld $1 FUTUREBUILD
+	date -n `date -j -v-400d "+%y%m%d%H%M.%S"` >/dev/null
+
+	# Turn ntpd back on, if appropriate
+	if [ ${ntpd_was_running} = 1 ]; then
+		log "Turning NTP back on"
+		/etc/rc.d/ntpd start >/dev/null
+	fi
+}
+
+# Add extra docs to ${WORKDIR}/$1
+addextradocs () {
+	log "Extracting extra docs"
+
+	# 8.0 doesn't have any extra docs
+}
+
+# Fixup: the "kernel" kernel is really the "generic" kernel.
+indexpublish () {
+	sed -E 's,kernel\|kernel,kernel|generic,'
+}               
+

Added: user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/i386/build.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ user/cperciva/freebsd-update-build/scripts/9.2-RELEASE/i386/build.conf	Thu Apr 17 19:37:12 2014	(r264623)
@@ -0,0 +1,10 @@
+# SHA256 hash of disc1.iso image.
+export RELH=76093c27288f0ab939a5de14b621ec8eb1420d96343132c2b7c382747d35b67c
+
+# Components of the world, source, and kernels
+export WORLDPARTS="base doc games"
+export SOURCEPARTS="src"
+export KERNELPARTS="kernel"
+
+# EOL date
+export EOL=1412121599



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404171937.s3HJbCmD010978>