From owner-freebsd-questions@freebsd.org Mon Aug 1 07:21:37 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 87D5DBAAC4A for ; Mon, 1 Aug 2016 07:21:37 +0000 (UTC) (envelope-from alnis.m@mail.com) Received: from mout.gmx.com (mout.gmx.com [74.208.4.201]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 503A11BE6 for ; Mon, 1 Aug 2016 07:21:37 +0000 (UTC) (envelope-from alnis.m@mail.com) Received: from [192.168.7.62] ([87.246.164.215]) by mail.gmx.com (mrgmxus002) with ESMTPSA (Nemesis) id 0M4HBd-1bC2n72Flr-00rpIv for ; Mon, 01 Aug 2016 09:21:34 +0200 Subject: Re: pkg-add for installing into a jail? References: <1997dd6e-1abd-4d4f-e95b-0f4679543a16@mail.com> To: freebsd-questions@freebsd.org From: Alnis Morics Message-ID: <41fb60ad-3377-4770-aeb3-8831b43c9a18@mail.com> Date: Mon, 1 Aug 2016 10:21:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:+aYIVW6v+wJcxTwenjgGLJc07kkdDzAnPLdX8OZs5lXKM3ctM89 VxziioBheVNQKFpNvF12Eq61Fif2VA1NR/4xm/BmMr9YjGL5jwqW5reH1mvOp29UI/omJ8l TjhwAioALX5MMLDzXeaR5oYRdf/4zxP2Flcrb2Xyrq03WvDyfk1Et8dJQla5joK5U2YzO2x oLvAE0KitA4E6LYcLMIDA== X-UI-Out-Filterresults: notjunk:1;V01:K0:Lpxi9wKjpc8=:qN6eZJb+Ns85IrZRt0edMK MCxE8CoBIjzzre8mhnfDws9PF7xoMP1IgfTU+jmZVp/dOj2IRJAKZOPMf73pxoqMpHH80pCIG RWLI8GDt5q0EIiO+UAvqsLhB2Dv98BnGnF03Eub54GU23Um+4xotb/6ADcG+htyuwjuIdz6Cj s5cCsa1WjlNHhRPUA+ZD9mK4NKjvg5/OUgipWbOc7o3ouyOC+1EaQ/ZhnNlwQGVor1YsQcTzD LMdd589641hGRgaL8Phm5t+/vLrrZHyuzPnUiRyu82vIV7dzllRdl04pClhTCtJ5cGT7Hfm5x 3+H0p7AG06Vz3LOjKJTePcxfUVL6qTyu6IgRxapkc6VL1W3aeYKHxsxWAhR0R2dBP0Lb8JOiZ lgq5M2OuGI+i7Lxx9UsRyyuoYHOGanykCNsxkRA6Uf4Phtmm3gLsd5WC3hwMfEwnKsoL6J439 8wLD5JcjXJBKXVJ+7o2fyKD7+WnMXjaGijcQxFZ/2w7QjtGNznltp/fCgl6JG5jorOJxoAieO 3LiRcCg8+6rD06/ZjuDC684mdFscw88IY6rEkF6Eo74eES0RIdv3P2OLAn/11Eu9PZqW53tpJ mk+c432kAurESbzoeD1wpN0QPdJ7ZjZwBFiEuRq+D/5ouLgA7yjLoeqfzl/YPdpOip7hrI4eg An/PqSxUE9IVdVP3YMsGe+E+feJq6CH2XgxnKrlcIMyzgZKR6XQOqPkNEsdcXzs9iY1LqZtCG YBAZuTnLCz+c8QEkNqhq6H15tcEk/Jl0SD2gN4Y0jZwAeY+DYOBift3dRkPT1eIAygQpuqgVS 4FANe46 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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: Mon, 01 Aug 2016 07:21:37 -0000 Thanks, Doug and Ben. Yes, null-mounting and using absolute path in the pkg add command helped. I found out that the packages directory can be arbitrary but their paths must be the same on the host and on the jail. Btw, I also use ezjail but I don't use ezjail-admin for updating ports because it uses portsnap which, on its turn, pulls in the head (no other option AFAIK). I prefer using a quarterly branch which I synchronize with svn. Hence this hassle :) -Alnis On 08/01/2016 01:40 AM, Ben Woods wrote: > On Sunday, 31 July 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 > > > It looks like the package you are trying to install is not in the > directory that pkg is running from within the jail. Either they are on > the host filesystem but not passed through to the jail, or pkg runs > from a different directory within the jail. > > If you have your host system ports directory nullfs mounted inside the > jail also, this might be fixed by specifying the absolute path of the > package. > > # pkg -j 1 add /usr/ports/packages/All/apache22-2.2.31_1.txz > /usr/ports/packages/All/apr-1.5.2.1.5.4.txz > > Check if your ports tree has the same directory inside the jail, and > contains these files. > > Good luck! > Ben > > > -- > > -- > From: Benjamin Woods > woodsb02@gmail.com