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
F94827388: D46287.diff
Wed, Sep 18, 10:41 AM
F94826444: D46287.diff
Wed, Sep 18, 10:30 AM
F94607152: D46287.id142062.diff
Tue, Sep 17, 8:26 PM
F94539082: D46287.id142062.diff
Tue, Sep 17, 3:56 PM
F94533447: D46287.id142062.diff
Tue, Sep 17, 3:28 PM
Unknown Object (File)
Tue, Sep 17, 1:20 AM
Unknown Object (File)
Tue, Sep 17, 1:20 AM
Unknown Object (File)
Mon, Sep 16, 10:07 PM
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