aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2013-08-13 20:16:14 +0000
committerGlen Barber <gjb@FreeBSD.org>2013-08-13 20:16:14 +0000
commita1020436eafafd1f70f459741b3ad0cb94f42076 (patch)
treeab5c9374af11b2ece0861fe06ade7cd27c8beacb
parentc5c392e7ede10d5de5b096de858c8f21ad516414 (diff)
downloadsrc-a1020436eafafd1f70f459741b3ad0cb94f42076.tar.gz
src-a1020436eafafd1f70f459741b3ad0cb94f42076.zip
- Only set ARCH_FLAGS (TARGET/TARGET_ARCH) if specified, otherwise
allow the toolchain to detect the correct values. - Remove {SRC,DOC,PORT}REVISION variables, and use 'branch@rNNNNNN' as the {SRC,DOC,PORT}BRANCH variables. - Only set default KERNEL_FLAGS and WORLD_FLAGS make(1) jobs if the number of CPUs is greater than 1. Submitted by: hrs
Notes
Notes: svn path=/head/; revision=254293
-rw-r--r--release/release.conf.sample11
-rwxr-xr-xrelease/release.sh34
2 files changed, 19 insertions, 26 deletions
diff --git a/release/release.conf.sample b/release/release.conf.sample
index fd6556f846bb..5f30b4b9e383 100644
--- a/release/release.conf.sample
+++ b/release/release.conf.sample
@@ -10,18 +10,13 @@ CHROOTDIR="/scratch"
SVNROOT="svn://svn.FreeBSD.org"
## Set the src/, ports/, and doc/ branches or tags.
-SRCBRANCH="base/head"
-DOCBRANCH="doc/head"
-PORTBRANCH="ports/head"
+SRCBRANCH="base/head@rHEAD"
+DOCBRANCH="doc/head@rHEAD"
+PORTBRANCH="ports/head@rHEAD"
## Run svn co --force for src checkout.
#SRC_FORCE_CHECKOUT=yes
-## Set the src/, ports/, and doc/ revisions.
-SRCREVISION="-rHEAD"
-DOCREVISION="-rHEAD"
-PORTREVISION="-rHEAD"
-
## Set to override the default target architecture.
#TARGET="amd64"
#TARGET_ARCH="amd64"
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