Skip to content

Conversation

@NDM14
Copy link

@NDM14 NDM14 commented Dec 9, 2025

GitLab Username: schmidpl

How to test:

  1. build the docker image:
    docker build -t cpackexample .

  2. Run the container:
    docker run --rm -it --mount type=bind,source="$(pwd)",target=/mnt/cpack-exercise cpackexercise

  3. build the packages inside the container:
    cd /mnt/cpack-exercise mkdir build && cd build cmake .. make -j4 make package

  4. test the packages inside the container:
    `dpkg-deb -c cpackexample_0.1.0_amd64.deb
    tar -tzf cpackexample-0.1.0-Linux.tar.gz

make install DESTDIR=/tmp/test-install

apt install -y ./cpackexample_0.1.0_amd64.deb
cpackexample

lintian ./cpackexample_0.1.0_amd64.deb
`

Final Lintian Output:

'
root@194e97b2f21d:/mnt/cpack-exercise/build# lintian ./cpackexample_0.1.0_amd64.deb
running with root privileges is not recommended!
E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package)
E: cpackexample: no-copyright-file
W: cpackexample: extended-description-line-too-long line 1
W: cpackexample: no-manual-page [usr/bin/cpackexample]
'

Changes:

  1. Modified CMakeLists.txt to add install targets
  2. Created cmake/CPackConfig.cmake to generate debian packages
  3. Inspected the debian package with linter to validate it

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