Skip to content

Add short-option clustering and interop CI harness - #1904

Merged
oferchen merged 2 commits into
masterfrom
enable-side-by-side-installation-of-rsync
Nov 3, 2025
Merged

oferchen merged 2 commits into
masterfrom
enable-side-by-side-installation-of-rsync

Conversation

@oferchen

@oferchen oferchen commented Nov 3, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • add a short-option clustering expander and surface the dedicated --recursive/-r flag through the CLI parser
  • update CLI defaults and tests so archive/recursive handling matches upstream clusters like -arvz
  • extend release/build workflows for the dist profile, enable Windows MSVC matrices, and introduce an interop workflow plus helper script to exercise upstream <-> oc-rsync transfers

Testing

  • cargo test -p rsync-cli parse_args_recognises_recursive
  • ./tools/ci/run_interop.sh

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

Copy link
Copy Markdown

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 on lines 52 to 54
archive,
recursive: _recursive,
delete_mode,

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 Forward --recursive to fallback arguments

The parser now populates a recursive field when -r (or -a) is present, but the execution layer immediately destructures it into _recursive and drops the value. Because FallbackArgumentsContext and the downstream fallback builders never receive this flag, any transfer that falls back to upstream rsync ignores a user-supplied -r and only processes the top-level files. This diverges from upstream semantics and breaks recursive copies during fallback. Thread recursive through the fallback context so the spawned rsync binary receives -r when requested.

Useful? React with 👍 / 👎.

@oferchen
oferchen merged commit 9ad1de2 into master Nov 3, 2025
@oferchen
oferchen deleted the enable-side-by-side-installation-of-rsync branch November 3, 2025 19:38
oferchen added a commit that referenced this pull request May 2, 2026
…) (#3559)

The daemon parsed `fake super = yes` from `rsyncd.conf(5)` into
`ModuleConfig.fake_super` but never threaded it into the transfer
pipeline. Receivers therefore tried real chown() regardless of the
module directive, which silently dropped ownership for non-root
daemons and contradicted upstream's `clientserver.c:1106-1107`
behaviour where `fake super = yes` demotes the receiver's am_root
and forces fake-super semantics on the wire.

Wire-up path:
  ModuleConfig.fake_super
    -> ServerConfig.fake_super (transfer/config)
       -> MetadataOptions.fake_super (receiver/transfer.rs)
          -> apply_ownership_via_fake_super (writes user.rsync.%stat)
             -> create_*_with_fake_super placeholders for special files

Changes:
- transfer/config/mod.rs: add `pub fake_super: bool` to ServerConfig
  with upstream citation and default false.
- transfer/config/builder.rs: add `.fake_super(bool)` builder method
  matching the existing `&mut self -> &mut Self` style.
- transfer/config/builder_tests.rs: assert default false and
  round-trip through the builder.
- daemon/sections/module_access/client_args.rs: in
  `build_server_config`, set `cfg.fake_super = module.fake_super`
  after the iconv wire-up. Per upstream, the directive is purely
  daemon-config-driven; client `--fake-super` is demoted to
  `--super` on the wire and never reaches the server-side parser.
- transfer/receiver/transfer.rs: call `.fake_super(self.config.fake_super)`
  on the MetadataOptions builder so the receiver routes ownership
  writes into the user.rsync.%stat xattr instead of chown().
- daemon/tests/chunks/daemon_fake_super_module_push.rs: end-to-end
  test that pushes a file with `-og` to a daemon module configured
  with `fake super = yes` and asserts the destination carries the
  user.rsync.%stat xattr.

Upstream references:
- clientserver.c:1106-1107: `fake super = yes` demotes am_root and
  rewrites client `--fake-super` to honour the daemon directive.
- loadparm.c: `fake super` module parameter parsing.
- rsync.c:set_file_attrs(): fake-super stores ownership in xattrs.
- xattrs.c:set_stat_xattr(): user.rsync.%stat encoding.

Closes #1904.
oferchen added a commit that referenced this pull request May 5, 2026
…) (#3559)

The daemon parsed `fake super = yes` from `rsyncd.conf(5)` into
`ModuleConfig.fake_super` but never threaded it into the transfer
pipeline. Receivers therefore tried real chown() regardless of the
module directive, which silently dropped ownership for non-root
daemons and contradicted upstream's `clientserver.c:1106-1107`
behaviour where `fake super = yes` demotes the receiver's am_root
and forces fake-super semantics on the wire.

Wire-up path:
  ModuleConfig.fake_super
    -> ServerConfig.fake_super (transfer/config)
       -> MetadataOptions.fake_super (receiver/transfer.rs)
          -> apply_ownership_via_fake_super (writes user.rsync.%stat)
             -> create_*_with_fake_super placeholders for special files

Changes:
- transfer/config/mod.rs: add `pub fake_super: bool` to ServerConfig
  with upstream citation and default false.
- transfer/config/builder.rs: add `.fake_super(bool)` builder method
  matching the existing `&mut self -> &mut Self` style.
- transfer/config/builder_tests.rs: assert default false and
  round-trip through the builder.
- daemon/sections/module_access/client_args.rs: in
  `build_server_config`, set `cfg.fake_super = module.fake_super`
  after the iconv wire-up. Per upstream, the directive is purely
  daemon-config-driven; client `--fake-super` is demoted to
  `--super` on the wire and never reaches the server-side parser.
- transfer/receiver/transfer.rs: call `.fake_super(self.config.fake_super)`
  on the MetadataOptions builder so the receiver routes ownership
  writes into the user.rsync.%stat xattr instead of chown().
- daemon/tests/chunks/daemon_fake_super_module_push.rs: end-to-end
  test that pushes a file with `-og` to a daemon module configured
  with `fake super = yes` and asserts the destination carries the
  user.rsync.%stat xattr.

Upstream references:
- clientserver.c:1106-1107: `fake super = yes` demotes am_root and
  rewrites client `--fake-super` to honour the daemon directive.
- loadparm.c: `fake super` module parameter parsing.
- rsync.c:set_file_attrs(): fake-super stores ownership in xattrs.
- xattrs.c:set_stat_xattr(): user.rsync.%stat encoding.

Closes #1904.
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