From owner-freebsd-questions@freebsd.org Sun Jul 31 21:08:15 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C68C9BA8F04 for ; Sun, 31 Jul 2016 21:08:15 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from cyrus.watson.org (cyrus.watson.org [198.74.231.69]) by mx1.freebsd.org (Postfix) with ESMTP id A62E711D0 for ; Sun, 31 Jul 2016 21:08:15 +0000 (UTC) (envelope-from doug@fledge.watson.org) Received: from fledge.watson.org (fledge.watson.org [198.74.231.63]) by cyrus.watson.org (Postfix) with ESMTPS id A15A146B3C; Sun, 31 Jul 2016 17:08:14 -0400 (EDT) Received: from fledge.watson.org (doug@localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.15.2/8.15.2) with ESMTP id u6VL8ECN095522; Sun, 31 Jul 2016 17:08:14 -0400 (EDT) (envelope-from doug@fledge.watson.org) Received: from localhost (doug@localhost) by fledge.watson.org (8.15.2/8.15.2/Submit) with ESMTP id u6VL8Egk095519; Sun, 31 Jul 2016 17:08:14 -0400 (EDT) (envelope-from doug@fledge.watson.org) Date: Sun, 31 Jul 2016 17:08:14 -0400 (EDT) From: doug Reply-To: doug@safeport.com To: Alnis Morics cc: freebsd-questions@freebsd.org Subject: Re: pkg-add for installing into a jail? In-Reply-To: <1997dd6e-1abd-4d4f-e95b-0f4679543a16@mail.com> Message-ID: References: <1997dd6e-1abd-4d4f-e95b-0f4679543a16@mail.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (fledge.watson.org [127.0.0.1]); Sun, 31 Jul 2016 17:08:14 -0400 (EDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2016 21:08:15 -0000 On Sun, 31 Jul 2016, Alnis Morics wrote: > Hi, > > I could successfully use "pkg -j 1 " 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-1.5.2.1.5.4.txz > > I can now install these packages using pkg-add on the host, but not onto the > jail: > > test:/usr/ports/packages/All# pkg -j 1 add apache22-2.2.31_1.txz > apr-1.5.2.1.5.4.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-1.5.2.1.5.4.txz: No such file or directory > pkg: Was 'pkg install apr-1.5.2.1.5.4.txz' meant? > > Failed to install the following 2 package(s): apache22-2.2.31_1.txz, > apr-1.5.2.1.5.4.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? > > -Alnis 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.