From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 28 23:21:52 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F79937B401; Fri, 28 Mar 2003 23:21:52 -0800 (PST) Received: from geekpunk.net (adsl-32-212-96.bna.bellsouth.net [67.32.212.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49E1543FAF; Fri, 28 Mar 2003 23:21:51 -0800 (PST) (envelope-from bandix@geekpunk.net) Received: from localhost.my.domain (taran [127.0.0.1]) by geekpunk.net (8.12.6/8.12.6) with ESMTP id h2T7Lv6g012467; Sat, 29 Mar 2003 01:21:57 -0600 (CST) (envelope-from bandix@geekpunk.net) Received: (from bandix@localhost) by localhost.my.domain (8.12.6/8.12.6/Submit) id h2T7LuI6012466; Sat, 29 Mar 2003 01:21:56 -0600 (CST) (envelope-from bandix) Date: Sat, 29 Mar 2003 01:21:56 -0600 From: "Brandon D. Valentine" To: Tim Kientzle Message-ID: <20030329072156.GO3528@geekpunk.net> References: <3E42C148.4050807@acm.org> <20030329012828.GA32891@intruder.bmah.org> <3E85418F.8010201@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E85418F.8010201@acm.org> User-Agent: Mutt/1.4.1i cc: "Bruce A. Mah" cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Making pkg_XXX tools smarter about file types... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Mar 2003 07:21:53 -0000 On Fri, Mar 28, 2003 at 10:47:43PM -0800, Tim Kientzle wrote: > > P.S. It's galled me for a while that pkg_add has to fork 'tar' to > extract the archive. I've started piecing together a library that > reads/writes tarfiles. With this, it should be possible to make > pkg_add considerably more efficient. In particular, rather than > extracting to a temp directory, then parsing important information, > then moving the files, it should be possible using this library to > read the initial entries ("+CONTENTS", in particular) directly into > memory, process the information there, then extract the remainder of > the package files directly into their final locations. So far, I have > a library API outlined, and functional read support implemented. Next > step is to hack up a minimal tar implementation that uses it to make > sure everything's working correctly. > > So far, the library automatically detects compression formats (using > techniques like those in my pkg_install patch) and has some rough > support for detecting the archive format as well. (One goal of mine: > support for 'pax extended archives', which I understand can handle > ACLs.) > > Of course, such a library could also form the basis for a BSD-licensed > tar to replace GNU tar. I understand a few people have wanted such a > thing. FYI, libtar[0] is BSD-licensed and might be useful to such a project. [0] - http://www-dev.cites.uiuc.edu/libtar/ Brandon D. Valentine -- brandon@dvalentine.com http://www.geekpunk.net Pseudo-Random Googlism: valentine is a champion of the true small online business