From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 13 14:51:27 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13271106567B; Thu, 13 Mar 2008 14:51:27 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id C301D8FC26; Thu, 13 Mar 2008 14:51:26 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.2/8.14.2) with ESMTP id m2DEMRSn055338; Thu, 13 Mar 2008 09:22:27 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Thu, 13 Mar 2008 09:22:27 -0500 (CDT) From: "Sean C. Farley" To: Ivan Voras In-Reply-To: Message-ID: References: User-Agent: Alpine 1.00 (BSF 882 2007-12-20) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail.farley.org Cc: freebsd-hackers@FreeBSD.org Subject: Re: Transferring ports X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Mar 2008 14:51:27 -0000 On Thu, 13 Mar 2008, Ivan Voras wrote: *snip* > The details: imagine there are two or more full FreeBSD installation > trees in the file system (e.g. complete jails). The utility would > transfer (installed) packages from one tree to the other. The easy, > brute-force way would be to generate package files (tbz) from the > installed tree and then install them to the other tree, but I can't do > that because of performance and disk space reasons. I do not know of any such scripts but a possible solution is to use nullfs. I personally install all needed ports into the base system and use nullfs read-only to pull everything into the jails. Almost everything, files from /usr/local/etc are manually copied as needed into each jail. It lowers the disk usage and reduces risk due to most files (even system) being read-only. You just need individual /etc/fstab. files like this: /bin /usr/local/jails//bin nullfs ro 0 0 And similar lines for these (at least all that you require): /boot /lib /libexec /sbin /usr/bin /usr/games /usr/include /usr/lib /usr/libdata /usr/libexec /usr/local/bin /usr/local/cyrus /usr/local/etc/periodic /usr/local/etc/php /usr/local/etc/rc.d /usr/local/info /usr/local/lib /usr/local/libdata /usr/local/libexec /usr/local/man /usr/local/sbin /usr/local/share /usr/sbin /usr/share /var/db/pkg A basic jail runs about 9MB (mainly /etc and /usr/local/etc). Does this help? Sean -- scf@FreeBSD.org