pkg -c/pkg -j question

Matthew Seaman matthew at freebsd.org
Wed Feb 13 16:10:13 UTC 2013


On 13/02/2013 15:58, Arthur Chance wrote:
> A question for pkgng gurus. When using pkg -c or pkg -j to work within
> chroots or jails, how much of the pkg infrastructure needs to be present
> in the chroot/jail?
> 
> The reason I ask is because I'm thinking of building a server which has
> all services running in jails, with the necessary packages being
> manipulated from above.

You need /bin/sh in each jail for pkg to be able to workout what ${ABI}
should be.

You need /var/db/pkg and /var/cache/pkg available and writable in the
jail / chroot (ie. relative to the chroot or root of the jail)

That's basically it.

You might run into problems running some package scripts if you're
trying to manage a chroot designed for a very different CPU arch / OS
version than your system is running: this is something we haven't really
put much thought into yet.

	Cheers,

	Matthew

PS.  This sort of question is what the new freebsd-pkg at freebsd.org list
is for.




More information about the freebsd-questions mailing list