[CMake] cpack changed binary file permission in 2.8.10
Eric Noulard
eric.noulard at gmail.com
Fri Apr 19 11:19:27 EDT 2013
2013/4/19 hce <jupiter.hce at gmail.com>:
> Hi,
>
> I have another wired situation when I run "cpack -G RPM", the cpack changed
> a binary file permission:
>
> Original file in the build directory:
>
> $ ls -l Robotic/Robotic-prefix/src/robotic/bin/CreateSystemObject
>
> -rwxr-xr-x. 1 root root 15307640 Apr 19 12:01
> Robotic/Robotic-prefix/src/robotic/bin/CreateSystemObject
>
> After running "cpack -G RPM":
>
> $ ls -l
> _CPack_Packages/el6.x86_64/RPM/robotic/usr/local/bin/CreateSystemObject
>
> -rwxr--r--. 1 root root 15307640 Apr 19 16:22
> _CPack_Packages/el6.x86_64/RPM/robotic/usr/local/bin/CreateSystemObject
>
> The cpack changed binary file "CreateSystemObject" permission from
> -rwxr-xr-x to -rwxr--r--, not sure why, but is there any way to force cpack
> don't change the permission?
Did you specify PERMISSION in your install(...) statement for this target?
If not please do so, cpack shall respect what "make install" does which
may be different from the permission you get in the build tree which
only comes from the umask of the user doing the build.
If the problem persist please file a bug report.
You may probably able to fix the right using
CPACK_RPM_USER_FILELIST which can override generated spec file list
for one (or several) file.
By the way you seem to be compiling+building+package being root,
is it really the case?
I would really suggest NOT to do that,
building whould really be done a normal user.
Packaging "may" require fakeroot,
Real install (rpm or make install at system-wide location) needs root privilege.
Otherwise being root for doing "normal user stuff" is looking for trouble.
>
> Thank you.
>
> Kind regards,
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
More information about the CMake
mailing list