This tutorial sums up how to slipstream content into OSX packages (pkg
files). The tutorial works on the GrowlMail.pkg
package with is meant to install GrowlMail which is incompatible with newer versions of Mail.app
under Snow Leopard.
GrowlMail.pkg
package is placed on the desktop.cd ~/Desktop/ pkgutil --expand GrowlMail.pkg GrowlMail
cd GrowlMail/growlmail.pkg cat Payload | gzip -d | cpio -id mkdir ~/Desktop/Bundle mv GrowlMail.mailbundle ~/Desktop/Bundle cd ~/Desktop/Bundle
Now you can edit the files or add new files. In this case, we add:
<string>588FF7D1-4310-4175-9980-145B7E975C02</string> <string>064442B6-53C0-4A97-B71B-2F111AE4195B</string>
to the ~/Desktop/Bundle/GrowlMail.mailbundle/Contents/Info.plist
file.
cd ~/Desktop/Bundle find . | cpio -o --format odc | gzip -c > ~/Desktop/GrowlMail/growlmail.pkg/Payload mkbom ./ ~/Desktop/GrowlMail/growlmail.pkg/Bom
Still in ~/Desktop/Bundle
we issue:
du -sk
and then edit ~/Desktop/GrowlMail/growlmail.pkg/PackageInfo
and modify the line:
<payload installKBytes="1288" numberOfFiles="60"/>
so that installKBytes
is the value we obtained with du -sk
minus 4 (assuming that the disk is using 4KB blocks).
The result is thus:
<payload installKBytes="1300" numberOfFiles="60"/>
Additionally, if we had added or removed files, we have to issue:
find ~/Desktop/Bundle/ | wc
and update ~/Desktop/GrowlMail/growlmail.pkg/PackageInfo
to change numberOfFiles
which represents the total number of nodes (files, directories, sockets, etc…) including .
.
cd ~/Desktop rm GrowlMail.pkg pkgutil --flatten GrowlMail GrowlMail.pkg
The result is the following package that makes GrowlMail
compatible with Snow Leopard including the latest security updates that made GrowlMail
incompatible with Mail.app
.