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
F168895623: D58961.diff
Sun, Aug 30, 3:55 PM
F168836370: D58961.id185385.diff
Sun, Aug 30, 9:25 AM
F168810514: D58961.id185265.diff
Sun, Aug 30, 6:36 AM
F168790814: D58961.id184835.diff
Sun, Aug 30, 4:23 AM
Unknown Object (File)
Sat, Aug 29, 9:34 AM
Unknown Object (File)
Fri, Aug 28, 10:20 PM
Unknown Object (File)
Fri, Aug 28, 10:15 PM
Unknown Object (File)
Fri, Aug 28, 3:49 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 76300
Build 73183: 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