Skip to content

Fix packaging metadata for side-by-side installs#1897

Merged
oferchen merged 1 commit into
masterfrom
create-packages-for-oc-rsync
Nov 2, 2025
Merged

Fix packaging metadata for side-by-side installs#1897
oferchen merged 1 commit into
masterfrom
create-packages-for-oc-rsync

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented Nov 2, 2025

Summary

  • ensure Debian and RPM packages install oc-rsync binaries alongside compatibility wrappers without conflicting with upstream rsync
  • add an explicit dist profile so release artifacts are built with the optimised settings expected by the packaging workflows

Testing

  • cargo build --profile dist --bins --features legacy-binaries

https://chatgpt.com/codex/tasks/task_e_69075ced41d8832380682881b74eeb52

@oferchen oferchen merged commit faa1269 into master Nov 2, 2025
@oferchen oferchen deleted the create-packages-for-oc-rsync branch November 2, 2025 13:55
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread Cargo.toml
Comment on lines 133 to +139
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" },
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

oferchen added a commit that referenced this pull request May 1, 2026
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.
oferchen added a commit that referenced this pull request May 1, 2026
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.
oferchen added a commit that referenced this pull request May 2, 2026
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.
oferchen added a commit that referenced this pull request May 2, 2026
* 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
oferchen added a commit that referenced this pull request May 5, 2026
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.
oferchen added a commit that referenced this pull request May 5, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant