Skip to content

Fix Debian packaging#74

Open
DDvO wants to merge 25 commits into
masterfrom
fix-Debian-packaging
Open

Fix Debian packaging#74
DDvO wants to merge 25 commits into
masterfrom
fix-Debian-packaging

Conversation

@DDvO

@DDvO DDvO commented May 20, 2026

Copy link
Copy Markdown
Member

This is an enhanced, squashed, and rebased version of Feat/prepare for cmake debian build#68.

It meanwhile also contains a commit fixing compatibility, which introduced the bool type.

@DDvO DDvO added bug Something isn't working enhancement New feature or request labels May 20, 2026
@DDvO DDvO force-pushed the fix-Debian-packaging branch from 37cbf6e to 286eb8c Compare May 20, 2026 17:15
@DDvO DDvO requested a review from Copilot May 20, 2026 17:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.

Comment thread src/security-utilities.pc.in Outdated
Comment thread src/security-utilities.pc.in Outdated
Comment thread src/libsecutils/include/secutils/CMakeLists.txt
Comment thread src/CMakeLists.txt
Comment thread Makefile_v1 Outdated
ifeq ($(OS),Linux)
ifeq ($(shell echo $(OPENSSL_DIR) | grep -E '^/(home|Users)'),)
override OPENSSL_LIB = $(wildcard /lib/*linux-gnu*)
override OPENSSL_LIB = $(wildcard /lib/$(shell uname -i)-linux-*)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix would be necessary for the Makefile_v1 build in debian.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've taken this over.

Comment thread debian/rules
Comment thread debian/control Outdated
Comment thread CMakeLists.txt Outdated
Comment thread CMakeLists.txt Outdated
@DDvO DDvO force-pushed the fix-Debian-packaging branch from 286eb8c to 16d3e88 Compare May 22, 2026 09:23
@DDvO DDvO requested a review from Copilot May 22, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (2)

debian/rules:46

  • libsecutils-bin is defined in debian/control, but the rules file does not enable the CMake option/env var that actually builds icvutil (SECURITY_UTILITIES_USE_ICV / SECUTILS_USE_ICV). The current workaround (touch icvutil) risks packaging an empty placeholder into /usr/bin. Prefer enabling the feature for the Debian build (e.g. pass -DSECURITY_UTILITIES_USE_ICV=ON or export SECUTILS_USE_ICV=1) or make the -bin package conditional instead of creating a dummy file.
	dh_auto_build
	dh_auto_build -- doc
	 #	      dh_auto_install --destdir=$(CURDIR)/debian/tmp

override_dh_auto_install:
	touch icvutil # workaround in case SECUTILS_USE_ICV is unset
	dh_auto_install --destdir debian/tmp # -- -f Makefile_v1

CMakeLists.txt:431

  • In the CPack component loop, COMPONENT_DOC_SUBDIR is set to an empty string and then the same doc files (libsecutils.svg, and on Linux also debian/copyright + changelog.gz) are installed for every component to the same ${CMAKE_INSTALL_DOCDIR} path. This will cause the generated component DEBs (e.g. runtime and -dev) to contain overlapping file paths, which typically results in dpkg file conflicts when installing multiple packages. Consider restoring per-component doc destinations (e.g. include the ${suffix} in the path) or installing shared doc files into only one component/package.
    set(COMPONENT_DOC_SUBDIR "") # "/${PROJECT_NAME}${suffix}"

    if(suffix STREQUAL "-dev")
      install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/html
        OPTIONAL # TODO add build for doc/
        DESTINATION "${CMAKE_INSTALL_DOCDIR}${COMPONENT_DOC_SUBDIR}"
        COMPONENT security-utilities_library_Development
      )
    endif()
    install(FILES
      "${CMAKE_CURRENT_SOURCE_DIR}/libsecutils.svg"
      DESTINATION "${CMAKE_INSTALL_DOCDIR}${COMPONENT_DOC_SUBDIR}"
      COMPONENT ${component}
    )
    if(CMAKE_SYSTEM_NAME MATCHES "Linux")
      install(FILES
        "${CMAKE_CURRENT_SOURCE_DIR}/debian/copyright"
        "${CMAKE_CURRENT_BINARY_DIR}/changelog.gz"
        DESTINATION "${CMAKE_INSTALL_DOCDIR}${COMPONENT_DOC_SUBDIR}"
        COMPONENT ${component}

Comment thread src/libsecutils/include/secutils/CMakeLists.txt
Comment thread src/CMakeLists.txt Outdated
Comment thread debian/libsecutils-dev.install
Comment thread debian/rules Outdated
Comment thread CMakeLists.txt Outdated
@DDvO DDvO force-pushed the fix-Debian-packaging branch 2 times, most recently from 78db8d4 to 0701d22 Compare May 22, 2026 09:55
@DDvO DDvO requested a review from rajeev-0 May 22, 2026 10:00
@DDvO

DDvO commented May 22, 2026

Copy link
Copy Markdown
Member Author

@gylstorffq, does this look good to you?
For some reason, cannot add you as usual to the list of requested reviewers.

@DDvO

DDvO commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

Ping @gylstorffq - did you see my follow-up commits?
Please let me know if this still accomplishes what you were aiming at.

@gylstorffq

Copy link
Copy Markdown

I didn't have time to check it - will try to do it in this week.

@gylstorffq gylstorffq left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a test build with

sbuild -d trixie --profile nocheck --no-clean-source .

I have the following lintian messages during build for trixie.
W: libsecutils-bin: executable-not-elf-or-script [usr/bin/icvutil]
W: libsecutils: lacks-unversioned-link-to-shared-library example: usr/lib/x86_64-linux-gnu/libsecutils.so [usr/lib/x86_64-linux-gnu/libsecutils.so.2.2.0]
W: libsecutils: link-to-shared-library-in-wrong-package usr/lib/x86_64-linux-gnu/libsecutils.so.2.2.0 [usr/lib/x86_64-linux-gnu/libsecutils.so]
W: libsecutils-bin: no-manual-page [usr/bin/icvutil]
W: libsecutils source: no-versioned-debhelper-prerequisite 10
W: libsecutils: package-name-doesnt-match-sonames libsecutils2

Also this will not build with gcc-15 as default version c standard changes to c23, which defines bool.

Comment thread debian/control Outdated
Priority: optional
Maintainer: Benjamin Schilling <Schilling.Benjamin@siemens.com>
Uploader: David von Oheimb <David.von.Oheimb@siemens.com>
Build-Depends: libssl-dev, debhelper (>= 9), devscripts

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake is missing as a build depends

Comment thread debian/control Outdated

Package: libsecutils-dev
Depends: libsecutils (>= 2.2), ${misc:Depends}
Depends: ${misc:Depends}, ${shlibs:Depends}, libssl-dev

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be more correct:
Depends: libsecutils (= ${binary:Version}), ${misc:Depends}, libssl-dev
Suggests: libuta-dev

Comment thread Makefile_v1 Outdated
ifeq ($(OS),Linux)
ifeq ($(shell echo $(OPENSSL_DIR) | grep -E '^/(home|Users)'),)
override OPENSSL_LIB = $(wildcard /lib/*linux-gnu*)
override OPENSSL_LIB = $(wildcard /lib/$(shell uname -i)-linux-*)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix would be necessary for the Makefile_v1 build in debian.

Comment thread debian/rules Outdated
CC=$(DEB_HOST_GNU_TYPE)-gcc
CXX=$(DEB_HOST_GNU_TYPE)-g++
AR=$(DEB_HOST_GNU_TYPE)-ar
# DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should remove that commented code.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved this close to the place where (also commented out meanwhile) it was used before.

Comment thread debian/control Outdated
Section: devel
Architecture: all
Architecture: any
Multi-Arch: foreign

@gylstorffq gylstorffq Jun 10, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-Arch: foreign will lead to a lintian error. I would remove it.

@DDvO DDvO force-pushed the fix-Debian-packaging branch from 9f0cd8f to 04dbaaf Compare June 11, 2026 07:28
gylstorffq and others added 4 commits June 11, 2026 10:00
This adds the package configuration information, which allows to
use the cmake files of the library in distributions like Debian.
This is necessary to build the system
This allows to disable the cpack build and other parts which are
incompatible with building a Debian package.
@DDvO DDvO force-pushed the fix-Debian-packaging branch from 04dbaaf to 435732a Compare June 11, 2026 16:17
@DDvO DDvO force-pushed the fix-Debian-packaging branch from 435732a to eca141a Compare June 11, 2026 16:25
@DDvO DDvO force-pushed the fix-Debian-packaging branch 2 times, most recently from 6450947 to 6dc2a66 Compare June 11, 2026 20:01
@DDvO DDvO force-pushed the fix-Debian-packaging branch from 6dc2a66 to 2571fb1 Compare June 11, 2026 20:04
@DDvO DDvO requested a review from gylstorffq June 11, 2026 20:05
Copilot finished work on behalf of DDvO June 11, 2026 20:27
@DDvO DDvO force-pushed the fix-Debian-packaging branch from ec028ad to d68de52 Compare June 11, 2026 20:30
@DDvO

DDvO commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

Thanks @gylstorffq for your comments.
I meanwhile handled all of them
and finally also managed to get rid of all lintian warning, using massive support by Copilot.

@DDvO DDvO force-pushed the fix-Debian-packaging branch from 85aedc5 to e231405 Compare June 15, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants