git: 0be274d37379 - main - Adjust where UNAME_r is defined for ports builds

Glen Barber gjb at FreeBSD.org
Tue Mar 2 15:13:11 UTC 2021


The branch main has been updated by gjb:

URL: https://cgit.FreeBSD.org/src/commit/?id=0be274d3737972532c042d06c53b5807e95aa845

commit 0be274d3737972532c042d06c53b5807e95aa845
Author:     Glen Barber <gjb at FreeBSD.org>
AuthorDate: 2021-03-02 15:11:04 +0000
Commit:     Glen Barber <gjb at FreeBSD.org>
CommitDate: 2021-03-02 15:11:04 +0000

    Adjust where UNAME_r is defined for ports builds
    
    In followup to 80ab50e1de19ca125f05a13937c796d48c4edd4a,
    export UNAME_r in Makefile.inc1 instead of Makefile.vm.
    
    MFC after:      3 days
    MFC with:       80ab50e1de19
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 release/Makefile.inc1 | 3 +++
 release/Makefile.vm   | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/release/Makefile.inc1 b/release/Makefile.inc1
index 64f7c6e049a4..a97dee9994b6 100644
--- a/release/Makefile.inc1
+++ b/release/Makefile.inc1
@@ -40,3 +40,6 @@ BUILDDATE!=		date +%Y%m%d
 .export BUILDDATE
 .endif
 
+# Override UNAME_r to allow building ports for a different branch.
+UNAME_r=	${REVISION}-${BRANCH}
+.export UNAME_r
diff --git a/release/Makefile.vm b/release/Makefile.vm
index b0bd47521dc5..cad1974e3a6f 100644
--- a/release/Makefile.vm
+++ b/release/Makefile.vm
@@ -54,7 +54,7 @@ emulator-portinstall:
 .if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" )
 .if !exists(/usr/local/bin/qemu-${TARGET_ARCH}-static)
 .if exists(${PORTSDIR}/emulators/qemu-user-static/Makefile)
-	env - UNAME_r="${REVISION}-${BRANCH}" PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean
+	env - UNAME_r=${UNAME_r} PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean
 .else
 .if !exists(/usr/local/sbin/pkg-static)
 	env ASSUME_ALWAYS_YES=yes pkg bootstrap -y


More information about the dev-commits-src-all mailing list