Fix packaging metadata for side-by-side installs#1897
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| package = "oc-rsync" | ||
| summary = "Rust implementation of rsync-compatible client and daemon (includes oc-rsync compatibility wrappers)" | ||
| assets = [ | ||
| { source = "target/@TARGET@/@PROFILE@/oc-rsync", dest = "/usr/bin/oc-rsync", mode = "0755" }, | ||
| { source = "target/@TARGET@/@PROFILE@/oc-rsyncd", dest = "/usr/bin/oc-rsyncd", mode = "0755" }, | ||
| { source = "target/@TARGET@/@PROFILE@/rsync", dest = "/usr/libexec/oc-rsync/rsync", mode = "0755" }, | ||
| { source = "target/@TARGET@/@PROFILE@/rsyncd", dest = "/usr/libexec/oc-rsync/rsyncd", mode = "0755" }, |
There was a problem hiding this comment.
Avoid duplicate RPM binary entries
The new assets list under [package.metadata.rpm] now enumerates oc-rsync, oc-rsyncd, rsync, and rsyncd even though the same four executables are already mapped in [package.metadata.rpm.targets] below. cargo rpm treats targets and assets separately when generating the spec file, so listing the binaries in both places produces duplicate file entries during cargo rpm build (rpmbuild errors with “File listed twice” for each duplicate). Keep these binaries in either targets or assets, not both, so RPM packaging succeeds.
Useful? React with 👍 / 👎.
Add CompletionPump: a shared completion-port driver that owns a worker thread looping on GetQueuedCompletionStatusEx and dispatches each completion entry to a per-operation handler keyed by the OVERLAPPED pointer. This is the Windows analogue of an io_uring CQE drain and is the foundational building block for the upcoming batched-write API (#1898), the concurrent file/socket paths (#1928-#1932), and the IOCP benchmark harness (#1899). Existing IocpReader/IocpWriter create a private port and inline-call GetQueuedCompletionStatus per operation, so the pump introduces a process-wide proactor without disturbing those single-op paths. Cross-platform: real implementation lives behind #[cfg(all(target_os = "windows", feature = "iocp"))]; non-Windows targets get an Unsupported-returning stub so the crate still compiles on Linux and macOS. All unsafe stays inside fast_io per the workspace unsafe-code policy.
Adds an IOCP-backed async socket reader/writer that mirrors the io_uring socket surface and dispatches completions through the shared CompletionPump from #1897. Each WSARecv/WSASend issues an OVERLAPPED operation; synchronous completions and WSA_IO_PENDING paths both wait on a oneshot handler registered with the pump, so file I/O and socket I/O share a single drain thread. Mirrors upstream rsync's socket I/O semantics: - recv treats graceful peer close (WSAEDISCON, WSAESHUTDOWN, WSAENETRESET, WSAECONNRESET, WSAECONNABORTED) and STATUS_END_OF_FILE as Ok(0), matching safe_read breaking on n == 0 (target/interop/upstream-src/rsync-3.4.1/io.c:276). - send maps WSAESHUTDOWN/WSAECONNRESET/WSAECONNABORTED to BrokenPipe and returns short counts so the caller's loop re-issues, matching safe_write's partial-write retry (io.c:316-336). Files: - crates/fast_io/src/iocp/socket.rs (new): IocpSocketReader, IocpSocketWriter, SharedPump alias, six tests covering localhost TCP roundtrip, partial 64KB send accounting, peer-shutdown EOF, empty-buffer fast paths, and completion-key override. - crates/fast_io/src/iocp/mod.rs: pub mod socket; (single line) - crates/fast_io/src/iocp_stub.rs: matching stub module so the workspace cross-compiles on Linux and macOS, all methods returning io::ErrorKind::Unsupported. - crates/fast_io/Cargo.toml: add Win32_Networking_WinSock to the windows-sys feature list for WSARecv/WSASend bindings. Cross-platform compile preserved: the real implementation is gated behind cfg(all(target_os = "windows", feature = "iocp")) at the fast_io::iocp module level; non-Windows builds fall through to the stub.
Adds an IOCP-backed async socket reader/writer that mirrors the io_uring socket surface and dispatches completions through the shared CompletionPump from #1897. Each WSARecv/WSASend issues an OVERLAPPED operation; synchronous completions and WSA_IO_PENDING paths both wait on a oneshot handler registered with the pump, so file I/O and socket I/O share a single drain thread. Mirrors upstream rsync's socket I/O semantics: - recv treats graceful peer close (WSAEDISCON, WSAESHUTDOWN, WSAENETRESET, WSAECONNRESET, WSAECONNABORTED) and STATUS_END_OF_FILE as Ok(0), matching safe_read breaking on n == 0 (target/interop/upstream-src/rsync-3.4.1/io.c:276). - send maps WSAESHUTDOWN/WSAECONNRESET/WSAECONNABORTED to BrokenPipe and returns short counts so the caller's loop re-issues, matching safe_write's partial-write retry (io.c:316-336). Files: - crates/fast_io/src/iocp/socket.rs (new): IocpSocketReader, IocpSocketWriter, SharedPump alias, six tests covering localhost TCP roundtrip, partial 64KB send accounting, peer-shutdown EOF, empty-buffer fast paths, and completion-key override. - crates/fast_io/src/iocp/mod.rs: pub mod socket; (single line) - crates/fast_io/src/iocp_stub.rs: matching stub module so the workspace cross-compiles on Linux and macOS, all methods returning io::ErrorKind::Unsupported. - crates/fast_io/Cargo.toml: add Win32_Networking_WinSock to the windows-sys feature list for WSARecv/WSASend bindings. Cross-platform compile preserved: the real implementation is gated behind cfg(all(target_os = "windows", feature = "iocp")) at the fast_io::iocp module level; non-Windows builds fall through to the stub.
* feat(fast_io): IOCP socket I/O via WSARecv/WSASend (#1928) Adds an IOCP-backed async socket reader/writer that mirrors the io_uring socket surface and dispatches completions through the shared CompletionPump from #1897. Each WSARecv/WSASend issues an OVERLAPPED operation; synchronous completions and WSA_IO_PENDING paths both wait on a oneshot handler registered with the pump, so file I/O and socket I/O share a single drain thread. Mirrors upstream rsync's socket I/O semantics: - recv treats graceful peer close (WSAEDISCON, WSAESHUTDOWN, WSAENETRESET, WSAECONNRESET, WSAECONNABORTED) and STATUS_END_OF_FILE as Ok(0), matching safe_read breaking on n == 0 (target/interop/upstream-src/rsync-3.4.1/io.c:276). - send maps WSAESHUTDOWN/WSAECONNRESET/WSAECONNABORTED to BrokenPipe and returns short counts so the caller's loop re-issues, matching safe_write's partial-write retry (io.c:316-336). Files: - crates/fast_io/src/iocp/socket.rs (new): IocpSocketReader, IocpSocketWriter, SharedPump alias, six tests covering localhost TCP roundtrip, partial 64KB send accounting, peer-shutdown EOF, empty-buffer fast paths, and completion-key override. - crates/fast_io/src/iocp/mod.rs: pub mod socket; (single line) - crates/fast_io/src/iocp_stub.rs: matching stub module so the workspace cross-compiles on Linux and macOS, all methods returning io::ErrorKind::Unsupported. - crates/fast_io/Cargo.toml: add Win32_Networking_WinSock to the windows-sys feature list for WSARecv/WSASend bindings. Cross-platform compile preserved: the real implementation is gated behind cfg(all(target_os = "windows", feature = "iocp")) at the fast_io::iocp module level; non-Windows builds fall through to the stub. * style(transport): cargo fmt
Add CompletionPump: a shared completion-port driver that owns a worker thread looping on GetQueuedCompletionStatusEx and dispatches each completion entry to a per-operation handler keyed by the OVERLAPPED pointer. This is the Windows analogue of an io_uring CQE drain and is the foundational building block for the upcoming batched-write API (#1898), the concurrent file/socket paths (#1928-#1932), and the IOCP benchmark harness (#1899). Existing IocpReader/IocpWriter create a private port and inline-call GetQueuedCompletionStatus per operation, so the pump introduces a process-wide proactor without disturbing those single-op paths. Cross-platform: real implementation lives behind #[cfg(all(target_os = "windows", feature = "iocp"))]; non-Windows targets get an Unsupported-returning stub so the crate still compiles on Linux and macOS. All unsafe stays inside fast_io per the workspace unsafe-code policy.
* feat(fast_io): IOCP socket I/O via WSARecv/WSASend (#1928) Adds an IOCP-backed async socket reader/writer that mirrors the io_uring socket surface and dispatches completions through the shared CompletionPump from #1897. Each WSARecv/WSASend issues an OVERLAPPED operation; synchronous completions and WSA_IO_PENDING paths both wait on a oneshot handler registered with the pump, so file I/O and socket I/O share a single drain thread. Mirrors upstream rsync's socket I/O semantics: - recv treats graceful peer close (WSAEDISCON, WSAESHUTDOWN, WSAENETRESET, WSAECONNRESET, WSAECONNABORTED) and STATUS_END_OF_FILE as Ok(0), matching safe_read breaking on n == 0 (target/interop/upstream-src/rsync-3.4.1/io.c:276). - send maps WSAESHUTDOWN/WSAECONNRESET/WSAECONNABORTED to BrokenPipe and returns short counts so the caller's loop re-issues, matching safe_write's partial-write retry (io.c:316-336). Files: - crates/fast_io/src/iocp/socket.rs (new): IocpSocketReader, IocpSocketWriter, SharedPump alias, six tests covering localhost TCP roundtrip, partial 64KB send accounting, peer-shutdown EOF, empty-buffer fast paths, and completion-key override. - crates/fast_io/src/iocp/mod.rs: pub mod socket; (single line) - crates/fast_io/src/iocp_stub.rs: matching stub module so the workspace cross-compiles on Linux and macOS, all methods returning io::ErrorKind::Unsupported. - crates/fast_io/Cargo.toml: add Win32_Networking_WinSock to the windows-sys feature list for WSARecv/WSASend bindings. Cross-platform compile preserved: the real implementation is gated behind cfg(all(target_os = "windows", feature = "iocp")) at the fast_io::iocp module level; non-Windows builds fall through to the stub. * style(transport): cargo fmt
Summary
distprofile so release artifacts are built with the optimised settings expected by the packaging workflowsTesting
https://chatgpt.com/codex/tasks/task_e_69075ced41d8832380682881b74eeb52