MantisBT - CMake
View Issue Details
0007523CMakeCPackpublic2008-08-21 20:112010-12-14 18:45
Timothy Shead 
David Cole 
normalminoralways
closedfixed 
CMake-2-6 
 
0007523: CPack OSX bundle generator can fail when assigning a custom volume icon.
If the user assigns a custom volume icon to their bundle disk image, the generator must mount the image to set a flag. The current generator mounts the image to a temporary directory relative to CPACK_TOPLEVEL_DIRECTORY, but the OSX mount command places a 90-character limit on the length of mount points, which is easily exceeded in a CMake build tree.

The attached patch mounts the image to a temporary directory in /tmp instead.
No tags attached.
patch bundle_generator_mount_point.patch (2,234) 2008-08-21 20:11
https://public.kitware.com/Bug/file/1673/bundle_generator_mount_point.patch
patch cpack-hdiutil-length.patch (2,655) 2009-01-08 08:09
https://public.kitware.com/Bug/file/1983/cpack-hdiutil-length.patch
Issue History
2008-08-21 20:11Timothy SheadNew Issue
2008-08-21 20:11Timothy SheadFile Added: bundle_generator_mount_point.patch
2008-08-21 20:38Bill HoffmanStatusnew => assigned
2008-08-21 20:38Bill HoffmanAssigned To => David Cole
2008-08-21 20:41Bill HoffmanNote Added: 0013146
2008-08-22 11:08Timothy SheadNote Added: 0013153
2009-01-08 08:08Mike McQuaidNote Added: 0014485
2009-01-08 08:09Mike McQuaidFile Added: cpack-hdiutil-length.patch
2009-01-21 13:42David ColeNote Added: 0014651
2009-01-21 13:42David ColeStatusassigned => resolved
2009-01-21 13:42David ColeResolutionopen => fixed
2010-12-14 18:45David ColeNote Added: 0024023
2010-12-14 18:45David ColeStatusresolved => closed

Notes
(0013146)
Bill Hoffman   
2008-08-21 20:41   
I am not sure I like writing to /tmp. We have to be careful to handle collisions, and make sure stuff gets cleaned up correctly. Perhaps a symlink approach would work?
(0013153)
Timothy Shead   
2008-08-22 11:08   
I've done some testing with symlinks without success - if I try to mount an image to a symlink of less than 90 characters it still fails when the target of the symlink is greater than 90 characters.

My hope was that CMake would provide some API comparable to mktemp for managing this stuff, but I didn't see anything in the sources.

Cheers,
Tim
(0014485)
Mike McQuaid   
2009-01-08 08:08   
I've made a nicer patch that parses the hdiutil output, please review for inclusion.

Tim, thanks for your work but your patch also makes a bunch of changes unrelated to the patch. Maybe it would be an idea to try and keep patches as minimal as possible in future.
(0014651)
David Cole   
2009-01-21 13:42   
$ cvs commit -m "BUG: Fix issue 0007523: Analyze output of 'hdiutil attach' to get the name of the volume that was mounted. Eliminates the need to use the -mountpoint arg of hdiutil which has a silly 90 character limit on the name of the mount point. Also add a custom volume icon to the BundleGeneratorTest to cover this code."

/cvsroot/CMake/CMake/Source/CPack/cmCPackBundleGenerator.cxx,v <-- Source/CPack/cmCPackBundleGenerator.cxx
new revision: 1.7; previous revision: 1.6
/cvsroot/CMake/CMake/Source/CPack/cmCPackBundleGenerator.h,v <-- Source/CPack/cmCPackBundleGenerator.h
new revision: 1.2; previous revision: 1.1
/cvsroot/CMake/CMake/Tests/BundleGeneratorTest/CMakeLists.txt,v <-- Tests/BundleGeneratorTest/CMakeLists.txt
new revision: 1.2; previous revision: 1.1
/cvsroot/CMake/CMake/Tests/BundleGeneratorTest/CustomVolumeIcon.icns,v <-- Tests/BundleGeneratorTest/CustomVolumeIcon.icns
initial revision: 1.1

Mike Arthur: thanks for the patch. I changed the regex slightly, but the basic idea is the same. I also modified the BundleGeneratorTest to cover this code.
(0024023)
David Cole   
2010-12-14 18:45   
Closing bugs that have been resolved for more than 3 months without any further updates.