Re: package +MANIFEST file - look inside

2020-02-10 Thread Yuet-nan Wong via freebsd-ports
Thanks.
jq was quite helpful but the syntax convoluted.  Fortunately with thispkg info 
-R -F xyzzy-1.0.txz (and some while reads) 
 and/usr/local/sbin/pkg-static -d add --no-scripts -f I was able to achieve all 
my short term goals. 

I did not know that I could examine the package content without installing.  
This is a great bonus. 


___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: package +MANIFEST file - look inside

2020-02-10 Thread Bob Eager
On Tue, 11 Feb 2020 00:04:42 + (UTC)
Yuet-nan Wong via freebsd-ports  wrote:

> 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.
> 
> 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.

Assuming a package called (say) xyzzy:

pkg fetch xyzzy
pkg info -R -F xyzzy-1.0.txz (or whatever)

Redirect the output from pkg info to somewhere, and use jq to analyse
it.

Or use: pkg-info --raw-format yaml -F xyzzy-1.0.txz
and then a yaml analyser.
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: package +MANIFEST file - look inside

2020-02-10 Thread Miroslav Lachman

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
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


package +MANIFEST file - look inside

2020-02-10 Thread Yuet-nan Wong via freebsd-ports
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.

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.
___
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"