forked from pool/rsync
Pedro Monreal Gonzalez
2b390fdfe4
- Updated to version 3.2.2 * Too many changes to list, see included NEWS.md file. - Add BR on pkgconfig(openssl), rsync now uses openssl for MD4/MD5 - Add BR on libzstd-devel and liblz4-devel to enabled lz4 and zstd compression support. - Add BR on xxhash-devel to enable xxhash checksum support. - Refresh rsync-add_back_use_slp_directive.patch - Drop rsync-both-compressions.patch, rsync-send_error_to_sender.patch, rsync-avoid-uploading-after-error.patch, rsync-fix-prealloc-to-keep-file-size-0-when-possible.patch: Fixed upstream. OBS-URL: https://build.opensuse.org/request/show/819170 OBS-URL: https://build.opensuse.org/package/show/network/rsync?expand=0&rev=78
93 lines
3.3 KiB
Diff
93 lines
3.3 KiB
Diff
Index: rsync-3.2.2/clientserver.c
|
|
===================================================================
|
|
--- rsync-3.2.2.orig/clientserver.c
|
|
+++ rsync-3.2.2/clientserver.c
|
|
@@ -1412,7 +1412,7 @@ int daemon_main(void)
|
|
* local address??? */
|
|
|
|
#ifdef HAVE_LIBSLP
|
|
- if (register_services()) {
|
|
+ if (lp_use_slp() && register_services()) {
|
|
rprintf(FINFO,
|
|
"Couldn't register with service discovery protocol, continuing anyway\n");
|
|
}
|
|
Index: rsync-3.2.2/daemon-parm.txt
|
|
===================================================================
|
|
--- rsync-3.2.2.orig/daemon-parm.txt
|
|
+++ rsync-3.2.2/daemon-parm.txt
|
|
@@ -11,6 +11,7 @@ STRING socket_options NULL
|
|
INTEGER listen_backlog 5
|
|
INTEGER rsync_port|port 0
|
|
INTEGER slp_refresh 0
|
|
+BOOL use_slp False
|
|
|
|
BOOL proxy_protocol False
|
|
|
|
Index: rsync-3.2.2/rsyncd.conf.5.md
|
|
===================================================================
|
|
--- rsync-3.2.2.orig/rsyncd.conf.5.md
|
|
+++ rsync-3.2.2/rsyncd.conf.5.md
|
|
@@ -136,6 +136,11 @@ a literal % into a value is to use %%.
|
|
You can override the default backlog value when the daemon listens for
|
|
connections. It defaults to 5.
|
|
|
|
+0. `use slp`
|
|
+
|
|
+ This parameter is used to determine if the module names are advertised via
|
|
+ slp. The default is disabled, which won't advertise your public modules.
|
|
+
|
|
0. `slp refresh`
|
|
|
|
This parameter is used to determine how long service advertisements are
|
|
Index: rsync-3.2.2/main.c
|
|
===================================================================
|
|
--- rsync-3.2.2.orig/main.c
|
|
+++ rsync-3.2.2/main.c
|
|
@@ -1366,11 +1366,14 @@ static int start_client(int argc, char *
|
|
if (shell_machine && !shell_machine[0]) {
|
|
#ifdef HAVE_LIBSLP
|
|
/* User entered just rsync:// URI */
|
|
- print_service_list();
|
|
- exit_cleanup(0);
|
|
-#else /* No SLP, die here */
|
|
+ if (lp_use_slp()) {
|
|
+ print_service_list();
|
|
+ exit_cleanup(0);
|
|
+ } else {
|
|
+ rprintf(FINFO, "SLP is disabled, cannot browse\n");
|
|
+ }
|
|
+#else /* No SLP */
|
|
rprintf(FINFO, "No SLP support, cannot browse\n");
|
|
- exit_cleanup(RERR_SYNTAX);
|
|
#endif
|
|
}
|
|
|
|
Index: rsync-3.2.2/socket.c
|
|
===================================================================
|
|
--- rsync-3.2.2.orig/socket.c
|
|
+++ rsync-3.2.2/socket.c
|
|
@@ -536,7 +536,7 @@ void start_accept_loop(int port, int (*f
|
|
int *sp, maxfd, i;
|
|
#ifdef HAVE_LIBSLP
|
|
time_t next_slp_refresh;
|
|
- short slp_timeout = lp_slp_refresh();
|
|
+ short slp_timeout = lp_use_slp() ? lp_slp_refresh() : 0;
|
|
if (slp_timeout) {
|
|
if (slp_timeout < SLP_MIN_TIMEOUT)
|
|
slp_timeout = SLP_MIN_TIMEOUT;
|
|
Index: rsync-3.2.2/rsyncd.conf.5
|
|
===================================================================
|
|
--- rsync-3.2.2.orig/rsyncd.conf.5
|
|
+++ rsync-3.2.2/rsyncd.conf.5
|
|
@@ -132,6 +132,10 @@ can also be specified via the \fB\-\-soc
|
|
.IP "\fBlisten\ backlog\fP"
|
|
You can override the default backlog value when the daemon listens for
|
|
connections. It defaults to 5.
|
|
+.IP "\fBuse\ slp\fP"
|
|
+This parameter is used to determine if the module names are advertised
|
|
+via slp. The default is disabled, which won't advertise your public
|
|
+modules.
|
|
.IP "\fBslp\ refresh\fP"
|
|
This parameter is used to determine how long service advertisements are
|
|
valid (measured in seconds), and is only applicable if you have Service
|