relaxing that in Cargo.toml to >= 0.19 lets the build succeed (and build with python3-defaults from experimental).
I was doing a test build of lintian brush to test I could build it with the version of rust-distro-info I was preparing (now uploaded) and ran into a couple of other issues. Firstly there was a missing build-dependency on librust-pyo3-file-dev, I added it. Secondly in version 0.1.81, rust-breezyshim added an extra variant "NoWhoami" to the "CommitError" enum, causing serveral match statements to fail to build. I made a quick extension of the code to accomodate this, but it could probablly do with some more thinking about by someone with a better understanding of the code. Finally I got test failures.
====================================================================== FAIL: fixer test: multiple-references for upstream-metadata-invalid ---------------------------------------------------------------------- Traceback (most recent call last): File "/lintian-brush-0.152+nmu1/lintian_brush/tests/fixers.py", line 129, in runTest raise AssertionError("unexpected output: %s" % diff.decode()) AssertionError: unexpected output: diff --no-dereference -x '*~' -ur /lintian-brush-0.152+nmu1/lintian_brush/tests/../../tests/upstream-metadata-invalid/multiple-references/out/debian/upstream/metadata /tmp/tmpbyzt2qq8/testdir/debian/upstre am/metadata --- /lintian-brush-0.152+nmu1/lintian_brush/tests/../../tests/upstream-metadata-invalid/multiple-references/out/debian/upstream/metadata 2023-10-28 00:41:32.000000000 +0000 +++ /tmp/tmpbyzt2qq8/testdir/debian/upstream/metadata 2024-04-27 13:33:40.537269350 +0000 @@ -10,13 +10,15 @@ Journal: LinuxUser Year: 2003 Volume: 12 - URL: https://www.linux-community.de/ausgaben/linuxuser/2003/12/woerterbuecher-und-textdateien-durchsuchen-mit-grafischem-frontend/ + URL: + https://www.linux-community.de/ausgaben/linuxuser/2003/12/woerterbuecher-und-textdateien-durchsuchen-mit-grafischem-frontend/ - Author: Michael Vogelbacher Title: Service und Informationen aus dem Netz Journal: LinuxUser Year: 2001 Volume: 01 - URL: https://www.linux-community.de/ausgaben/linuxuser/2001/01/service-und-informationen-aus-dem-netz/+ URL: + https://www.linux-community.de/ausgaben/linuxuser/2001/01/service-und-informationen-aus-dem-netz/- Author: Redaktion pcmagazin Title: Ding - das Linuxlexikon Journal: PC Magazin ====================================================================== FAIL: fixer test: from-upstream-metadata for copyright-missing-upstream-info ---------------------------------------------------------------------- Traceback (most recent call last): File "/lintian-brush-0.152+nmu1/lintian_brush/tests/fixers.py", line 108, in runTest self.assertEqual(p.returncode, 0) AssertionError: 1 != 0 ====================================================================== FAIL: fixer test: meta.yml for upstream-metadata-file ---------------------------------------------------------------------- Traceback (most recent call last): File "/lintian-brush-0.152+nmu1/lintian_brush/tests/fixers.py", line 108, in runTest self.assertEqual(p.returncode, 0) AssertionError: 1 != 0 ====================================================================== FAIL: fixer test: cran for debian-watch-file-is-missing ---------------------------------------------------------------------- Traceback (most recent call last): File "/lintian-brush-0.152+nmu1/lintian_brush/tests/fixers.py", line 108, in runTest self.assertEqual(p.returncode, 0) AssertionError: 1 != 0 ---------------------------------------------------------------------- Ran 796 tests in 80.565s FAILED (failures=4, expected failures=1)
A debdiff is attached, which fixes the compile errors but not the test failures.
diff -Nru lintian-brush-0.152/Cargo.toml lintian-brush-0.152+nmu1/Cargo.toml --- lintian-brush-0.152/Cargo.toml 2023-10-28 00:41:32.000000000 +0000 +++ lintian-brush-0.152+nmu1/Cargo.toml 2024-04-27 11:28:42.000000000 +0000 @@ -40,7 +40,7 @@ [workspace.dependencies] breezyshim = "0.1.34" -pyo3 = "0.19" +pyo3 = ">=0.19" debversion = ">=0.1.8" serde_yaml = ">=0.8" reqwest = "0.11" diff -Nru lintian-brush-0.152/debian/changelog lintian-brush-0.152+nmu1/debian/changelog --- lintian-brush-0.152/debian/changelog 2023-10-28 00:41:32.000000000 +0000 +++ lintian-brush-0.152+nmu1/debian/changelog 2024-04-27 11:28:42.000000000 +0000 @@ -1,3 +1,12 @@ +lintian-brush (0.152+nmu1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Relax cargo dependency on pyo3 crate (Closes: #106435) + * Add missing build-dependency on librust-pyo3-file-dev + * Fix build with newer versions of rust-breezyshim. + + -- Peter Michael Green <[email protected]> Sat, 27 Apr 2024 11:28:42 +0000 + lintian-brush (0.152) unstable; urgency=medium * Fix compatibility with newer rust crates. Closes: #1054839 diff -Nru lintian-brush-0.152/debian/control lintian-brush-0.152+nmu1/debian/control --- lintian-brush-0.152/debian/control 2023-10-28 00:41:32.000000000 +0000 +++ lintian-brush-0.152+nmu1/debian/control 2024-04-27 11:28:42.000000000 +0000 @@ -10,7 +10,7 @@ dh-python, dos2unix, gpg, - librust-breezyshim-dev (>= 0.1.34), + librust-breezyshim-dev (>= 0.1.81), librust-chrono-dev (>= 0.4), librust-clap+cargo-dev (>= 4), librust-clap+derive-dev (>= 4), @@ -31,6 +31,7 @@ librust-pyo3+chrono-dev (>= 0.19), librust-pyo3+serde-dev (>= 0.19), librust-pyo3-log-dev, + librust-pyo3-file-dev (>= 0.5), librust-reqwest+blocking-dev (>= 0.11), librust-serde+derive-dev (>= 1), librust-serde-json-dev (>= 1), diff -Nru lintian-brush-0.152/lintian-brush/src/lib.rs lintian-brush-0.152+nmu1/lintian-brush/src/lib.rs --- lintian-brush-0.152/lintian-brush/src/lib.rs 2023-10-28 00:41:32.000000000 +0000 +++ lintian-brush-0.152+nmu1/lintian-brush/src/lib.rs 2024-04-27 11:28:42.000000000 +0000 @@ -1338,6 +1338,7 @@ .map_err(|e| match e { CommitError::PointlessCommit => FixerError::NoChanges, CommitError::Other(e) => FixerError::Python(e), + _ => FixerError::Other(e.to_string()) })?; result.revision_id = Some(revid); diff -Nru lintian-brush-0.152/multiarch-hints/src/bin/apply-multiarch-hints.rs lintian-brush-0.152+nmu1/multiarch-hints/src/bin/apply-multiarch-hints.rs --- lintian-brush-0.152/multiarch-hints/src/bin/apply-multiarch-hints.rs 2023-10-28 00:41:32.000000000 +0000 +++ lintian-brush-0.152+nmu1/multiarch-hints/src/bin/apply-multiarch-hints.rs 2024-04-27 11:28:42.000000000 +0000 @@ -357,6 +357,16 @@ None, ); } + Err(OverallError::NoWhoami) => { + drop(write_lock); + report_fatal( + versions_dict(), + "no-whoami", + "Breezyshim reports No whoami", + None, + None, + ); + } Ok(overall_result) => overall_result, }; std::mem::drop(write_lock); diff -Nru lintian-brush-0.152/multiarch-hints/src/lib.rs lintian-brush-0.152+nmu1/multiarch-hints/src/lib.rs --- lintian-brush-0.152/multiarch-hints/src/lib.rs 2023-10-28 00:41:32.000000000 +0000 +++ lintian-brush-0.152+nmu1/multiarch-hints/src/lib.rs 2024-04-27 11:28:42.000000000 +0000 @@ -424,6 +424,7 @@ NotDebianPackage(std::path::PathBuf), Python(PyErr), NoChanges, + NoWhoami, } impl std::fmt::Display for OverallError { @@ -435,6 +436,7 @@ OverallError::TreeError(e) => write!(f, "{}", e), OverallError::Python(e) => write!(f, "{}", e), OverallError::NoChanges => write!(f, "No changes to apply."), + OverallError::NoWhoami => write!(f, "No whoami") } } } @@ -458,6 +460,7 @@ match e { CommitError::PointlessCommit => OverallError::NoChanges, CommitError::Other(e) => OverallError::Python(e), + CommitError::NoWhoami => OverallError::NoWhoami, } } }

