Skip to content

Add canonical rsync entrypoints#1795

Merged
oferchen merged 1 commit into
masterfrom
implement-rust-version-of-rsync-3.4.1
Oct 31, 2025
Merged

Add canonical rsync entrypoints#1795
oferchen merged 1 commit into
masterfrom
implement-rust-version-of-rsync-3.4.1

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • add shared client and daemon entrypoint modules so both the canonical rsync/rsyncd binaries and the oc-* compatibility wrappers use the same dispatch path
  • update binary targets and packaging metadata to build and install the new rsync and rsyncd executables alongside the existing oc-* names
  • expand the CLI smoke tests to exercise help, usage, and error flows for every supported binary name

Testing

  • cargo test

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

@oferchen oferchen merged commit b8056f5 into master Oct 31, 2025
@oferchen oferchen deleted the implement-rust-version-of-rsync-3.4.1 branch October 31, 2025 23:05
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 106 to 110
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"],
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 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 👍 / 👎.

oferchen added a commit that referenced this pull request May 17, 2026
…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.
oferchen added a commit that referenced this pull request May 18, 2026
…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.
oferchen added a commit that referenced this pull request May 18, 2026
…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.
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