Add metalog entries for various files. This is a bit incomplete as
pw(8) doesn't yet have support for emitting metalog entries, which we
need since it's used here to create a user.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
@cperciva has said that he's planning to remove Vagrant support at some point so I will just hold off on this one for now.
We now have a developer interested in making Vagrant support work; so please go ahead with this change.
So, to be clear this change is not complete. In particular, this script creates a vagrant user, which isn't compatible with the use of an mtree metalog. I can see a couple of options:
- somehow use cloud-init to create the user during first boot,
- teach pw(8) to emit metalog entries and use that functionality here.
@cperciva @emaste do you have any opinions on the best path here? I'm inclined towards the latter.
I think your proposed path from earlier, of "don't do Vagrant if we're doing no-root builds" is ok for now. We'll tackle the no-root issues with Vagrant as part of resurrecting Vagrant builds.
BTW in EC2 we install amazon-ssm-agent and that creates a user -- how are you handling the pw(8) usage there?
Good question. The home directory for that user won't be included in the image, which is a bug. I'm not sure if it's a problem in practice: does anything actually need to be able to log in as the amazon ssm user? In the Vagrant case, the home directory is clearly required. This all suggests that having a -M <METALOG> option for pw(8) would be useful...