mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 09:36:41 -04:00
Mk/bsd.port.mk: stop ports from finding the ports tree's git repository
When building from source, the ports tree is by default a parent directory of WRKDIR. When ports try to use git to find the git commit they are built from, they'll some times find the port's git repository and produce bogus metadata. Set GIT_CEILING_DIRS in WRK_ENV to ensure that git does not escape WRK_ENV trying to look for a git repository that doesn't exist. This doesn't affect Poudriere builds as for these, WRKDIR is by default not a subdirectory of the ports tree, and neither is git installed in builder jails unless explicitly needed. As a result, bugs of this kind tend to go unnoticed by maintainers, but do affect source builders. Approved by: portmgr (mat) Exp-run by: antoine PR: 283098 Differential Revision: https://reviews.freebsd.org/D47850
This commit is contained in:
parent
f3a65c1d60
commit
deb79782a9
1 changed files with 3 additions and 0 deletions
|
@ -1615,9 +1615,12 @@ PKG_NOTES+= flavor
|
|||
PKG_NOTE_flavor= ${FLAVOR}
|
||||
. endif
|
||||
|
||||
# GIT_CEILING_DIRECTORIES prevents ports that try to find their version
|
||||
# using git from finding the ports tree's git repository.
|
||||
WRK_ENV+= HOME=${WRKDIR} \
|
||||
MACHINE_ARCH=${MACHINE_ARCH} \
|
||||
PWD="$${PWD}" \
|
||||
GIT_CEILING_DIRECTORIES=${WRKDIR} \
|
||||
__MAKE_CONF=${NONEXISTENT}
|
||||
. for e in OSVERSION PATH TERM TMPDIR \
|
||||
UNAME_b UNAME_i UNAME_K UNAME_m UNAME_n \
|
||||
|
|
Loading…
Add table
Reference in a new issue