View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007523CMakeCPackpublic2008-08-21 20:112010-12-14 18:45
ReporterTimothy Shead 
Assigned ToDavid Cole 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0007523: CPack OSX bundle generator can fail when assigning a custom volume icon.
DescriptionIf 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.
TagsNo tags attached.
Attached Filespatch file icon bundle_generator_mount_point.patch [^] (2,234 bytes) 2008-08-21 20:11 [Show Content]
patch file icon cpack-hdiutil-length.patch [^] (2,655 bytes) 2009-01-08 08:09 [Show Content]

 Relationships

  Notes
(0013146)
Bill Hoffman (manager)
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 (reporter)
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 (reporter)
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 (manager)
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 (manager)
2010-12-14 18:45

Closing bugs that have been resolved for more than 3 months without any further updates.

 Issue History
Date Modified Username Field Change
2008-08-21 20:11 Timothy Shead New Issue
2008-08-21 20:11 Timothy Shead File Added: bundle_generator_mount_point.patch
2008-08-21 20:38 Bill Hoffman Status new => assigned
2008-08-21 20:38 Bill Hoffman Assigned To => David Cole
2008-08-21 20:41 Bill Hoffman Note Added: 0013146
2008-08-22 11:08 Timothy Shead Note Added: 0013153
2009-01-08 08:08 Mike McQuaid Note Added: 0014485
2009-01-08 08:09 Mike McQuaid File Added: cpack-hdiutil-length.patch
2009-01-21 13:42 David Cole Note Added: 0014651
2009-01-21 13:42 David Cole Status assigned => resolved
2009-01-21 13:42 David Cole Resolution open => fixed
2010-12-14 18:45 David Cole Note Added: 0024023
2010-12-14 18:45 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team