Fix Debian packaging#74
Conversation
37cbf6e to
286eb8c
Compare
| 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-*) |
There was a problem hiding this comment.
This fix would be necessary for the Makefile_v1 build in debian.
286eb8c to
16d3e88
Compare
There was a problem hiding this comment.
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-binis defined indebian/control, but the rules file does not enable the CMake option/env var that actually buildsicvutil(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=ONor exportSECUTILS_USE_ICV=1) or make the-binpackage 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_SUBDIRis set to an empty string and then the same doc files (libsecutils.svg, and on Linux alsodebian/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}
78db8d4 to
0701d22
Compare
|
@gylstorffq, does this look good to you? |
|
Ping @gylstorffq - did you see my follow-up commits? |
|
I didn't have time to check it - will try to do it in this week. |
There was a problem hiding this comment.
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.
| 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 |
There was a problem hiding this comment.
cmake is missing as a build depends
|
|
||
| Package: libsecutils-dev | ||
| Depends: libsecutils (>= 2.2), ${misc:Depends} | ||
| Depends: ${misc:Depends}, ${shlibs:Depends}, libssl-dev |
There was a problem hiding this comment.
This would be more correct:
Depends: libsecutils (= ${binary:Version}), ${misc:Depends}, libssl-dev
Suggests: libuta-dev
| 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-*) |
There was a problem hiding this comment.
This fix would be necessary for the Makefile_v1 build in debian.
| 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) |
There was a problem hiding this comment.
You should remove that commented code.
There was a problem hiding this comment.
I've moved this close to the place where (also commented out meanwhile) it was used before.
| Section: devel | ||
| Architecture: all | ||
| Architecture: any | ||
| Multi-Arch: foreign |
There was a problem hiding this comment.
Multi-Arch: foreign will lead to a lintian error. I would remove it.
9f0cd8f to
04dbaaf
Compare
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.
04dbaaf to
435732a
Compare
435732a to
eca141a
Compare
…available without SECUTILS_USE_ICV
…ription also with debian/control
…DEVELOPMENT_PACKAGE_ARCHITECTURE "all"
6450947 to
6dc2a66
Compare
6dc2a66 to
2571fb1
Compare
ec028ad to
d68de52
Compare
|
Thanks @gylstorffq for your comments. |
85aedc5 to
e231405
Compare
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
booltype.