-
Notifications
You must be signed in to change notification settings - Fork 115
Packages Suitable for Deployment
Packages normally assume that they're being installed on the current host, but that's not true when you're building packages into an image. The installer is being run on the host system but with the target set to a disk image. There are several things that a package will need to observe to install successfully:
Packages that rely on a user launching the install will fail. This includes payloads that install into user's home directories, and scripts that make assumptions about $HOME or $USER.
The host may be running one build of OS X while installing another.
If the package has preinstall or postinstall scripts, they need to reference paths on the installation by prefixing them with "$3".
The preinstall and postinstall scripts run on the host OS during image building. Commands such as networksetup and scutil will interact with the host, not the image.
Only include the packages you absolutely need in the image. Install everything else after the system has booted.
The only safe packages are those that only include a payload and no scripts.