release.sh: fix OSVERSION and UNAME_r overrides

Add PBUILD_FLAGS and UNAME_r overrides to extra_chroot_setup()
to fix building ports for 14-CURRENT builds on 13.x.

MFC after:	3 days
MFC with:	c511a5ab53
Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Glen Barber 2021-02-11 10:46:38 -05:00
parent 29ed53850e
commit 6462113b70

View File

@ -308,7 +308,13 @@ extra_chroot_setup() {
GITUNSETOPTS="${GITUNSETOPTS} ICONV NLS P4 PERL"
GITUNSETOPTS="${GITUNSETOPTS} SEND_EMAIL SUBTREE SVN"
GITUNSETOPTS="${GITUNSETOPTS} PCRE PCRE2"
PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes"
PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}"
PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}"
PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports"
PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles"
eval chroot ${CHROOTDIR} env OPTIONS_UNSET=\"${GITUNSETOPTS}\" \
${PBUILD_FLAGS} \
make -C /usr/ports/devel/git FORCE_PKG_REGISTER=1 \
WRKDIRPREFIX=/tmp/ports \
DISTDIR=/tmp/distfiles \
@ -345,6 +351,7 @@ extra_chroot_setup() {
_OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U)
REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION)
BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH)
UNAME_r=${REVISION}-${BRANCH}
PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes"
PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}"
PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}"