[CMake] CPack PackageMaker bug?

Clinton Stimpson clinton at elemtech.com
Thu Jan 15 15:17:55 EST 2009


Michael Jackson wrote:
>
> On Jan 14, 2009, at 1:27 PM, Clinton Stimpson wrote:
>
>> Bill Hoffman wrote:
>>> Michael Jackson wrote:
>>>
>>>>   Another reason to have a Drag-and-Drop installation for CMake. I 
>>>> guess someone should file a bug for this.
>>>>
>>> If you want to create one, and contribute it that would be great.
>>>
>>> -Bill
>> I can make a patch and bug report.
>>
>> Should there be new variables where one can set the owner, group and 
>> permissions of the files, and have the PackageMaker generator 
>> recognize those?  And make root:admin and permissions of 775 the 
>> default, but check that the user is in the admin group first?
>>
>> Clint
>
> That would probably be the best answer would be to add the owner:group 
> to the install() command. I'm not convinced about the check to make 
> sure the user is in the admin group though. I'll have to think that 
> one through.

Adding owner:group to install() commands seems useful for something like 
installing a web server and some data files need to be owned by a web 
server user.  When doing a make install on Linux, I do it as root, so 
setting different ownership works.  Whereas doing a "make package" would 
set it up so the ownership is set when one installs the package.  When 
installing the package, one has root privileges as necessary anyways, so 
setting ownership works.  Is that how you were thinking the user:group 
option to the install commands would work?

The problem with PackageMaker is that ALL the files need to be owned by 
root at package time.  Not install time.  That can only be done if I 
issue "make package" as root, as "chown root" doesn't work as a normal 
user.  When I do that, most of my problem is solved.  Then I just add an 
install(CODE "chmod ...") to make sure the permissions are correct as 
well.  I don't see how a patch to CMake can help this PackageMaker 
problem much.

Clint



More information about the CMake mailing list