From owner-cvs-all@FreeBSD.ORG Sun Jul 29 20:27:54 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5F6916A418; Sun, 29 Jul 2007 20:27:54 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B45A513C46E; Sun, 29 Jul 2007 20:27:54 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l6TKRs0a072328; Sun, 29 Jul 2007 20:27:54 GMT (envelope-from kris@repoman.freebsd.org) Received: (from kris@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6TKRs0S072327; Sun, 29 Jul 2007 20:27:54 GMT (envelope-from kris) Message-Id: <200707292027.l6TKRs0S072327@repoman.freebsd.org> From: Kris Kennaway Date: Sun, 29 Jul 2007 20:27:54 +0000 (UTC) To: ports-committers@FreeBSD.org, cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: ports/Tools/portbuild/scripts claim-chroot clean-chroot cleanup-chroots X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jul 2007 20:27:54 -0000 kris 2007-07-29 20:27:54 UTC FreeBSD ports repository Modified files: Tools/portbuild/scripts claim-chroot clean-chroot cleanup-chroots Log: Support builds using zfs and tmpfs backing store zfs: * Enabled by use_zfs=1 in portbuild.conf * Populate build chroots by cloning a zfs snapshot instead of maintaining many duplicate copies. In principle this is very efficient since everything is copy-on-write and zfs snapshot creation is almost instantaneous. There might be additional overheads from building on zfs though. Currently the snapshot base is hard-wired to y/${branch}@base but should be parametrized. This also must be populated beforehand, e.g. during machine startup * Clean build chroots by just destroying the snapshot. tmpfs: * Enabled by use_tmpfs=1 and tmpfs_size in portbuild.conf * The previous md strategy of mounting in used/, populating and then remounting (to avoid possible races from multiple builds claiming the same chroot) doesn't work here because tmpfs instances are destroyed at umount. I am not entirely sure the simpler approach is free from races. Revision Changes Path 1.10 +19 -4 ports/Tools/portbuild/scripts/claim-chroot 1.14 +16 -2 ports/Tools/portbuild/scripts/clean-chroot 1.7 +5 -1 ports/Tools/portbuild/scripts/cleanup-chroots