Page MenuHomeFreeBSD

nanobsd: Use mtree -C to produce the metalog
ClosedPublic

Authored by jlduran on Jan 24 2026, 12:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 25, 5:28 PM
Unknown Object (File)
Tue, Aug 25, 10:15 AM
Unknown Object (File)
Tue, Aug 25, 12:58 AM
Unknown Object (File)
Fri, Aug 21, 2:04 PM
Unknown Object (File)
Mon, Aug 17, 5:08 AM
Unknown Object (File)
Sun, Aug 16, 3:34 AM
Unknown Object (File)
Sat, Aug 15, 8:05 PM
Unknown Object (File)
Thu, Aug 13, 12:11 AM
Subscribers

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 Not Applicable
Unit
Tests Not Applicable

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.Jan 24 2026, 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.