Page MenuHomeFreeBSD

Makefile.inc1: Unify pkg ABI handling for pkgbase targets
ClosedPublic

Authored by markj on Aug 13 2024, 11:22 PM.
Tags
None
Referenced Files
F102269615: D46287.id142161.diff
Sat, Nov 9, 9:26 PM
F102245877: D46287.diff
Sat, Nov 9, 12:17 PM
Unknown Object (File)
Thu, Nov 7, 11:55 PM
Unknown Object (File)
Tue, Nov 5, 1:50 PM
Unknown Object (File)
Mon, Nov 4, 9:36 AM
Unknown Object (File)
Mon, Nov 4, 9:36 AM
Unknown Object (File)
Mon, Nov 4, 9:36 AM
Unknown Object (File)
Mon, Nov 4, 9:12 AM
Subscribers

Details

Summary

Right now, to get the pkg ABI we either use PKG_ABI, derived from
newvers.sh, or use an ABI file from the staged world. This
inconsistency is confusing and can cause problems.

Switch to a single source of truth: use an ABI file from the worldstage
dir to get the ABI of pkgbase packages. In particular, we do not need
to know the ABI until staging is done. More specifically:

  • use a shell command to define PKG_ABI,
  • replace inline uses of ABI_FILE,
  • run sign-packages in a subshell (this was already done for the update-packages target) so that the staging targets are done before we try to evaluate the ABI.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Mhm, that would mean that we need to buildworld before make create-kernel-packages which I think isn't needed right now as I used that in the past to dev only on kernel part. Could we use another file if uname isn't built yet ?

Mhm, that would mean that we need to buildworld before make create-kernel-packages which I think isn't needed right now as I used that in the past to dev only on kernel part. Could we use another file if uname isn't built yet ?

I'm not sure which file we could use. The kernel won't have an ABI note, so that doesn't work. kernel-toolchain outputs are compiled for the host system, not the target.

I thought packages and update-packages were the only top-level targets. And I'm not sure how your workflow worked before, there were uses of -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname in the create-kernel-packages target above.

Makefile.inc1
2309

Aren't we assuming here that worldstage is already populated?

Mhm, that would mean that we need to buildworld before make create-kernel-packages which I think isn't needed right now as I used that in the past to dev only on kernel part. Could we use another file if uname isn't built yet ?

I'm not sure which file we could use. The kernel won't have an ABI note, so that doesn't work. kernel-toolchain outputs are compiled for the host system, not the target.

I thought packages and update-packages were the only top-level targets. And I'm not sure how your workflow worked before, there were uses of -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname in the create-kernel-packages target above.

Mhm indeed, maybe I've just used an old buildworld since it didn't matter for my use case.

This revision is now accepted and ready to land.Aug 14 2024, 4:46 PM