From owner-freebsd-ports@FreeBSD.ORG Thu Apr 21 22:38:51 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E61321065740 for ; Thu, 21 Apr 2011 22:38:51 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) by mx1.freebsd.org (Postfix) with ESMTP id A6C0B8FC1A for ; Thu, 21 Apr 2011 22:38:51 +0000 (UTC) Received: from elsa.codelab.cz (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 6516519E02E; Fri, 22 Apr 2011 00:20:50 +0200 (CEST) Received: from [192.168.1.2] (ip-86-49-61-235.net.upcbroadband.cz [86.49.61.235]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 83B1B19E02D; Fri, 22 Apr 2011 00:20:48 +0200 (CEST) Message-ID: <4DB0ADBF.4030108@quip.cz> Date: Fri, 22 Apr 2011 00:20:47 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.18) Gecko/20110320 SeaMonkey/2.0.13 MIME-Version: 1.0 To: Mickey Harvey References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: installing to jail X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2011 22:38:52 -0000 Mickey Harvey wrote: > Is there an easy way to install a port from a host system to the equivalent > directories in a hosted jail? For example if I have a jail at /jail/www and > want to install a port that installs its config file as > /usr/local/etc/thefile.conf and its binaries into /usr/local/bin. Is there a > way to easily change it to install the files to > /jail/www/usr/local/etc/thefile.conf and /jail/www/usr/local/bin? The easiest way is to mount host's /usr/ports in to jailed system: mount -t nullfs /usr/ports /jail/www/usr/ports then you can execute what ever command in your jail by jexec command with JID of given jail: jexec 1 portmaster www/apache22 Or you can enter the jail jexec 1 tcsh and then you can do same steps like in any non jailed system: cd /usr/ports/www/apache22 make install clean Miroslav Lachman