The branch main has been updated by ivy:

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

commit f259daa708f507d3ff450d2eb8c05065674339ec
Author:     Lexi Winter <i...@freebsd.org>
AuthorDate: 2025-09-23 22:15:35 +0000
Commit:     Lexi Winter <i...@freebsd.org>
CommitDate: 2025-09-24 09:16:12 +0000

    Makefile.inc1: Fix package-pkg with a non-default LOCALBASE
    
    package-pkg (via make-pkg-package.sh) passes CONFIGURE_ARGS to make when
    building ports-mgmt/pkg, which overrides the port's default configure
    args that are supposed to set --prefix.  This means that pkg is always
    built with the default prefix of /usr/local, which then fails when ports
    tries to package it from LOCALBASE.
    
    Work around this by explicitly adding --prefix to CONFIGURE_ARGS.
    
    MFC after:      1 day
    Reviewed by:    bapt
    Differential Revision:  https://reviews.freebsd.org/D52634
---
 Makefile.inc1                       | 2 +-
 release/scripts/make-pkg-package.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.inc1 b/Makefile.inc1
index 94c33ca791fd..e98b5f233b51 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2049,7 +2049,7 @@ package-pkg: _pkgbootstrap _repodir .PHONY
        env ${WMAKEENV} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} 
REVISION=${_REVISION} \
                PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} 
REPODIR=${REPODIR} \
                WSTAGEDIR=${WSTAGEDIR} \
-               OSVERSION="${SRCRELDATE}" \
+               OSVERSION="${SRCRELDATE}" LOCALBASE=${LOCALBASE} \
                sh ${.CURDIR}/release/scripts/make-pkg-package.sh
 .endif
 .endif
diff --git a/release/scripts/make-pkg-package.sh 
b/release/scripts/make-pkg-package.sh
index ee75e7d68d14..a1e006bd6964 100755
--- a/release/scripts/make-pkg-package.sh
+++ b/release/scripts/make-pkg-package.sh
@@ -13,7 +13,7 @@ export DISTDIR=/tmp/distfiles
 export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg 
I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES -V WRKDIR)
 
 make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} 
\
-       CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION}" \
+       CONFIGURE_ARGS="--host=$(uname -m)-portbld-freebsd${REVISION} 
--prefix=${LOCALBASE}" \
        I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES \
        BATCH=YES stage create-manifest
 

Reply via email to