pkg-add for installing into a jail?
doug at fledge.watson.org
Sun Jul 31 21:08:15 UTC 2016
On Sun, 31 Jul 2016, Alnis Morics wrote:
> I could successfully use "pkg -j 1 <packagename>" many times to install
> packages onto a jail.
> But now I had to change an option in a port, so I built a package myself:
> portmaster -g www/apache22
> The package and its dependency was stored to /usr/ports/packages/All (as I
> set it in $PACKAGES):
> apache22-2.2.31_1.txz apr-184.108.40.206.5.4.txz
> I can now install these packages using pkg-add on the host, but not onto the
> test:/usr/ports/packages/All# pkg -j 1 add apache22-2.2.31_1.txz
> pkg: apache22-2.2.31_1.txz: No such file or directory
> pkg: Was 'pkg install apache22-2.2.31_1.txz' meant?
> pkg: apr-220.127.116.11.5.4.txz: No such file or directory
> pkg: Was 'pkg install apr-18.104.22.168.5.4.txz' meant?
> Failed to install the following 2 package(s): apache22-2.2.31_1.txz,
> If there is "No such file or directory", where does pkg look for them? (I
> also tried to use full path; the result is the same) Or is pkg-add an
> exception which doesn't work with -j option?
The way you build a jail is to have /usr/ports and /usr/local be on the jail not
on the base. The later is by default. If you log into the base system and look
at the file tree you can see how you are set up. I use exjail that provides an
option for this and I look at this so rarely I 're-learn' what I need each time.
The jail an ezjail man pages are very well done.
More information about the freebsd-questions