Package: dh-debputy Version: 0.1.59 Severity: important
Hi!Today I tried using debputy's full integration mode for a new package I'm preparing, but it unfortunately hasn't been able to properly build my simple CMake package.
I believe that the issue is in the `relative_from_builddir_to_source()` method of `BuildSystemRule`, defined in `/usr/share/dh-debputy/debputy/plugin/debputy/to_be_api_types.py`. The method signature says that it is OK to call it with no `path_in_source_dir` parameter, but when a None gets passed to `os.path.join(source_dir, path_in_source_dir)` an exception is thrown, as `os.path.join()` doesn't seem to accept None as a parameter.
`relative_from_builddir_to_source` is called without parameters in the `configure_impl` implementation of the class `CMakeBuildSystemRule`, defined in `/usr/share/dh-debputy/debputy/plugin/debputy/build_system_rules.py`.
Lastly, in case it helps, here's the full build debug log (by the way, is there an easy way to pass `--debug` to debputy when building? I've hardcoded it into `/usr/share/perl5/Dpkg/BuildDriver/Debputy.pm`, which is not exactly optimal). Bye :D
dpkg-buildpackage: info: source package oaknut dpkg-buildpackage: info: source version 1.2.2+git20240301.94c726c-1 dpkg-buildpackage: info: source distribution UNRELEASED dpkg-buildpackage: info: source changed by Andrea Pappacoda <and...@pappacoda.it> dpkg-source --diff-ignore=true --tar-ignore=true --diff-ignore=.git --before-build . dpkg-buildpackage: info: host architecture amd64 debputy --debug internal-command dpkg-build-driver-run-task clean debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/plugin/api/impl_types.py:165 (PluginProvidedParser.parse) (from context: None) debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/plugin/api/impl_types.py:561 (DispatchingObjectParser.register_child_parser.<locals>._handler) (from context: None) debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/plugin/api/impl_types.py:165 (PluginProvidedParser.parse) (from context: None) debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/installations.py:1031 (PPFInstallRule.__init__) (from context: None) debputy: debug: Auto-detecting build systems. debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system autoconf: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system make: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system perl-build: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system perl-makemaker: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Considering build system debhelper as its Detector returned True! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Considering build system cmake as its Detector returned True! debputy: debug: Build system cmake excludes: debhelper, make! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system meson: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system qmake: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system qmake6: Detector returned False! debputy: debug: The following build systems have been excluded: debhelper, make! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:101 (auto_detect_buildsystem) (from context: None) debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:101 (auto_detect_buildsystem) (from context: debputy) debputy: info: Auto-detected build system: CMakeBuildSystemRule debputy: debug: Computed environment variables from dpkg-buildflags [default-env] debputy: debug: ASFLAGS= debputy: debug: ASFLAGS_FOR_BUILD= debputy: debug: CFLAGS=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: CFLAGS_FOR_BUILD=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 debputy: debug: CPPFLAGS_FOR_BUILD=-Wdate-time -D_FORTIFY_SOURCE=2 debputy: debug: CXXFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: CXXFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: DFLAGS=-frelease debputy: debug: DFLAGS_FOR_BUILD=-frelease debputy: debug: FCFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: FCFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: FFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: FFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: LDFLAGS=-Wl,-z,relro -Wl,-z,now debputy: debug: LDFLAGS_FOR_BUILD=-Wl,-z,relro -Wl,-z,now debputy: debug: OBJCFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: OBJCFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: OBJCXXFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: OBJCXXFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: info: Updated environment to match build debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/plugin/debputy/to_be_api_types.py:396 (BuildSystemRule.run_clean) (from context: None)debputy: debug: Characteristics for CMakeBuildSystemRule rm -fr _build
dpkg-buildtree clean rm -fr debian/.debputy dpkg-source --diff-ignore=true --tar-ignore=true --diff-ignore=.git -b . dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building oaknut using existing ./oaknut_1.2.2+git20240301.94c726c.orig.tar.xz dpkg-source: info: building oaknut in oaknut_1.2.2+git20240301.94c726c-1.debian.tar.xz dpkg-source: info: building oaknut in oaknut_1.2.2+git20240301.94c726c-1.dsc debputy --debug internal-command dpkg-build-driver-run-task binary debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/plugin/api/impl_types.py:165 (PluginProvidedParser.parse) (from context: None) debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/plugin/api/impl_types.py:561 (DispatchingObjectParser.register_child_parser.<locals>._handler) (from context: None) debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/plugin/api/impl_types.py:165 (PluginProvidedParser.parse) (from context: None) debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/installations.py:1031 (PPFInstallRule.__init__) (from context: None) debputy: debug: Auto-detecting build systems. debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system autoconf: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system make: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system perl-build: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system perl-makemaker: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Considering build system debhelper as its Detector returned True! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Considering build system cmake as its Detector returned True! debputy: debug: Build system cmake excludes: debhelper, make! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system meson: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system qmake: Detector returned False! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:46 (auto_detect_buildsystem) (from context: None) debputy: debug: Skipping build system qmake6: Detector returned False! debputy: debug: The following build systems have been excluded: debhelper, make! debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:101 (auto_detect_buildsystem) (from context: None) debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/build_support/buildsystem_detection.py:101 (auto_detect_buildsystem) (from context: debputy) debputy: info: Auto-detected build system: CMakeBuildSystemRule debputy: debug: Computed environment variables from dpkg-buildflags [default-env] debputy: debug: ASFLAGS= debputy: debug: ASFLAGS_FOR_BUILD= debputy: debug: CFLAGS=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: CFLAGS_FOR_BUILD=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 debputy: debug: CPPFLAGS_FOR_BUILD=-Wdate-time -D_FORTIFY_SOURCE=2 debputy: debug: CXXFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: CXXFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: DFLAGS=-frelease debputy: debug: DFLAGS_FOR_BUILD=-frelease debputy: debug: FCFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: FCFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: FFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: FFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: LDFLAGS=-Wl,-z,relro -Wl,-z,now debputy: debug: LDFLAGS_FOR_BUILD=-Wl,-z,relro -Wl,-z,now debputy: debug: OBJCFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: OBJCFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: OBJCXXFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: OBJCXXFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: info: Updated environment to match build debputy: debug: Computed environment variables from dpkg-buildflags [default-env] debputy: debug: ASFLAGS= debputy: debug: ASFLAGS_FOR_BUILD= debputy: debug: CFLAGS=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: CFLAGS_FOR_BUILD=-g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 debputy: debug: CPPFLAGS_FOR_BUILD=-Wdate-time -D_FORTIFY_SOURCE=2 debputy: debug: CXXFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: CXXFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: DFLAGS=-frelease debputy: debug: DFLAGS_FOR_BUILD=-frelease debputy: debug: FCFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: FCFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: FFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: FFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -fcf-protection debputy: debug: LDFLAGS=-Wl,-z,relro -Wl,-z,now debputy: debug: LDFLAGS_FOR_BUILD=-Wl,-z,relro -Wl,-z,now debputy: debug: OBJCFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: OBJCFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: OBJCXXFLAGS=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: debug: OBJCXXFLAGS_FOR_BUILD=-g -O2 -ffile-prefix-map=/home/tachi/dev/deb/oaknut=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection debputy: info: Updated environment to match build debputy: debug: Switching plugin context to debputy at /usr/share/dh-debputy/debputy/plugin/debputy/to_be_api_types.py:243 (BuildRule.run_build) (from context: None)debputy: debug: Characteristics for CMakeBuildSystemRule debputy: warning: Re-raising original exception to show the full stack trace due to debug mode being active
Traceback (most recent call last): File "/usr/bin/debputy", line 8, in <module> main() File "/usr/share/dh-debputy/debputy/commands/debputy_cmd/__main__.py", line 1129, in main _error_w_stack_trace( File "/usr/share/dh-debputy/debputy/commands/debputy_cmd/__main__.py", line 1151, in _error_w_stack_trace raise orig_exception if orig_exception is not None else stacktrace File "/usr/share/dh-debputy/debputy/commands/debputy_cmd/__main__.py", line 1050, in main ROOT_COMMAND(cmd_arg) File "/usr/share/dh-debputy/debputy/commands/debputy_cmd/context.py", line 702, in __call__ self._aliases[v](command_arg) File "/usr/share/dh-debputy/debputy/commands/debputy_cmd/context.py", line 702, in __call__ self._aliases[v](command_arg) File "/usr/share/dh-debputy/debputy/commands/debputy_cmd/context.py", line 533, in __call__ return self._handler(context) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/dh-debputy/debputy/commands/debputy_cmd/__main__.py", line 719, in _dpkg_build_driver_integration perform_builds(context, manifest) File "/usr/share/dh-debputy/debputy/build_support/build_logic.py", line 145, in perform_builds build_system.run_build( File "/usr/share/dh-debputy/debputy/plugin/debputy/to_be_api_types.py", line 243, in run_build run_in_context_of_plugin( File "/usr/share/dh-debputy/debputy/plugin/plugin_state.py", line 92, in run_in_context_of_plugin return context.run(func, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/dh-debputy/debputy/plugin/debputy/to_be_api_types.py", line 485, in perform_build self.configure_impl(context, manifest, **kwargs) File "/usr/share/dh-debputy/debputy/plugin/debputy/build_system_rules.py", line 1384, in configure_impl source_dir_from_build_dir = self.relative_from_builddir_to_source() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/dh-debputy/debputy/plugin/debputy/to_be_api_types.py", line 435, in relative_from_builddir_to_source return os.path.relpath(os.path.join(source_dir, path_in_source_dir), build_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen posixpath>", line 90, in join File "<frozen genericpath>", line 164, in _check_arg_types TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType' dpkg-buildpackage: error: debputy --debug internal-command dpkg-build-driver-run-task binary subprocess returned exit status 1
signature.asc
Description: PGP signature