From owner-freebsd-questions@FreeBSD.ORG Sun May 31 18:40:03 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8331B1065670 for ; Sun, 31 May 2009 18:40:03 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.221.173]) by mx1.freebsd.org (Postfix) with ESMTP id 397F38FC08 for ; Sun, 31 May 2009 18:40:02 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: by qyk3 with SMTP id 3so10363102qyk.3 for ; Sun, 31 May 2009 11:40:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=d4ColKSk2HVFm0tXyLjxepRmcVdXMeu+WEg9tRVWKzE=; b=f7oTjwNeYXLlFjT+2nRNx+9g7IfgxoCmB09Ab6n0pr0D34lNpbsYNYG7+MXYaAZB7h SUs8PjjEaNWnlTDyqd6qWebnbY/ZCMv+LqocNdIvftImA/damp8D0Nl7hymIS6w/eZZ3 9HQpRcsvfOQSGWtiDnTy6Y7aVdoyJPH7WF5d0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=V2tXcG+esAjYMHkE3jQQlhB7pcFigTZQMEfyPZHIY14eTOCzU2J4/Co6lxemHwNSge Hh+hSiWzmb5FYvbr7aI/DoYnYO7pl+Jyvdp0KsS8JzylDbo7yfcpki2w1afPMSPNRhxk 0JhVNSQ78vincUeeiB94TunKO3PWgrNCN17fI= MIME-Version: 1.0 Received: by 10.220.90.199 with SMTP id j7mr3348876vcm.57.1243795202118; Sun, 31 May 2009 11:40:02 -0700 (PDT) In-Reply-To: <44ws7x5kho.fsf@lowell-desk.lan> References: <1b30fd140905291235q7f45e6c3x7dcba8a8e88cf3ca@mail.gmail.com> <44ws7x5kho.fsf@lowell-desk.lan> From: Tim Judd Date: Sun, 31 May 2009 12:39:42 -0600 Message-ID: To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: davidcollins001@gmail.com Subject: Re: portupgrade jails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2009 18:40:03 -0000 On Sun, May 31, 2009 at 10:02 AM, Lowell Gilbert < freebsd-questions-local@be-well.ilk.org> wrote: > David Collins writes: > > > I have several jails for the purpose of not trashing my root partition > > with junk programs that I may not need and also to learn how to run > > various system services, ie dns, http, mysql, samba etc. I have been > > running them for a while and have only just updated the jail root > > after rebuilding world. > > > > I have been using portupgrade to rebuild the host ports I have > > installed. What I would like it know is if it is possible to use > > portupgrade on the host system to update the jail ports. So like when > > rebuilding world a destdir is specified and is populated with the new > > world, is it possible to do the same with portupgrade? The reason is > > because I don't want to have to install portupgrade and ruby several > > times, also I can script the upgrade easily too. > > > > I have been reading through the ports and portupgrade man pages and > > setting environment variables to the appropriate directories in the > > jail to try to get this to work but so far no luck. Portupgrade wants > > to upgrade the host ports > > > > Here is what I have tried so far: > > > > viper:~$ export DISTDIR=/usr/jails/xserver/var/tmp/ > > viper:~$ export WRKDIRPREFIX=/usr/jails/xserver/var/tmp/ > > viper:~$ export PREFIX=/usr/jails/xserver/usr/local/ > > viper:~$ export BATCH=yes > > viper:~$ export PORT_DBDIR=/usr/jails/xserver/var/db/p > > viper:~$ export PORT_DBDIR=/usr/jails/xserver/var/db/ports > > viper:~$ export PKG_DBDIR=/usr/jails/xserver/var/db/pkg/ > > viper:~$ export PORTS_DBDIR=/usr/jails/xserver/var/db/ports > > viper:~$ > > viper:~$ sudo portupgrade -narR > > It sounds like PREFIX is the one you're not picking up. > > Perhaps it's being overridden by one of your makefiles, or by > portupgrade's configuration files? > Or portupgrade is using the same souce as pkg_* tools, /var/db/pkg Or portupgrade is using pkg_* tools.