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 270457 2014-08-24 12:51:34Z 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
92usage() {
93 echo "Usage: $0 [-c release.conf]"
94 exit 1
95}
96
97while getopts c: opt; do
98 case ${opt} in
99 c)
--- 64 unchanged lines hidden (view full) ---
164load_chroot_env
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}"
173
174# Force src checkout if configured
175FORCE_SRC_KEY=
176if [ -n "${SRC_FORCE_CHECKOUT}" ]; then
177 FORCE_SRC_KEY="--force"
178fi
179
180if [ -z "${CHROOTDIR}" ]; then
--- 88 unchanged lines hidden (view full) ---
269fi
270
271load_target_env
272eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld
273eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel
274eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
275 release
276eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
277 install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES}
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 270457 2014-08-24 12:51:34Z 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
92usage() {
93 echo "Usage: $0 [-c release.conf]"
94 exit 1
95}
96
97while getopts c: opt; do
98 case ${opt} in
99 c)
--- 64 unchanged lines hidden (view full) ---
164load_chroot_env
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}"
173
174# Force src checkout if configured
175FORCE_SRC_KEY=
176if [ -n "${SRC_FORCE_CHECKOUT}" ]; then
177 FORCE_SRC_KEY="--force"
178fi
179
180if [ -z "${CHROOTDIR}" ]; then
--- 88 unchanged lines hidden (view full) ---
269fi
270
271load_target_env
272eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld
273eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel
274eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
275 release
276eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
277 install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES}