Page MenuHomeFreeBSD

Makefile.inc1: Fix -DNO_ROOT distributeworld certctl usage
ClosedPublic

Authored by jrtc27 on Jul 13 2022, 9:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 10, 3:52 PM
Unknown Object (File)
Sun, Nov 10, 6:41 AM
Unknown Object (File)
Sun, Nov 10, 6:17 AM
Unknown Object (File)
Sat, Nov 9, 9:53 PM
Unknown Object (File)
Oct 4 2024, 8:33 AM
Unknown Object (File)
Oct 4 2024, 5:27 AM
Unknown Object (File)
Oct 2 2024, 6:16 AM
Unknown Object (File)
Sep 29 2024, 11:26 PM
Subscribers

Details

Summary

Currently for distributeworld we pass DESTDIR to certctl.sh as an
environment variable, which sets the default value in the script.
However, for -DNO_ROOT builds, CERTCTLFLAGS has METALOG_INSTALLFLAGS
which includes -D ${DESTDIR}, overriding the custom DESTDIR pointing at
the base dist directory.

Moreover, in order to ensure that the METALOG includes the base/ prefix
for all the files, we need to have certctl call install with -D set to
DESTDIR/DISTDIR without the /base suffix but also ensure the files get
installed to DESTDIR/DISTDIR/base.

Fix these by passing the custom DESTDIR to certctl via -D rather than in
the environment and to pass the /base suffix in the distributeworld case
via the newly-added -d option.

Finally we also need to run certctl rehash before we generate the .meta
files from the METALOG, not after, otherwise they won't include the
METALOG additions, so move the certctl rehash call.

Obtained from: CheriBSD
MFC after: 1 week

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 46418
Build 43307: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Jul 13 2022, 11:08 PM
kevans added a subscriber: markj.
kevans added inline comments.
Makefile.inc1
1451

I thought I had pushed the fix for this, but can you add this edit here as well, please? (Reported by: @markj iirc)

Makefile.inc1
1451

Ha, yes, can include when committing