svn commit: r262662 - projects/release-embedded/release
Glen Barber
gjb at FreeBSD.org
Sat Mar 1 18:09:39 UTC 2014
Author: gjb
Date: Sat Mar 1 18:09:38 2014
New Revision: 262662
URL: http://svnweb.freebsd.org/changeset/base/262662
Log:
Allow skipping the chroot buildworld/installworld/distribution.
The purpose of this is not to re-use the build environment, but
to allow skipping redundant stages if the build environment exists
via alternate means.
For snapshot builds, a single amd64 userland is built for all
non-i386 builds as part of a wrapper around release.sh, and the
resulting userland is installed into CHROOTDIR for each architecture.
Without this change, a buildworld would happen for each architecture
being built from the branch.
For head/, there are currently 12 individual builds across all
architectures, which means 12 repeated steps to set up the build
environment, all using the same svn revision, and all with the
same resulting userland. Allowing a way to skip the redundant
provides a significant reduction in overall build time when building
more than one architecture release. The wrapper script has been
patching release.sh to eliminate the redundancy, and this commit
eliminates the need to use any local patches to release.sh.
Sponsored by: The FreeBSD Foundation
Modified:
projects/release-embedded/release/release.conf.sample
projects/release-embedded/release/release.sh
Modified: projects/release-embedded/release/release.conf.sample
==============================================================================
--- projects/release-embedded/release/release.conf.sample Sat Mar 1 17:55:20 2014 (r262661)
+++ projects/release-embedded/release/release.conf.sample Sat Mar 1 18:09:38 2014 (r262662)
@@ -55,3 +55,7 @@ PORTBRANCH="ports/head at rHEAD"
## build chroot environment.
#EMBEDDED_WORLD_FLAGS=""
+## Set to skip the chroot environment buildworld/installworld/distribution
+## step if it is expected the build environment will exist via alternate
+## means.
+#CHROOTBUILD_SKIP=
Modified: projects/release-embedded/release/release.sh
==============================================================================
--- projects/release-embedded/release/release.sh Sat Mar 1 17:55:20 2014 (r262661)
+++ projects/release-embedded/release/release.sh Sat Mar 1 18:09:38 2014 (r262662)
@@ -190,12 +190,14 @@ if [ "x${NOPORTS}" = "x" ]; then
${VCSCMD} ${PORTBRANCH} ${CHROOTDIR}/usr/ports
fi
-cd ${CHROOTDIR}/usr/src
-env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld
-env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \
- DESTDIR=${CHROOTDIR}
-env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \
- DESTDIR=${CHROOTDIR}
+if [ -z ${CHROOTBUILD_SKIP} ]; then
+ cd ${CHROOTDIR}/usr/src
+ env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld
+ env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \
+ DESTDIR=${CHROOTDIR}
+ env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \
+ DESTDIR=${CHROOTDIR}
+fi
mount -t devfs devfs ${CHROOTDIR}/dev
cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit
More information about the svn-src-projects
mailing list