Set OSREL and UNAME_r in release/release.sh when building

ports to prevent ports build failures from killing the
release build.

MFC after:	3 days
X-MFC-with:	r270417, r270418
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
gjb 2014-08-24 12:50:50 +00:00
parent fc2af22220
commit 6cc6bc54dc

View File

@ -255,9 +255,13 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then
## Trick the ports 'run-autotools-fixup' target to do the right thing.
_OSVERSION=$(sysctl -n kern.osreldate)
REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION)
BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH)
UNAME_r=${REVISION}-${BRANCH}
if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then
PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes"
PBUILD_FLAGS="${PBUILD_FLAGS}"
PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}"
PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}"
chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \
${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" install clean distclean
fi