1. I just wasted a week on this
2. Maybe if I'm incorrect about something, someone will correct me and I'll learn something too...
3. It amazes me that there's hardly anything on the subject of going from bundled to flat that I could find on google
a) Is there are way that I could re-incorporate them (readme, welcome, etc) into the user experience and sign my package so that Gatekeeper will not complain?
Build a distribution package.
If you're using the PackageMaker UI and a PackageMaker document, get this configured by clicking "Edit Interface" in the upper right.
If you're trying to use PackageMaker on the command line you'll probably end up using xar to open up a flat package, modify it, and re-xar it. Distributions can have a folder named Resources. The file named "Distribution" specifies file names, e.g.:
<background file="background" alignment="topleft" scaling="none"/>
<welcome file="Welcome"/>
b) Is it true that only flat packages can be signed?
That's my understanding, though this seems like an artificial restriction to me, to force adoption of newer OS's.
c) When I select 10.5 as the minimum OS, the postflight option disappears from the UI, but it still seems to execute. Why? Should I switch to postinstall instead?
d) Are postupgrade and preupgrade valid for flat packages? Or is there no difference between postinstall/upgrade and preinstall/upgrade?
As I understand it, flat packages (single components with no distribution) can have a preinstall and a postinstall. These are equivalent to the old preflight/postflight - they run on every install regardless of what version is or is not already installed.
A distribution can't have a preinstall/postinstall. But the PackageMaker UI has an "Actions" tab for the distribution. Configuring things in this tab just creates a "dummy" sub-pkg that exists merely so that it can have a preinstall/postinstall. Also, the actions have some common tasks that you might want to do, and they'll set up the necessary scripts.
For a pkg within a distribution, you can use the Scripts tab. If you give it a directory it will automatically look for files named preinstall and postinstall, and will populate the pre/post install fields if it finds them. But you can also have scripts with different names and specify them in pre/post install fields.
Some Apple page suggested that actions in a distribution are more "secure" than scripts in a component package - but based on examining what was produced it seems that the mechanism is in fact identical.
e) Are flat packages and distribution packages fundamentally different?
Distribution package seems conceptually to be more or less like an old mpkg.
But it seems you must use a distribution package to get welcome / background / etc.
1. No way to get info on a flat package and see version information
2. No more "restart recommended"
Anyone else out there, please correct me if I'm mistaken on any of this...