From owner-freebsd-current@freebsd.org Sun May 22 21:24:46 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 4C43AB4698C for ; Sun, 22 May 2016 21:24:46 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::230]) (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 B521E12D0; Sun, 22 May 2016 21:24:45 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-lf0-x230.google.com with SMTP id e126so40936513lfg.2; Sun, 22 May 2016 14:24:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=INUwtgzRus6/wQ3TRFe+ZY4CHaKLHLFPkaj+Skig2SY=; b=nR7hX6e1YwVNEpF/2x2fJmtHn3VYA1+ySV4XfpBKuzPq87bG3EkwG1UJQn54K+1w4W PnADPFcKTYb+1Z2/6rp4UVbhkIbu/PwefLZf4fwPJxyDxVyrblfoMfBZUWHAdk/oEB7f 09k65S1PAK3K6WARfNR/T3BigJ/YY600k3pmM+lD1nZ41+shYVMM/HjgS1Yf9kLIMO6w fbqZlwM6HFyvYkYima4AkiDLD67kdV8h0YUmcWr0/uxFP9vX2Ni5VDhR3AixO2Z8k1PP EUuPfK/3j4dmAu46YUPx5xnVWjqCp3FyflvVKcy3Yu6vjvYA5khFCxksZjxThr3XRLXr Gw3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=INUwtgzRus6/wQ3TRFe+ZY4CHaKLHLFPkaj+Skig2SY=; b=eQJI9N9iRtGvURKgi2BAbNwEK/ABPdAGZWnxcJ7Nq4IQY/eVKbk+koVCMf1xDpBjV3 4iIl6RA4CMe3eWWL7icH3rP/ZJbgF7VrQxbHVSjannQ23HkFhR41/C8O/yP8IkA2TS3T OHfvGO0FkSFAcsv/+QoVI1Jjpxyiur+0WhNN5GoZURqj2WyGWJGedFtCb+q8lAC5c2nH Qdzr+eo8eyRbMdPSDvWe522Dm2CUZGRAlbEONPErH5YIYFBW8kocR7l5XwbKFgfHnzTt 6rHGrHHnirkJYpmbqec1Vgjwy31Z89AyIZ+UGocZB+xhT2wjxSmQ9txt8569SO7c/8FY WRwg== X-Gm-Message-State: AOPr4FU2OhXnm3gLHlp9E7f52JLPYSmyLevtL7D61BJpN2ZdB9wPiFHpD0d0snhm4upeag== X-Received: by 10.25.158.131 with SMTP id h125mr3929204lfe.165.1463952283345; Sun, 22 May 2016 14:24:43 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id k81sm5215267lfg.16.2016.05.22.14.24.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 May 2016 14:24:42 -0700 (PDT) Sender: Baptiste Daroussin Date: Sun, 22 May 2016 23:24:39 +0200 From: Baptiste Daroussin To: Matthew Macy Cc: Tim Kientzle , "K. Macy" , FreeBSD current Subject: Re: pkg chroot issues? Message-ID: <20160522212439.GG11189@ivaldir.etoilebsd.net> References: <9BC1A0E1-696D-4C00-B8C8-B57C4DB3A8EF@kientzle.com> <471497D9-2B97-42B4-9C59-EBABEEED77C9@kientzle.com> <154da550d77.fb9ef0d4130957.4575849336840075088@nextbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7uYPyRQQ5N0D02nI" Content-Disposition: inline In-Reply-To: <154da550d77.fb9ef0d4130957.4575849336840075088@nextbsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) 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 21:24:46 -0000 --7uYPyRQQ5N0D02nI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 22, 2016 at 02:18:07PM -0700, Matthew Macy wrote: >=20 >=20 >=20 > ---- On Sun, 22 May 2016 13:43:13 -0700 Tim Kientzle = wrote ----=20 > > =20 > > > On May 22, 2016, at 1:28 PM, K. Macy wrote:=20 > > > =20 > > > =20 > > > =20 > > > On Sunday, May 22, 2016, Tim Kientzle wrote:=20 > > > Crochet has some experimental hooks to install packages onto the sys= tem being built, but this seems to be hitting problems due to limitations i= n '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 comple= te system environment (which it cannot be when you're building an image for= another system).=20 > > > =20 > > > There's some further discussion on github:=20 > > > =20 > > > https://github.com/freebsd/crochet/issues/141=20 > > > =20 > > > Any suggestions?=20 > > > =20 > > > Cheers,=20 > > > =20 > > > Tim=20 > > > =20 > > > =20 > > > Just like you need to mount devfs you should have a resolv.conf in y= our chroot first. Just copy it over before running pkg. This works for me i= n my image creation script.=20 > > =20 > > Sometimes the image does already have a resolv.conf, but if it does, i= t'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 bu= ilt.=20 > =20 > Setting NAMESERVER to "10.0.1.1" crashed pkg for me. Maybe it's been fixe= d in the meantime. If a resolv.conf already exists I would just rename it b= efore and then rename it back after the call to pkg -c. >=20 Setting nameserver will inject this name server directly via the libc resol= v api so it won't touch the resolv.conf at all no need to back it up Best regards, Bapt --7uYPyRQQ5N0D02nI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXQiOXAAoJEGOJi9zxtz5a+F4P/3I53aCcQSfLmZa/8UMsBevT j6c5ee1+M/5h4EXzhnV54QztVUoftvx4QVcxURv27O90ick5b0g3w0Od6nIBisHJ M4CC1FWZVXgLDD+GJSkrSLAS7OqfK1rkCORfkRSn7PpQO+otxuvOK49gGN98UUml qrpvgKMgA77MkMsP4Xg43o4twU6JJCqrTzb4Wom3E+c/IfSRjg+GbcmLdI6scCT2 8nVp3hCkkVBJg0xS4uD/UsoPCS/ascSXcBYT7vzYbb2Z2i+QvkOCuddAU6ZGYN63 VjPWQoXu3gmr0h8EckPyQCkg0HUlUf1a/T+0YoM1vcjXdml5boH8CFTa+poPktN3 duCcRQGvLTBTB8P85TjldLS2O/CZzumrvQ/ky0vbrm87kn54DfcrEldNiXeQsDI3 G2F1fIEocF/ErCubRu+vpHFUcpE8o5p2Vi3jJUamJJe0JXoKT31clig+HZF1qfQ6 cTH6Qn/JeulMue7GFbbMeSpfKGmNlkao5QYbAMeBBQ+cNrdHMy1QL/VZwVFbfd2k f5XNuAb2n6of7EZP9ssZvC1woZDwOcWvgWU17dCfBmx1ONYg5H7siPqDyrf3PhGu TENvrPt2v7aCvkC3E3FpRo9lWGKz0jilCm8z+Z/z2nkD9FqEArkn0LCkZJQa+de3 yyq/LtevVntR85N36EnM =kAOK -----END PGP SIGNATURE----- --7uYPyRQQ5N0D02nI--