packages and base jails

Michael W. Lucas mwlucas at michaelwlucas.com
Mon Nov 26 20:24:12 UTC 2018


Hi,

I'm writing a book on jails and am looking for BCP. I'd like to
present either "This is the approved solution and should work" or
"these are the gotchas with any of these, choose your pain."

Folks want base jails to include packages, but also want to install
additional packages--which won't happen if /usr/local is mounted
read-only in the base jail. Trawling around the Net I see a couple
options. Both involve the primary jail using a different package
repo. The overlay jail uses the standard package repo.

1) primary jail uses a repo with PREFIX=/usr/pkg or /opt. Works in my
simple use cases once I set ldconfig directories in rc.conf, but I'm
told programs like pkgconfig can go sideways.

2) base jail repo uses with PREFIX=/. Utterly violates separation of
base and pkg, but everything should find everything out of the
box. Again, seems to work in my wimpy use cases.

Is there an option that should work? Or is a matter of choosing
between horrors?

Thanks,
==ml



-- 
Michael W. Lucas 	https://mwl.io/
author of: Absolute OpenBSD, SSH Mastery, git commit murder,
Immortal Clay, PGP & GPG, Absolute FreeBSD, etc, etc, etc...


More information about the freebsd-ports mailing list