Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestInteropRemoteDaemon fails with openrsync (which macOS 15+ uses by default) #33

Open
stapelberg opened this issue Jan 26, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@stapelberg
Copy link
Contributor

The reason is a bug in openrsync where openrsync does not send the --daemon arg when starting a remote rsync daemon process over a remote shell. The fix (against the (old) https://github.com/kristapsdz/openrsync repository) is:

diff --git i/extern.h w/extern.h
index e3636d4..89be4e8 100644
--- i/extern.h
+++ w/extern.h
@@ -99,6 +99,7 @@ struct	fargs {
 	enum fmode mode; /* mode of operation */
 	int	   remote; /* uses rsync:// or :: for remote */
 	char	  *module; /* if rsync://, the module */
+	int	   daemon_over_rsh;
 };
 
 /*
diff --git i/fargs.c w/fargs.c
index 17ecd53..9065084 100644
--- i/fargs.c
+++ w/fargs.c
@@ -95,6 +95,9 @@ fargs_cmdline(struct sess *sess, const struct fargs *f, size_t *skip)
 		addargs(&args, "--server");
 	}
 
+	if (f->daemon_over_rsh)
+		addargs(&args, "--daemon");
+
 	/* Shared arguments. */
 
 	if (sess->opts->del)
diff --git i/main.c w/main.c
index 1be9361..e5542f9 100644
--- i/main.c
+++ w/main.c
@@ -204,6 +204,14 @@ fargs_parse(size_t argc, char *argv[], struct opts *opts)
 		}
 	}
 
+	for (j = 0; j < f->sourcesz; j++) {
+		if (!fargs_is_daemon(f->sources[j]))
+			continue;
+
+		f->daemon_over_rsh = 1;
+		break;
+	}
+
 	/*
 	 * If we're not remote and a sender, strip our hostname.
 	 * Then exit if we're a sender or a local connection.

I’ll see how to get this upstreamed into OpenBSD…

@stapelberg stapelberg added the bug Something isn't working label Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant