Page MenuHomeFreeBSD

Mk/bsd.port.mk: stop ports from finding the ports tree's git repository
Needs ReviewPublic

Authored by fuz on Sat, Nov 30, 1:39 PM.

Details

Reviewers
None
Group Reviewers
portmgr
Summary

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 WRKDIR trying to look for a git repository
where we have extracted the distfile.

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.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 60902
Build 57786: arc lint + arc unit

Event Timeline

fuz requested review of this revision.Sat, Nov 30, 1:39 PM
fuz created this revision.

This looks like a good idea, but could you please add the new environment variable to where WRK_ENV is first appended to, about 100 lines before.

  • Mk/bsd.port.mk: move GIT_CEILING_DIRECTORIES to initial WRK_ENV block