Page MenuHomeFreeBSD

vmimage.subr: Fix when/where we fix up METALOG
ClosedPublic

Authored by cperciva on Sun, Oct 19, 12:34 AM.
Tags
None
Referenced Files
F133048229: D53194.diff
Wed, Oct 22, 10:57 AM
Unknown Object (File)
Tue, Oct 21, 2:09 PM
Unknown Object (File)
Tue, Oct 21, 2:09 PM
Unknown Object (File)
Tue, Oct 21, 2:09 PM
Unknown Object (File)
Tue, Oct 21, 2:15 AM
Unknown Object (File)
Sun, Oct 19, 11:33 PM
Unknown Object (File)
Sun, Oct 19, 1:36 PM
Unknown Object (File)
Sun, Oct 19, 11:20 AM
Subscribers

Details

Summary

We only need to check for unMETALOGed directories and sort the METALOG
file if we're using it, i.e. if we're doing a NO_ROOT build. This
non-NO_ROOT builds by no longer bogusly writing to /METALOG*.

We only need to add databases (spwd.db etc) to METALOG if we're doing
a pkgbase-enabled NO_ROOT build; but we should always do this before
creating the filesystem, not only if we installed extra packages (in
vm_extra_install_packages, where that code was erroneously placed).
This fixes non-cloud VM images, which in 15.0-BETA2 shipped without
password databases.

MFC after: 3 days
Sponsored by: https://www.patreon.com/cperciva

Diff Detail

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

Event Timeline

release/tools/vmimage.subr
302

is there any harm in doing this anyway for a non-pkgbase build? or is it handled somewhere else in that case?

release/tools/vmimage.subr
302

For a non-pkgbase install this is handled by code in various Makefiles, e.g. https://cgit.freebsd.org/src/tree/lib/libc/gen/Makefile.inc#n584

It would be sort of harmless to include here anyway since we're going to remove duplicate lines, but for clarity I'd prefer to only add the lines when needed.

ivy added inline comments.
release/tools/vmimage.subr
302

okay, that seems reasonable.

This revision is now accepted and ready to land.Sun, Oct 19, 4:17 PM