Page MenuHomeFreeBSD

nanobsd: Use mtree -C to produce the metalog
ClosedPublic

Authored by jlduran on Sat, Jan 24, 12:03 AM.
Tags
None
Referenced Files
F143028243: D54854.id170317.diff
Sun, Jan 25, 9:06 AM
F143028130: D54854.id170312.diff
Sun, Jan 25, 9:05 AM
F142971057: D54854.id.diff
Sun, Jan 25, 12:35 AM
F142964877: D54854.id170314.diff
Sat, Jan 24, 11:43 PM
F142944120: D54854.diff
Sat, Jan 24, 9:01 PM
F142933075: D54854.diff
Sat, Jan 24, 7:16 PM
F142929008: D54854.id170314.diff
Sat, Jan 24, 6:43 PM
F142915384: D54854.id170317.diff
Sat, Jan 24, 4:55 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 70099
Build 66982: 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.