Add canonical rsync entrypoints#1795
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".
| assets = [ | ||
| ["target/release/rsync", "/usr/bin/rsync", "755"], | ||
| ["target/release/rsyncd", "/usr/bin/rsyncd", "755"], | ||
| ["target/release/oc-rsync", "/usr/bin/oc-rsync", "755"], | ||
| ["target/release/oc-rsyncd", "/usr/bin/oc-rsyncd", "755"], |
There was a problem hiding this comment.
Declare conflicts before installing canonical rsync binaries
The deb/rpm metadata now installs /usr/bin/rsync and /usr/bin/rsyncd from this crate, but no Conflicts, Replaces, or alternatives entries were added. On a system where the upstream rsync package is already present (the common case), installing the generated package will fail because dpkg/rpm refuses to overwrite those files without an explicit conflict declaration. Consider adding the appropriate package metadata so the new binaries can replace or coexist with the distribution’s rsync package without manual --force flags.
Useful? React with 👍 / 👎.
…e) (#1795) (#4266) Introduce a structured connection primitive that wraps the existing `SshCommand` builder behind explicit `SshConnectConfig` and `KeepAliveConfig` structs. This is the first concrete step in the SSH transport chain (#1795 -> #1796 -> #1797 -> #1805 -> #1806) and lets upstream call sites compose connect, auth, and session-setup steps from a single config value instead of a long sequence of builder setters. The new `SshConnection::connect_with_config(remote, &config)` entry point stays synchronous and reuses the existing watchdog + stderr-drain plumbing. Defaults mirror the historical `SshCommand::new` behaviour (30 s connect timeout, 20 s keepalive interval, 3 allowed failures); a `None` field disables the corresponding `-o ConnectTimeout` or `-o ServerAlive*` injection. The async variant is reserved for task #1801 and intentionally not introduced here, so no new runtime dependencies land in this PR. Unit coverage exercises the config defaults, the builder-setter round trip, the rendered argv (timeout, keepalive, remote command ordering), keepalive disabled / custom-value cases, sub-second rounding, and user/host splitting. A unix-gated, env-guarded smoke test (`OC_RSYNC_SSH_NET=1`) confirms an unreachable host surfaces an io::Error within ~2x the configured timeout.
…e) (#1795) (#4266) Introduce a structured connection primitive that wraps the existing `SshCommand` builder behind explicit `SshConnectConfig` and `KeepAliveConfig` structs. This is the first concrete step in the SSH transport chain (#1795 -> #1796 -> #1797 -> #1805 -> #1806) and lets upstream call sites compose connect, auth, and session-setup steps from a single config value instead of a long sequence of builder setters. The new `SshConnection::connect_with_config(remote, &config)` entry point stays synchronous and reuses the existing watchdog + stderr-drain plumbing. Defaults mirror the historical `SshCommand::new` behaviour (30 s connect timeout, 20 s keepalive interval, 3 allowed failures); a `None` field disables the corresponding `-o ConnectTimeout` or `-o ServerAlive*` injection. The async variant is reserved for task #1801 and intentionally not introduced here, so no new runtime dependencies land in this PR. Unit coverage exercises the config defaults, the builder-setter round trip, the rendered argv (timeout, keepalive, remote command ordering), keepalive disabled / custom-value cases, sub-second rounding, and user/host splitting. A unix-gated, env-guarded smoke test (`OC_RSYNC_SSH_NET=1`) confirms an unreachable host surfaces an io::Error within ~2x the configured timeout.
…e) (#1795) (#4266) Introduce a structured connection primitive that wraps the existing `SshCommand` builder behind explicit `SshConnectConfig` and `KeepAliveConfig` structs. This is the first concrete step in the SSH transport chain (#1795 -> #1796 -> #1797 -> #1805 -> #1806) and lets upstream call sites compose connect, auth, and session-setup steps from a single config value instead of a long sequence of builder setters. The new `SshConnection::connect_with_config(remote, &config)` entry point stays synchronous and reuses the existing watchdog + stderr-drain plumbing. Defaults mirror the historical `SshCommand::new` behaviour (30 s connect timeout, 20 s keepalive interval, 3 allowed failures); a `None` field disables the corresponding `-o ConnectTimeout` or `-o ServerAlive*` injection. The async variant is reserved for task #1801 and intentionally not introduced here, so no new runtime dependencies land in this PR. Unit coverage exercises the config defaults, the builder-setter round trip, the rendered argv (timeout, keepalive, remote command ordering), keepalive disabled / custom-value cases, sub-second rounding, and user/host splitting. A unix-gated, env-guarded smoke test (`OC_RSYNC_SSH_NET=1`) confirms an unreachable host surfaces an io::Error within ~2x the configured timeout.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_69053e22f0f4832399317d49a371b88d