From owner-freebsd-current@freebsd.org Sun May 22 20:43:16 2016 Return-Path: Delivered-To: freebsd-current@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 A84FAB456A4 for ; Sun, 22 May 2016 20:43:16 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (kientzle.com [142.254.26.11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 887BE118B; Sun, 22 May 2016 20:43:15 +0000 (UTC) (envelope-from tim@kientzle.com) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id u4MKhEmT008267; Sun, 22 May 2016 20:43:14 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.102] (192.168.1.101 [192.168.1.101]) by kientzle.com with SMTP id 6vc2qxnjijcs2sa2d6zp7tuhh2; Sun, 22 May 2016 20:43:13 +0000 (UTC) (envelope-from tim@kientzle.com) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: pkg chroot issues? From: Tim Kientzle In-Reply-To: Date: Sun, 22 May 2016 13:43:13 -0700 Cc: FreeBSD current Content-Transfer-Encoding: quoted-printable Message-Id: <471497D9-2B97-42B4-9C59-EBABEEED77C9@kientzle.com> References: <9BC1A0E1-696D-4C00-B8C8-B57C4DB3A8EF@kientzle.com> To: "K. Macy" X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2016 20:43:16 -0000 > On May 22, 2016, at 1:28 PM, K. Macy wrote: >=20 >=20 >=20 > On Sunday, May 22, 2016, Tim Kientzle wrote: > Crochet has some experimental hooks to install packages onto the = system being built, but this seems to be hitting problems due to = limitations in 'pkg -c'. In particular, it seems that pkg performs the = chroot before it does any network lookups. This is a problem if the = chroot is not a complete system environment (which it cannot be when = you're building an image for another system). >=20 > There's some further discussion on github: >=20 > https://github.com/freebsd/crochet/issues/141 >=20 > Any suggestions? >=20 > Cheers, >=20 > Tim >=20 >=20 > Just like you need to mount devfs you should have a resolv.conf in = your chroot first. Just copy it over before running pkg. This works for = me in my image creation script. Sometimes the image does already have a resolv.conf, but if it does, = it's for the target environment (where the image will ultimately be = running) and may not be appropriate for the environment where the image = is being built. Tim