Source: rust-ring Version: 0.17.14-1 Severity: serious Tags: FTBFS, patch Dear rust-ring maintainer, The package rust-ring build failed on all archs,The crucial buildd log below: ```
/usr/share/cargo/bin/dh-cargo-built-using: found static lib ring_core_0_17_14_ at /build/reproducible-path/rust-ring-0.17.14/target/x86_64-unknown-linux-gnu/debug/build/ring-4884453bb58d7fb6/out/libring_core_0_17_14_.a /usr/share/cargo/bin/dh-cargo-built-using: static library derived from /build/reproducible-path/rust-ring-0.17.14 which is the top-level crate being built, no need to add Built-Using /usr/share/cargo/bin/dh-cargo-built-using: found static lib ring_core_0_17_14__test at /build/reproducible-path/rust-ring-0.17.14/target/x86_64-unknown-linux-gnu/debug/build/ring-4884453bb58d7fb6/out/libring_core_0_17_14__test.a /usr/share/cargo/bin/dh-cargo-built-using: abort: could not determine source-distribution conditions of build/ring-4884453bb58d7fb6/out/libring_core_0_17_14__test.a. You must patch build.rs of ring to output 'println!("dh-cargo:deb-built-using=ring_core_0_17_14__test=$s={}", env::var("CARGO_MANIFEST_DIR").unwrap());' where: - $s is 1 if the license(s) of the included static libs require source distribution alongside binaries, otherwise 0 dh_auto_test: error: env CARGO_CHANNEL=debug /usr/share/cargo/bin/dh-cargo-built-using returned exit code 1 make: *** [debian/rules:3: binary-arch] Error 25 dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2 ``` The full buildd log is here: https://buildd.debian.org/status/fetch.php?pkg=rust-ring&arch=amd64&ver=0.17.14-1&stamp=1744757535&raw=0 Problem Analysis: The Debian packaging helper dh-cargo-built-using requires explicit information about the licensing terms for static libraries generated during the build, specifically whether the license mandates source code distribution alongside binaries derived from the static library. The script successfully identifies the main static library (libring_core_0_17_14_.a) but fails on the test-specific static library libring_core_0_17_14__test.a. The ring crate's build.rs script does not currently output the required dh-cargo:deb-built-using directive for this test library. Proposed Solution: As suggested by the error message, the fix involves patching the build.rs script of the ring crate to output the necessary information for libring_core_0_17_14__test.a. The ring crate uses a combination of permissive licenses (ISC-like, MIT, OpenSSL) which do not require source distribution alongside binaries. Therefore, the $s parameter in the directive should be 0. The debdiff patch is in the attachment.I have tested that locally,and it works well.Please let me know whether this solution can be accepted. Gui-Yue Best Regards
fix_rust-ring_dh-cargo-test-lib-built-using.patch
Description: Binary data