[CMake] Specifying a file owner

cmake.bobd at dfgh.net cmake.bobd at dfgh.net
Tue Dec 30 14:01:37 EST 2014


Hi,

I was looking at https://www.cmake.org/Bug/view.php?id=3602 "Add
possibility to change file owner into install macro".

I have some issues with the comments, but the last note says to discuss
the bug on this list, so here goes:

CMake already allows the install command to accept
PERMISSIONS SETUID

It already deals with platforms that can't support SETUID.

So the argument that we should not support setting a file owner seems
specious to me. It seems inconsistent/incomplete to allow specifying
SETUID without allowing specification of the file ownership itself,
particularly since changing the file owner after the fact (e.g. in a
postinst package script) will clear the SETUID bit anyway, thus
rendering its specification useless for anything other than the default
(and currently non-overrideable) file owner (root).

I believe we should in fact support specifying the file owner, and
handle the case where that owner does not exist in the same way (from a
user experience) as we handle platforms that don't support SETUID - i.e.
do nothing (logging some kind of non-fatal error would be good).

Automatically creating a non-existing user would also be nice but is
orthogonal and should be handled as a separate feature request rather
than muddying the waters around this feature discussion.

-Bob




More information about the CMake mailing list