From owner-freebsd-current@freebsd.org Sun May 22 20:32:49 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 3ADAAB45337 for ; Sun, 22 May 2016 20:32:49 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-lb0-x22b.google.com (mail-lb0-x22b.google.com [IPv6:2a00:1450:4010:c04::22b]) (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 B22B81C12 for ; Sun, 22 May 2016 20:32:48 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-lb0-x22b.google.com with SMTP id sh2so7946232lbb.1 for ; Sun, 22 May 2016 13:32:48 -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=Tarqcmrt6VccP4KUyrY7J1BU33ewgm//5WkRPBlop9w=; b=T046Ib+QVfJePU2wPvOEgcbFhufo5HTWr0Z3jWV+O8BK5WXALWYiLbvlqQqVDtWTKI 8hlevJv/IOyE/f6b0koz76cmNnM06NFC/NutYDawYoHjrb2FZ5/zy9cf0d+4Y2zyIrsW 3P4w8dc7mxhHlyzMO/BrHy9eMWXekkKW3u5CR6annbg1SWdUBSlvv7yDN53hrwoX4QZq d20rRKhPbRIQHprhYlTwFCsXxG0VatfNarBGv7sYqJPwT6F1WCpCsElcw1v7xbE7+5Ty LsK1KSIYjhRyHFdtlSUJMFxTKJ8/N8OBK3gVL6Ixcm+4+Gujxd2lJpamsf0u5Mk6RleO PqSA== 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=Tarqcmrt6VccP4KUyrY7J1BU33ewgm//5WkRPBlop9w=; b=IiPnU5HVtwBH3i5I5nCq+l8g9b/hq6lVTi03XVs5NEYQuQJVuzv8YLZHnIKibaLogH KtZPRN1bc2+xcBg/ebsGbdgsQEKACQQdQf5V3Pv2ne66+LO+4hcZz7bDgPYkUuQ9BAXD pfMqFT0CUm8rsZj5XC286q4phZU4Uvv5sJKlBjMQPJ2AaP1r1eWGAAFCXodhVjW5s0lM 5TzVp40X3Rf8CbZThG9ObHLBqS+aOVVq8tOq9KMyhNPBNLFO2OE6XpFcSq3/ITd5oWp8 PdIB9Qul3MKGvVOkhoNCEtHvBJZp+0D7zJ2IRIoWVIOsL4aFO4/+rlUHgPOOcZPE2LlQ vBUg== X-Gm-Message-State: AOPr4FUxwssomTlDxNxi+ZFMBDUlSxI2Ve/ZUmHNQNyMyYoCwbCpFfQSStJTu0jXVsNL4g== X-Received: by 10.112.132.104 with SMTP id ot8mr4659278lbb.34.1463949167062; Sun, 22 May 2016 13:32:47 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id wt10sm5121197lbb.25.2016.05.22.13.32.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 May 2016 13:32:46 -0700 (PDT) Sender: Baptiste Daroussin Date: Sun, 22 May 2016 22:32:44 +0200 From: "bapt@freebsd.org" To: Tim Kientzle Cc: FreeBSD current Subject: Re: pkg chroot issues? Message-ID: <20160522203243.GF11189@ivaldir.etoilebsd.net> References: <9BC1A0E1-696D-4C00-B8C8-B57C4DB3A8EF@kientzle.com> <20160522203108.GE11189@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bGR76rFJjkSxVeRa" Content-Disposition: inline In-Reply-To: <20160522203108.GE11189@ivaldir.etoilebsd.net> 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 20:32:49 -0000 --bGR76rFJjkSxVeRa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 22, 2016 at 10:31:08PM +0200, bapt@freebsd.org wrote: > On Sun, May 22, 2016 at 01:24:12PM -0700, 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 do= es 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 an= other system). > >=20 > > There's some further discussion on github: > >=20 > > https://github.com/freebsd/crochet/issues/141 > >=20 > > Any suggestions? > >=20 > I'll reply directly to github thanks for pointing me to the ticket >=20 > Best regards, > Bapt As people might only follow this thread and not the ticket here is what I answered: pkg supports an option for that which is pkg -o NAMESERVER=3D to avoid havi= ng to copy resolv.conf it was broken in 1.8 but I fixed it in pkg 1.8.0 which has= been released today. the problem with pkg -c is that it calls chroot very early. To avoid that problem we have added pkg -r which does not perform any chroot at all there= fore having not network issue, but the ports tree are is not yet entirely aware = of it and some scripts (preinstall/postinstall) might cause some issues. at least creating users from the script is safe in that regard. for most si= mple case that should work. Best regards, Bapt --bGR76rFJjkSxVeRa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXQhdrAAoJEGOJi9zxtz5aknYP/RVH6AR9zlL8hp/4LmnieJ3F YBsk506sWNJukzGdiqESzPk4aE81j0y9W96o3w/A45Gv/agjB8cvXpv/6r7vX5wq bmsuI3qPQANnBUayQjY43wT4++1MY/VVSzBn6mdi3A9fpfZFi2mSEf46z9HpI/aA QKUKqGgINgTnI7ItcO/FRbfEnBk7ETT1l7uHWJpNNNldkRCHoj9eWqvRzCVl0d2d u/++u31Ips7LOWDePzRzJOr3ayrRQRQSL+nku/GBTb9RB8s1WMj7FPFRJNTjxY+4 6FhtGKDFjyRaEFqmgjZZZ5zmu5qQkEbX83kd3V/pJ+HsNO288+5ZoIz9yD7B+zzo N1vA2fuHTCXkOptQmRhEa0CJ+M0OOVWs2pxdLYLl9nX8eXTvPxF2TwC1dn2Q+h9T oiaXxXOKs8UB0QvsJ4iaT+PeXlXgkMg+VAXxmJq+2+kyCpYFHkoMXEBRxFiB3vJP IsUpjabUG3Ix2YWDGIHCwFU/HiXTf9cqOi/bYiohSezIaSitOSX8KqrkxEmivxsH 8Q2TqKCWh9ff3E10x1t4m4HqeNnSKKOlsq4nuz2UdWy2GZyUPfXfxzN6HwgaHlKr Qsou/PrBDiH3bRJWvV44u2Squtmu2nv6b7WAmX3vdrASUmW0rMQyEfpker4ldcyJ DBnX0TU2a7/ptcAn/f1Q =LLV3 -----END PGP SIGNATURE----- --bGR76rFJjkSxVeRa--