From owner-freebsd-arch@FreeBSD.ORG Tue Jun 26 15:42:07 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9D0E106566B for ; Tue, 26 Jun 2012 15:42:07 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from aussmtpmrkpc120.us.dell.com (aussmtpmrkpc120.us.dell.com [143.166.82.159]) by mx1.freebsd.org (Postfix) with ESMTP id 9557D8FC18 for ; Tue, 26 Jun 2012 15:42:07 +0000 (UTC) X-Loopcount0: from 64.238.244.148 X-IronPort-AV: E=Sophos;i="4.77,478,1336366800"; d="scan'208";a="506453771" Received: from mail.compellent.com ([64.238.244.148]) by aussmtpmrkpc120.us.dell.com with ESMTP; 26 Jun 2012 10:42:07 -0500 Message-ID: <4FE9D84E.7080402@vangyzen.net> Date: Tue, 26 Jun 2012 10:42:06 -0500 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120531 Thunderbird/12.0.1 MIME-Version: 1.0 To: Tim Kientzle References: <20120626063017.D05DA58081@chaos.jnpr.net> <86wr2uwdgf.fsf@ds4.des.no> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 8bit Cc: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , Simon Gerraty , freebsd-arch@freebsd.org Subject: Re: Allow user install X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2012 15:42:07 -0000 On 06/26/2012 10:18, Tim Kientzle wrote: > > On Jun 26, 2012, at 3:54 AM, Dag-Erling Smørgrav wrote: > >> Simon Gerraty writes: >>> The patch below is a step towards supporting unprivileged buildworld >>> etc. Eg. >> >> Wow, this is really cool - and long overdue. >> >> I've been thinking for a while that some bor^H^H^Henterprising soul >> should hack install(1) so that if a specific environment variable is >> set, it writes the file to a tarball instead of writing it to disk. >> Unfortunately, there would still be a ton of ${LN} etc. that would need >> to be handled somehow. > > Better idea: have the build write a textual description of the > tar entries. That description can then be fed to tar to build > the actual tarball. > > The description format that tar already supports is a variant > mtree format borrowed from NetBSD. Each line specifies > the tar entry fields (filename, owner, permissions, etc) and > the filename where the file contents are stored. Simon: Thank you for working on this and contributing it. I expect it will help a lot of people...including me. :) Tim's idea sounds great, and would cover several use-cases. Specifically, it leaves the build artifacts in the usual places so other, later builds can build against them, whereas writing the artifacts directly to a tar file does not. Building a manifest would also be very handy, and even necessary for correct packaging of the artifacts from an unprivileged build, where the on-disk meta data are not "correct". I'm already doing something like this at $WORK, but not using buildworld/installworld (to my dismay). I manually maintain an mtree file which gets fed to makefs to build an mfsroot. Although I like the fascist control of this method, it's more work to maintain. Automation is good. Eric