package +MANIFEST file - look inside

Miroslav Lachman 000.fbsd at quip.cz
Tue Feb 11 00:50:57 UTC 2020


Yuet-nan Wong via freebsd-ports wrote on 2020/02/11 01:04:
> Is there a command, or short script that enables the +MANIFEST to be examined.  There are cases where we want to review what the scripts section of the +MANIFEST contains.  In particular the post-install script.
> 
> What we're trying to achieve is something like
> pkg view scripts post-install -f $OUTPUT
> so we can modify or run it at a better time, like first boot.

If you want to modify or run in in a better time then you probably need 
to know it before running pkg install / pkg upgrade command. Then you 
probably need to fetch a package alone (pkg upgrade with -f or 
--fetch-only) and then you can unpack +MANIFEST from it and use some 
JSON / YAML tool to examine content (e.g. textproc/jq). After that you 
can run pkg upgrade (or pkg install) again with -I or --no-install-scripts.

> As a follow-on from this, we would like to use the "files" list to set the MAC mls/ settings as a post-install task, so getting the first, filename element (of filename:signature,) from the "files" list is important.
> Thank-you.

You can get the list of the installed files by "pkg info -l pkgname" or 
"pkg query '%Fp' pkgname"

Miroslav Lachman


More information about the freebsd-ports mailing list