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
F169389367: D58961.id185385.diff
Tue, Sep 1, 9:45 AM
F169383122: D58961.id184835.diff
Tue, Sep 1, 9:26 AM
F169364151: D58961.id184835.diff
Tue, Sep 1, 8:10 AM
F169358583: D58961.id184461.diff
Tue, Sep 1, 7:41 AM
F169229002: D58961.id.diff
Mon, Aug 31, 11:23 PM
F169215457: D58961.id184512.diff
Mon, Aug 31, 9:35 PM
F169214121: D58961.id184962.diff
Mon, Aug 31, 9:22 PM
F169211202: D58961.id184753.diff
Mon, Aug 31, 8:52 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 76255
Build 73138: 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