svn commit: r277613 - user/gjb/thermite
Glen Barber
gjb at FreeBSD.org
Fri Jan 23 21:44:53 UTC 2015
Author: gjb
Date: Fri Jan 23 21:44:52 2015
New Revision: 277613
URL: https://svnweb.freebsd.org/changeset/base/277613
Log:
Syncronize thermite.sh after recent changes:
- Prefix output lines with a timestamp in info() and
verbose().
- In prebuild_setup(), fix output when creating work
directories.
- Use 'releasesrc' to determine from which branch to
checkout the release/ directory, which defaults to
'head'.
- In build_release(), use set(1) instead of printenv(1)
to print the environment to the log file for debugging
- Remove build_vmimage(), which is no longer needed.
- Add '-d' flag for debugging, which invokes verbose().
Update the configuration file to closer match what is
used for weekly snapshot builds.
Sponsored by: The FreeBSD Foundation
Modified:
user/gjb/thermite/master.conf
user/gjb/thermite/thermite.sh
Modified: user/gjb/thermite/master.conf
==============================================================================
--- user/gjb/thermite/master.conf Fri Jan 23 21:34:08 2015 (r277612)
+++ user/gjb/thermite/master.conf Fri Jan 23 21:44:52 2015 (r277613)
@@ -10,26 +10,42 @@
use_zfs=1
emailgoesto=
scriptdir="$(dirname $(realpath ${0}))"
-mkdir -p ${scriptdir}/../release
-srcdir="$(realpath ${scriptdir}/../release)"
-mkdir -p ${scriptdir}/../logs
-logdir="$(realpath ${scriptdir}/../logs)"
-mkdir -p ${scriptdir}/../chroots
-chroots="$(realpath ${scriptdir}/../chroots)"
+srcdir="${scriptdir}/../release"
+logdir="${scriptdir}/../logs"
+chroots="${scriptdir}/../chroots"
+releasesrc="head"
heads="11"
-stables="10 9"
+stables=
revs="${heads} ${stables}"
-archs="amd64 i386 ia64 powerpc powerpc64 sparc64 armv6"
+archs="amd64 i386 powerpc powerpc64 sparc64 armv6"
types="snap"
x86_kernels="GENERIC"
-armv6_kernels="BEAGLEBONE RPI-B PANDABOARD WANDBOARD-QUAD"
+armv6_kernels="BEAGLEBONE RPI-B PANDABOARD WANDBOARD-QUAD ZEDBOARD"
kernels="${x86_kernels} GENERIC64 ${armv6_kernels}"
+ftpdir="/relengftp"
+ftpsubdir=
+
zfs_root="zroot"
zfs_mount="releng"
zfs_parent="${zfs_root}/${zfs_mount}"
+relengdir="/releng"
+
+__WRKDIR_PREFIX="${relengdir}"
+BUILDSVNREV="rHEAD"
+BUILDDATE="$(date +%Y%m%d)"
+SVNROOT="svn://svn.FreeBSD.org/"
+
+KERNEL="GENERIC"
+WORLD_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))"
+KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))"
+
+CHROOTBUILD_SKIP=1
+SRC_UPDATE_SKIP=1
+PORTS_UPDATE_SKIP=1
+DOC_UPDATE_SKIP=1
Modified: user/gjb/thermite/thermite.sh
==============================================================================
--- user/gjb/thermite/thermite.sh Fri Jan 23 21:34:08 2015 (r277612)
+++ user/gjb/thermite/thermite.sh Fri Jan 23 21:44:52 2015 (r277613)
@@ -42,7 +42,7 @@ usage() {
info() {
out="${@}"
- printf "INFO:\t${out}\n" >/dev/stdout
+ printf "$(date +%Y%m%d-%H:%M:%S)\tINFO:\t${out}\n" >/dev/stdout
unset out
}
@@ -51,7 +51,7 @@ verbose() {
return 0
fi
out="${@}"
- printf "DEBUG:\t${out}\n" >/dev/stdout
+ printf "$(date +%Y%m%d-%H:%M:%S)\tDEBUG:\t${out}\n" >/dev/stdout
unset out
}
@@ -218,10 +218,14 @@ zfs_bootstrap() {
prebuild_setup() {
info "Creating ${logdir}"
+ mkdir -p ${logdir}
info "Creating ${srcdir}"
- mkdir -p "${logdir}" "${srcdir}"
+ mkdir -p ${srcdir}
+ info "Creating ${chroots}"
+ mkdir -p ${chroots}
info "Checking out src/release to ${srcdir}"
- svn co -q --force svn://svn.freebsd.org/base/head/release ${srcdir}
+ svn co -q --force svn://svn.freebsd.org/base/${releasesrc}/release \
+ ${srcdir}
info "Reverting any changes to ${srcdir}"
svn revert -R ${srcdir}
}
@@ -244,8 +248,9 @@ build_release() {
_conf="${scriptdir}/${_build}.conf"
source_config || return 0
info "Building release: ${_build}"
- printenv >> ${logdir}/${_build}.log
- env -i /bin/sh ${srcdir}/release.sh -c ${_conf} \
+ set >> ${logdir}/${_build}.log
+ env -i __BUILDCONFDIR="${__BUILDCONFDIR}" \
+ /bin/sh ${srcdir}/release.sh -c ${_conf} \
>> ${logdir}/${_build}.log 2>&1
send_logmail ${logdir}/${_build}.log ${_build}
@@ -264,33 +269,6 @@ build_release() {
unset _build _conf
}
-build_vmimage() {
- _build="${rev}-${arch}-${kernel}-${type}"
- _conf="${scriptdir}/${_build}.conf"
- source_config || return 0
-
- case ${arch} in
- amd64|i386)
- # continue
- ;;
- *)
- return 0
- ;;
- esac
- case ${kernel} in
- GENERIC)
- info "Building vm image: ${_build}"
- env -i /bin/sh ${scriptdir}/mk-vmimage.sh -c ${_conf} \
- >> ${logdir}/${_build}.log 2>&1
- ;;
- *)
- return 0
- ;;
- esac
- send_logmail ${logdir}/${_build}.log ${_build}
- unset _build _conf
-}
-
# Install amd64/i386 "seed" chroots for all branches being built.
install_chroots() {
source_config || return 0
@@ -379,13 +357,18 @@ build_chroots() {
}
main() {
- mkdir -p ../chroots/ ../logs/ ../release/
- while getopts c: opt; do
+ releasesrc="head"
+ export __BUILDCONFDIR="$(dirname $(realpath ${0}))"
+
+ while getopts "c:d" opt; do
case ${opt} in
c)
CONF=${OPTARG}
[ -e ${CONF} ] && . $(realpath ${CONF})
;;
+ d)
+ debug=1
+ ;;
\?)
usage
;;
@@ -400,7 +383,6 @@ main() {
runall build_chroots
runall install_chroots
runall build_release
- runall build_vmimage
}
main "$@"
More information about the svn-src-user
mailing list