libtarfile (Was Re: pkg_create broken by design?)
Tim Kientzle
kientzle at acm.org
Fri Jul 4 11:36:00 PDT 2003
Julian Elischer wrote:
> Sometimes it's a pain to have to install the package before one can
> build it..
>
> The trouble is that both the @srcdir and the @cwd produce
> '-C [dir]' to be added to the 'tar' command list
>
> I see several possible fixes..
Another alternative: stop trying to use a separate 'tar'
program. The attached is a functional alpha of "libtarfile", which
provides a pretty clean API for building and reading tar archives (complete
with gzip or bzip2 compression). In particular, this could be
incorporated into pkg_create to address both of the problems you described:
* Remove the need to install a package before
creating the package file. In particular, using this library,
you can separate the filename written into the
library from the file used as a source of data.
* Remove problems with building 'tar' command lines.
On the read side, this library eliminates most of
tar's historic limitations (by supporting 'pax extended'
format archives and a couple of extensions used by GNU tar
and star). These extensions have not yet been fully
implemented for writing archives, though I do plan
to implement the 'pax extended' format. (The hooks are
all in place; I'm just missing a few hundred lines of code.)
The source code includes a very minimal standalone tar
program. If anyone is interested in trying to complete
it, please let me know.
I am working on a complete replacement for pkg_add
using this library. So far, it's working pretty well,
though I'm now looking at some complicated issues of
package management, version control, and the like.
I have some ideas for handling these issues, but there's
still a lot of code to be written.
Updating pkg_create should be much simpler, though it's not something
I'll be able to look into for quite a while. Again, if someone would
like to use this library to improve pkg_create, let me know.
(In particular, this will encourage me to find time to polish the
write support.)
Feedback much appreciated,
Tim Kientzle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libtarfile-0.1.tgz
Type: application/octet-stream
Size: 38538 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20030704/8bcb0470/libtarfile-0.1.obj
More information about the freebsd-hackers
mailing list