Source: rust-microformats Version: 0.15.0-1 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: filesystem X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that rust-microformats could not be built reproducibly. This was because it was generating a bunch of tests that were ordered by the underling filesystem order, which is of course non-deterministic. A patch is attached that sorts the filenames first. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
--- a/debian/patches/2004_reproducible_build.patch 1969-12-31 16:00:00.000000000 -0800 --- b/debian/patches/2004_reproducible_build.patch 2025-07-18 10:53:40.941562191 -0700 @@ -0,0 +1,25 @@ +Description: Make the build reproducible +Author: Chris Lamb <la...@debian.org> +Last-Update: 2025-07-18 + +--- rust-microformats-0.15.0.orig/library/build.rs ++++ rust-microformats-0.15.0/library/build.rs +@@ -183,6 +183,7 @@ fn main() { + } + + fn collect_fixtures_for(suite: &str) -> Vec<String> { ++ let mut fixtures = Vec::new(); + get_mf_fixture_dir_for(suite) + .read_dir() + .unwrap_or_else(|_| panic!("Couldn't find fixtures for testing '{}' support.", suite)) +@@ -210,7 +211,7 @@ fn collect_fixtures_for(suite: &str) -> + .unwrap_or_default(); + + let test_name = format!("{}/{}", suite, file_name); +- test_name +- }) +- .collect() ++ fixtures.push(test_name) ++ }); ++ return fixtures; + } --- a/debian/patches/series 2025-07-18 10:46:45.303088383 -0700 --- b/debian/patches/series 2025-07-18 10:53:39.965586840 -0700 @@ -8,3 +8,4 @@ 2001_yare.patch 2002_no_bin.patch 2003_no_vendor_testsuite.patch +2004_reproducible_build.patch