<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/06/16 17:58, Kristian wrote:<br>
</div>
<blockquote
cite="mid:CAO5HUhN3PriS9aXacjvLaFzbqfJu+Z95LVtC4ZtjepE3SV+24w@mail.gmail.com"
type="cite">
<div dir="ltr">Hey guys,
<div><br>
</div>
<div>I am creating a RPM package with CMake. Here is a small
example of how it looks:</div>
<div><br>
</div>
<div>========</div>
<div><br>
</div>
<div>
<div>cmake_minimum_required(VERSION 3.5)</div>
<div><br>
</div>
<div>set(BOOST_LIB "${CMAKE_CURRENT_SOURCE_DIR}/boost")</div>
<div><br>
</div>
<div>file(GLOB_RECURSE BOOST_LIBRARIES ${BOOST_LIB}/*)</div>
<div><br>
</div>
<div>install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/usr/bin/executable DESTINATION
bin)</div>
<div>install(FILES ${BOOST_LIBRARIES} DESTINATION lib)</div>
<div><br>
</div>
<div>set(CPACK_GENERATOR "RPM")</div>
<div>set(CPACK_PACKAGE_VERSION 6.5)</div>
<div>set(CPACK_PACKAGE_NAME "executable-proj")</div>
<div># set(CPACK_RPM_PACKAGE_NAME "executable-proj")</div>
<div>set(CPACK_RPM_PACKAGE_SUMMARY "Simple executable
project")</div>
<div>set(CPACK_RPM_PACKAGE_ARCHITECTURE x86_64)</div>
<div>set(CPACK_PACKAGE_VENDOR "Some Vendor Limited")</div>
<div>set(CPACK_RPM_PACKAGE_MAINTAINER "Some Vendor Limited")</div>
<div>set(CPACK_RPM_PACKAGE_AUTOREQ "NO")</div>
<div>set(CPACK_PACKAGE_EXECUTABLES "executable")</div>
<div><br>
</div>
<div>INCLUDE(CPack)</div>
</div>
<div><br>
</div>
<div>======</div>
<div><br>
</div>
<div>Before running this cmake script, I am setting executable
permissions on the build machine, where the package is
created.</div>
<div><br>
</div>
<div>Then, I create a docker image, where this RPM is downloaded
and installed. But when I want to start the executable within
a docker container, then I am getting the message "permission
denied". </div>
<div>When I look at the permissions of my installed package,
then I see, I only have read permissions.</div>
<div><br>
</div>
<div>So the question is: What can I do for getting executable
permissions for this executable? Is this a CMake/CPack
problem?</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<p>Hi Kristian,</p>
<p>Did you take a look at the manual page for the install command:
cmake --help-command install? I think your issue may be resolved
by using the 'install(TARGETS ...' instead of 'install(FILES
...)'.</p>
<p>Best regards,</p>
<p>Micha<br>
</p>
</body>
</html>