Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing .deb when built on Debian 10 appears broken #15

Open
soxrok2212 opened this issue Apr 22, 2020 · 3 comments
Open

Installing .deb when built on Debian 10 appears broken #15

soxrok2212 opened this issue Apr 22, 2020 · 3 comments

Comments

@soxrok2212
Copy link

Hi all,

I've been successful in compiling and packaging into a .deb, however when attempting to install it, I get the error

dpkg: error processing archive dlep-2.1.amd64.deb (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 6:
 missing 'Package' field
Errors were encountered while processing:
 dlep-2.1.amd64.deb

This only happens when building on a Debian 10 64-bit system. Building and packing from an Ubuntu 18.04 64-bit machine, all works just fine. I've attempted playing with the CMakeLIsts.txt and build/CPackConfig.make files, but haven't had any luck.

Viewing _CPack_Packages/Linux/DEB/dlep-2.1.amd64/control has a Package field set, granted it's not near line 6.

Both systems are up to date with all requirements installed.

@b00ga
Copy link
Contributor

b00ga commented Apr 22, 2020

I took a look this morning. I can reproduce this issue. This is either something with how Debian 10's dpkg tools are handling this or how cpack in Debian cmake 3.13.4 is creating the package. Ultimately, when the package description is being read into a variable, there is a stray newline being added and that is malforming the control file.

I'd like to look at this more closely when I have more time, but here is a workaround for now.
In the top level CMakeLists.txt, after the line:
FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/package/packagedesc.txt" PACKAGEDESC)
add the line:
STRING(REGEX REPLACE "\n$" "" PACKAGEDESC ${PACKAGEDESC})
and rerun make package

The resulting deb should now be installable.

@b00ga
Copy link
Contributor

b00ga commented Apr 22, 2020

You may need to re-run your cmake command before make package as well.

@soxrok2212
Copy link
Author

Much appreciated, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants