Bug#1110345: lomiri-location-service FTCBFS: Multiple reasons
Hi Nilesh, On Mon, Aug 04, 2025 at 08:23:27PM +0530, Nilesh Patra wrote: > Hmm -- is it? That's news. I did find several packages using !nocheck build > profile > when I searched on codesearch.debian.net _including_ the final lomiri package > [1]. Probably, most of https://codesearch.debian.net/search?q=Build-Profiles%3A.*nocheck&literal=0 are buggy and should be fixed. > And the test-only deps seem to be marked with !nocheck as well. If the package is normally reproducible and nocheck produces something else (e.g. fewer packages), that's an rc bug in forky. Refer to glib2.0 for a sensible example installing tests into a binary package. > Should that be fixed in the lomiri package too, in that case? Yes. > > ifeq (,$(filter lomiri-location-service-doc,$(shell dh_listpackages))) > > > > If doing an arch-only build or a nodoc build, debhelper will not list > > the package in dh_listpackages. > > > > > +EXTRA_CMAKE_OPTS += -DBUILD_DOCS=OFF > > > +endif > > > +ifneq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS) > > > $(DEB_BUILD_PROFILES))) > > > > This should likely be matching noinsttest. > > I do not see that option for DEB_BUILD_OPTIONS on the debian policy doc [2] > and lintian still suggests nocheck [3]. noinsttest is a build profile only. nocheck is an option and profile and eventually we'd like to turn it into a profile only. So once you move to noinsttest, you should be matching DEB_BUILD_PROFILES only. Last but not least, use filter instead of findstring. The profile pkg.foo.noinsttest should not be matched, but findstring would match it. Helmut
Bug#1110345: lomiri-location-service FTCBFS: Multiple reasons
On 04/08/25 11:21, Helmut Grohne wrote: On Mon, Aug 04, 2025 at 12:54:25AM +0530, Nilesh Patra wrote: 2. The lomiri-location-service-tests package misses a !nocheck build profile due to which cross-builds were trying to build for test package as well generally should never be used in Build-Profiles to disable the building of certain packages. To inhibit the building of installed tests, please use the noinsttest build profile. That may mean that some of the Build-Depends must move their annotations to annotations. Since that profile is not enabled by default for cross builds, that may result in failing to satisfy cross build depends. Hmm -- is it? That's news. I did find several packages using !nocheck build profile when I searched on codesearch.debian.net _including_ the final lomiri package [1]. And the test-only deps seem to be marked with !nocheck as well. Should that be fixed in the lomiri package too, in that case? export DPKG_GENSYMBOLS_CHECK_LEVEL=4 +EXTRA_CMAKE_OPTS = include /usr/share/dpkg/default.mk +ifneq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) There is a lomiri-location-service-doc package. Do you happen to know whether BUILD_DOCS affects other packages beyond this? Before submitting the patch, I skimmed over the relevant files and also checked the resulting .deb and it seemed to me that it does not. I'll try to double-check later. ifeq (,$(filter lomiri-location-service-doc,$(shell dh_listpackages))) If doing an arch-only build or a nodoc build, debhelper will not list the package in dh_listpackages. +EXTRA_CMAKE_OPTS += -DBUILD_DOCS=OFF +endif +ifneq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES))) This should likely be matching noinsttest. I do not see that option for DEB_BUILD_OPTIONS on the debian policy doc [2] and lintian still suggests nocheck [3]. Am I the only one getting confused? :P Should this be noinsttest for DEB_BUILD_PROFILES and nocheck for DEB_BUILD_OPTIONS? [1] https://sources.debian.org/src/lomiri/0.5.0-4/debian/control/?hl=237#L237 [2] https://www.debian.org/doc/debian-policy/ch-source.html#debian-rules-and-deb-build-options: [3] https://lintian.debian.org/tags/override_dh_auto_test-does-not-check-DEB_BUILD_OPTIONS.html
Bug#1110345: lomiri-location-service FTCBFS: Multiple reasons
Hi Nilesh,
thanks for sending cross build patches.
On Mon, Aug 04, 2025 at 12:54:25AM +0530, Nilesh Patra wrote:
> > > 2. The lomiri-location-service-tests package misses a !nocheck build
> > > profile due
> > > to which cross-builds were trying to build for test package as well
generally should never be used in Build-Profiles to disable
the building of certain packages. To inhibit the building of installed
tests, please use the noinsttest build profile.
That may mean that some of the Build-Depends must move their
annotations to annotations. Since that profile is not
enabled by default for cross builds, that may result in failing to
satisfy cross build depends.
> --- a/debian/control
> +++ b/debian/control
> @@ -69,6 +69,7 @@ Package: lomiri-location-service-tests
> Architecture: any
> Depends: ${misc:Depends},
> ${shlibs:Depends},
> +Build-Profiles:
> Description: Lomiri Location Service test executables
> Aggregates position/velocity/heading updates and exports them over DBus.
> .
This is the hunk I'm complaining about.
> diff --git a/debian/rules b/debian/rules
> index dbdb92e..ef527e0 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -14,12 +14,20 @@ NULL =
> export DEB_BUILD_MAINT_OPTIONS = hardening=+all
> DPKG_EXPORT_BUILDFLAGS = 1
> include /usr/share/dpkg/buildflags.mk
> +-include /usr/share/dpkg/buildtools.mk
The buildtools.mk file is present since quite a long time now.
Initially, I started using it with "-include" to facilitate backports,
but we no longer need to cover that case and plain "include" is more
sensible these days.
> DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
>
> export DPKG_GENSYMBOLS_CHECK_LEVEL=4
> +EXTRA_CMAKE_OPTS =
>
> include /usr/share/dpkg/default.mk
> +ifneq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
There is a lomiri-location-service-doc package. Do you happen to know
whether BUILD_DOCS affects other packages beyond this? (You may check
using reproducible builds, e.g. manual pages may go away.) If only that
one package is affected, a better check would be:
ifeq (,$(filter lomiri-location-service-doc,$(shell dh_listpackages)))
If doing an arch-only build or a nodoc build, debhelper will not list
the package in dh_listpackages.
> +EXTRA_CMAKE_OPTS += -DBUILD_DOCS=OFF
> +endif
> +ifneq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
This should likely be matching noinsttest.
> +EXTRA_CMAKE_OPTS += -DBUILD_TESTS=OFF
> +endif
>
> %:
> dh $@
> @@ -33,8 +41,10 @@ override_dh_auto_install:
> override_dh_install:
> rm -Rv debian/tmp/usr/lib/*/lomiri-location-service/examples/
> rm -Rv debian/tmp/usr/share/lomiri-location-service/examples/
> +ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
Also match on the package being built here if possible.
Helmut
Bug#1110345: lomiri-location-service FTCBFS: Multiple reasons
Missed to CC bug report. doing that now. On 03/08/25 23:36, Nilesh Patra wrote: On 03/08/25 20:00, Nilesh Patra wrote: Package: lomiri-location-service Version: 3.3.0-2 Tags: patch User: [email protected] Usertags: ftcbfs X-Debbugs-Cc: [email protected] Dear Maintainer, lomiri-location-service fails to cross-build due to multiple reasons. 1. In d/rules, "CC" and "CXX" are used with dh_auto_configure without importing include /usr/share/dpkg/buildtools.mk which will set it to correct triplet prefixed var. 2. The lomiri-location-service-tests package misses a !nocheck build profile due to which cross-builds were trying to build for test package as well 3. CMakeLists.txt lack an option to not compile build time tests and documentation. I've attempted to fix all 3 issues and attached a patch. Please consider to review and apply. I missed to attach one more change for install rule which should only be executed if there's no nodoc. Attached another patch with this mail. From beacf83f033b3ba374d86e19bf5f88ad1bd59340 Mon Sep 17 00:00:00 2001 From: Nilesh Patra Date: Sun, 3 Aug 2025 19:31:29 +0530 Subject: [PATCH] Get lomiri-location-service cross-building --- CMakeLists.txt| 12 +-- debian/control| 1 + ...02_add-opts-for-disabling-tests-docs.patch | 32 +++ debian/patches/series | 1 + debian/rules | 11 +++ 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 debian/patches/2002_add-opts-for-disabling-tests-docs.patch diff --git a/CMakeLists.txt b/CMakeLists.txt index 45e6d70..0512759 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,10 @@ set(LOMIRI_LOCATION_SERVICE_VERSION_PATCH 0) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) +# Add flag for Build time tests +option(BUILD_TESTS "Build the tests at build time" ON) +# Add flag for Docs +option(BUILD_DOCS "Build the documentation at build time" ON) message(STATUS "${CMAKE_PROJECT_NAME} ${LOMIRI_LOCATION_SERVICE_VERSION_MAJOR}.${LOMIRI_LOCATION_SERVICE_VERSION_MINOR}.${LOMIRI_LOCATION_SERVICE_VERSION_PATCH}") @@ -153,12 +157,16 @@ if(ENABLE_TRUST_STORE) endif(ENABLE_TRUST_STORE) add_subdirectory(data) -add_subdirectory(doc) +if(BUILD_DOCS) +add_subdirectory(doc) +endif(BUILD_DOCS) add_subdirectory(examples) add_subdirectory(include) add_subdirectory(po) add_subdirectory(src) -add_subdirectory(tests) +if(BUILD_TESTS) +add_subdirectory(tests) +endif(BUILD_TESTS) add_subdirectory(qt) # There's no nice way to format this. Thanks CMake. diff --git a/debian/control b/debian/control index 31f4962..db124b0 100644 --- a/debian/control +++ b/debian/control @@ -69,6 +69,7 @@ Package: lomiri-location-service-tests Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, +Build-Profiles: Description: Lomiri Location Service test executables Aggregates position/velocity/heading updates and exports them over DBus. . diff --git a/debian/patches/2002_add-opts-for-disabling-tests-docs.patch b/debian/patches/2002_add-opts-for-disabling-tests-docs.patch new file mode 100644 index 000..1493714 --- /dev/null +++ b/debian/patches/2002_add-opts-for-disabling-tests-docs.patch @@ -0,0 +1,32 @@ +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -11,6 +11,10 @@ + set(CMAKE_INCLUDE_CURRENT_DIR ON) + # Instruct CMake to run moc automatically when needed. + set(CMAKE_AUTOMOC ON) ++# Add flag for Build time tests ++option(BUILD_TESTS "Build the tests at build time" ON) ++# Add flag for Docs ++option(BUILD_DOCS "Build the documentation at build time" ON) + + message(STATUS "${CMAKE_PROJECT_NAME} ${LOMIRI_LOCATION_SERVICE_VERSION_MAJOR}.${LOMIRI_LOCATION_SERVICE_VERSION_MINOR}.${LOMIRI_LOCATION_SERVICE_VERSION_PATCH}") + +@@ -153,12 +157,16 @@ + endif(ENABLE_TRUST_STORE) + + add_subdirectory(data) +-add_subdirectory(doc) ++if(BUILD_DOCS) ++add_subdirectory(doc) ++endif(BUILD_DOCS) + add_subdirectory(examples) + add_subdirectory(include) + add_subdirectory(po) + add_subdirectory(src) +-add_subdirectory(tests) ++if(BUILD_TESTS) ++add_subdirectory(tests) ++endif(BUILD_TESTS) + add_subdirectory(qt) + + # There's no nice way to format this. Thanks CMake. diff --git a/debian/patches/series b/debian/patches/series index 4556b3e..ecc8795 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 2001_skip-boost-ptree-settings-tests.patch 1002_typo-fixes.patch 1003_not-build-dir-in-doc-files.patch +2002_add-opts-for-disabling-tests-docs.patch diff --git a/debian/rules b/debian/rules index dbdb92e..ef527e0 100755 --- a/debian/rules +++ b/debian/rules @@ -14,12 +14,20 @@ NULL = export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk +-include /usr/share/dpkg/buildtools.mk DEB_H
Bug#1110345: lomiri-location-service FTCBFS: Multiple reasons
Package: lomiri-location-service Version: 3.3.0-2 Tags: patch User: [email protected] Usertags: ftcbfs X-Debbugs-Cc: [email protected] Dear Maintainer, lomiri-location-service fails to cross-build due to multiple reasons. 1. In d/rules, "CC" and "CXX" are used with dh_auto_configure without importing include /usr/share/dpkg/buildtools.mk which will set it to correct triplet prefixed var. 2. The lomiri-location-service-tests package misses a !nocheck build profile due to which cross-builds were trying to build for test package as well 3. CMakeLists.txt lack an option to not compile build time tests and documentation. I've attempted to fix all 3 issues and attached a patch. Please consider to review and apply. Best, NileshFrom 53e574c074f966c813886623308bab3160687240 Mon Sep 17 00:00:00 2001 From: Nilesh Patra Date: Sun, 3 Aug 2025 19:31:29 +0530 Subject: [PATCH] Get lomiri-location-service cross-building --- CMakeLists.txt| 12 +-- debian/control| 1 + ...02_add-opts-for-disabling-tests-docs.patch | 32 +++ debian/patches/series | 1 + debian/rules | 9 ++ 5 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 debian/patches/2002_add-opts-for-disabling-tests-docs.patch diff --git a/CMakeLists.txt b/CMakeLists.txt index 45e6d70..0512759 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,10 @@ set(LOMIRI_LOCATION_SERVICE_VERSION_PATCH 0) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) +# Add flag for Build time tests +option(BUILD_TESTS "Build the tests at build time" ON) +# Add flag for Docs +option(BUILD_DOCS "Build the documentation at build time" ON) message(STATUS "${CMAKE_PROJECT_NAME} ${LOMIRI_LOCATION_SERVICE_VERSION_MAJOR}.${LOMIRI_LOCATION_SERVICE_VERSION_MINOR}.${LOMIRI_LOCATION_SERVICE_VERSION_PATCH}") @@ -153,12 +157,16 @@ if(ENABLE_TRUST_STORE) endif(ENABLE_TRUST_STORE) add_subdirectory(data) -add_subdirectory(doc) +if(BUILD_DOCS) +add_subdirectory(doc) +endif(BUILD_DOCS) add_subdirectory(examples) add_subdirectory(include) add_subdirectory(po) add_subdirectory(src) -add_subdirectory(tests) +if(BUILD_TESTS) +add_subdirectory(tests) +endif(BUILD_TESTS) add_subdirectory(qt) # There's no nice way to format this. Thanks CMake. diff --git a/debian/control b/debian/control index 31f4962..db124b0 100644 --- a/debian/control +++ b/debian/control @@ -69,6 +69,7 @@ Package: lomiri-location-service-tests Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, +Build-Profiles: Description: Lomiri Location Service test executables Aggregates position/velocity/heading updates and exports them over DBus. . diff --git a/debian/patches/2002_add-opts-for-disabling-tests-docs.patch b/debian/patches/2002_add-opts-for-disabling-tests-docs.patch new file mode 100644 index 000..1493714 --- /dev/null +++ b/debian/patches/2002_add-opts-for-disabling-tests-docs.patch @@ -0,0 +1,32 @@ +--- a/CMakeLists.txt b/CMakeLists.txt +@@ -11,6 +11,10 @@ + set(CMAKE_INCLUDE_CURRENT_DIR ON) + # Instruct CMake to run moc automatically when needed. + set(CMAKE_AUTOMOC ON) ++# Add flag for Build time tests ++option(BUILD_TESTS "Build the tests at build time" ON) ++# Add flag for Docs ++option(BUILD_DOCS "Build the documentation at build time" ON) + + message(STATUS "${CMAKE_PROJECT_NAME} ${LOMIRI_LOCATION_SERVICE_VERSION_MAJOR}.${LOMIRI_LOCATION_SERVICE_VERSION_MINOR}.${LOMIRI_LOCATION_SERVICE_VERSION_PATCH}") + +@@ -153,12 +157,16 @@ + endif(ENABLE_TRUST_STORE) + + add_subdirectory(data) +-add_subdirectory(doc) ++if(BUILD_DOCS) ++add_subdirectory(doc) ++endif(BUILD_DOCS) + add_subdirectory(examples) + add_subdirectory(include) + add_subdirectory(po) + add_subdirectory(src) +-add_subdirectory(tests) ++if(BUILD_TESTS) ++add_subdirectory(tests) ++endif(BUILD_TESTS) + add_subdirectory(qt) + + # There's no nice way to format this. Thanks CMake. diff --git a/debian/patches/series b/debian/patches/series index 4556b3e..ecc8795 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 2001_skip-boost-ptree-settings-tests.patch 1002_typo-fixes.patch 1003_not-build-dir-in-doc-files.patch +2002_add-opts-for-disabling-tests-docs.patch diff --git a/debian/rules b/debian/rules index dbdb92e..24487f3 100755 --- a/debian/rules +++ b/debian/rules @@ -14,12 +14,20 @@ NULL = export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk +-include /usr/share/dpkg/buildtools.mk DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) export DPKG_GENSYMBOLS_CHECK_LEVEL=4 +EXTRA_CMAKE_OPTS = include /usr/share/dpkg/default.mk +ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) +EXTRA_CMAKE_OPTS += -DBUILD_DOCS=OFF +endif +i

