Add missing mtree directory entries. Without them, the resulting
worldstage METALOG file would produce an invalid (incomplete) mtree
specification file.
Details
- Reviewers
ivy - Group Reviewers
pkgbase - Commits
- rG8d99314a044c: mtree: Add missing entries
In preparation for pkgbase + NanoBSD, we currently "lint" the resulting METALOG with a final "mtree -C" pass:
cat /usr/obj/usr/src/arm64.aarch64/worldstage/METALOG | sort -u | mtree -C -K uname,gname,tags -R time
The de-duplication of entries can be fixed so that, for example:
./boot type=dir uname=root gname=wheel mode=0755 tags=package=bootloader ./boot type=dir uname=root gname=wheel mode=0755 tags=package=utilities
Can be "unified" as, for example:
./boot type=dir uname=root gname=wheel mode=0755 tags=package=bootloader,utilities
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
./boot type=dir uname=root gname=wheel mode=0755 tags=package=bootloader,utilities
i don't think this is right (and based on what i remember of mtree-to-plist, i'm not sure it'll even work). /boot should be owned by the bootloader package; if something is adding a package=utilities tag to it, whatever's doing that should be fixed.
not tested, but based on code inspection this looks fine. it's better not to add the correct package= tags on the new entries for now, instead we can do that for the entire file and test it all at once, since that's created subtle issues in the past.
Yes, I chose a bad example. How about:
./etc type=dir uname=root gname=wheel mode=0755 tags=package=runtime ./etc type=dir uname=root gname=wheel mode=0755 tags=package=utilities
It turns out that NanoBSD's mtree-dedup.awk "chooses" the first package entry, but ideally both should be on a single line. You are correct that mtree-to-plist.awk does not understand a combination like package=runtime,utilities but it is something we will be exploring. Maybe it is better to tag as plural: packages=<pkg1>,<pkg2> and leave the current package= branch logic as is.
It is still too early to tell, as we do not know what the output of pkg info should be on a pkgbase NanoBSD system.
Thank you for the fast review.