It seems that _pkgbootstrap relies on the pre-existing system pkg binary which is
not available on cross-built systems, to bootstrap. If we intend to be able to cross-
build packages, this needs fixing in multiple places.
Details
- Reviewers
- None
- Group Reviewers
pkgbase
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 65372 Build 62255: arc lint + arc unit
Event Timeline
i may be missing something but pkg doesn't ever exist in WSTAGEDIR, does it? it's not part of world since it comes from ports.
edit: or is this meant to call the pkg-bootstrap binary, but that will never work on non-FreeBSD platforms...
I don't know how the pkg bootstrap process is supposed to work. What I see that we still build pkg during buildworld/release, and that we use the host pkg command.
find $MAKEOBJDIRPREFIX/ -name pkg -type f -perm +111
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/worldstage/usr/sbin/pkg
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/usr.sbin/pkg/pkg
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/release/dist/base/usr/sbin/pkg
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/release/disc1-memstick/usr/sbin/pkg
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/release/bootonly-memstick/usr/sbin/pkg
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/release/disc1-disc1/usr/sbin/pkg
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/release/bootonly/usr/sbin/pkg
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/release/disc1/usr/sbin/pkg
/scratch/tmp/wosch/freebsd/home/wosch/projects/freebsd-src/amd64.amd64/release/bootonly-bootonly/usr/sbin/pkg
Yes, this can't possibly work -- the pkg you see there is built for the target, and it's just the bootstrap that downloads a suitable pkg from pkg.f.o. We don't have a version of pkg that could be used to cross-build packages at the moment, you'd need to bring your own (it is tested on Linux and macOS, IIRC).