Re: combining binary rpms/cpios

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Johnson wrote:
Eli Carter wrote:

All,

I was looking for a way I could take a group of binary rpms, convert them to one file in cpio format and install them using cpio.

It's the "one file in cpio format" that has me stumped at the moment. Is there a way to combine cpio archives without unpacking/repacking them?

If this is documented somewhere, please point me to the docs.



Hmmm, this is just a guess, but I suspect I'm right ...


cpio archives have a trailer. strip the trailer off, concatenate the archives, put a trailer on the end.

A cpio trailer is really simple, something like "trailer!!", details in lib/cpio.h (I'm too lazy too look ;-)

I might have missed padding, but I don't believe it will matter, the trailer is padded to the same boundary
as a cpio archive header.


Anyways, you want to read about cpio archive format.

Ok, quick hack answer for this is to remove the last 124 bytes of each cpio archive & concatenate, then tack
echo -en "07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!!\0\0\0\0"


onto the end of the file. (Arrived at by creating an rpm with no files in it, such as basesystem, which rpm2cpio converts to a cpio that has the 124-byte trailer as its entire contents.) Ta-da! One big cpio archive.

Easy enough. Thanks for the advice! :)

Eli
--------------------. "If it ain't broke now,
Eli Carter           \                  it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------




------------------------------------------------------------------------ Confidentiality Notice: This e-mail transmission may contain confidential and/or privileged information that is intended only for the individual or entity named in the e-mail address. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or reliance upon the contents of this e-mail message is strictly prohibited. If you have received this e-mail transmission in error, please reply to the sender, so that proper delivery can be arranged, and please delete the message from your computer. Thank you. Inet Technologies, Inc. ------------------------------------------------------------------------


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux