[CMake] How to set suid for an executable with CMake and CPack?

Dong Tiger idlecat511 at gmail.com
Mon Aug 10 10:11:19 EDT 2009


Thanks. I'll take a look although I feel CPack should be able to take care
of that automatically. Especially the owner of files should not be the user
who builds the package.

2009/8/10 Michael Wild <themiwi at users.sourceforge.net>

> you probably want to have a look at the fakeroot package
>
> Michael
>
>
> On 10. Aug, 2009, at 12:23, Dong Tiger wrote:
>
>  I tried with
>>
>> install(TARGETS
>>     my_executable
>>     RUNTIME DESTINATION bin
>>     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
>> GROUP_EXECUTE WORLD_READ WORLD_EXECUTE SETUID
>> )
>>
>> But it only works if I do "sudo make install" before "cpack -G DEB". How
>> to
>> avoid the "sudo make install" step?  Can I embed post-install script in
>> cpack generated debian package?
>>
>> --
>> Tiger
>>
>>
>> 2009/8/10 Dong Tiger <idlecat511 at gmail.com>
>>
>>  Hi,
>>>
>>> I use CPack to  build debian package for my project. One of the
>>> executables
>>> in my project need to have suid set. How could I do that?
>>>
>>> TIA
>>>
>>> --
>>> Tiger
>>>
>>>  _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090810/81cfeaca/attachment.htm>


More information about the CMake mailing list