tags 1043418 +patch thanks
The autopkgtest for rust-rustls-webpki is failing with a bunch of file not found errors.
Investigating a bit more, the issue is that the data files in question are included in the source package, but not in the binary package. I'm not sure if this is a result of your debcargo fork. In any case, I wrote a patch to allow the autpkgtest to use the test data from the source package. I also ran into a second issue, there is a patch that removes the dev-dependencies needed for the benches and also removes the bench declaration in Cargo.toml, but cargo has a feature for auto-detecting tests/benches/examples, so it was still trying to build the benches. I added autobenches=false to disable this. With the attatched debdiff, the autopkgtest passes. I'd like to see this fixed fairly quickly, as fixes blocked by the stalled rustls transition are threatening a bunch of packages with auto-removal. If I get no response I'll likely NMU it next weekend.
diff -Nru rust-rustls-webpki-0.101.3/debian/changelog rust-rustls-webpki-0.101.3/debian/changelog --- rust-rustls-webpki-0.101.3/debian/changelog 2023-08-13 11:24:24.000000000 +0000 +++ rust-rustls-webpki-0.101.3/debian/changelog 2023-08-15 16:01:55.000000000 +0000 @@ -1,3 +1,14 @@ +rust-rustls-webpki (0.101.3-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Add patch 2004 and alter debian/tests/control to use test data from the source + package during autopkgtest as the test data is not included in the binary + package (Closes: #1043418) + * Extend patch 2001 to add autobenches=false so that the benches + are really disabled + + -- Peter Michael Green <plugw...@debian.org> Tue, 15 Aug 2023 16:01:55 +0000 + rust-rustls-webpki (0.101.3-1) unstable; urgency=medium [ upstream ] diff -Nru rust-rustls-webpki-0.101.3/debian/patches/2001_bencher.patch rust-rustls-webpki-0.101.3/debian/patches/2001_bencher.patch --- rust-rustls-webpki-0.101.3/debian/patches/2001_bencher.patch 2023-08-13 11:24:24.000000000 +0000 +++ rust-rustls-webpki-0.101.3/debian/patches/2001_bencher.patch 2023-08-15 15:56:54.000000000 +0000 @@ -1,11 +1,22 @@ -Description: drop bench-only build-dependencies +Description: drop bench-only build-dependencies and disable benches Author: Jonas Smedegaard <d...@jones.dk> -Last-Update: 2023-07-29 +Author: Peter Michael Green <plugw...@debian.org> +Last-Update: 2023-08-15 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -72,9 +72,6 @@ +Index: rust-rustls-webpki-0.101.3/Cargo.toml +=================================================================== +--- rust-rustls-webpki-0.101.3.orig/Cargo.toml ++++ rust-rustls-webpki-0.101.3/Cargo.toml +@@ -22,6 +22,7 @@ name = "rustls-webpki" + readme = "README.md" + repository = "https://github.com/rustls/webpki" + version = "0.101.3" ++autobenches = false + + include = [ + "Cargo.toml", +@@ -72,9 +73,6 @@ untrusted = "0.7.1" [dev-dependencies] base64 = "0.21" @@ -15,7 +26,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -@@ -94,11 +91,6 @@ +@@ -94,11 +92,6 @@ lto = true debug-assertions = false codegen-units = 1 diff -Nru rust-rustls-webpki-0.101.3/debian/patches/2004_use_test_data_from_source_package_during_autopkgtest.patch rust-rustls-webpki-0.101.3/debian/patches/2004_use_test_data_from_source_package_during_autopkgtest.patch --- rust-rustls-webpki-0.101.3/debian/patches/2004_use_test_data_from_source_package_during_autopkgtest.patch 1970-01-01 00:00:00.000000000 +0000 +++ rust-rustls-webpki-0.101.3/debian/patches/2004_use_test_data_from_source_package_during_autopkgtest.patch 2023-08-15 16:01:55.000000000 +0000 @@ -0,0 +1,43 @@ +Description: allow using an environment variable to specify where to find test-data + This allows the test data, which is included in the source package, but not in the + binary package to be used during the autopkgtest. +Author: Peter Michael Green <plugw...@debian.org> +Last-Update: 2023-08-15 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +diff -urN rustls-webpki-0.101.3/build.rs rustls-webpki-0.101.3/build.rs +--- rustls-webpki-0.101.3/build.rs 1970-01-01 00:00:00.000000000 +0000 ++++ rustls-webpki-0.101.3/build.rs 2023-08-15 17:04:24.774078929 +0000 +@@ -0,0 +1,7 @@ ++use std::env::VarError::NotPresent; ++fn main() { ++ println!("cargo:rerun-if-env-changed=SOURCEPACKAGEDIR"); ++ if std::env::var("SOURCEPACKAGEDIR") == Err(NotPresent) { ++ println!("cargo:rustc-env=SOURCEPACKAGEDIR={}",std::env::current_dir().unwrap().to_str().unwrap()); ++ } ++} +diff -urN rustls-webpki-0.101.3/src/signed_data.rs rustls-webpki-0.101.3/src/signed_data.rs +--- rustls-webpki-0.101.3/src/signed_data.rs 2006-07-24 01:21:28.000000000 +0000 ++++ rustls-webpki-0.101.3/src/signed_data.rs 2023-08-15 16:39:39.669690115 +0000 +@@ -441,7 +441,8 @@ + macro_rules! test_file_bytes { + ( $file_name:expr ) => { + include_bytes!(concat!( +- "../third-party/chromium/data/verify_signed_data/", ++ env!("SOURCEPACKAGEDIR"), ++ "/third-party/chromium/data/verify_signed_data/", + $file_name + )) + }; +diff -urN rustls-webpki-0.101.3/tests/better_tls.rs rustls-webpki-0.101.3/tests/better_tls.rs +--- rustls-webpki-0.101.3/tests/better_tls.rs 2006-07-24 01:21:28.000000000 +0000 ++++ rustls-webpki-0.101.3/tests/better_tls.rs 2023-08-15 16:41:21.058290478 +0000 +@@ -6,7 +6,7 @@ + #[test] + #[ignore] + pub fn path_building() { +- let raw_json = include_bytes!("../third-party/bettertls/pathbuilding.tests.json"); ++ let raw_json = include_bytes!(concat!(env!("SOURCEPACKAGEDIR"),"/third-party/bettertls/pathbuilding.tests.json")); + let better_tls: BetterTls = serde_json::from_slice(raw_json).expect("invalid test JSON"); + println!("Testing BetterTLS revision {:?}", better_tls.revision); + diff -Nru rust-rustls-webpki-0.101.3/debian/patches/series rust-rustls-webpki-0.101.3/debian/patches/series --- rust-rustls-webpki-0.101.3/debian/patches/series 2023-08-05 23:17:38.000000000 +0000 +++ rust-rustls-webpki-0.101.3/debian/patches/series 2023-08-15 16:01:55.000000000 +0000 @@ -2,3 +2,4 @@ 2001_bencher.patch 2002_bettertls.patch 2003_avoid_cargo_patch.patch +2004_use_test_data_from_source_package_during_autopkgtest.patch diff -Nru rust-rustls-webpki-0.101.3/debian/tests/control rust-rustls-webpki-0.101.3/debian/tests/control --- rust-rustls-webpki-0.101.3/debian/tests/control 2023-08-13 11:24:24.000000000 +0000 +++ rust-rustls-webpki-0.101.3/debian/tests/control 2023-08-15 16:01:55.000000000 +0000 @@ -1,4 +1,4 @@ -Test-Command: /usr/share/cargo/bin/cargo-auto-test rustls-webpki 0.101.3 +Test-Command: SOURCEPACKAGEDIR=$PWD /usr/share/cargo/bin/cargo-auto-test rustls-webpki 0.101.3 --all-targets --all-features Features: test-name=rust-rustls-webpki-0.101:@ Depends: @@ -11,7 +11,7 @@ librust-serde-json-1+default-dev, Restrictions: allow-stderr -Test-Command: /usr/share/cargo/bin/cargo-auto-test rustls-webpki 0.101.3 +Test-Command: SOURCEPACKAGEDIR=$PWD /usr/share/cargo/bin/cargo-auto-test rustls-webpki 0.101.3 --all-targets --no-default-features Features: test-name=rust-rustls-webpki-0.101: Depends: @@ -24,7 +24,7 @@ librust-serde-json-1+default-dev, Restrictions: allow-stderr -Test-Command: /usr/share/cargo/bin/cargo-auto-test rustls-webpki 0.101.3 +Test-Command: SOURCEPACKAGEDIR=$PWD /usr/share/cargo/bin/cargo-auto-test rustls-webpki 0.101.3 --all-targets --no-default-features --features alloc Features: test-name=rust-rustls-webpki-0.101:alloc Depends: @@ -37,7 +37,7 @@ librust-serde-json-1+default-dev, Restrictions: allow-stderr -Test-Command: /usr/share/cargo/bin/cargo-auto-test rustls-webpki 0.101.3 +Test-Command: SOURCEPACKAGEDIR=$PWD /usr/share/cargo/bin/cargo-auto-test rustls-webpki 0.101.3 --all-targets Features: test-name=rust-rustls-webpki-0.101:default Depends: @@ -50,7 +50,7 @@ librust-serde-json-1+default-dev, Restrictions: allow-stderr -Test-Command: /usr/share/cargo/bin/cargo-auto-test rustls-webpki 0.101.3 +Test-Command: SOURCEPACKAGEDIR=$PWD /usr/share/cargo/bin/cargo-auto-test rustls-webpki 0.101.3 --all-targets --no-default-features --features std Features: test-name=rust-rustls-webpki-0.101:std Depends: