aboutsummaryrefslogtreecommitdiff
path: root/release/release.sh
diff options
context:
space:
mode:
Diffstat (limited to 'release/release.sh')
-rwxr-xr-xrelease/release.sh34
1 files changed, 16 insertions, 18 deletions
diff --git a/release/release.sh b/release/release.sh
index e06da2082fb3..92723036b1ae 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -41,19 +41,14 @@ CHROOTDIR="/scratch"
# The default svn checkout server, and svn branches for src/, doc/,
# and ports/.
SVNROOT="svn://svn.freebsd.org"
-SRCBRANCH="base/head"
-DOCBRANCH="doc/head"
-PORTBRANCH="ports/head"
+SRCBRANCH="base/head@rHEAD"
+DOCBRANCH="doc/head@rHEAD"
+PORTBRANCH="ports/head@rHEAD"
# Sometimes one needs to checkout src with --force svn option.
# If custom kernel configs copied to src tree before checkout, e.g.
SRC_FORCE_CHECKOUT=
-# The default src/, doc/, and ports/ revisions.
-SRCREVISION="-rHEAD"
-DOCREVISION="-rHEAD"
-PORTREVISION="-rHEAD"
-
# The default make.conf and src.conf to use. Set to /dev/null
# by default to avoid polluting the chroot(8) environment with
# non-default settings.
@@ -62,17 +57,16 @@ SRC_CONF="/dev/null"
# The number of make(1) jobs, defaults to the number of CPUs available for
# buildworld, and half of number of CPUs available for buildkernel.
-WORLD_FLAGS="-j$(sysctl -n hw.ncpu)"
-KERNEL_FLAGS="-j$(expr $(sysctl -n hw.ncpu) / 2)"
+NCPU=$(sysctl -n hw.ncpu)
+if [ ${NCPU} -gt 1 ]; then
+ WORLD_FLAGS="-j${NCPU}"
+ KERNEL_FLAGS="-j$(expr ${NCPU} / 2)"
+fi
MAKE_FLAGS="-s"
# The name of the kernel to build, defaults to GENERIC.
KERNEL="GENERIC"
-# The TARGET and TARGET_ARCH to build, defaults to the running system.
-TARGET="$(uname -p)"
-TARGET_ARCH="${TARGET}"
-
# Set to non-empty value to disable checkout of doc/ and/or ports/. Disabling
# ports/ checkout also forces NODOC to be set.
NODOC=
@@ -136,7 +130,11 @@ fi
# this file, unless overridden by release.conf. In most cases, these
# will not need to be changed.
CONF_FILES="__MAKE_CONF=${MAKE_CONF} SRCCONF=${SRC_CONF}"
-ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}"
+if [ "x${TARGET}" != "x" ] && [ "x${TARGET_ARCH}" != "x" ]; then
+ ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}"
+else
+ ARCH_FLAGS=
+fi
CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}"
CHROOT_IMAKEFLAGS="${CONF_FILES}"
CHROOT_DMAKEFLAGS="${CONF_FILES}"
@@ -165,12 +163,12 @@ set -e # Everything must succeed
mkdir -p ${CHROOTDIR}/usr
-svn co ${FORCE_SRC_KEY} ${SVNROOT}/${SRCBRANCH} ${CHROOTDIR}/usr/src $SRCREVISION
+svn co ${FORCE_SRC_KEY} ${SVNROOT}/${SRCBRANCH} ${CHROOTDIR}/usr/src
if [ "x${NODOC}" = "x" ]; then
- svn co ${SVNROOT}/${DOCBRANCH} ${CHROOTDIR}/usr/doc $DOCREVISION
+ svn co ${SVNROOT}/${DOCBRANCH} ${CHROOTDIR}/usr/doc
fi
if [ "x${NOPORTS}" = "x" ]; then
- svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports $PORTREVISION
+ svn co ${SVNROOT}/${PORTBRANCH} ${CHROOTDIR}/usr/ports
fi
get_rev_branch