From owner-freebsd-questions@FreeBSD.ORG Tue Oct 8 13:12:33 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 28C20C2E for ; Tue, 8 Oct 2013 13:12:33 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF08B2281 for ; Tue, 8 Oct 2013 13:12:32 +0000 (UTC) Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id B4B0720F04 for ; Tue, 8 Oct 2013 09:12:31 -0400 (EDT) Received: from web3 ([10.202.2.213]) by compute4.internal (MEProxy); Tue, 08 Oct 2013 09:12:31 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:in-reply-to:references :subject:date; s=smtpout; bh=e4reVXloE6orhqh+ijaBvFOFH+8=; b=IeQ ZLUCuXQDPKfL3izS6RTL00C7zYqEbqBjwP+ctap4DO1FKmkE8akTqKhht3i2n//G 0BoDOYpsEgQvkW3wsN9a4NiN+erL/pdeDKEJYUnFQktNeLDmUx/fIgkyXSMIJ3wx 21XUjHTWA8Si8sEjfZmuKZLD2dDPWvzz7jJJEd5c= Received: by web3.nyi.mail.srv.osa (Postfix, from userid 99) id 96D0F116B32; Tue, 8 Oct 2013 09:12:31 -0400 (EDT) Message-Id: <1381237951.15680.31430109.1ED62FEE@webmail.messagingengine.com> X-Sasl-Enc: p3k0gmAMQbF6pLwTTSiTFsXhA6+Lf3wlMdxiJWhKrgXb 1381237951 From: Mark Felder To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: MessagingEngine.com Webmail Interface - ajax-ce174988 In-Reply-To: <20131008130753.GA26177@sh4-5.1blu.de> References: <20131008111618.GA9957@sh4-5.1blu.de> <1381237086.8491.31423161.63C77F6D@webmail.messagingengine.com> <20131008130753.GA26177@sh4-5.1blu.de> Subject: Re: install packages with pkg_add(1) into another file system Date: Tue, 08 Oct 2013 08:12:31 -0500 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: Tue, 08 Oct 2013 13:12:33 -0000 On Tue, Oct 8, 2013, at 8:07, Matthias Apitz wrote: > El d=EDa Tuesday, October 08, 2013 a las 07:58:06AM -0500, Mark Felder > escribi=F3: >=20 > > On Tue, Oct 8, 2013, at 6:16, Matthias Apitz wrote: > > >=20 > > > So far so good. Now I want install the packages as well into the image > > > in /mnt. What would be the best method for this? Run pkg_add with the > > > flag --chroot chrootdir, or use chroot(8) directly? Or any other idea? > > >=20 > > > Thanks in advance > > >=20 > > > All this is with 10-CURRENT (base and ports). > > >=20 > >=20 > > pkg_add and all of the old "pkgtools" do not exist in 10-CURRENT > > anymore. Are you running a build of 10-CURRENT before they were removed? >=20 > No. The r255948 was built on a clean, empty environment but with >=20 > $ cat /etc/src.conf=20 > WITH_PKGTOOLS=3Dyes >=20 Ok, I won't question your needs for pkg_* as you seem to be aware of what you're doing :-) When you use pkg_* or pkg with their built-in chroot options it seems that it executes those tools within those chroots instead of setting the chroot as a destination for the installation. So if you wanted to use --chroot I think you have to make sure the packages are available inside the chroot. Perhaps there's some sort of DESTDIR option for the package installation? I've been searching but have had no luck yet. I'll ask around. It might be more reliable to do something like nullfs mount the packages into the chroot and do the installation completely within the chroot.