From owner-freebsd-questions@FreeBSD.ORG Wed Feb 13 16:10:12 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EBA516B9 for ; Wed, 13 Feb 2013 16:10:12 +0000 (UTC) (envelope-from matthew@freebsd.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 8B23DD32 for ; Wed, 13 Feb 2013 16:10:12 +0000 (UTC) Received: from rufus.webfusion.com (mail.heartinternet.co.uk [79.170.40.31]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.6/8.14.6) with ESMTP id r1DG9vAu051872 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Wed, 13 Feb 2013 16:10:03 GMT (envelope-from matthew@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.7.4 smtp.infracaninophile.co.uk r1DG9vAu051872 Authentication-Results: smtp.infracaninophile.co.uk/r1DG9vAu051872; dkim=none reason="no signature"; dkim-adsp=none (insecure policy) X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host mail.heartinternet.co.uk [79.170.40.31] claimed to be rufus.webfusion.com Message-ID: <511BBAD3.30707@freebsd.org> Date: Wed, 13 Feb 2013 16:09:55 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130129 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: pkg -c/pkg -j question References: <511BB811.3050301@qeng-ho.org> In-Reply-To: <511BB811.3050301@qeng-ho.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 16:10:13 -0000 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@freebsd.org list is for.