Page MenuHomeFreeBSD

nanobsd: Clean up target pkg database and metalog after install
Needs ReviewPublic

Authored by senguptaangshuman17_gmail.com on Aug 19 2026, 10:20 AM.
Tags
None
Referenced Files
F174372358: D58961.id.diff
Fri, Oct 2, 6:33 PM
F174275611: D58961.id184326.diff
Thu, Oct 1, 10:51 PM
F174275491: D58961.id184835.diff
Thu, Oct 1, 10:50 PM
F174275346: D58961.id184512.diff
Thu, Oct 1, 10:48 PM
F174275017: D58961.id185265.diff
Thu, Oct 1, 10:44 PM
F174273182: D58961.id184753.diff
Thu, Oct 1, 10:25 PM
F174269613: D58961.id184962.diff
Thu, Oct 1, 9:40 PM
Unknown Object (File)
Thu, Oct 1, 3:59 PM
Subscribers

Details

Reviewers
jlduran
jrm
ashish
Summary

Add _xxx_fix_pkg_permissions to fix the libsa.3.gz and /root permissions in the target pkg database until pkg metalog generation is fixed upstream, pkg_db_vacuum to verify and compact the target pkg database after the manual SQL edits, and _xxx_pkg_add_var_db_files_to_metalog to add the generated /var/db/pkg files to the metalog.

Also document _xxx_pkg_metalog's existing permission fixups by referencing the same upstream pkg issue.

Diff Detail

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

Event Timeline

Clean up merge conflict markers in defaults.sh

I think _xxx_pkg_db_dump_or_vacuum should be added sooner. In fact, I think this function should not be a _xxx_ function, as we will always want to verify the integrity of the pkg database before shipping our NanoBSD image, so I suggest "promoting" it to a regular pkg function (pkg_db_vacuum since it no longer dumps.) and including it in D58951.
I think the commit message in this revision also needs updating.

Update cleanup helper to call pkg_db_vacuum