Page MenuHomeFreeBSD

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

Authored by senguptaangshuman17_gmail.com on Wed, Aug 19, 10:20 AM.
Tags
None
Referenced Files
F168400198: D58961.id184835.diff
Fri, Aug 28, 1:21 AM
F168380016: D58961.id184753.diff
Thu, Aug 27, 9:25 PM
F168379945: D58961.id184326.diff
Thu, Aug 27, 9:24 PM
F168379390: D58961.id184512.diff
Thu, Aug 27, 9:19 PM
F168379389: D58961.id185000.diff
Thu, Aug 27, 9:19 PM
F168377516: D58961.diff
Thu, Aug 27, 9:03 PM
F168374075: D58961.diff
Thu, Aug 27, 8:31 PM
F168373787: D58961.diff
Thu, Aug 27, 8:29 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 76085
Build 72968: 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