From owner-freebsd-pkg@FreeBSD.ORG Wed May 7 23:35:20 2014 Return-Path: Delivered-To: pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16A91CF4; Wed, 7 May 2014 23:35:20 +0000 (UTC) Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com [IPv6:2a00:1450:4010:c04::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6713BD3B; Wed, 7 May 2014 23:35:19 +0000 (UTC) Received: by mail-lb0-f177.google.com with SMTP id s7so2402980lbd.36 for ; Wed, 07 May 2014 16:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=OxAvf9fsHMfEYRosw1FE7BGTrrQDEn6Lx49Pt4J4Lwg=; b=OJ1x3yZ2Q036nPteEOW3AbVdiPiHnLclEyIFdpWi/1Yaa7T4mHftvLyDplTLEFPk8l QB+5XkosOckD4a4Yo5XLRxp4qrENs8tCYmCb3qBbAJgJ48YUqqu6deBpxd1LdQ15hWjS hPg8OXS4LMkO2DXJssI1Sgb3F5Xn5sVScfiQdCigZl+8yVGWkBsnlilWe4tTd7ZHJhcv UT0JT4K3RPfzv1qxjGCwdiRCOTTW7kvmgX7Q0AB/pcCKLfe+8SUHa1nBqKwLFAI8eo8P WR/WMefrTPM+dPPRmN6z0YztB0MYVao02wyqvYWSRIierbRLpuh7O40TaZGtVH2+4PJH 7a9g== MIME-Version: 1.0 X-Received: by 10.112.135.198 with SMTP id pu6mr110701lbb.58.1399505716140; Wed, 07 May 2014 16:35:16 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.67.73 with HTTP; Wed, 7 May 2014 16:35:16 -0700 (PDT) In-Reply-To: <536AB6AE.4000009@a1poweruser.com> References: <5369407E.9060008@a1poweruser.com> <53694241.6050207@my.hennepintech.edu> <536A3E10.4030902@a1poweruser.com> <536A9BB5.9080905@a1poweruser.com> <536AB6AE.4000009@a1poweruser.com> Date: Wed, 7 May 2014 16:35:16 -0700 X-Google-Sender-Auth: 6pRLqqvOwRzQGYcEj083ecoPkH8 Message-ID: Subject: Re: bootstrapping /usr/sbin/pkg inside a jail From: Craig Rodrigues To: Fbsd8 Content-Type: text/plain; charset=ISO-8859-1 Cc: pkg , questions X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 23:35:20 -0000 On Wed, May 7, 2014 at 3:41 PM, Fbsd8 wrote: > Craig Rodrigues wrote: > Figured out the problem. > To create my jail filesystem I download and uncompress the base.txz file > just like bsdinstall does. This base filesystem has a environment variable > PACKAGESITE populated with the content needed by the old pkg_add -r command > which is no longer part of the 10.0 base. bsdinstall must do an unsetenv > PACKAGESITE on that environment variable during the install process to > prepare the system for pkgng. > > The solution for me is after creating my jail filesystem from the base.txz > file, I start the jail and then jexec jailname tcsh to open a console to the > jail. From inside of the jail I issue "unsetenv PACKAGESITE" to disable that > environment variable. Then issue pkg and the pkg bootstrap works as > expected. > > Now global system environment variables must be saved in some file that gets > read during the system boot process. Does anyone know where that file is > located and what its called? Hi, Very good analysis. Thanks for doing it. Inside your jail, can you do the following as root: find /etc /var | xargs grep -l PACKAGESITE -- Craig