From 3d314e2dd015981827634d6a2d76a680c1a3bbcb Mon Sep 17 00:00:00 2001 From: "bootc-bot[bot]" <225049296+bootc-bot[bot]@users.noreply.github.com> Date: Sun, 12 Jul 2026 00:57:03 +0000 Subject: [PATCH 1/3] fix(deps): update rust Signed-off-by: bootc-bot[bot] <225049296+bootc-bot[bot]@users.noreply.github.com> --- Cargo.toml | 4 ++-- crates/composefs-ctl/Cargo.toml | 2 +- crates/composefs-splitdirfdstream/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index db18f65b..3cfd081b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,8 +44,8 @@ composefs-ostree = { version = "0.7.0", path = "crates/composefs-ostree", defaul cap-std-ext = "5.1.2" ocidir = "0.8.0" -zlink = { version = "0.5", default-features = false, features = ["tokio", "introspection", "proxy", "server", "service", "tracing"] } -zlink-core = { version = "0.5", default-features = false, features = ["introspection", "std", "tracing"] } +zlink = { version = "0.6", default-features = false, features = ["tokio", "introspection", "proxy", "server", "service", "tracing"] } +zlink-core = { version = "0.6", default-features = false, features = ["introspection", "std", "tracing"] } [profile.dev.package.sha2] # this is *really* slow otherwise diff --git a/crates/composefs-ctl/Cargo.toml b/crates/composefs-ctl/Cargo.toml index 7eb558e3..512b48a3 100644 --- a/crates/composefs-ctl/Cargo.toml +++ b/crates/composefs-ctl/Cargo.toml @@ -54,7 +54,7 @@ tokio = { version = "1.24.2", default-features = false, features = ["io-std", "i zlink = { workspace = true } [dev-dependencies] -similar-asserts = "1.7.0" +similar-asserts = "2.0.0" tar = { version = "0.4.38", default-features = false } tempfile = "3.8.0" tokio = { version = "1.24.2", default-features = false, features = ["macros", "rt-multi-thread"] } diff --git a/crates/composefs-splitdirfdstream/Cargo.toml b/crates/composefs-splitdirfdstream/Cargo.toml index 9f46172c..a987fa69 100644 --- a/crates/composefs-splitdirfdstream/Cargo.toml +++ b/crates/composefs-splitdirfdstream/Cargo.toml @@ -20,7 +20,7 @@ tokio = ["dep:tokio"] rand = { version = "0.10.0", default-features = false, features = ["alloc"] } rand_pcg = { version = "0.10.0", default-features = false } rustix = { version = "1.0.0", default-features = false, features = ["fs", "pipe", "std"] } -sha2 = { version = "0.10", default-features = false, features = ["std"] } +sha2 = { version = "0.11", default-features = false, features = ["std"] } thiserror = { version = "2.0.0", default-features = false } tokio = { version = "1", default-features = false, features = ["rt"], optional = true } From 0916c18482153373b55b936472ee70e07adab778 Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Mon, 13 Jul 2026 11:15:39 -0400 Subject: [PATCH 2/3] `sha2` no longer has a `std` feature Signed-off-by: John Eckersberg --- crates/composefs-splitdirfdstream/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/composefs-splitdirfdstream/Cargo.toml b/crates/composefs-splitdirfdstream/Cargo.toml index a987fa69..3af54e9c 100644 --- a/crates/composefs-splitdirfdstream/Cargo.toml +++ b/crates/composefs-splitdirfdstream/Cargo.toml @@ -20,7 +20,7 @@ tokio = ["dep:tokio"] rand = { version = "0.10.0", default-features = false, features = ["alloc"] } rand_pcg = { version = "0.10.0", default-features = false } rustix = { version = "1.0.0", default-features = false, features = ["fs", "pipe", "std"] } -sha2 = { version = "0.11", default-features = false, features = ["std"] } +sha2 = { version = "0.11", default-features = false } thiserror = { version = "2.0.0", default-features = false } tokio = { version = "1", default-features = false, features = ["rt"], optional = true } From ead3ca6711868dd0d4116c09194cfb6b72bd3d2f Mon Sep 17 00:00:00 2001 From: John Eckersberg Date: Mon, 13 Jul 2026 11:16:47 -0400 Subject: [PATCH 3/3] Adapt to breaking changes in zlink 0.6 Signed-off-by: John Eckersberg --- crates/composefs-ctl/src/varlink.rs | 22 +++++++++++++------ crates/composefs-storage/src/cstor_service.rs | 17 ++++++++++---- crates/composefs-storage/src/userns_helper.rs | 4 ++-- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/crates/composefs-ctl/src/varlink.rs b/crates/composefs-ctl/src/varlink.rs index 25347b53..f37aa480 100644 --- a/crates/composefs-ctl/src/varlink.rs +++ b/crates/composefs-ctl/src/varlink.rs @@ -1796,9 +1796,9 @@ pub(crate) struct ActivatedListener { impl zlink::Listener for ActivatedListener { type Socket = zlink::unix::Stream; - async fn accept(&mut self) -> zlink::Result> { + async fn accept(&mut self) -> zlink::Result>> { match self.conn.take() { - Some(conn) => Ok(conn), + Some(conn) => Ok(Some(conn)), None => std::future::pending().await, } } @@ -1863,8 +1863,9 @@ pub(crate) fn try_activated_listener() -> Result> { .context("setting systemd socket to non-blocking")?; let tokio_stream = tokio::net::UnixStream::from_std(std_stream) .context("converting systemd UnixStream to tokio")?; - let zlink_stream = zlink::unix::Stream::from(tokio_stream); - let conn = zlink::Connection::from(zlink_stream); + let zlink_stream = + zlink::unix::Stream::try_from(tokio_stream).map_err(|e| anyhow::anyhow!(e))?; + let conn = zlink::Connection::new(zlink_stream); Ok(Some(ActivatedSocket::Connected(ActivatedListener { conn: Some(conn), }))) @@ -2847,8 +2848,9 @@ pub(crate) fn spawn_in_process( server_std.set_nonblocking(true)?; let client_stream = tokio::net::UnixStream::from_std(client_std)?; - let client_zlink = zlink::unix::Stream::from(client_stream); - let client_conn = zlink::Connection::from(client_zlink); + let client_zlink = + zlink::unix::Stream::try_from(client_stream).map_err(std::io::Error::other)?; + let client_conn = zlink::Connection::new(client_zlink); let handle = std::thread::Builder::new() .name("cfsctl-service-server".into()) @@ -2872,7 +2874,13 @@ pub(crate) fn spawn_in_process( return; } }; - let server_zlink = zlink::unix::Stream::from(server_stream); + let server_zlink = match zlink::unix::Stream::try_from(server_stream) { + Ok(s) => s, + Err(e) => { + log::error!("CfsctlService server zlink stream conversion failed: {e:#?}"); + return; + } + }; let listener = zlink::ReadyListener::new(server_zlink); let server = zlink::Server::new(listener, service); if let Err(e) = server.run().await { diff --git a/crates/composefs-storage/src/cstor_service.rs b/crates/composefs-storage/src/cstor_service.rs index da5a34e5..48084792 100644 --- a/crates/composefs-storage/src/cstor_service.rs +++ b/crates/composefs-storage/src/cstor_service.rs @@ -496,8 +496,9 @@ pub fn spawn_in_process( server_std.set_nonblocking(true)?; let client_stream = tokio::net::UnixStream::from_std(client_std)?; - let client_zlink = zlink::unix::Stream::from(client_stream); - let client_conn = zlink::Connection::from(client_zlink); + let client_zlink = + zlink::unix::Stream::try_from(client_stream).map_err(std::io::Error::other)?; + let client_conn = zlink::Connection::new(client_zlink); let (shutdown_tx, shutdown_rx) = tokio::sync::oneshot::channel::<()>(); @@ -525,7 +526,15 @@ pub fn spawn_in_process( return; } }; - let server_zlink = zlink::unix::Stream::from(server_stream); + let server_zlink = match zlink::unix::Stream::try_from(server_stream) { + Ok(s) => s, + Err(e) => { + tracing::error!( + "CstorLayerService server zlink stream conversion failed: {e:#?}" + ); + return; + } + }; let listener = zlink::ReadyListener::new(server_zlink); let server = zlink::Server::new(listener, service); @@ -569,7 +578,7 @@ pub fn serve_on_socket_blocking(socket: std::os::unix::net::UnixStream) -> std:: local.block_on(&rt, async move { // `from_std` must be called inside the runtime context. let stream = tokio::net::UnixStream::from_std(socket)?; - let zs = zlink::unix::Stream::from(stream); + let zs = zlink::unix::Stream::try_from(stream).map_err(std::io::Error::other)?; let listener = zlink::ReadyListener::new(zs); let server = zlink::Server::new(listener, CstorLayerService); server diff --git a/crates/composefs-storage/src/userns_helper.rs b/crates/composefs-storage/src/userns_helper.rs index 55174258..81782678 100644 --- a/crates/composefs-storage/src/userns_helper.rs +++ b/crates/composefs-storage/src/userns_helper.rs @@ -238,8 +238,8 @@ impl StorageProxy { parent_sock.set_nonblocking(true)?; let tok = tokio::net::UnixStream::from_std(parent_sock) .map_err(|e| HelperError::Ipc(format!("failed to convert socket: {e}")))?; - let zs = zlink::unix::Stream::from(tok); - let conn = zlink::Connection::from(zs); + let zs = zlink::unix::Stream::try_from(tok).map_err(std::io::Error::other)?; + let conn = zlink::Connection::new(zs); Ok(Self { child: Some(child),