PackageMaker sets wrong permissions when building from the command line

Originator:eric.trepanier
Number:rdar://7253630 Date Originated:2009-09-25 11:43-0500
Status:Open Resolved:
Product:Developer Tools Product Version:3.0.4/179
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
PackageMaker does not set the correct group write permission when building a package that installs a kernel extension from the command line.

Steps to reproduce:
1. Create a kernel extension (e.g. SampleKext.kext).
2. Create a PackageMaker document (e.g. SampleKext.pmdoc) with the kernel extension as its top-level component.
3. Set the Owner to "root" for all files of the kernel extension
4. Set the Group to "wheel" for all files of the kernel extension
5. Verify that the Group Write permission IS NOT SET for all files of the kernel extension
6. Save.
7. Close the document or quit.
8. Build the package from the command line using the following command:
/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -v --doc SampleKext.pmdoc --out SampleKext.pkg
9. Install the resulting SampleKext package

Expected Results:
The SampleKext.kext is correctly installed in /System/Library/Extensions folder and has the proper ownership and permissions.

Actual Results:
The SampleKext.kext is installed in /System/Library/Extensions folder but incorrectly has its group write attribute set for all files / folders, making it unusable (i.e. the kernel will not load it).

Regression:
Yes. 3.0.3/174 correctly builds a similar installer package (via the command line) that will correctly install and will have the expected file permissions.

Notes:
If I build the PackageMaker document from within the GUI tool directly (instead of building it from the command line), it will also build and install correctly, with the expected file permissions.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!