From 04ae766340e61ac7b6acdc3a3bef0ac2e7698e41 Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Tue, 5 May 2026 15:10:31 -0300 Subject: [PATCH 01/10] Add Debian template for 'cargo' build type Signed-off-by: Jorge Perez --- bloom/generators/debian/generator.py | 4 +- .../debian/templates/cargo/changelog.em | 7 ++ .../debian/templates/cargo/compat.em | 1 + .../debian/templates/cargo/control.em | 14 ++++ .../debian/templates/cargo/copyright.em | 11 +++ .../debian/templates/cargo/gbp.conf.em | 3 + .../debian/templates/cargo/rules.em | 83 +++++++++++++++++++ .../debian/templates/cargo/source/format.em | 1 + .../debian/templates/cargo/source/options.em | 6 ++ 9 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 bloom/generators/debian/templates/cargo/changelog.em create mode 100644 bloom/generators/debian/templates/cargo/compat.em create mode 100644 bloom/generators/debian/templates/cargo/control.em create mode 100644 bloom/generators/debian/templates/cargo/copyright.em create mode 100644 bloom/generators/debian/templates/cargo/gbp.conf.em create mode 100644 bloom/generators/debian/templates/cargo/rules.em create mode 100644 bloom/generators/debian/templates/cargo/source/format.em create mode 100644 bloom/generators/debian/templates/cargo/source/options.em diff --git a/bloom/generators/debian/generator.py b/bloom/generators/debian/generator.py index 12a12412..a24165f1 100644 --- a/bloom/generators/debian/generator.py +++ b/bloom/generators/debian/generator.py @@ -401,7 +401,9 @@ def generate_substitutions_from_package( # Build-type specific substitutions. build_type = package.get_build_type() - if build_type == 'catkin': + if build_type == 'cargo': + pass + elif build_type == 'catkin': pass elif build_type == 'cmake': pass diff --git a/bloom/generators/debian/templates/cargo/changelog.em b/bloom/generators/debian/templates/cargo/changelog.em new file mode 100644 index 00000000..35859090 --- /dev/null +++ b/bloom/generators/debian/templates/cargo/changelog.em @@ -0,0 +1,7 @@ +@[for change_version, change_date, changelog, main_name, main_email in changelogs]@(Package) (@(change_version)@(DebianInc)@(Distribution)) @(Distribution); urgency=high + +@(changelog) + + -- @(main_name) <@(main_email)> @(change_date) + +@[end for] diff --git a/bloom/generators/debian/templates/cargo/compat.em b/bloom/generators/debian/templates/cargo/compat.em new file mode 100644 index 00000000..7a87216d --- /dev/null +++ b/bloom/generators/debian/templates/cargo/compat.em @@ -0,0 +1 @@ +@(debhelper_version) diff --git a/bloom/generators/debian/templates/cargo/control.em b/bloom/generators/debian/templates/cargo/control.em new file mode 100644 index 00000000..a2997a90 --- /dev/null +++ b/bloom/generators/debian/templates/cargo/control.em @@ -0,0 +1,14 @@ +Source: @(Package) +Section: misc +Priority: optional +Maintainer: @(Maintainer) +Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(sorted(set(BuildDepends) | {'cargo', 'cargo-auditable', 'dh-cargo', 'pallet-patcher', 'rustc'}))) +Homepage: @(Homepage) +Standards-Version: 4.6.0 + +Package: @(Package) +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, @(', '.join(Depends)) +@[if Conflicts]Conflicts: @(', '.join(Conflicts))@\n@[end if]@ +@[if Replaces]Replaces: @(', '.join(Replaces))@\n@[end if]@ +Description: @(Description) diff --git a/bloom/generators/debian/templates/cargo/copyright.em b/bloom/generators/debian/templates/cargo/copyright.em new file mode 100644 index 00000000..bc82fd5d --- /dev/null +++ b/bloom/generators/debian/templates/cargo/copyright.em @@ -0,0 +1,11 @@ +Format: Bloom subset of https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: @(Name) +@[if BugTracker]Upstream-Contact: @(BugTracker)@\n@[end if]@ +@[if Source]Source: @(Source)@\n@[end if]@ +@[for License, Text in Licenses]@ + +Files: See file headers in repository for details +Copyright: See package copyright in source code for details +License: @(License) + @(Text) +@[end for]@ diff --git a/bloom/generators/debian/templates/cargo/gbp.conf.em b/bloom/generators/debian/templates/cargo/gbp.conf.em new file mode 100644 index 00000000..ad24a164 --- /dev/null +++ b/bloom/generators/debian/templates/cargo/gbp.conf.em @@ -0,0 +1,3 @@ +[git-buildpackage] +upstream-tag=@(release_tag) +upstream-tree=tag diff --git a/bloom/generators/debian/templates/cargo/rules.em b/bloom/generators/debian/templates/cargo/rules.em new file mode 100644 index 00000000..64c76c00 --- /dev/null +++ b/bloom/generators/debian/templates/cargo/rules.em @@ -0,0 +1,83 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +export DH_VERBOSE=1 +# TODO: remove the LDFLAGS override. It's here to avoid esoteric problems +# of this sort: +# https://code.ros.org/trac/ros/ticket/2977 +# https://code.ros.org/trac/ros/ticket/3842 +export LDFLAGS= +export PKG_CONFIG_PATH=@(InstallationPrefix)/lib/pkgconfig +# Explicitly enable -DNDEBUG, see: +# https://github.com/ros-infrastructure/bloom/issues/327 +export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + +%: + dh $@@ -v --buildsystem=cargo --builddirectory=.obj-$(DEB_HOST_GNU_TYPE) + +override_dh_auto_configure: + # dh-cargo's configure step expects these two files to exist, even when + # we aren't vendoring dependencies. Touching an empty cargo-checksum.json + # and Cargo.lock is the canonical workaround (see Debian wiki: Rust Packaging). + # TODO: once bloom grows a proper vendoring story, the checksum file + # should be generated from the vendored crates instead of stubbed out. + touch debian/cargo-checksum.json Cargo.lock + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree and source it. It will set things like + # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \ + dh_auto_configure + # Generate a pallet-patcher config so that, once we have a viable + # vendoring solution, we can point cargo at a ROS-local registry. + pallet-patcher --output-format=toml Cargo.toml > pallet-patcher.toml + +override_dh_auto_clean: + dh_auto_clean + rm -f debian/cargo-checksum.json pallet-patcher.toml + +override_dh_auto_build: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree and source it. It will set things like + # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi + # Call cargo directly to avoid the dh-cargo Python wrapper interfering + # with registry resolution when dependencies are pre-fetched offline. + # `cargo auditable` is a drop-in wrapper that embeds a compressed JSON + # dependency list into a `.dep-v0` linker section of every produced + # binary. Tools like `cargo audit bin`, trivy, grype, syft, and + # `rust-audit-info` can read it back. URLs and local paths are redacted + # by design, so no `/work/...` style paths leak into shipped artifacts. + cargo auditable build --release + +override_dh_auto_test: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree and source it. It will set things like + # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + echo -- Running tests. Even if one of them fails the build is not canceled. + if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi + cargo test || true + +override_dh_auto_install: + # In case we're installing to a non-standard location, look for a setup.sh + # in the install tree and source it. It will set things like + # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. + if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi + # Call cargo install directly rather than through dh_auto_install so that + # the dh-cargo Python wrapper does not interfere with registry resolution. + # --no-track suppresses .crates.toml/.crates2.json metadata in the package. + # `cargo auditable` wraps cargo and embeds a compressed JSON dependency + # tree into the resulting binary's `.dep-v0` ELF section. This replaces + # the previous hand-rolled `cargo tree` manifest: the embedded data is + # the canonical SBOM, can't drift from the binary, and is consumed by + # `cargo audit bin`, trivy, grype, syft, osv-scanner, and `rust-audit-info`. + cargo auditable install --path . \ + --root "$(CURDIR)/debian/@(Package)@(InstallationPrefix)" \ + --no-track diff --git a/bloom/generators/debian/templates/cargo/source/format.em b/bloom/generators/debian/templates/cargo/source/format.em new file mode 100644 index 00000000..9666bf41 --- /dev/null +++ b/bloom/generators/debian/templates/cargo/source/format.em @@ -0,0 +1 @@ +3.0 (@(format)) diff --git a/bloom/generators/debian/templates/cargo/source/options.em b/bloom/generators/debian/templates/cargo/source/options.em new file mode 100644 index 00000000..8c4c78b0 --- /dev/null +++ b/bloom/generators/debian/templates/cargo/source/options.em @@ -0,0 +1,6 @@ +@[if format and format == 'quilt']@ +# Automatically add upstream changes to the quilt overlay. +# http://manpages.ubuntu.com/manpages/trusty/man1/dpkg-source.1.html +# This supports reusing the orig.tar.gz for debian increments. +auto-commit +@[end if] From 9fa339cafa8f0bfce8646aa6fa0b60729a21ab53 Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Tue, 5 May 2026 15:26:00 -0300 Subject: [PATCH 02/10] Remove outdated comment Signed-off-by: Jorge Perez --- bloom/generators/debian/templates/cargo/rules.em | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bloom/generators/debian/templates/cargo/rules.em b/bloom/generators/debian/templates/cargo/rules.em index 64c76c00..34e847c9 100644 --- a/bloom/generators/debian/templates/cargo/rules.em +++ b/bloom/generators/debian/templates/cargo/rules.em @@ -27,8 +27,6 @@ override_dh_auto_configure: # dh-cargo's configure step expects these two files to exist, even when # we aren't vendoring dependencies. Touching an empty cargo-checksum.json # and Cargo.lock is the canonical workaround (see Debian wiki: Rust Packaging). - # TODO: once bloom grows a proper vendoring story, the checksum file - # should be generated from the vendored crates instead of stubbed out. touch debian/cargo-checksum.json Cargo.lock # In case we're installing to a non-standard location, look for a setup.sh # in the install tree and source it. It will set things like @@ -36,7 +34,7 @@ override_dh_auto_configure: if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi && \ dh_auto_configure # Generate a pallet-patcher config so that, once we have a viable - # vendoring solution, we can point cargo at a ROS-local registry. + # vendoring solution, we can point cargo to local deps pallet-patcher --output-format=toml Cargo.toml > pallet-patcher.toml override_dh_auto_clean: From 93f2196808584eff7a2d28a557e3512c55fce1f3 Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Tue, 5 May 2026 15:28:29 -0300 Subject: [PATCH 03/10] Add improvement to if/else type selection Signed-off-by: Jorge Perez --- bloom/generators/debian/generator.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/bloom/generators/debian/generator.py b/bloom/generators/debian/generator.py index a24165f1..bf707e48 100644 --- a/bloom/generators/debian/generator.py +++ b/bloom/generators/debian/generator.py @@ -401,17 +401,14 @@ def generate_substitutions_from_package( # Build-type specific substitutions. build_type = package.get_build_type() - if build_type == 'cargo': - pass - elif build_type == 'catkin': - pass - elif build_type == 'cmake': - pass - elif build_type == 'meson': - pass - elif build_type == 'ament_cmake': - pass - elif build_type == 'ament_python': + if build_type in ( + 'cargo', + 'catkin', + 'cmake', + 'meson', + 'ament_cmake', + 'ament_python', + ): # Don't set the install-scripts flag if it's already set in setup.cfg. package_path = os.path.abspath(os.path.dirname(package.filename)) setup_cfg_path = os.path.join(package_path, 'setup.cfg') From 56227d4b764427b6143a934f3674a4cf0ff8952f Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Thu, 14 May 2026 17:45:36 -0300 Subject: [PATCH 04/10] Separate library vs binary in deb template Signed-off-by: Jorge Perez --- .../debian/templates/cargo/rules.em | 49 +++++++++++++------ 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/bloom/generators/debian/templates/cargo/rules.em b/bloom/generators/debian/templates/cargo/rules.em index 34e847c9..948e48b4 100644 --- a/bloom/generators/debian/templates/cargo/rules.em +++ b/bloom/generators/debian/templates/cargo/rules.em @@ -64,18 +64,37 @@ override_dh_auto_test: cargo test || true override_dh_auto_install: - # In case we're installing to a non-standard location, look for a setup.sh - # in the install tree and source it. It will set things like - # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. - if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi - # Call cargo install directly rather than through dh_auto_install so that - # the dh-cargo Python wrapper does not interfere with registry resolution. - # --no-track suppresses .crates.toml/.crates2.json metadata in the package. - # `cargo auditable` wraps cargo and embeds a compressed JSON dependency - # tree into the resulting binary's `.dep-v0` ELF section. This replaces - # the previous hand-rolled `cargo tree` manifest: the embedded data is - # the canonical SBOM, can't drift from the binary, and is consumed by - # `cargo audit bin`, trivy, grype, syft, osv-scanner, and `rust-audit-info`. - cargo auditable install --path . \ - --root "$(CURDIR)/debian/@(Package)@(InstallationPrefix)" \ - --no-track + # Classify the crate's targets ourselves rather than rely on dh-cargo's + # libpkg/binpkg dispatch, which keys on Debian package-name heuristics + # (librust-*-dev vs. others) that bloom-generated ROS package names don't + # satisfy. We then run whichever of the two install branches apply: + # - HAS_LIB: lay down the unpacked crate source under + # /share/cargo/registry/-/ so downstream ROS + # Rust packages can resolve this crate via pallet-patcher. Mirrors + # dh-cargo cargo.pm:install() libpkg branch. + # - HAS_BIN: run `cargo auditable install`, which wraps cargo and + # embeds a compressed JSON SBOM into each binary's .dep-v0 ELF + # section. Tools that read it: cargo audit bin, trivy, grype, syft, + # osv-scanner, rust-audit-info. --no-track suppresses .crates.toml. + set -e ; \ + if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi ; \ + META=$$(cargo metadata --no-deps --format-version 1) ; \ + CRATE_NAME=$$(printf '%s' "$$META" | python3 -c "import sys,json;print(json.load(sys.stdin)['packages'][0]['name'])") ; \ + CRATE_VER=$$(printf '%s' "$$META" | python3 -c "import sys,json;print(json.load(sys.stdin)['packages'][0]['version'])") ; \ + HAS_LIB=$$(printf '%s' "$$META" | python3 -c "import sys,json;p=json.load(sys.stdin)['packages'][0];L={'lib','rlib','dylib','cdylib','staticlib','proc-macro'};print(int(any(k in L for t in p['targets'] for k in t['kind'])))") ; \ + HAS_BIN=$$(printf '%s' "$$META" | python3 -c "import sys,json;p=json.load(sys.stdin)['packages'][0];print(int(any('bin' in t['kind'] for t in p['targets'])))") ; \ + if [ "$$HAS_LIB" = "1" ]; then \ + TARGET="$(CURDIR)/debian/@(Package)@(InstallationPrefix)/share/cargo/registry/$$CRATE_NAME-$$CRATE_VER" ; \ + install -d "$$TARGET" ; \ + find . -mindepth 1 -maxdepth 1 \ + \! -name target \! -name debian \! -name .git \ + -exec cp -a -t "$$TARGET" {} + ; \ + rm -rf "$$TARGET/target" ; \ + cp debian/cargo-checksum.json "$$TARGET/.cargo-checksum.json" ; \ + [ -z "$$SOURCE_DATE_EPOCH" ] || touch -d@$$SOURCE_DATE_EPOCH "$$TARGET/Cargo.toml" ; \ + fi ; \ + if [ "$$HAS_BIN" = "1" ]; then \ + cargo auditable install --path . \ + --root "$(CURDIR)/debian/@(Package)@(InstallationPrefix)" \ + --no-track ; \ + fi From 024293a189fddd006ced92e19cce00819c72a19a Mon Sep 17 00:00:00 2001 From: "Jorge J. Perez" Date: Mon, 11 May 2026 10:47:48 -0300 Subject: [PATCH 05/10] Update bloom/generators/debian/generator.py Co-authored-by: Scott K Logan --- bloom/generators/debian/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bloom/generators/debian/generator.py b/bloom/generators/debian/generator.py index bf707e48..f4243169 100644 --- a/bloom/generators/debian/generator.py +++ b/bloom/generators/debian/generator.py @@ -402,12 +402,12 @@ def generate_substitutions_from_package( # Build-type specific substitutions. build_type = package.get_build_type() if build_type in ( + 'ament_cmake', + 'ament_python', 'cargo', 'catkin', 'cmake', 'meson', - 'ament_cmake', - 'ament_python', ): # Don't set the install-scripts flag if it's already set in setup.cfg. package_path = os.path.abspath(os.path.dirname(package.filename)) From b159f272640aa0ac5f33684d443cf35a8bf42326 Mon Sep 17 00:00:00 2001 From: "Jorge J. Perez" Date: Mon, 11 May 2026 10:48:17 -0300 Subject: [PATCH 06/10] Update bloom/generators/debian/templates/cargo/rules.em Co-authored-by: Scott K Logan --- bloom/generators/debian/templates/cargo/rules.em | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bloom/generators/debian/templates/cargo/rules.em b/bloom/generators/debian/templates/cargo/rules.em index 948e48b4..5d935317 100644 --- a/bloom/generators/debian/templates/cargo/rules.em +++ b/bloom/generators/debian/templates/cargo/rules.em @@ -35,7 +35,7 @@ override_dh_auto_configure: dh_auto_configure # Generate a pallet-patcher config so that, once we have a viable # vendoring solution, we can point cargo to local deps - pallet-patcher --output-format=toml Cargo.toml > pallet-patcher.toml + pallet-patcher --output-format=toml Cargo.toml @(InstallationPrefix)/share/cargo/registry > pallet-patcher.toml override_dh_auto_clean: dh_auto_clean From e2956e5f33c3733c2215f3b485e033d9463279cf Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Fri, 15 May 2026 02:09:24 -0300 Subject: [PATCH 07/10] Exclude extra obj files Signed-off-by: Jorge Perez --- bloom/generators/debian/templates/cargo/rules.em | 1 + 1 file changed, 1 insertion(+) diff --git a/bloom/generators/debian/templates/cargo/rules.em b/bloom/generators/debian/templates/cargo/rules.em index 5d935317..30c94584 100644 --- a/bloom/generators/debian/templates/cargo/rules.em +++ b/bloom/generators/debian/templates/cargo/rules.em @@ -88,6 +88,7 @@ override_dh_auto_install: install -d "$$TARGET" ; \ find . -mindepth 1 -maxdepth 1 \ \! -name target \! -name debian \! -name .git \ + \! -name '.obj-*' \! -name 'pallet-patcher.toml' \ -exec cp -a -t "$$TARGET" {} + ; \ rm -rf "$$TARGET/target" ; \ cp debian/cargo-checksum.json "$$TARGET/.cargo-checksum.json" ; \ From 1e31918ed734017948a824b4d1c8c5d9ce449323 Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Fri, 19 Jun 2026 13:39:08 -0500 Subject: [PATCH 08/10] Fix a couple of bugs discovered by buildfarm use --- bloom/generators/debian/templates/cargo/control.em | 2 +- bloom/generators/debian/templates/cargo/rules.em | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bloom/generators/debian/templates/cargo/control.em b/bloom/generators/debian/templates/cargo/control.em index a2997a90..ad97e056 100644 --- a/bloom/generators/debian/templates/cargo/control.em +++ b/bloom/generators/debian/templates/cargo/control.em @@ -2,7 +2,7 @@ Source: @(Package) Section: misc Priority: optional Maintainer: @(Maintainer) -Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(sorted(set(BuildDepends) | {'cargo', 'cargo-auditable', 'dh-cargo', 'pallet-patcher', 'rustc'}))) +Build-Depends: debhelper (>= @(debhelper_version).0.0), @(', '.join(sorted(set(BuildDepends) | {'cargo', 'cargo-auditable', 'dh-cargo', 'python3-pallet-patcher', 'rustc'}))) Homepage: @(Homepage) Standards-Version: 4.6.0 diff --git a/bloom/generators/debian/templates/cargo/rules.em b/bloom/generators/debian/templates/cargo/rules.em index 30c94584..56cd98c5 100644 --- a/bloom/generators/debian/templates/cargo/rules.em +++ b/bloom/generators/debian/templates/cargo/rules.em @@ -92,7 +92,7 @@ override_dh_auto_install: -exec cp -a -t "$$TARGET" {} + ; \ rm -rf "$$TARGET/target" ; \ cp debian/cargo-checksum.json "$$TARGET/.cargo-checksum.json" ; \ - [ -z "$$SOURCE_DATE_EPOCH" ] || touch -d@$$SOURCE_DATE_EPOCH "$$TARGET/Cargo.toml" ; \ + [ -z "$$SOURCE_DATE_EPOCH" ] || touch -d@@$$SOURCE_DATE_EPOCH "$$TARGET/Cargo.toml" ; \ fi ; \ if [ "$$HAS_BIN" = "1" ]; then \ cargo auditable install --path . \ From fbd36830288ef6b3256130446ed7b0dff9cf179c Mon Sep 17 00:00:00 2001 From: "Jorge J. Perez" Date: Wed, 24 Jun 2026 21:56:28 -0300 Subject: [PATCH 09/10] Add pallet-patcher generated configs Signed-off-by: Jorge J. Perez --- bloom/generators/debian/templates/cargo/rules.em | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bloom/generators/debian/templates/cargo/rules.em b/bloom/generators/debian/templates/cargo/rules.em index 56cd98c5..e9b006d8 100644 --- a/bloom/generators/debian/templates/cargo/rules.em +++ b/bloom/generators/debian/templates/cargo/rules.em @@ -53,7 +53,7 @@ override_dh_auto_build: # binary. Tools like `cargo audit bin`, trivy, grype, syft, and # `rust-audit-info` can read it back. URLs and local paths are redacted # by design, so no `/work/...` style paths leak into shipped artifacts. - cargo auditable build --release + cargo auditable build --release --config pallet-patcher.toml override_dh_auto_test: # In case we're installing to a non-standard location, look for a setup.sh From 360e3876d0c7e3e11785275334e13aed1346baca Mon Sep 17 00:00:00 2001 From: "Jorge J. Perez" Date: Fri, 26 Jun 2026 18:33:48 -0300 Subject: [PATCH 10/10] Add missing pallet-patcher config references Signed-off-by: Jorge J. Perez --- bloom/generators/debian/templates/cargo/rules.em | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bloom/generators/debian/templates/cargo/rules.em b/bloom/generators/debian/templates/cargo/rules.em index e9b006d8..79012975 100644 --- a/bloom/generators/debian/templates/cargo/rules.em +++ b/bloom/generators/debian/templates/cargo/rules.em @@ -61,7 +61,7 @@ override_dh_auto_test: # CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH. echo -- Running tests. Even if one of them fails the build is not canceled. if [ -f "@(InstallationPrefix)/setup.sh" ]; then . "@(InstallationPrefix)/setup.sh"; fi - cargo test || true + cargo test --config pallet-patcher.toml || true override_dh_auto_install: # Classify the crate's targets ourselves rather than rely on dh-cargo's @@ -95,7 +95,7 @@ override_dh_auto_install: [ -z "$$SOURCE_DATE_EPOCH" ] || touch -d@@$$SOURCE_DATE_EPOCH "$$TARGET/Cargo.toml" ; \ fi ; \ if [ "$$HAS_BIN" = "1" ]; then \ - cargo auditable install --path . \ + cargo auditable install --path . --config pallet-patcher.toml \ --root "$(CURDIR)/debian/@(Package)@(InstallationPrefix)" \ --no-track ; \ fi