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, Nov 22, 9:49 PM
Unknown Object (File)
Mon, Nov 10, 4:53 AM
Unknown Object (File)
Oct 29 2025, 11:00 AM
Unknown Object (File)
Oct 24 2025, 7:56 AM
Unknown Object (File)
Oct 24 2025, 4:29 AM
Unknown Object (File)
Oct 17 2025, 5:53 AM
Unknown Object (File)
Oct 9 2025, 3:01 PM
Unknown Object (File)
Oct 9 2025, 3:01 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.