How do you build your packages?
This is how we did it in earlier versions PackageMaker (2.x.x and earlier?)
[color=Blue]"To indicate to PackageMaker where the files of a Package should be installed, you need to create a relative file hierarchy describing where each file should be installed."[/color]
[url]http://s.sudre.free.fr/Stuff/PackageMaker_Howto.html[/url]
As Apple noticed, and I just discovered, this is a really bad way of doing it. It is the recipe for a [color=Red]permissions disaster[/color].
In PackerMaker 3.x.x Apple changed the way we are supposed to build packages.
[color=Blue]"Important: Never include Mac OS X standard directories inside a component’s hierarchy. That is, do not reflect any standard part of the Mac OS X file system (in any of the file system domains) inside your component’s structure."[/color]
[url=http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Component_Packages/chapter_6_section_6.html]Apple Software Delivery Guide: Create the Component Package[/url]
Earlier I was building my packages the [b]"old way"[/b], and it has always bothered me how difficult it is to keep all the permissions correct. On the other hand, you get away with only one component in your project. When clicking the [b]Apply Recommendations[/b] button for the permissions, PackageMaker is unable to see the permissions of all System folders, i.e. [b]/private/var/db/dslocal/Default/nodes/users/[/b]
By doing it the [b]"new way"[/b], the permissions part is a lot easier to handle. If I countinue on my example above, let's say I would like to add a user.plist file. I would then add the users folder as a component with my user.plist file inside. Then I would set the destination to [b]/private/var/db/dslocal/Default/nodes/users/[/b], and set the right permissions for that single file.
Is this a good way of doing it? At least you avoid messing up the permissions for any parent directories.
What about you? How are you building your packages?