svn commit: r254293 - head/release
Glen Barber
gjb at FreeBSD.org
Tue Aug 13 20:16:15 UTC 2013
Author: gjb
Date: Tue Aug 13 20:16:14 2013
New Revision: 254293
URL: http://svnweb.freebsd.org/changeset/base/254293
Log:
- 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 at 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
Modified:
head/release/release.conf.sample
head/release/release.sh
Modified: head/release/release.conf.sample
==============================================================================
--- head/release/release.conf.sample Tue Aug 13 19:59:49 2013 (r254292)
+++ head/release/release.conf.sample Tue Aug 13 20:16:14 2013 (r254293)
@@ -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 at rHEAD"
+DOCBRANCH="doc/head at rHEAD"
+PORTBRANCH="ports/head at 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"
Modified: head/release/release.sh
==============================================================================
--- head/release/release.sh Tue Aug 13 19:59:49 2013 (r254292)
+++ head/release/release.sh Tue Aug 13 20:16:14 2013 (r254293)
@@ -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 at rHEAD"
+DOCBRANCH="doc/head at rHEAD"
+PORTBRANCH="ports/head at 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
More information about the svn-src-head
mailing list