From owner-freebsd-questions@freebsd.org Sun Jul 31 22:41:00 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 AC577BAA0DA for ; Sun, 31 Jul 2016 22:41:00 +0000 (UTC) (envelope-from woodsb02@gmail.com) Received: from mail-yw0-x234.google.com (mail-yw0-x234.google.com [IPv6:2607:f8b0:4002:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EE3E1193 for ; Sun, 31 Jul 2016 22:41:00 +0000 (UTC) (envelope-from woodsb02@gmail.com) Received: by mail-yw0-x234.google.com with SMTP id u134so158346690ywg.3 for ; Sun, 31 Jul 2016 15:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Hn56/bYt5aFNMwxrHhpxvHe7vDTzWebxuPFjzZ/zkYk=; b=KackOHu2tvzH8zCDs3kWWlq4nop/y0nchplHcbeV0Eysmfi7w6N2pjwB5NN96nh0X/ nKkRcJtFavyQyvCYV/LU2IetXVnAgsdQtRQrFmdJtfmAbWf/8Z9pZc/vyC2DAoGzp2XC nkABaywpiiQOfBGOK2x1vFECzyIA/cwQJF6ML/ogM+UB3PxP1i/dE8WLIl33ZZKYbwUa JxSBoTx4SjChUIDRb6Vbe0f5l/oZEEC2ulLYReLfttRFd70VfPJgNwolZAsI0YvIyT9x rzN76HyUsV97i9txULZWnCopdd7vZhAOg1WZFku7nC1ngv2xtwJuE9i1wTiLhI4IOSIN JG2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Hn56/bYt5aFNMwxrHhpxvHe7vDTzWebxuPFjzZ/zkYk=; b=QtdisVEQEzrhr9/vAjsjmW8kMbjjY8h8pXOzS/9GLjMOubFRVPLDz1wZdwhkgdkx2s IdiL3By2yd7WYgCa0GHySqRe9HEzUBuBgk1OhZlD9ootobQoY6XBm2xqbSBrPXttpDwV exx+++qaro25/sZJE7512ltvPSVimmGUF4W0z911ojbs+Ve9n8j1lcGJp+D/tyFI6+Hn wzVIWxXA1utVmTUfkWIxqYf8Ki+n+W+fDx/KWEHOPfZDutK06XgVdyVAteBnfDSV5P2c k2Eb8JIf2Cv8tINlZAasnoYn3dZkWR0WAngj/OtDNgYsLbWQuBe0NoB2nglXAqSBIjlR WemA== X-Gm-Message-State: AEkoous215gucwjIvO7t3RJgAuRjwx+4/fFvtyzCDFsSFayLjA2bkhl4TI+3IUQGQguRPSUk8lL6ZqgqR3pl4Q== X-Received: by 10.37.43.129 with SMTP id r123mr39844864ybr.51.1470004859001; Sun, 31 Jul 2016 15:40:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.199.65 with HTTP; Sun, 31 Jul 2016 15:40:58 -0700 (PDT) In-Reply-To: <1997dd6e-1abd-4d4f-e95b-0f4679543a16@mail.com> References: <1997dd6e-1abd-4d4f-e95b-0f4679543a16@mail.com> From: Ben Woods Date: Mon, 1 Aug 2016 06:40:58 +0800 Message-ID: Subject: Re: pkg-add for installing into a jail? To: Alnis Morics Cc: "freebsd-questions@freebsd.org" Content-Type: text/plain; charset=UTF-8 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: Sun, 31 Jul 2016 22:41:00 -0000 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