release.sh (264343) | release.sh (269639) |
---|---|
1#!/bin/sh 2#- 3# Copyright (c) 2013, 2014 The FreeBSD Foundation 4# Copyright (c) 2013 Glen Barber 5# Copyright (c) 2011 Nathan Whitehorn 6# All rights reserved. 7# 8# Portions of this software were developed by Glen Barber --- 19 unchanged lines hidden (view full) --- 28# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30# SUCH DAMAGE. 31# 32# release.sh: check out source trees, and build release components with 33# totally clean, fresh trees. 34# Based on release/generate-release.sh written by Nathan Whitehorn 35# | 1#!/bin/sh 2#- 3# Copyright (c) 2013, 2014 The FreeBSD Foundation 4# Copyright (c) 2013 Glen Barber 5# Copyright (c) 2011 Nathan Whitehorn 6# All rights reserved. 7# 8# Portions of this software were developed by Glen Barber --- 19 unchanged lines hidden (view full) --- 28# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30# SUCH DAMAGE. 31# 32# release.sh: check out source trees, and build release components with 33# totally clean, fresh trees. 34# Based on release/generate-release.sh written by Nathan Whitehorn 35# |
36# $FreeBSD: head/release/release.sh 264343 2014-04-11 13:48:45Z gjb $ | 36# $FreeBSD: head/release/release.sh 269639 2014-08-06 19:04:05Z gjb $ |
37# 38 39PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" 40export PATH 41 | 37# 38 39PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin" 40export PATH 41 |
42# Prototypes that can be redefined per-chroot or per-target. 43load_chroot_env() { } 44load_target_env() { } 45 |
|
42# The directory within which the release will be built. 43CHROOTDIR="/scratch" 44RELENGDIR="$(realpath $(dirname $(basename ${0})))" 45 46# The default version control system command to obtain the sources. 47VCSCMD="svn checkout" 48 49# The default svn checkout server, and svn branches for src/, doc/, --- 69 unchanged lines hidden (view full) --- 119esac 120 121# Prefix the branches with the SVNROOT for the full checkout URL. 122SRCBRANCH="${SVNROOT}${SRCBRANCH}" 123DOCBRANCH="${SVNROOT}${DOCBRANCH}" 124PORTBRANCH="${SVNROOT}${PORTBRANCH}" 125 126if [ -n "${EMBEDDEDBUILD}" ]; then | 46# The directory within which the release will be built. 47CHROOTDIR="/scratch" 48RELENGDIR="$(realpath $(dirname $(basename ${0})))" 49 50# The default version control system command to obtain the sources. 51VCSCMD="svn checkout" 52 53# The default svn checkout server, and svn branches for src/, doc/, --- 69 unchanged lines hidden (view full) --- 123esac 124 125# Prefix the branches with the SVNROOT for the full checkout URL. 126SRCBRANCH="${SVNROOT}${SRCBRANCH}" 127DOCBRANCH="${SVNROOT}${DOCBRANCH}" 128PORTBRANCH="${SVNROOT}${PORTBRANCH}" 129 130if [ -n "${EMBEDDEDBUILD}" ]; then |
127 if [ -z "${XDEV}" ] || [ -z "${XDEV_ARCH}" ]; then 128 echo "ERROR: XDEV and XDEV_ARCH must be set in ${RELEASECONF}." 129 exit 1 130 fi | |
131 WITH_DVD= 132 WITH_COMPRESSED_IMAGES= 133 NODOC=yes 134fi 135 136# If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree 137# is required to build the documentation set. 138if [ -n "${NOPORTS}" ] && [ -z "${NODOC}" ]; then --- 17 unchanged lines hidden (view full) --- 156# this file, unless overridden by release.conf. In most cases, these 157# will not need to be changed. 158CONF_FILES="__MAKE_CONF=${MAKE_CONF} SRCCONF=${SRC_CONF}" 159if [ -n "${TARGET}" ] && [ -n "${TARGET_ARCH}" ]; then 160 ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" 161else 162 ARCH_FLAGS= 163fi | 131 WITH_DVD= 132 WITH_COMPRESSED_IMAGES= 133 NODOC=yes 134fi 135 136# If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree 137# is required to build the documentation set. 138if [ -n "${NOPORTS}" ] && [ -z "${NODOC}" ]; then --- 17 unchanged lines hidden (view full) --- 156# this file, unless overridden by release.conf. In most cases, these 157# will not need to be changed. 158CONF_FILES="__MAKE_CONF=${MAKE_CONF} SRCCONF=${SRC_CONF}" 159if [ -n "${TARGET}" ] && [ -n "${TARGET_ARCH}" ]; then 160 ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}" 161else 162 ARCH_FLAGS= 163fi |
164load_chroot_env |
|
164CHROOT_MAKEENV="${CHROOT_MAKEENV} MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" 165CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}" 166CHROOT_IMAKEFLAGS="${CONF_FILES}" 167CHROOT_DMAKEFLAGS="${CONF_FILES}" 168RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}" 169RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" 170RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \ 171 ${DOCPORTS} WITH_DVD=${WITH_DVD}" --- 52 unchanged lines hidden (view full) --- 224fi 225 226# Embedded builds do not use the 'make release' target. 227if [ -n "${EMBEDDEDBUILD}" ]; then 228 # If a crochet configuration file exists in *this* checkout of 229 # release/, copy it to the /tmp/external directory within the chroot. 230 # This allows building embedded releases without relying on updated 231 # scripts and/or configurations to exist in the branch being built. | 165CHROOT_MAKEENV="${CHROOT_MAKEENV} MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj" 166CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}" 167CHROOT_IMAKEFLAGS="${CONF_FILES}" 168CHROOT_DMAKEFLAGS="${CONF_FILES}" 169RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}" 170RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" 171RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \ 172 ${DOCPORTS} WITH_DVD=${WITH_DVD}" --- 52 unchanged lines hidden (view full) --- 225fi 226 227# Embedded builds do not use the 'make release' target. 228if [ -n "${EMBEDDEDBUILD}" ]; then 229 # If a crochet configuration file exists in *this* checkout of 230 # release/, copy it to the /tmp/external directory within the chroot. 231 # This allows building embedded releases without relying on updated 232 # scripts and/or configurations to exist in the branch being built. |
233 load_target_env |
|
232 if [ -e ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf ] && \ 233 [ -e ${RELENGDIR}/${XDEV}/release.sh ]; then 234 mkdir -p ${CHROOTDIR}/tmp/external/${XDEV}/ 235 cp ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf \ 236 ${CHROOTDIR}/tmp/external/${XDEV}/crochet-${KERNEL}.conf 237 /bin/sh ${RELENGDIR}/${XDEV}/release.sh 238 fi 239 # If the script does not exist for this architecture, exit. --- 16 unchanged lines hidden (view full) --- 256 if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then 257 PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" 258 PBUILD_FLAGS="${PBUILD_FLAGS}" 259 chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ 260 ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean 261 fi 262fi 263 | 234 if [ -e ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf ] && \ 235 [ -e ${RELENGDIR}/${XDEV}/release.sh ]; then 236 mkdir -p ${CHROOTDIR}/tmp/external/${XDEV}/ 237 cp ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf \ 238 ${CHROOTDIR}/tmp/external/${XDEV}/crochet-${KERNEL}.conf 239 /bin/sh ${RELENGDIR}/${XDEV}/release.sh 240 fi 241 # If the script does not exist for this architecture, exit. --- 16 unchanged lines hidden (view full) --- 258 if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then 259 PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" 260 PBUILD_FLAGS="${PBUILD_FLAGS}" 261 chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ 262 ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean 263 fi 264fi 265 |
266load_target_env |
|
264eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld 265eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel 266eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ 267 release 268eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ 269 install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} | 267eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld 268eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel 269eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ 270 release 271eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ 272 install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} |