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 272414 2014-10-02 16:13:12Z gjb $
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() { }
--- 39 unchanged lines hidden (view full) ---
84# ports/ checkout also forces NODOC to be set.
85NODOC=
86NOPORTS=
87
88# Set to non-empty value to build dvd1.iso as part of the release.
89WITH_DVD=
90WITH_COMPRESSED_IMAGES=
91
92# Set to non-empty value to build virtual machine images as part of
93# the release.
94WITH_VMIMAGES=
95WITH_COMPRESSED_VMIMAGES=
96
97usage() {
98 echo "Usage: $0 [-c release.conf]"
99 exit 1
100}
101
102while getopts c: opt; do
103 case ${opt} in
104 c)
--- 64 unchanged lines hidden (view full) ---
169load_chroot_env
170CHROOT_MAKEENV="${CHROOT_MAKEENV} MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
171CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}"
172CHROOT_IMAKEFLAGS="${CONF_FILES}"
173CHROOT_DMAKEFLAGS="${CONF_FILES}"
174RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}"
175RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}"
176RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \
177 ${DOCPORTS} WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES}"
178
179# Force src checkout if configured
180FORCE_SRC_KEY=
181if [ -n "${SRC_FORCE_CHECKOUT}" ]; then
182 FORCE_SRC_KEY="--force"
183fi
184
185if [ -z "${CHROOTDIR}" ]; then
--- 88 unchanged lines hidden (view full) ---
274fi
275
276load_target_env
277eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld
278eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel
279eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
280 release
281eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
282 install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} \
283 WITH_COMPRESSED_VMIMAGES=${WITH_COMPRESSED_VMIMAGES}
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 272414 2014-10-02 16:13:12Z gjb $
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() { }
--- 39 unchanged lines hidden (view full) ---
84# ports/ checkout also forces NODOC to be set.
85NODOC=
86NOPORTS=
87
88# Set to non-empty value to build dvd1.iso as part of the release.
89WITH_DVD=
90WITH_COMPRESSED_IMAGES=
91
92# Set to non-empty value to build virtual machine images as part of
93# the release.
94WITH_VMIMAGES=
95WITH_COMPRESSED_VMIMAGES=
96
97usage() {
98 echo "Usage: $0 [-c release.conf]"
99 exit 1
100}
101
102while getopts c: opt; do
103 case ${opt} in
104 c)
--- 64 unchanged lines hidden (view full) ---
169load_chroot_env
170CHROOT_MAKEENV="${CHROOT_MAKEENV} MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
171CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}"
172CHROOT_IMAKEFLAGS="${CONF_FILES}"
173CHROOT_DMAKEFLAGS="${CONF_FILES}"
174RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}"
175RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}"
176RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \
177 ${DOCPORTS} WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES}"
178
179# Force src checkout if configured
180FORCE_SRC_KEY=
181if [ -n "${SRC_FORCE_CHECKOUT}" ]; then
182 FORCE_SRC_KEY="--force"
183fi
184
185if [ -z "${CHROOTDIR}" ]; then
--- 88 unchanged lines hidden (view full) ---
274fi
275
276load_target_env
277eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld
278eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel
279eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
280 release
281eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
282 install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} \
283 WITH_COMPRESSED_VMIMAGES=${WITH_COMPRESSED_VMIMAGES}