CPack DEB generator: control-file-has-bad-permissions mdsums 0644 != 0644
Asked Answered
D

3

7

I am developing small console application and I was trying to create Ubuntu package using CPack. Ubuntu version is 13.04 and my main CPack file is below. Package is created correctly, but while trying to install it using graphic interface (basically double click on deb file in Ubuntu) following warning appears:

Package is of bad quality control-file-has-bad-permissions mdsums 0644 != 0644

Does anybody know what is the reason of that? And more importantly, how to fix it? CMake version is 2.8.10.1 but I have also tried to use 2.8.11.2 and nothing has changed.

I have seen, that they had similar problems here, but nothing about the nature of the fix

My main CPack file:

INCLUDE(InstallRequiredSystemLibraries)  
SET(CPACK_GENERATOR DEB)
SET(CPACK_PACKAGE_NAME "color")
SET(CPACK_PACKAGE_VERSION "0.8")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12)")
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")

SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "color - unix console tool for log syntax coloring")

SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/Copyright.txt")
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
SET(CPACK_PACKAGE_VERSION_MINOR "0")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_STRIP_FILES "color")
SET(CPACK_PACKAGE_EXECUTABLES "color")
INCLUDE(CPack)

If somebody wants to see the package or do more research, github repo (deb file is in first the release).

Doretheadoretta answered 22/7, 2013 at 20:21 Comment(2)
why use a tool when you can do it yourself?Superinduce
@Phpdna If you know how to fix the issue by editing the deb package, that's also useful information.Doretheadoretta
I
3

Good day, i stuck with same problem. After googling and some failed attempts i create workaround. After cpack i start my own script where i fix permissions on mdsums file. You can see my solution on next link: https://github.com/paralect/robomongo/blob/master/install/linux/fixup_deb.sh.in

Ivaivah answered 14/8, 2013 at 10:47 Comment(1)
but how can i make this script run automatically after the package is made??Neptunium
N
3

This is fixed in the develop branch of CMake, upcoming version 3.3.

Nerti answered 18/5, 2015 at 7:31 Comment(0)
E
1

Can confirm, CMake 3.3.0-rc2 fixes it, but if you have your source files on NTFS-formatted hard drive (like me), the error will still be there. As a workaround you can build your package from any available EXT partition, it worked in my case.

Expedient answered 23/6, 2015 at 12:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.