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