Reinhard Tartler <siret...@debian.org> writes: > Package: librust-tonic-dev > Version: 0.10.2+dfsg-12 > Severity: serious > Justification: Breaks compilation of depending packages > > [...] > The following packages have unmet dependencies: > librust-tonic-dev : Depends: librust-axum-0.6-dev but it is not installable > E: Unable to correct problems, you have held broken packages. > apt-get failed. > E: Package installation failed
I've tried the naive approach of "just" bumping the dependencies with the attached patch. However, this runs into a compilation issue: ' CARGO_PKG_HOMEPAGE='https://github.com/hyperium/tonic' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=tonic CARGO_PKG_README=../README.md CARGO_PKG_REPOSITORY='https://github.com/hyperium/tonic' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.10.2 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=10 CARGO_PKG_VERSION_PATCH=2 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/release/deps rustc --crate-name tonic --edition=2021 tonic/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="channel"' --cfg 'feature="codegen"' --cfg 'feature="default"' --cfg 'feature="gzip"' --cfg 'feature="prost"' --cfg 'feature="tls"' --cfg 'feature="transport"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("channel", "codegen", "default", "gzip", "prost", "tls", "tls-root s", "tls-roots-common", "transport"))' -C metadata=485a23f653a8e74a -C extra-filename=-decac77e6c54a626 --out-dir /build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -C strip=debuginfo -L dependency=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/release/deps --extern async_stream=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libasync_stream-fb31bd691a4d0da2.rmeta --extern async_trait=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/release/deps/libasync_trait-753d4fdfba6a47f0.so --extern axum=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libaxum-8227ca5c25ea4d84.rmeta --extern base64=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libbase64-18f2b7c2b4af2 989.rmeta --extern bytes=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libbytes-049891ee00809e23.rmeta --extern flate2=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libflate2-d79784b4a9ba394f.rmeta --extern h2=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libh2-8499421b229fc163.rmeta --extern http=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libhttp-51d39075ca9bb9eb.rmeta --extern http_body=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libhttp_body-56d10af7fd24699c.rmeta --extern hyper=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libhyper-e38e798c35535e29.rmeta --extern hyper_timeout=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libhyper_timeout-a324e9fd6d7f 9933.rmeta --extern percent_encoding=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libpercent_encoding-14360a2752397cf5.rmeta --extern pin_project=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libpin_project-66922be3f1cda763.rmeta --extern prost=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libprost-bb55bf7e76c86d88.rmeta --extern rustls=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/librustls-0b8f1af495a10f72.rmeta --extern rustls_pemfile=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/librustls_pemfile-0617cb1eb193c177.rmeta --extern tokio=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libtokio-012cdf6cfc47a665.rmeta --extern tokio_rustls=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown- linux-gnu/release/deps/libtokio_rustls-b7a50ca23e565701.rmeta --extern tokio_stream=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libtokio_stream-1f9533b6b8b17828.rmeta --extern tower=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libtower-e87d80db1912db72.rmeta --extern tower_layer=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libtower_layer-755127e7643f220a.rmeta --extern tower_service=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libtower_service-58b220a2076bd222.rmeta --extern tracing=/build/reproducible-path/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libtracing-6d424f805c115e7d.rmeta --remap-path-prefix tonic-build_0.10.2=/usr/share/cargo/registry/tonic-build-0.10.2 --remap-path-prefix tonic_0.10.2=/usr/share/cargo/registry/tonic-0.10.2 -L native=/build/reproducible-pat h/rust-tonic-0.10.2+dfsg/target/x86_64-unknown-linux-gnu/release/build/ring-a6a76e47df4ffd6c/out` error[E0432]: unresolved import `axum::body::BoxBody` --> tonic/src/transport/mod.rs:109:16 | 109 | pub use axum::{body::BoxBody as AxumBoxBody, Router as AxumRouter}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `BoxBody` in `body` | = help: consider importing one of these items instead: crate::body::BoxBody http_body::combinators::BoxBody error[E0425]: cannot find value `boxed` in module `axum::body` --> tonic/src/transport/service/router.rs:79:62 | 79 | let svc = svc.map_response(|res| res.map(axum::body::boxed)); | ^^^^^ not found in `axum::body` | So it seems that tonic 0.10.2 is not compatible with axum 0.7 at all. That's most unfornate. I've also spent more time that I'd like to admit in attempting to upgrade the package ot tonic 0.12 (is the first upstream version to use axum 0.7), but this runs into a number of other version incompatibilities. Jonas, this is threatening removal of large portions of the container stack, such as podman. The reason for that is that podman has rewritten its networking stack in rust with netavark/aardvark-dns, which require tonic. What's the best way to proceed here? Trying to backport https://github.com/hyperium/tonic/commit/9c1f2f9402d97cfa4c9d9065b5af2fb99d2ef521 to tonic 0.10 or attempting to package 0.12? Best, -rt
From: Reinhard Tartler <siret...@tauware.de> Date: Fri, 14 Mar 2025 07:48:40 -0400 Subject: build against axum 0.7, Closes: #1098897 --- tonic/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: rust-tonic/tonic/Cargo.toml =================================================================== --- rust-tonic.orig/tonic/Cargo.toml +++ rust-tonic/tonic/Cargo.toml @@ -66,14 +66,14 @@ async-trait = {version = "0.1.13", optio # transport h2 = {version = ">= 0.3.17, <= 0.4", optional = true} hyper = {version = "0.14.26", features = ["full"], optional = true} -hyper-timeout = {version = "0.4", optional = true} +hyper-timeout = {version = "0.5", optional = true} tokio-stream = "0.1" tower = {version = "0.4.7", default-features = false, features = ["balance", "buffer", "discover", "limit", "load", "make", "timeout", "util"], optional = true} -axum = {version = "0.6.9", default_features = false, optional = true} +axum = {version = "0.7", default_features = false, optional = true} # rustls async-stream = { version = "0.3", optional = true } -rustls-pemfile = { version = "1.0", optional = true } +rustls-pemfile = { version = "2.2", optional = true } rustls-native-certs = { version = "0.6.3", optional = true } tokio-rustls = { version = "0.24.1", optional = true } rustls = { version = "0.21.7", optional = true } Index: rust-tonic/examples/Cargo.toml =================================================================== --- rust-tonic.orig/examples/Cargo.toml +++ rust-tonic/examples/Cargo.toml @@ -332,7 +332,7 @@ bytes = { version = "1", optional = true h2 = { version = ">= 0.3, <= 0.4", optional = true } tokio-rustls = { version = "0.24.0", optional = true } hyper-rustls = { version = "0.24.0", features = ["http2"], optional = true } -rustls-pemfile = { version = "1", optional = true } +rustls-pemfile = { version = "2", optional = true } tower-http = { version = "0.4", optional = true } [build-dependencies]