2013/4/19 hce <jupiter....@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
--

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

Reply via email to