cpio/pax using libarchive? (was Re: Replace /rescue/vi with
mined(1) from DragonFlyBSD)
Tim Robbins
tjr at freebsd.org
Mon Jun 20 09:25:46 GMT 2005
On Sun, Jun 19, 2005 at 12:00:12PM -0700, Tim Kientzle wrote:
> Peter Jeremy wrote:
> >On Sat, 2005-Jun-18 20:39:04 -0700, David O'Brien wrote:
> >>On Sat, Jun 18, 2005 at 04:16:04PM +1000, Peter Jeremy wrote:
> >>
> >>>If you're looking for ways to save space in /rescue, there are other
> >>>low-hanging fruit before you start moving to yet another editor:
> >>
> >>>- pax (when the new libarchive tar is available)
> >>
> >>Pax does more than just tar archives. Can libarchive'ed tar handle cpio
> >>archives?
> >
> >According to tar(1) and libarchive-formats(3), yes it read anything that
> >pax can. (It can't write cpio but I don't see that as a requirement in
> >/rescue).
>
> Yes, it can write cpio. (Posix octet-oriented cpio format, also called
> 'odc cpio' Other variants are easy to add if there's demand.)
>
> Is that not in the manpages? I'll add it.
This is a bit off topic, but is there a good reason (other than lack of
time) that cpio and pax could not be rewritten to use libarchive?
Doing that would win us at least (a) a pax that correctly extracts GNU tar
archives, and (b) a non-GPL cpio implementation.
For the sake of completeness, it may also make sense to make shar either
a C program that calls into libarchive or a wrapper around tar -Wformat=shar,
but this doesn't have much practical value.
Tim
More information about the freebsd-current
mailing list