Page MenuHomeFreeBSD

pkgbootstrap: Gate building from ports
ClosedPublic

Authored by cperciva on Sep 19 2025, 4:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 11, 9:47 PM
Unknown Object (File)
Fri, Apr 10, 5:02 AM
Unknown Object (File)
Mon, Apr 6, 6:32 AM
Unknown Object (File)
Thu, Mar 26, 2:24 PM
Unknown Object (File)
Mar 13 2026, 4:35 AM
Unknown Object (File)
Mar 13 2026, 4:25 AM
Unknown Object (File)
Jan 25 2026, 5:51 AM
Unknown Object (File)
Jan 23 2026, 11:34 PM
Subscribers

Details

Summary

In release builds we want to build pkg from the ports tree for reasons
mentioned in a previous commit; but non-release pkgbase builds may be
just fine with installing pkg from pkg.freebsd.org.

Gate it behind BOOTSTRAP_PKG_FROM_PORTS rather than building form ports
any time we have a ports tree available.

While I'm here, make the pkgbase-repo target in release/Makefile
create the temporary directories we need for building.

MFC after: 6 hours
Sponsored by: https://www.patreon.com/cperciva
Fixes: 2c06b824436d ("pkgbootstrap: Build pkg if PORTSDIR exists")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67173
Build 64056: arc lint + arc unit

Event Timeline

i'm okay with this on the basis that it turns the pkg problem into a release thing and not something that affects all developers. we definitely need a better way to do this, but i think everyone is aware of that at this point :-)

release/Makefile
198

i really don't like the hardcoded paths here, i'd like to see this fixed to use mkdtemp(1), although i won't insist on that for this change.

This revision is now accepted and ready to land.Sep 19 2025, 5:00 PM
release/Makefile
198

Yeah, using a temporary directory, or having it configured elsewhere, would be better; but right now I'm in "get this thing building" mode rather than "do it cleanly" mode. :-/

emaste added inline comments.
release/Makefile
198

This change was committed in e87b75a8bfc8f without this mkdir -- @cperciva can you close if there's nothing more to do here

Looks like I forgot to put a Differential Revision: tag on that commit.