From owner-freebsd-questions@FreeBSD.ORG Sun May 31 16:02:19 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 B7FDA10656BD for ; Sun, 31 May 2009 16:02:19 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail8.sea5.speakeasy.net (mail8.sea5.speakeasy.net [69.17.117.10]) by mx1.freebsd.org (Postfix) with ESMTP id 8E3C78FC1E for ; Sun, 31 May 2009 16:02:19 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 25293 invoked from network); 31 May 2009 16:02:19 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail8.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 31 May 2009 16:02:18 -0000 Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.6]) by be-well.ilk.org (Postfix) with ESMTP id 696915083A; Sun, 31 May 2009 12:02:12 -0400 (EDT) Received: by lowell-desk.lan (Postfix, from userid 1147) id 168121CC82; Sun, 31 May 2009 12:02:11 -0400 (EDT) To: davidcollins001@gmail.com References: <1b30fd140905291235q7f45e6c3x7dcba8a8e88cf3ca@mail.gmail.com> From: Lowell Gilbert Date: Sun, 31 May 2009 12:02:11 -0400 In-Reply-To: <1b30fd140905291235q7f45e6c3x7dcba8a8e88cf3ca@mail.gmail.com> (David Collins's message of "Fri\, 29 May 2009 20\:35\:45 +0100") Message-ID: <44ws7x5kho.fsf@lowell-desk.lan> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: portupgrade jails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 May 2009 16:02:20 -0000 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? -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/