[CMake] cpack changed binary file permission in 2.8.10
hce
jupiter.hce at gmail.com
Fri Apr 19 22:12:25 EDT 2013
Eric Noulard wrote
> 2013/4/19 hce <
> jupiter.hce@
> >:
>> 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.
I did not use install statement, the binary files in bin directory were
copied directly to the Build directory at
Robotic/Robotic-prefix/src/robotic/bin, at that point all files permission
were correct.
Eric Noulard wrote
> 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.
I think it could be a cpack bug and I'll file a bug report. I'll try the
CPACK_RPM_USER_FILELIST for the time being.
Eric Noulard wrote
> 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.
I have tried bout could not figure out how to avoid to use root to build
packages where installation directory in system /usr/local/. I tried to
build and package software in fakeroot /tmp/fakeroot/application, and to
install the rpm int /usr/local/application. Then software generated
libraries and the fakeroot was added to appconfig.pc. If I misintepreted how
to use the fakeroot, could you please give me some examples of how to use
fakeroot correctly.
Thank you Eric.
Kind regards.
jupiter
--
View this message in context: http://cmake.3232098.n2.nabble.com/cpack-changed-binary-file-permission-in-2-8-10-tp7584105p7584119.html
Sent from the CMake mailing list archive at Nabble.com.
More information about the CMake
mailing list