Page MenuHomeFreeBSD

nanobsd: Use mtree -C to produce the metalog
ClosedPublic

Authored by jlduran on Sat, Jan 24, 12:03 AM.

Details

Summary

Prefer an mtree -C output, which is guaranteed to be mtree-compatible.
Add "gname", "uname", and "tags" to the default keyword set, while
removing "size" and "time", the latter being set on kernel file entries
and taking precedence over makefs -T (when paired with -F).

As a side effect, this produces a cleaner file with sorted keywords.

Test Plan
# sh nanobsd.sh -U -n -c ~/nano.conf
...
# shasum /usr/obj/nanobsd.full/_.disk.image
<matching hash>  /usr/obj/nanobsd.full/_.disk.image
# sh nanobsd.sh -U -n -c ~/nano.conf
...
# shasum /usr/obj/nanobsd.full/_.disk.image
<matching hash>  /usr/obj/nanobsd.full/_.disk.image

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70101
Build 66984: arc lint + arc unit

Event Timeline

jlduran added a reviewer: imp.
  • Update the comment to indicate that we also remove the time keyword
imp added inline comments.
tools/tools/nanobsd/defaults.sh
569

Do you want -u on the sort?

This revision is now accepted and ready to land.Sat, Jan 24, 12:57 AM
tools/tools/nanobsd/defaults.sh
569

I guess it does not hurt to have it. mtree-dedup.awk should take care of duplicates, furthermore mtree -C removes the duplicate entries. But I'll add it when committing, just in case. Thanks!

tools/tools/nanobsd/defaults.sh
569

I should have emphasized: mtree -C NOW removes the duplicate entries.

This revision was automatically updated to reflect the committed changes.
jlduran marked an inline comment as done.