[CMake] CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA file permissions.

Eric Noulard eric.noulard at gmail.com
Fri May 23 02:28:17 EDT 2014


2014-05-22 23:52 GMT+02:00 Rick McGuire <object.rexx at gmail.com>:
> We're running into a problem with our Debian packaging.  We're using the
> CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA setting to configure postinst and prerm
> scripts for the package.  The scrips come from our svn source tree and are
> keeping the fairly open permissions from the checkout.  The ubuntu installer
> is throwing an error because it expects these files to have more restrictive
> permissions of 0644.  How can we get these files to the correct permissions
> when the package is built?

Copy the file from source to build tree using

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/prerm DESTINATION
${CMAKE_CURRENT_BINARY_DIR}
     FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
     NO_SOURCE_PERMISSIONS)

then use ${CMAKE_CURRENT_BINARY_DIR}/prerm in
CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA.



>
> Rick
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake



-- 
Erk
L'élection n'est pas la démocratie -- http://www.le-message.org


More information about the CMake mailing list