Skip to content

Conversation

@FelixKimmerle
Copy link

Since I completed the Optional Bonus Task, to test it you need to build the Docker container:

  sudo docker build -t cpack_ex .

and run it like this:

  sudo docker run --rm -v "$(pwd)":/src:ro -v "$(pwd)/dist":/out cpack_ex

This will build the packages (.tgz, .deb) and place them in the dist folder.
No build artifacts will be created on the host. The only caveat I noticed is that the files are owned by root, so you need sudo to delete them again.

When I initially ran lintian I got the following output:

  E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package)
  E: cpackexample: no-copyright-file
  E: cpackexample: no-phrase Maintainer FelixKimmerle@hotmail.com
  E: cpackexample: unstripped-binary-or-object [usr/bin/cpackexample]
  W: cpackexample: no-manual-page [usr/bin/cpackexample]

I fixed all of them, so there was no output from lintian after the fixes.
For this I had to:

  • install the repository’s LICENSE file into usr/share/doc/cpackexample/copyright (I used ${CMAKE_INSTALL_DOCDIR} from GNUInstallDirs)
  • create, compress, and install a changelog (it has no useful content but abides by the convention so that lintian does not complain)
  • create, compress, and install a man page (it also has no really useful content but serves as an example)
  • enable stripping of the binaries
  • format the Maintainer string to conform to the convention: Name <email>

Since the Optional Bonus Task asks to build the library as a shared library, there are now new things lintian is complaining about because I did not change anything else, and it wants the .deb package to contain ldconfig information and wants the name of the .so to include the version number:

  E: cpackexample: lacks-ldconfig-trigger usr/lib/libcpackexamplelib.so
  W: cpackexample: maintscript-calls-ldconfig [postinst]
  W: cpackexample: maintscript-calls-ldconfig [postrm]
  W: cpackexample: package-name-doesnt-match-sonames libcpackexamplelib
  W: cpackexample: shared-library-lacks-version usr/lib/libcpackexamplelib.so libcpackexamplelib.so

I used generative AI for the content of the changelog and the manpage.

Felix Kimmerle and others added 3 commits December 4, 2025 18:53
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

Successfully merging this pull request may close these issues.

1 participant