Packages are simply .xar archives with a different extension and a specified file hierarchy. Unfortunately, part of this file hierarchy is the cpio.gz archive of real installation files, and usually this is what you want to edit. There is also a Bom file that contains information about the files inside this cpio archive and a PackageInfo file that includes the summary information.
If you really just need to edit one of the information files, this is simple:
mkdir Foo cd Foo xar -xf ../Foo.pkg
But if you need to edit the installation files:
mkdir Foo cd Foo xar -xf ../Foo.pkg cd foo.pkg cat Payload | gunzip -dc |cpio -i
I believe you can get mkbom (and lsbom) for most Linux distributions. (If you can get the same thing that makes things even easier, but I'm not sure if this is almost universally available.)
abarnert Jul 02 '12 at 19:23 2012-07-02 19:23
source share