Date: Sat, 29 Mar 2003 01:21:56 -0600 From: "Brandon D. Valentine" <brandon@dvalentine.com> To: Tim Kientzle <kientzle@acm.org> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Making pkg_XXX tools smarter about file types... Message-ID: <20030329072156.GO3528@geekpunk.net> In-Reply-To: <3E85418F.8010201@acm.org> References: <3E42C148.4050807@acm.org> <20030329012828.GA32891@intruder.bmah.org> <3E85418F.8010201@acm.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030329072156.GO3528>
