[Toybox] New email, [PATCH] fdisk cleanup, etc.

Rob Landley rob at landley.net
Sun Aug 11 20:07:49 PDT 2013


On 08/11/2013 07:42:37 PM, Isaac wrote:
> I also have some code here that *should* handle writing a member of a  
> cpio
> newc archive, loopfiles_stdin(), and a general idea of how to proceed.
> Don't expect much soon.
> (newc is essentially an octal dump of struct stat; oldc differs only  
> in
> having a few fields missing or differently sized. cpio is well-suited  
> to
> loopfiles, except it reads from stdin.

I've only been looking at newc, because that's what initramfs uses. If  
RPM (the other major modern user of cpio I'm aware of) also uses newc,  
then that's probably all we need to implement. (Dunno about full rpm  
support, but we should be able to do rpm2cpio.)

There was a really fun trick somebody suggested last decade in busybox,  
which was to grab the metadata header part of each rpm file you install  
and dump it in a directory, then just do the rpm -qpi code to read  
what's installed. (So no database, just a directory of chunks of the  
files.)

The main reason we never bothered was all the install script nonsense  
that can do arbitrary turing complete stuff at install and uninstall  
time. I just basically never got around to it...

> I'm working on cpio instead of pax because (a) I want to write an  
> initrd,
> and (b) pax has a much more complex specification).

I was only planning on doing tar, not pax. I'm aware Solaris got it  
into posix, but I don't care. Almost nobody uses it on Linux, everybody  
uses tar instead.

Rob
 1376276869.0


More information about the Toybox mailing list